exonum v0.7 Release Notes
Release Date: 2018-04-11 // about 6 years ago-
๐ฅ Breaking Changes
exonum
๐ POST-requests are now handled with
bodyparser
crate, so all the parameters must be passed in the body. (#529)ProofListIndex
andProofMapIndex
root_hash
method has been renamed tomerkle_root
. (#547)Proofs of existence / absence for
ProofMapIndex
s have been reworked. They now have a linear structure with two components: key-value pairs, and additional proof information allowing to restore the Merkle root of the entire index.MapProof
interface has been reworked correspondingly. (#380)
Migration path:
- Consult documents for the updated workflow for creation and verification
of
MapProof
s. See the README in the
storage::proof_map_index
module for theoretical details about the new proof structure.with_prefix
constructor of all index types has been renamed tonew_in_family
. Now it usesindex_id
instead of prefixes. Moreover,blockchain::gen_prefix
method has been removed. Instead, any type that implementsStorageKey
trait, can serve as anindex_id
. (#531)- Several
Schema
's methods have been renamed (#565):
tx_location_by_tx_hash
totransactions_locations
.block_txs
toblock_transactions
.SystemTime
previously used as storage key or value turned out to show different behavior on different platforms and, hence, has been replaced withchrono::DateTime<Utc>
that behaves the same in any environment. (#557)
Migration path:
- Replace all
SystemTime
fields withchrono::DateTime<Utc>
ones. Use
DateTime::from
andinto()
methods to convert your existingSystemTime
instances into suitable type when constructing transactions or working with database.Blockchain
methodtx_from_raw()
now returnsResult<Box<Transaction>, MessageError>
instead ofOption<Box<Transaction>>
. (#567)events
module becomes private. (#568)CryptoHash
trait is no longer implemented forHash
. (#578)- ๐
network_id
attribute has been removed fromNodeInfo
andRawMessage
.HEADER_LENGTH
remains the same, first byte ofRawMessage
is now reserved and always set to0
. (#579) exonum::explorer
module has been reworked to add new functionality. (#535, #600) In particular:
The explorer now allows to iterate over blocks in the blockchain in the given height range, replacing old
blocks_range
method.block_info
andtx_info
methods of the explorer are renamed toblock
andtransaction
respectively.TransactionInfo
moved from theapi::public
module to theexplorer
module.BlocksRange
moved from theexplorer
module to theapi::public
module.TxInfo
is renamed toCommittedTransaction
.BlockInfo
fields are private now, yet accessible with getter methods.
Migration path:
- Rename imported types and methods as specified above
- Use explicit type parameter in
TransactionInfo
andCommittedTransaction
(e.g.,TransactionInfo<serde_json::Value>
orTransactionInfo<MyTransaction>
) if you need to deserialize transaction-related data returned from the explorer HTTP API. Consult
explorer
module docs for further possible changes in API.validators-count
command-line parameter has been added. Now, when generating config template usinggenerate-template
command, you must specify the number of validators. (#586)- ๐
majority_count
parameter has been added to theStoredConfiguration
. Seeexonum-configuration
changes for more details. (#546)
โ exonum-testkit
- โช Rollback mechanism in
Testkit
is reworked to work with checkpoints (#582):- old
rollback
by blocks inTestkit
was removed; checkpoint
method was introduced to set checkpoints;- new
rollback
rolls back to the last set checkpoint.
- old
Migration path:
Replace every old
rollback(blocks)
by a pair ofcheckpoint()
androllback()
.- โ Testkit api now contains two methods to work with the transaction pool (#549):
is_tx_in_pool
- for checking transaction existence in the pool;add_tx
- for adding a new transaction into the pool.
Migration path:
Instead of calling
mempool()
, one should useis_tx_in_pool
oradd_tx
methods.- โ
TestKitApi::get_err
method now returnsApiError
, rather than a deserialized object, as it is forget
. For checking such results in tests you may want to useassert_matches
.
- โ
๐ง exonum-configuration
- ๐ง
majority_count: Option<u16>
configuration parameter is introduced. Allows to increase the threshold amount of votes required to commit a new configuration proposal. By default the number of votes is calculated as 2/3 + 1 of total validators count. (#546)
exonum-time
SystemTime
has been replaced withchrono::DateTime<Utc>
, as it provides more predictable behavior on all systems. (#557)
๐ New Features
exonum
ExecutionError::with_description
method now takesInto<String>
instead ofString
which allows to pass&str
directly. (#592)๐ New
database
field added to theNodeConfig
. This optional setting adjusts database-specific settings, like number of simultaneously opened files. (#538)ExecutionError::with_description
method now takesInto<String>
instead ofString
which allows to pass&str
directly. (#592)๐ New
database
field added to theNodeConfig
. This optional setting adjusts database-specific settings, like number of simultaneously opened files. (#538)โ Added
v1/user_agent
endpoint with information about Exonum, Rust and OS versions. (#548)ProofMapIndex
now allows to retrieve a proof of presence / absence for an arbitrary number of elements at one time with the help ofget_multiproof
method. Correspondingly,MapProof
allows to verify proofs for an arbitrary number of elements. (#380)storage::UniqueHash
trait that represents a unique, but not necessary cryptographic hash function, is introduced. (#579)โ Added the opportunity to parse configuration files with missing empty structures. Fields of such structures are equal to the default values. (#576)
CryptoHash
,Field
,StorageKey
andStorageValue
traits are implemented for theuuid::Uuid
. (#588)Display
trait is implemented for types from thecrypto
module. (#590)transactions!
macro now allows empty body. (#593)
โ exonum-testkit
create_block*
methods of theTestKit
now return the information about the created block. (#535)โ
TestKit::explorer()
method allows to access the blockchain explorer. (#535)
exonum-cryptocurrency-advanced
- A more complex example has been added featuring best practices for service writing. (#595)
Internal Improvements
exonum
RawTransaction
now has its own implementation offmt::Debug
trait instead of#[derive(Debug)]
. The template ofRawTransaction
โs debug message isTransaction { version: #, service_id: #, message_type: #, length: #, hash: Hash(###) }
. (#603)Non-committed transactions are now stored persistently in the storage instead of memory pool. (#549)
๐ Sandbox tests have been moved inside of the exonum core. (#568)
The requested transactions in the
TransactionsRequest
are now sent by batches, rather than one by one. The number of batches depends on the size limits of the message. (#583)
โ exonum-testkit
- โ
Request logging for
TestKitApi
now encompasses all requests. The log format is slightly changed to allow for the generic request / response form. (#601)