Release notes – ndau v1.2.1

  1. Home
  2. Knowledge Base
  3. Software Release Notes
  4. Release notes – ndau v1.2.1

NOTE: Testnet has been upgraded to v1.2.1, but Mainnet is currently still running v1.2.0. Mainnet will be upgraded to v1.2.1 in the near future.

Overview

This document outlines the changes between ndau v1.2.0 and v1.2.1.

ndau blockchain changes

No new transactions have been added and no transaction semantics have changed. The v1.2.1 blockchain is playback-compatible with v1.2.0

ndau API changes

/block/before

Fixed documentation for its expected behavior. The before suggests that the given block will not be included in the results, but it is. So think of “before” as “on or before”. This is similar to the behavior of the new /transaction/before endpoint. It’s inclusive.

/transaction

This endpoint is still supported but deprecated and will be removed in the future. It is replaced by the more usable and informative /transaction/detail endpoint.

/transaction/detail

The format of the response has changed. Here is an example of the new format:

 {
  "BlockHeight": 30000,
  "TxOffset": 0,
  "Fee": 1000000,
  "SIB": 0,
  "TxHash": "abcdefghijklmnopqrstuv",
  "TxType": "Transfer",
  "TxData": {
    "source": "nda...",
    "destination": "nda...",
    "qty": 1000000000,
    "sequence": 100,
    "signatures": [
      "abc123..."
    ]
  },
  "Timestamp": "2018-07-10T20:01:02Z"
 } 

The "Tx" and "TxBytes" objects have been removed. The following objects have been added:

  • "TxHash"
    • The transaction’s unique hash.
  • "TxType"
  • "TxData"
    • The transaction-specific data. This object differs for each transaction type. The previous format was not fully deserializing all of the transaction’s fields. The new format is intended to be easier to interpret and more convenient for consumption.
  • "Timestamp"
    • The timestamp of the block that contains the transaction. It’s the time when the block was committed to the blockchain. All transactions in a block share the same timestamp.

/transaction/before

This endpoint has been added to the API (live on Testnet, currently pending on Mainnet). The documentation for it can be found in the ndauapi README.md file (also here). But here it is, for convenience:


GET /transaction/before/:txhash

Returns a sequence of transaction metadata for transactions on or before a given transaction hash.

Parameters:

NameKindDescriptionDataType
txhashPathOnly transactions on or before this will be returned. Use 'start' to get the most recent page of transactions. Use a numeric block height to get transactions in and before that blockstring
typeQueryCase-insensitive transaction type name to filter by. Use multiple instances of this parameter to get results for multiple transaction types. Leave off to get transactions of any typestring
limitQueryThe maximum number of items to return. Use a positive limit, or 0 for getting max results; default=0, max=100int

Produces: [application/json]

Writes:

 {
  "Txs": [
    {
      "BlockHeight": 1234,
      "TxOffset": 3,
      "Fee": 0,
      "SIB": 0,
      "TxHash": "123abc34099f",
      "TxType": "Lock",
      "TxData": {
        "target": "ndamgmmntjwhq37gi6rwpazy4fka6zgzix55x85kkhepvuue",
        "period": "1m",
        "sequence": 1234,
       "signatures": null
      },
      "Timestamp": "2018-07-10T20:01:02Z"
    }
  ],
  "NextTxHash": "123abc34099f" } 

Response object

  • "Txs"
    • The transaction elements in this list have the same format as the response from the /transaction endpoint, documented earlier. Will be null if there are no results.
  • "NextTxHash"
    • This is the transaction hash to use on the next call to /transaction/before to return the next page of results. It will be "" if there are no more pages after the one just returned.
  • If a hash was given but is not valid, then null is returned instead of an object with nil/empty "Tx" and "NextTxHash" fields.

Internal improvements

  • Minor logging enhancements
  • Compatibility fixes for upgraded noms
  • Compatibility fixes for upgraded tendermint
  • Refactored ndau API to be mockable

Dependency changes

  • Upgraded github.com/alexflint/go-arg from v1.0.0 to v1.1.0
  • Using github.com/alecthomas/template revision fb15b899a75114aa79cc930e33c46b577cc664b1
  • Using github.com/alecthomas/units revision c3de453c63f4bdb4dadffab9805ec00426c505f7
  • Using github.com/attic-labs/kingpin versionv2.2.6
  • Upgraded github.com/attic-labs/noms to revision 1d6d4689808c155bccec3764720abfcb4ff9a3e7
  • Using github.com/libp2p/go-buffer-pool version v0.0.2
  • Upgraded github.com/tendermint/tendermint from v0.31.7 to v0.32.3
  • Using github.com/tendermint/tm-db version v0.1.1

Was this article helpful?

Related Articles

Download the ndau Wallet

ndau Wallet downloadndau Wallet download