Skip to content

Version 1.0.1

Compare
Choose a tag to compare
@vsuharnikov vsuharnikov released this 25 Jul 08:14
· 739 commits to master since this release

In this release

Migration

This migration is mandatory. It is required to provide a correct information about fees in REST API.

Run after update:

  • for mainnet: sudo -u waves waves -main com.wavesplatform.dex.MatcherTool /path/to/config oi-migrate
  • for testnet: sudo -u waves-testnet waves-testnet -main com.wavesplatform.dex.MatcherTool /path/to/config oi-migrate

Probably, you will see:

Can't parse the ...

There are very old orders, those weren't migrated a long time ago and it's okay to delete them.

Depending on the machine configuration the migration could take ≈12 minutes for each 100 millions of orders. Also the migration is idempotent and leaves the DB in the correct state even it ran multiple times.

Changes

New

The matcher fee in REST API

Getting a single order's information

Added filledFee in JSON for methods:

  • GET /orderbook/{amountAsset}/{priceAsset}/{orderId}
Sample responses

Before:

{
  "status": "Filled",
  "filledAmount": 754859
}

Now:

{
  "status": "Filled",
  "filledAmount": 754859,
  "filledFee": 700000
}

Getting a multiple orders' information

Added fee, filledFee and feeAsset fields in JSON for methods:

  • GET /orderbook/{amountAsset}/{priceAsset}/publicKey/{publicKey}
  • GET /orderbook/{publicKey}
  • GET /orders/{address}
Sample responses

Before:

[
  {
    "id": "D3mniK9HoDvF8eMSDqd5eAE1og2fpa2VVP4d9BeTKV7C",
    "type": "sell",
    "amount": 54999997,
    "price": 1000,
    "timestamp": 1559646820853,
    "filled": 0,
    "status": "Cancelled",
    "assetPair": {
      "amountAsset": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8",
      "priceAsset": "Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck"
    }
  },
  {
    "id": "BQHKXPr13r4fXVbB4q8e1XAoz5SsPfj9rDtVpbHgxCCx",
    "type": "buy",
    "amount": 5000000,
    "price": 39499999,
    "timestamp": 1559646738907,
    "filled": 4999998,
    "status": "Filled",
    "assetPair": {
      "amountAsset": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8",
      "priceAsset": null
    }
  }
]

Now:

[
  {
    "id": "D3mniK9HoDvF8eMSDqd5eAE1og2fpa2VVP4d9BeTKV7C",
    "type": "sell",
    "amount": 54999997,
    "fee": 300000,
    "price": 1000,
    "timestamp": 1559646820853,
    "filled": 0,
    "filledFee": 0,
    "feeAsset": null,
    "status": "Cancelled",
    "assetPair": {
      "amountAsset": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8",
      "priceAsset": "Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck"
    }
  },
  {
    "id": "BQHKXPr13r4fXVbB4q8e1XAoz5SsPfj9rDtVpbHgxCCx",
    "type": "buy",
    "amount": 5000000,
    "fee": 300000,
    "price": 39499999,
    "timestamp": 1559646738907,
    "filled": 4999998,
    "filledFee": 299999,
    "feeAsset": null,
    "status": "Filled",
    "assetPair": {
      "amountAsset": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8",
      "priceAsset": null
    }
  }
]

Numbers in errors in a human-readable format

All amount, prices and fees are in human-readable format in errors. Before this update you may see long numbers, now you will see a floating point values those correspond to your intuition about an asset.

For example, you may see "12345000000 WAVES" before in errors, now you will see "123.45 WAVES".

Other changes

  • The NODE dependency is updated to 1.0.2;
  • Now the DEX's version is show correctly in Swagger;
  • A DEX's deb package now depends on exact NODE's deb version. Previously we have issues with changed internal API, those led to unstable DEX work;
  • A new cool tool to make releases, see README.md :)
  • Updated other dependencies: [email protected];
  • Improved logs for AskTimeoutException;

Fixes

Fixed issue with order placement on new scripts

Previously, users have issues with order placement on accounts with scripts like this:

{-# STDLIB_VERSION 3 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}

@Verifier(x)
func verifier() = {
    match(x) {
      case o: Order =>true
      case _ => false
    }
}

Also now we catch all blockchain's access during an order's validation. All new functions those doesn't require a blockchain's access will be supported automatically in future. But the errors will be less readable if you trying, for example, to obtain account's data. Waiting for news from Smart Contracts Team!

SHA256 Checksums

9542468070ebef8cd2cb468b7bb3ab5135cda50306d3f2c07a216dc124e4a416 dex-1.0.1.tgz
e5159cb8fbbbed2dd777b1dd7de021a377ac41532210fdb577389ec5c64e5fe5 dex_1.0.1_all.deb
689a0aa5899cbf0098019ba4f51c1d6bf6cc66ec4f0dd034baebfaf67008a734 dex-testnet-1.0.1.tgz
61032a0c1033964b33ba872f3a7b502392ac9a0b5510a07835fd6a83556b6a5e dex-testnet_1.0.1_all.deb