exonum v0.12.0 Release Notes
Release Date: 2019-08-14 // over 4 years ago-
๐ฅ Breaking changes
exonum
- ๐ Module
storage
has been replace byexonum-merkledb
crate. See related section Signatures of methods
Service::initialize
andService::before_commit
has been changed. Now they take immutable reference toFork
instead of mutable. (#1293)Trait
BinaryForm
has been replaced byBinaryValue
. (#1298)
To implement
BinaryValue
for types that implementsProtobuf::Message
useimpl_binary_value_for_pb_message
macros.๐ Module
storage
has been replaced byexonum-merkledb
crate. See related section in changelog for details. (#1293)Bootstrapping workflow has been simplified (#1292)
generate-config
subcommand now uses singleOUTPUT_DIR
instead of set of options. So to generate node config you should write something like example bellow.cargo run --bin exonum-timestamping -- \ generate-template /tmp/exonum/template.toml --validators-count 4 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/0 \ --peer-address 0.0.0.0:8000 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/1 \ --peer-address 0.0.0.0:8001 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/2 \ --peer-address 0.0.0.0:8002 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/3 \ --peer-address 0.0.0.0:8003 cargo run --bin exonum-timestamping -- \ finalize /tmp/exonum/nodes/0/sec.toml /tmp/exonum/nodes/0/node.toml \ --public-configs /tmp/exonum/cfg/{0,1,2,3}/pub.toml cargo run --bin exonum-timestamping -- \ run -d /tmp/exonum/db/0 -c /tmp/exonum/nodes/0/node.toml
explorer/v1/block
endpoint returns a response in a "flat" format. (#1386)explorer/v1/blocks
endpoint withadd_blocks_time
param switched on now returns median precommit times in thetime
field within each returned block, rather than in a separate array. (#1278)system/v1/mempool
endpoint has been renamed intosystem/v1/stats
. An additional field in the response of the endpoint was added. The field corresponds to the total number of transactions in the blockchain. (#1289)system/v1/mempool
endpoint has been renamed intosystem/v1/stats
. An additional field in the response of the endpoint was added. The field corresponds to the total number of transactions in the blockchain. (#1289)
exonum-merkledb
โ Added restrictions to index names. Allowable characters in index name: ASCII characters, digits, underscores and dashes. (#1388)
โ Added
Debug
implementation forDatabase
,Snapshot
,Iterator
dynamic traits (#1363)๐ Changed storage layout (#1293)
- Changed indexes metadata layout in the database.
- Introduced a generic
IndexState
structure that can be used to store global index properties like total number of items.
๐ Changed
ProofMapIndex
hashing rules for branch nodes and root node. Branch nodes is hashing now with 0x04 prefix, root node with 0x03 (#1293).๐ Renamed method
merkle_root
ofProofMapIndex
andProofListIndex
toobject_hash
(#1293).Several mutable indexes now can be create from immutable reference to
Fork
(#1293)๐ Relaxed trait bounds for the
ProofMapIndex
keys (#1293)
Now keys should just implement
BinaryKey
trait instead of theProofMapKey
, which will be ordered according to their binary representation, as in theMapIndex
.๐ Changed
ProofListIndex
hashing rules for leaf nodes and branch nodes according to the certificate transparency specification. Leaf nodes contain hashes with 0x00 prefix, branch nodes - with 0x01. (#1293)StorageValue
andStorageKey
have been renamed to theBinaryValue
andBinaryKey
. (#1293)- Added
to_bytes
method to theBinaryValue
trait which doesn't consume original value instead of theinto_bytes
. BinaryKey::write
now returns total number of written bytes.CryptoHash
has been replaced by theObjectHash
.
- Added
๐ Changed the hash algorithm of the intermediate nodes in
ProofMapIndex
. (#1293)
ProofPath
now uses compact binary representation in theBranchNode
hash calculation.Binary representation is
|bits_len|bytes|
, where:- bits_len - total length of the given
ProofPath
in bits compressed by theleb128
algorithm - bytes - non-null bytes of the given
ProofPath
, i.e. the first(bits_len + 7) / 8
bytes.
exonum-crypto
- โ Removed deprecated
CryptoHash
trait, useexonum-merkledb::ObjectHash
instead (#1361)
๐ New features
exonum
๐ New endpoint:
v1/transactions/subscribe
, which subscribe to new transaction events. This endpoint accept optional parameters:service_id
andmessage_id
(message_id
as in derive macroTransactionSet
). (#1335)๐ New endpoint:
v1/ws
, which open websocket connection and allow to set multiple subscription (for blocks and transaction, filtered by service and transaction id) and send transactions (in hex, like in explorer) to blockchain (examples can be found in related pull request). (#1335)
๐ Bug Fixes
โ exonum-testkit
- ๐ Fixed
TestKit::add_tx()
method, which previously did not persist transactions. (#1278)
Internal improvements
exonum
๐
explorer/v1/blocks
endpoint supportsadd_precommits
param, which supplies each returned block with theprecommits
field. (#1278)explorer/v1/blocks
endpoint allows to specify the lower bound on the returned block height with theearliest
query param. (#1278)โ Added
ProtobufConvert
implementation for byte array with fixed sizes (#1279)โ Added
service_name
getter to theTransactionContext
. (#1274)๐ Allowed to use symbol
-
in index names. (#1277)rocksdb
crate is now used instead ofexonum_rocksdb
. (#1286)โ Added a new endpoint
system/v1/services
for displaying information about available services. (#1288)Endpoints
explorer/v1/block
andexplorer/v1/transactions
were extended with adding additional fieldsservice_id
andtime
. (#1386)โ Added
tx_cache
field toState
to cache incoming transactions before adding them to persistent pool. (#1398)โ Added new request message
PoolTransactionsRequest
to obtain pool transactions from another peers. (#1404)Endpoints
explorer/v1/block
andexplorer/v1/transactions
were extended with adding additional fieldsservice_id
andtime
. (#1386)
exonum-merkledb
- โก๏ธ Updated
ProofMapIndex
data layout. (#1293)
Path to the root node in merkle patricia tree now has been stored in the index state.
๐ New API for getting and creating indexes. (#1293)
- Now indexes can be accessed via immutable references from
Snapshot
and mutable/immutable references fromFork
. - Introduced method
fork::get_object
to get or create object by address. get_object_existed
andget_object_existed_mut
methods ofFork
andSnapshot
returns optional references to index.
- Now indexes can be accessed via immutable references from
rocksdb
crate is now used instead ofexonum_rocksdb
. (#1286)โ Added a new endpoint
system/v1/services
for displaying information about available services. (#1288)rocksdb
crate is now used instead ofexonum_rocksdb
. (#1286)โ Added
From<Patch>
trait implementation toFork
. (#1403)
โ exonum-testkit
- โ
Implemented "stopping" and "resuming" a
TestKit
, allowing to emulate node restarts. (#1278)
- ๐ Module