exonum v0.9.0 Release Notes
Release Date: 2018-07-19 // almost 6 years ago-
๐ฅ Breaking Changes
exonum
Command
trait inhelpers::fabric
module became public. (#778)
Migration path:
If you override
ServiceFactory::command
method and do a match by a command name, just adduse helpers::fabric::Command
import.๐
schema_version
field inBlock
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 onactix-web
. (#727)
Migration path:
For backend:
- Remove old dependencies on
iron
and its companionsbodyparser
,router
and others. Simplify the API handlers as follows:
fn my_handler(state: &ServiceApiState, query: MyQueryType) -> Result<MyResponse, ApiError> { // ... }
where
MyQueryType
type implementsDeserialize
trait andMyResponse
implementsSerialize
trait.Replace old methods
public_api_handler
andprivate_api_handler
ofService
trait by a singlewire_api
method which takesServiceApiBuilder
. You can use this builder as a factory for your service API.get
,get_err
andpost
methods inTestKitApi
have been replaced by the more convenientRequestBuilder
. 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 likeGET api/my_method/:first/:second
should be replaced by theGET api/my_method?first=value1&second=value2
. - JSON parser for
POST
requests is now more strict. In this way you should sendnull
in request body even for handlers without query parameters.
See our [examples](examples) for more details.
storage::base_index
module has become private along withBaseIndex
andBaseIndexIter
types. (#723)ServiceFactory
trait has been extended withservice_name
function.(#730)๐ Method
name
has been removed fromRun
,GenerateCommonConfig
,GenerateNodeConfig
,Finalize
,GenerateTestnet
andMaintenance
structures (helpers/fabric
module). (#731)Whitelist
has been replaced byConnectList
. 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 example16ef83ca...da72 = "127.0.0.1:6333"
.- Healthcheck and consensus endpoints (
v1/healthcheck
andv1/consensus_status
) have been merged tov1/healthcheck
. (#736, #766) - โก๏ธ Node configuration file is now updated at
ConnectList
update. This is achieved via newConfigManager
entity. (#777)
- Healthcheck and consensus endpoints (
Migration path (required only if you create
Node
manually):If you need to update
ConnectList
on file system, passSome(path_to_node_config)
as the last argument of theNode::new
method. Otherwise, passNone
.exonum::crypto
types now have truncatedDisplay
/Debug
representations. (#797)
Migration path:
Use
encoding::serialize::ToHex
instead ofDisplay
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 ofFromStr
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 withtake
andswap
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 theEntry
index. (#790)โ Added missing
external_address
field to the auditor final configuration. (#805)
Internal Improvements
BlockResponse
sends transactions byHash
instead ofRawMessage
. 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)