exonum v0.9.0 Release Notes

Release Date: 2018-07-19 // almost 6 years ago
  • ๐Ÿ’ฅ Breaking Changes

    exonum

    • Command trait in helpers::fabric module became public. (#778)

    Migration path:

    If you override ServiceFactory::command method and do a match by a command name, just add use helpers::fabric::Command import.

    • ๐Ÿšš schema_version field in Block has been removed. (#774)

    • Storage in exonum is now versioned. Old databases will not work with this update. (#707)

    • ๐ŸŒ Iron-based web API has been replaced by the new implementation based on actix-web. (#727)

    Migration path:

    For backend:

    • Remove old dependencies on iron and its companions bodyparser, router and others.
    • Simplify the API handlers as follows:

      fn my_handler(state: &ServiceApiState, query: MyQueryType)
      -> Result<MyResponse, ApiError>
      {
        // ...
      }
      

      where MyQueryType type implements Deserialize trait and MyResponse implements Serialize trait.

    • Replace old methods public_api_handler and private_api_handler of Service trait by a single wire_api method which takes ServiceApiBuilder. You can use this builder as a factory for your service API.

    • get, get_err and post methods in TestKitApi have been replaced by the more convenient RequestBuilder. Don't forget to update your testkit-based API tests.

    For frontend:

    • New API implementation supports only query parameters in GET requests. In this way requests like GET api/my_method/:first/:second should be replaced by the GET api/my_method?first=value1&second=value2.
    • JSON parser for POST requests is now more strict. In this way you should send null in request body even for handlers without query parameters.

    See our [examples](examples) for more details.

    • storage::base_index module has become private along with BaseIndex and BaseIndexIter types. (#723)

    • ServiceFactory trait has been extended with service_name function.(#730)

    • ๐Ÿšš Method name has been removed from Run, GenerateCommonConfig, GenerateNodeConfig, Finalize, GenerateTestnet and Maintenance structures (helpers/fabric module). (#731)

    • Whitelist has been replaced by ConnectList. Now connection between nodes can only be established if nodes exist in each other's connect lists. (#739)

    Migration path:

    • Replace [whitelist] section in config with [connect_list.peers] section and specify here all validators' consensus public keys with corresponding ip-addresses. For example 16ef83ca...da72 = "127.0.0.1:6333".

      • Healthcheck and consensus endpoints (v1/healthcheck and v1/consensus_status) have been merged to v1/healthcheck. (#736, #766)
      • โšก๏ธ Node configuration file is now updated at ConnectList update. This is achieved via new ConfigManager entity. (#777)

    Migration path (required only if you create Node manually):

    If you need to update ConnectList on file system, pass Some(path_to_node_config) as the last argument of the Node::new method. Otherwise, pass None.

    • exonum::crypto types now have truncated Display/Debug representations. (#797)

    Migration path:

    Use encoding::serialize::ToHex instead of Display to produce full hexadecimal representation. You have to manually check if you need to switch or can keep using the truncated representation.

    Use encoding::serialize::FromHex instead of FromStr for reverse conversion. FromStr implementation has been removed from crypto types to avoid errors.

    ๐Ÿ†• New Features

    exonum

    • Existing sodiumoxide-based cryptographic backend behind opt-out sodiumoxide-crypto feature. It also allows to use your own cryptographic library with exonum. (#756)

    • ๐Ÿ†• New kind of CLI commands has been added: info command that can be used for getting various information from a node that has not been started yet. (#731) Currently supported sub-commands:

      • core-version - prints Exonum version as a plain string.
      • list-services - prints the list of the services the node is built with in the JSON format.
    • exonum::crypto::x25519 module to convert keys from Ed25519 to X25519 format has been introduced. (#722)

    • storage::Entry has been extended with take and swap methods. (#781)

    • โž• Added remote public key validation when handling incoming Connect message. (#786)

    ๐Ÿ› Bug Fixes

    exonum

    • ๐Ÿ›  Fixed bug with incorrect peer status for a turned-off node. (#730)

    • โš  handle_consensus does not write warning for message from previous height any more. (#729)

    • new_in_family constructor has been added to the Entry index. (#790)

    • โž• Added missing external_address field to the auditor final configuration. (#805)

    Internal Improvements

    • BlockResponse sends transactions by Hash instead of RawMessage. If the node does not have some transactions, requests are created for the corresponding transactions. Due to these changes, the block size became significantly smaller. (#664)