All notable changes to this project will be documented in this file. The project adheres to Semantic Versioning.
-
The
--allow-origin
parameter has been added to thefinalize
command. -
IPv6 addressing is now supported. (#615)
-
Field
,CryptoHash
,StorageValue
andExonumJson
traits have been implemented forchrono::Duration
structure. (#653)
- Additional service example has been added along with frontend. (#646)
-
Already processed transactions are rejected now in
NodeHandler::handle_incoming_tx
method. (#642) -
Fixed bug with shutdown requests handling. (#666)
- Frontend has been updated to reflect latest backend changes. (#602 #611)
-
Default implementation of
check
method was added toField
trait to reduce boilerplate. (#639) -
Metrics are now using
chrono::DateTime<Utc>
instead ofSystemTime
. (#620)
- Split service components to separate modules. (#604)
- Method
ProposeData::set_history_hash
has been removed. (#604)
-
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.
- Consult documents for the updated workflow for creation and verification
of
-
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.
- Replace all
-
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.
- The explorer now allows to iterate over blocks in the blockchain in the
given height range, replacing old
-
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)
-
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.
Migration path:
- Replace every old
rollback(blocks)
by a pair ofcheckpoint()
androllback()
.
- old
-
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
.
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)
SystemTime
has been replaced withchrono::DateTime<Utc>
, as it provides more predictable behavior on all systems. (#557)
-
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)
-
create_block*
methods of theTestKit
now return the information about the created block. (#535) -
TestKit::explorer()
method allows to access the blockchain explorer. (#535)
- A more complex example has been added featuring best practices for service writing. (#595)
-
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)
- Request logging for
TestKitApi
now encompasses all requests. The log format is slightly changed to allow for the generic request / response form. (#601)
-
exonum::crypto::CryptoHash
trait is introduced, andStorageValue::hash
andMessage::hash
methods are removed. (#442)Migration path:
- For implementations of
StorageValue
, move thehash
method toCryptoHash
implementation instead. - For implementations of
Message
simply removehash
method, there's a blanket impl ofCryptoHash
forMessage
. - Add
use exonum::crypto::CryptoHash
to use thehash
method.
- For implementations of
-
The
StorageKey
trait is re-implemented for signed integer types (i8
,i16
,i32
andi64
) to achieve the natural ordering of produced keys. (#443)This change will break indices using signed integers as keys. To emulate the old implementation, you may create a wrapper around a type (e.g.,
struct QuirkyI32Key(i32)
) and implementStorageKey
for it using big endian encoding. Then, use the wrapper instead of the int type in indices. See the unit tests forStorageKey
for an example. -
Transaction::execute
method now returnsTransactionResult
that is stored in the blockchain and can be accessed through api. The changes made by transactions that returnErr
are discarded. To migrate, addOk(())
as the last line to theexecute
method. More generally, make sure that the method returnsOk(())
on successful execution. (#385) -
Service transactions are now defined through
transactions!
macro that automatically assigns transaction IDs based on the declaration order. (#457)Migration path:
- Move all separate transactions declared as
message!
into onetransactions!
macro. - Remove
ID
constants. - Replace
TYPE
constants with a singleSERVICE_ID
constant.
- Move all separate transactions declared as
-
Several variants were removed from
ApiError
enum. (#474)Migration path:
- Use generic
ApiError::BadRequest
variant or createIronError
directly.
- Use generic
-
CommandExtension
usesfailure::Error
instead ofBox<std::error::Error>
for errors. (#474)Migration path:
std::error::Error
can be converted tofailure::Error
via.into()
method.
-
storage::Error
implementsfailure::Fail
instead ofstd::error::Error
. (#474) -
CryptoHash
for()
now correctly calculates a hash of an empty byte array instead of returningHash::zero()
. (#483) -
Removed the
'static
bound from the return value of theblockchain::Service::service_name()
method. (#485) -
StorageKey
trait now requiresToOwned
implementation. (#392) -
Connect
message has been extended with a user agent string, which breaks binary compatibility with previous versions. (#362) -
Log output become more human-readable. Now it uses
rfc2822
for time formatting. This change can break scripts that analyze the log output. (#514) -
output_dir
argument of thegenerate-testnet
command has been renamed tooutput-dir
. (#528) -
peer_addr
argument of thegenerate-config
command has been renamed topeer-address
. (#528) -
Blockchain::new
andNode::new
now acceptInto<Arc<Database>>
instead ofBox<Database>
. (#530)Migration path:
- Just pass database argument as is, for example instead of
Box::new(MemoryDb::new())
useMemoryDb::new()
.
- Just pass database argument as is, for example instead of
-
Most types renamed to avoid stuttering (see here for an explanation of the term) (#496):
ConfigurationService
toService
ConfigurationServiceFactory
toServiceFactory
TxConfigPropose
toPropose
TxConfigVote
toVote
ConfigurationSchema
toSchema
StorageValueConfigProposeData
toProposeData
CONFIG_SERVICE
constant toSERVICE_ID
Check the crate documentation for more details.
Migration path: Rename imported types from the crate, using aliases or qualified names if necessary:
use exonum_configuration::Service as ConfigService
.
-
Multiple APIs are no longer public (#496):
- Message identifiers
- Mutating methods of the service schema
- Module implementing HTTP API of the service
Check the crate documentation for more details.
Migration path: The restrictions are security-based and should not influence intended service use.
ZEROVOTE
is replaced with theMaybeVote
type, which is now used instead ofVote
in the schema method signatures. The storage format itself is unchanged (#496).
-
The structure
Time
is removed, useSystemTime
for saving validators time inProofMapIndex
instead. (#20) -
Renamed methods
validators_time
/validators_time_mut
tovalidators_times
/validators_times_mut
inSchema
. (#20)
-
StorageKey
andStorageValue
traits are implemented forSystemTime
. (#456) -
StorageValue
andCryptoHash
traits are implemented forbool
. (#385) -
Height
implementsstd::str::FromStr
. (#474) -
v1/transactions
endpoint has been extended with the transaction execution status. (#488) -
Key-indexes interface now allows to use borrowed types for the search operations. (#392)
-
Added
v1/shutdown
endpoint for graceful node termination. (#526) -
TransactionInfo
from the public api module became public. (#537)
-
Modified signature of the
TestKitApi::send
method, which previously did not acceptBox<Transaction>
. (#505) -
Added possibility to init a logger in
TestKitBuilder
. (#524)
-
Information about configurations by
/v1/configs/actual
,/v1/configs/following
and/v1/configs/committed
endpoints is extended with the hash of the corresponding proposal and votes for the proposal (#481). -
Implemented error handling based on error codes (#496).
-
ExonumJsonDeserialize
trait is implemented forF32
andF64
. (#461) -
Added round and propose timeouts validation. (#523)
-
Fixed bug with the extra creation of the genesis configuration. (#527)
-
Fixed panic "can't cancel routine" during node shutdown. (#530)
-
Consensus messages are stored persistently (in the database), so restart will not affect the node's behavior. (#322)
-
Runtime index type checks have been implemented for every index. (#525)
- Fixed logger output. (#451)
-
The order of bytes and bits in the
DBKey
keys ofProofMapIndex
became consistent. (#419)The change influences how Merkle Patricia trees are built for
ProofMapIndex
: the bits in each byte of aDBKey
are now enumerated from the least significant bit (LSB) to the most significant bit (MSB), compared to MSB-to-LSB ordering used before. Note: this change will break old storages using map proofs. -
The
Database
trait is simplified: it is no longer required to implement state-sharingclone
method. Instead, themerge
method now takes a shared reference toself
. (#422) -
message!
andencoding_struct!
no longer require manualSIZE
and offset specification. (#413) -
from_raw(raw: RawMessage)
method is moved to theMessage
trait. To migrate, adduse exonum::messages::Message
. (#427) -
Changed iterators over
Patch
andChanges
data into custom types instead of standard collection iterators. (#393) -
Fixed typo in
SparceListIndexKeys
andSparceListIndexValues
. (#398) -
Removed default
state_hash
implementation in theService
trait. (#399) -
Removed
info
method from theTransaction
. (#402) -
Replaced config param
timeout_events_capacity
withinternal_events_capacity
. (#388) -
The
Transaction
trait now inherits fromExonumJson
. (#402) -
Renamed
DBKey
toProofPath
and moved a part of its functionality to theBitsRange
trait. (#420)
- Added
patch
method to theFork
structure. (#393) - Added a public
healthcheck
endpoint. (#405) - Added serialization support of floating point types through special wrapper
(
F32
andF64
). This feature is hidden behindfloat_serialize
gate. Note: special values (Infinity and NaN) aren't supported. (#384) - Added a possibility to set maximum message size (
pub max_message_len
field inConsensusConfig
). (#426) - Added support for CORS. (#406)
- Added
run-dev
command that performs a simplified node launch for testing purposes. (#423)
- Fixed consensus on the threshold of 1/3 sleeping validators. (#388)
- Fixed a bunch of inconsistencies and mistakes in the docs. (#439)
- Fixed a bug with message header validation. (#430)
- The list of peer connections is now restored to the latest state after the process is restarted. (#378)
- Log dependency was updated to 0.4, which can cause issues with the previous versions. (#433)
- Better error reporting for configs in the
.toml
format. (#429)
- Allow creating auditor node from command line. (#364)
- Added a new function
merge_sync
. In this function a write will be flushed from the operating system buffer cache before the write is considered complete. (#368) - Added conversion into boxed values for values which implement
Service
orTransaction
traits. (#366) - Added constructor for the
ServiceContext
which can be useful for the alternative node implementations. (#366) - Implemented
AsRef<RawMessage>
for any Exonum messages that were created using themessage!
macro. (#372) - Implemented additional checks for conversion from raw message. (#372)
- Changed a signature of
open
function in arocksdb
module.RocksDBOptions
should pass by the reference. (#369) ValidatorState
in theServiceContext
replaced by theValidatorId
. (#366)add_transaction
in theServiceContext
replaced by thetransaction_sender
which implements theTransactionSend
trait. (#366)- The
Node
constructor now requiresdb
andservices
variables instead ofblockchain
instance. (#366) - The
Blockchain
constructor now requires services keypair and anApiSender
instance. (#366) mount_*_api
methods inBlockchain
instance now do not requireApiContext
. (#366)- Rename method
last_height
toheight
inSchema
. (#379) last_block
now returnsBlock
instead ofOption<Block>
. (#379)- Replaced
rocksdb
command-line parameter to more genericdb-path
. (#376) - Obsolete trait
HexValue
replaced by theFromHex
andToHex
traits. (#372) - Changed
Patch
andChanges
from type definitions into opaque structures. (#371) - Help text is displayed if required argument is not specified. (#390)
- Removed
round
method from theServiceContext
. (#366) - Removed redundant
FromRaw
trait. (#372) - Removed redundant
current_height
method inSchema
. (#379)
- Fixed
crate_authors!
macro usage, this macro can't return static string in new clap version. (#370) - Fixed mistake in description of the height getter in the
ServiceContext
. (#366) - Fixed #15 consensus on the threshold of 1/3 sleeping validators. (#388)
- New events implementation based on the
tokio
with the separated queues for network events and timeouts and different threads for the network and node code (#300) - Added a new index
SparseListIndex
. It is a list of items stored in sequential order. Similar toListIndex
but it may contain indexes without elements (#312) - Implement
FromStr
andToString
traits for public sodium types (#318) - Add a new macro
metric!
for collecting statistical information (#329) - Make type
DBKey
public because it is used inMapProof
(#306)
RocksDB
is a default storage (#178)- Field
events_pool_capacity
inMemoryPoolConfig
replaced by the newEventsPoolCapacity
configuration (#300) - Changed a build method
new
and added a new build methodwith_prefix
for indexes (#178) - Changed a signature of
gen_prefix
function in aschema
module (#178) NodeBuilder
works withServiceFactory
as trait object instead (#357)- Debug formatting for crypto types are improved (#353)
- Added description of deserialization error for message types (#337)
- Clarified
Transaction.info()
usage (#345)
- Support of
LevelDB
is removed (#178)
- Fix the issue causing timeouts are ignored when the event pool is full (#300)
- Fix network failure due to incorrect processing of the incoming buffer (#322)
- Add
RockDB
support (#273) - Add
TimeoutAdjusterConfig
,Constant
andDynamic
timeout adjusters (#256) - Add stream hashing and signing:
HashStream
andSignStream
(#254) - Add new type definitions
Height
andValidatorId
(#262) - Fields of
BlockInfo
andTxInfo
are now public (#283) - Public export of
PROOF_MAP_KEY_SIZE
constant (#270)
MapProof
variant fields are renamed:left_hash
andright_hash
toleft_node
andright_node
(#286)RequestBlock
is renamed toBlockRequest
andBlock
is renamed toBlockResponse
(#287)- All request messages are renamed:
RequestFoo
toFooRequest
(#287) - Improve log formatting (#291 #294)
- Make panic message during command line arguments parsing cleaner (#257)
- Fix network discover failure due to incorrect processing of the incoming buffer (#299)
- Fix snapshot behavior for
MemoryDB
(#292) - Disallow generate-testnet with 0 nodes (#258)
- Fix segfault when
LevelDBSnapshot
is destroyed afterLevelDB
(#285) - Fix panic during
BlockResponse
message processing if the transaction pool is full (#264) - Fix panic during deserialization of malformed messages (#278 #297)
The first release of Exonum.