All notable changes to this project will be documented in this file. The project adheres to Semantic Versioning.
- Functionality of the
proposer
module was extended. Now, it can also be used for removing transactions from the pool of unconfirmed transactions. The module was renamed topool
and related names were updated accordingly. (#1840)
- Added a possibility to set max allowed json payload size in
node.toml
config file inapi
section (e.g.json_payload_size = 1048576
). (#1918)
-
It is now possible cache results of transaction correctness verification, which leads to a moderate improvement in node performance. (#1844)
-
Backtrace is now included into
ExecutionError
s. (#1850)
- Added a possibility to use domain names along with IP addresses on generation configs stage and in the connect list. (#1870)
- Inner rocksdb database has been replaced for in-memory data structure in TemporaryDB. (#1872)
ApiManagerConfig
was made non-exhaustive. (#1834)
- Exonum nodes now gracefully terminate on receiving SIGINT, SIGTERM
and SIGQUIT signals (on Unix platforms), or a
ctrl + c
break (on Windows). These signal handlers may be switched off by usingNodeBuilder::disable_signals()
. (#1834)
- Fixed bug in
run-dev
command. Previously, using the existing configuration files inblockchain-path
led to an error. (#1827)
create_patch
andcommit
methods inBlockchainMut
have been generalized to support block skipping (see New Features section for more details). (#1820)
run-dev
command has been reworked. It now does not clear database files after the launch.artifacts-dir
parameter has been renamed toblockchain-path
. Configuration files are now stored insideconfig
subdirectory. (#1822)
-
MigrationRequest
was made non-exhaustive. (#1823) -
POST
endpoints now expect JSON-encoded input rather than hex-encoded Protobuf. (#1823) -
supervisor_name
method was removed. UseSupervisor::NAME
instead. (#1823)
- Several constants in the
command
module became public. (#1821)
-
Exonum nodes can now customize how they create block proposals. This can be used to whitelist / blacklist transaction authors or services, prioritize transactions by advanced criteria, implement complex rate limiting, etc. The functionality is available via
pool
module. (#1820) -
Exonum nodes can now skip block generation at a certain epoch of the consensus algorithm. This can be used to keep a "heartbeat" when the network load is low without bloating the storage used by the nodes. (#1820)
ServiceApiScope::pb_endpoint_mut
allows to accept Protobuf-encoded messages with the request content type set toapplication/octet-stream
in addition to JSON-encoded messages. (#1829)
- Testkit can send Protobuf-encoded payloads to POST endpoints. (#1831)
- Introduced a workaround for the HTTP restart hanging up on Windows. (#1828)
- Fixed a bug when a node created a propose with incorrect transactions. This could lead to consensus failure or weird error messages in the node log. (#1820)
- Fixed updating HTTP endpoints if the Rust runtime does not contain active services during node start. (#1831)
DeployRequest
andMigrationRequest
now have cryptographic seeds to retry the same request multiple times. (#1823)
-
Error handling is now performed with the
anyhow
crate instead offailure
. (#1805) -
APIs which previously used futures from the
futures 0.1
crate are now madeasync
, or are usingFuture
s from the standard library. (#1796, #1804) The main affected APIs are as follows:- Endpoint definitions in the
exonum-api
crate and their counterparts inexonum-rust-runtime
- Transaction sending with
ApiSender
from theexonum
crate - Node start-up with
Node::run
(exonum-node
crate) andNodeBuilder::run
(exonum-cli
crate), and shutdown withShutdownHandle
(exonum-node
crate) - HTTP API testing with
TestKitApi
(exonum-testkit
crate)
- Endpoint definitions in the
-
Testkit now does not include incorrect transactions into blocks or memory pool, similar to real Exonum nodes. (#1785)
-
Runtime::deploy_artifact
no longer returnsBox<dyn Future<...>>
. Instead a special communication channel is used to send deployment status from the runtime to the dispatcher. (#1788) -
Schema::call_errors
was removed in favor of more comprehensivecall_records
method. (#1792) -
Blockchain::create_patch
andBlockchain::commit
signatures were changed due to unsoundness of the previous implementation; see "Bug Fixes" section for more details. (#1809) -
Replaced
CoreError::ServiceNotStopped
with the more generalInvalidServiceTransition
error. (#1806)
- Data types were made non-exhaustive where appropriate. (#1799)
NodeBuilder
was refactored to use a more intuitive set of interfaces for adding built-in artifacts and services to the blockchain. (#1800)- Submodules of the
command
module were made private; the relevant data types are now exported from thecommand
module directly. Similarly,io
module was made private. (#1799)
- Data types were made non-exhaustive where appropriate. (#1799)
impl_binary_value_for_pb_message
macro was removed. Use theBinaryValue
derive macro from theexonum-derive
crate instead. (#1805)
- Data types were made non-exhaustive where appropriate. (#1799)
- Data types were made non-exhaustive where appropriate. (#1799)
-
Public api module has been removed. List of endpoints from private api has been changed. (#1790) Current list of the endpoints:
v1/info
- obtains information about the node;v1/stats
- obtains statistics of the node;v1/peers
- adds a peer to the Exonum node;v1/consensus_status
- enables or disables consensus on the node;v1/shutdown
- shuts down the node.
-
API data types were made non-exhaustive where appropriate. (#1799)
-
TestKitBuilder
was refactored to use a more intuitive set of interfaces for adding built-in artifacts and services to the blockchain. (#1800) -
Data types were made non-exhaustive where appropriate. (#1799)
-
Exonum now supports service freezing. A frozen service has fixed state (i.e., does not process transactions and service hooks), but, unlike stopped services, the service HTTP API remains active. (#1780)
-
Core and the explorer service now support retrieving call status with a cryptographic proof of authenticity. (#1792)
-
Exonum now supports unloading of unused service artifacts. This operation may be used to free resources associated with artifacts in the runtime hosting them. (#1794)
-
Supervisor service supports service freezing. (#1781)
-
supervisor/services
endpoint has been added which obtains information about deployed artifacts and available services. (#1790) -
Supervisor service supports artifact unloading. (#1798)
-
Rust services support freezing. (#1780)
-
HTTP API of Rust services is now switched on during data migrations. (#1780)
- Testkit server now returns info on emulated nodes. (#1799)
- Core now provides more thorough / context-dependent error descriptions related to service lifecycle. (#1806)
- Index clearing now uses range deletions for RocksDB, providing a significant performance boost for this operation. (#1791)
- Fixed bug related to nodes forgetting transactions after executing a block with them. Previously, nodes forgot all transactions in the executed blocks; such transactions were removed from the ephemeral transaction cache, but were not flushed to the DB or anywhere else. This could lead to consensus hang-up. (#1809)
-
Fixed potential node hang-up if the node received a proposal and a supermajority of transactions approving it before all transactions in the proposal are known. (#1781)
-
Switched off broadcasting of transactions which the node considers incorrect. (#1781)
-
Fixed incorrect invalidation of block proposals. (#1782)
-
Provided clear coherence period for the transaction pool by introducing the
mempool.flush_config_strategy
configuration parameter. Previously, transactions were flushed to the persistent pool only on block commit. This led to the unexpected behavior of some APIs, such as the transaction getter endpoint in the explorer service. (#1809) -
Fixed race condition when two nodes try to establish outgoing connections to each other at the same time. (#1804)
-
Testkit now does not include incorrect transactions into blocks or memory pool, similar to real Exonum nodes. (#1785)
-
Added a method to get reference to the underlying API client for the
TestKitApi
. (#1811)
-
before_commit
hook was renamed to theafter_transactions
. (#1577) -
before_transactions
andafter_transactions
hooks in Rust services now return aResult
. The semantics is the same as for transactions; an error or panic in the hook will lead to the rollback of the blockchain state. (#1576) -
Errors occurring while executing transactions and
before_transactions
/after_transactions
hooks are now aggregated within each block, rather than globally. Errors can be retrieved usingBlockWithTransactions
. (#1576) -
The Rust interface and Protobuf presentation of
ExecutionError
have been reworked. Error fields were made private and information about a failing call was added. (#1585) -
IntoExecutionError
macro was reworked into a separate trait,ExecutionFail
, and a corresponding derive macro. (#1585) -
State hash aggregation is now performed automatically by MerkleDB. The relevant methods in
Runtime
andService
in Rust runtime have been removed. (#1553) -
commit_service
has been renamed to theupdate_service_status
and now takesInstanceStatus
as an additional argument.start_adding_service
has been renamed toinitiate_adding_service
to better distinguish between starting and stopping a service. (#1605) -
after_transactions
hook is now invoked on the genesis block for the builtin services. Note that callingblockchain::Schema::height
withinafter_transactions
hook will cause a panic for a builtin service. (#1619) -
proposer_id
field inBlock
has been moved to additional block headers. (#1602) -
Interaction with services from the Rust runtime has been changed. Instead of using the
Transaction
trait, it is now possible to use service interfaces directly as Rust traits. These interface traits can be applied to a keypair (to generate signed transactions), toCallContext
(to call another service) and some other types. See Rust runtime docs for more details. (#1606) -
The following public APIs were removed/made private: (#1629, #1671)
blockchain::{error reexports}
(available fromruntime::
);blockchain::FatalError
public re-export;blockchain::InstanceCollection
structure;Blockchain::pool_size
,Blockchain::get_saved_peers
andBlockchain::remove_peer_with_pubkey
methods;helpers::path_relative_from
function;helpers::ZeroizeOnDrop
trait;helpers::Milliseconds
type;helpers::config
andhelpers::user_agent
modules;helpers::generate_testnet_config
,helpers::create_rust_runtime_and_genesis_config
andhelpers::clear_consensus_messages_cache
functions;impl_serde_hex_for_binary_value
macro (moved tomerkledb
);proto
module;runtime::error
module (catch_panic
was added to the list of public re-exports fromruntime::error
).
-
node
module and P2P messages from themessage
module (except forAnyTx
andPrecommit
) were moved to a separate crate,exonum-node
. The moved P2P messages were made private along with types / methods logically related to the consensus algorithm implementation (i.e.,NodeHandler
and types used by it). (#1698) -
The artifact identifier now has first-class semantic version. Previously, it was specific to the Rust runtime. (#1590)
-
The
name
field of the artifact identifier cannot contain:
symbol. (#1590) -
The format of the
proto-sources
endpoint in the Rust runtime has been changed. To get the core Protobuf sources, use the endpoint with thetype=core
query. To get the sources of an artifact, use querytype=artifact&name=$name&version=$version
, where$name
and$version
are replaced with appropriate values. (#1590) -
Rust runtime module was moved from the
exonum
crate into the separateexonum-rust-runtime
crate. (#1641) -
update_service_status
now does not return a value. (#1659) -
BlockchainBuilder::build
now returnsBlockchainMut
instead ofResult
. (#1659) -
A type for a position of transaction in the block has been changed for
u32
. (#1668) -
DispatcherError
has been split into two different types:CoreError
andCommonError
. (#1680) -
Common
variant has been added to theErrorKind
enum. (#1680) -
api
module of theexonum
crate has been moved to 2 separate crates (#1690):exonum-api
crate defining the base HTTP wrapperexonum-system-api
crate implementing system API endpoints
-
Added a new method
initiate_resuming_service
to theRuntime
trait. This method is used to resume a previously stopped services. (#1693) -
ExecutionContext
has been reworked (#1711)ExecutionContext
has been extended by the methods from theexonum_rust_runtime::CallContext
so there is no need to useCallContext
anymore. Public fields inExecutionData
has been replaced by the corresponding getters.- Direct
fork
access inExecutionContext
has been replaced by theBlockchainData::unstructured_access
which returns readonly access to whole blockchain data.
-
Public structures and enums were made non-exhaustive. (#1710)
-
Blockchain data access from the
ExecutionContext
after an error in a nested call is prohibited. (#1733) -
Protobuf declarations were organized according to their packages and, in case of the
exonum.runtime
package, split into smaller chunks. The core messages were moved fromexonum.messages
toexonum
package. (#1756) -
BlockchainBuilder
now acceptsGenesisConfig
as a separate argument, rather than a part ofnew
constructor. The config may be skipped if the blockchain is guaranteed to be initialized. (#1761)
-
supervisor-mode
parameter has been added forgenerate-template
subcommand. (#1598) -
NodeBuilder::with_service
has been renamed to thewith_rust_service
. (#1765)
- Protobuf declarations were organized according to their packages. (#1756)
- The field
content
of theCommittedTransaction
struct and theInPool
variant of theTransactionInfo
enum has been renamed tomessage
. (#1721)
-
Supervisor
structure isn't generic anymore. (#1587) -
DeployConfirmation
structure was renamed toDeployResult
and extended withsuccess
field. (#1648) -
Error code values were changed and split into several enum representing sub-groups. (#1680)
-
The crate has been restructured, indexes are now located in separate module. Indexes iterators names has been shortened to
Iter
,Keys
andValues
. (#1628) -
SparseListIndex::indices
method was renamed toSparseListIndex::indexes
. (#1629) -
AccessExt::touch_index
method has been replaced withindex_type
. (#1630) -
Public structures and enums were made non-exhaustive. (#1710)
-
CopyAccessExt
trait has been introduced. This trait is helpful for references implementingAccess
, such as&Fork
or&dyn Snapshot
. Methods fromAccessExt
trait acceptself
by reference now. (#1739) -
ProofPath
serialization during map hash computations was unified. It now usesLEB128(bit_length) || bytes
format, which was previously used for branches, but not for a single-entry maps. (#1743) -
Serialization of
ProofPath
s withinMapProof
Protobuf messages was changed to a more compact and implementation-independent format. (#1743) -
MapProof
Protobuf messages now serialize keys according to theirBinaryValue
implementation, rather thanBinaryKey
. (#1743) -
All index types now share a common set of iterators:
Entries
,Keys
andValues
. (#1762) -
KeySetIndex::insert
now takes the element by reference. (#1762) -
KeySetIndex
now supports unsized keys. Its getter methods are no longer parameterized by the key type, similar toMapIndex
/ProofMapIndex
. (#1762)
- Protobuf declarations were organized according to their packages. (#1756)
-
Service interfaces now have to specify method IDs with either
interface_method
attribute orauto_ids
option. (#1701) -
Service interface methods now can be marked as removed. (#1707)
-
The following public APIs were removed/made private: (#1629)
compare
module;txvec
macro;TestKit::probe_all
andTestKit::probe
methods.
-
TestKitBuilder::create
method was renamed tobuild
. (#1740) -
TestNode
now returnsKeyPair
instead of a(PublicKey, SecretKey)
tuple. (#1761)
- Modules were made private, crate now provides re-exports of necessary types instead. (#1716)
-
before_transactions
hook for services was introduced. (#1577) -
ErrorMatch
was introduced to test (e.g., using the testkit) that anExecutionError
has an expected type, error message and/or location. (#1585) -
We introduced a set of public endpoints to retrieve the status of calls executed within a block:
v1/call_status/transaction
- gets the status of a transaction,v1/call_status/before_transactions
- gets the status of abefore_transactions
hook,v1/call_status/after_transactions
- gets the status of anafter_transactions
hook. (#1612)
-
Service instances can now be stopped.
Active service instance can be stopped by the corresponding request to the
Supervisor
. Stopped service no more participates in the business logic, i.e. it does not execute transactions, process events, provide user APIs, etc. Service data becomes unavailable to other services, but still exists. The name and identifier remain reserved for the stopped service and cannot be used again for adding new services. (#1605) -
New
blockchain::Schema
methodnext_height
was added as a non-panicking alternative toheight
. (#1619) -
New method
in_genesis_block
was added to theCallContext
to check if the service hook is being executed for the genesis block. (#1619) -
New
api::Error
variants were added:Gone
andMovedPermanently
. (#1607) -
API endpoints are now can be marked as deprecated. (#1607)
-
Added
ProtobufConvert
forVerified
,BlockProof
andIndexProof
. (#1643) -
Slash (
/
) is now allowed to be a part of artifact/instance name. (#1681)
-
exonum-build
now fully supports hierarchical paths to Protobuf files. (#1756) -
It is possible to opt out of including file sources into the output generated by the crate. (#1756)
-
Blockchain::new
now supports any type convertible toKeyPair
. (#1761)
-
Added maintenance command
restart-migration
to restart migration script. (#1728) -
Added
with_instance
andwith_default_rust_service
methods toNodeBuilder
, which start service instances immediately after genesis block creation. (#1765) -
Added
NodeBuilder::development_node
constructor, which can be used to quickly set up a single-node development network. (#1765)
KeyPair
now can has constructors for generating a random keypair and generating a keypair from the specified seed. (#1761)
-
MerkleDB now performs automated state aggregation allowing to construct proofs for its contents. Hashed indexes which are not a part of a group participate in this aggregation. Consult crate docs for more details on how aggregation works. (#1553)
-
Added hashed version of
Entry
calledProofEntry
, which participates in the state aggregation. (#1553) -
Added support of unsized keys to
MapIndex
andProofMapIndex
. (#1621, #1626) -
Added mechanism to extend block header. Block now contains key-value storage
additional_headers
which can contain binary data. (#1602) -
TemporaryDB
can now be cleared. This will remove contents of all indexes and erase index metadata. (#1630) -
impl_serde_hex_for_binary_value
macro was moved from core tomerkledb
. (#1629) -
It is now possible to iterate over keys of the indexes within a group. (#1662)
-
Unsafe optimizations / experimental features are now behind a
yolo
feature, which is off by default. (#1740) -
MerkleDB now provides enumerations for all supported types of DB accesses which can be used to simplify generic code (e.g., in bindings). (#1747)
-
It is now possible to obtain readonly access to fork data with static lifetime. (#1763)
- Node logic (including P2P networking and consensus algorithm) was moved
from the
exonum
crate into the separateexonum-node
crate. (#1698)
-
Rust runtime module was moved from the
exonum
crate into the separateexonum-rust-runtime
crate. (#1641) -
CallContext
has been replaced by theExecutionContext
. (#1711)
-
Supervisor
service now can have initial configuration and implementsConfigure
interface. (#1587) -
ConfigChange::StopService
has been added to make requests to stop the service instance. (#1605) -
New private endpoint
deploy-status
was added. (#1648) -
Added support for resuming previously stopped services. (#1706)
- Added
resume_service
method to theConfigPropose
. - Added
ResumeService
variant to theConfigChange
enumeration.
- Added
-
Supervisor now supports migrations. (#1727)
- Added middleware service that can batch transactions and perform checked calls (calls that are executed if the target service corresponds to a specific artifact and version requirement). (#1590)
-
sandbox
module was moved to thetest-suite/consensus-tests
. (#1627) -
Some of general-purpose tests were moved to the
test-suite/node-tests
. (#1633)
-
Snapshot
implementation forPatch
has been fixed. The previous implementation could lead to stale reads from aPatch
or aFork
. (#1611) -
Maximum height in
ProofListIndex
was fixed from the bogus value 58 to 56. (#1762) -
Bogus setting of the empty key was removed for
ListIndex
. (#1762) -
ProofListIndex
now properly processes all index values; previously, some of its methods panicked if called with an index exceeding2 ** 56
. (#1768)
-
Most important: new Dynamic Services feature was introduced. For details see the Dynamic Services section of the changelog.
-
Used
rust
version is updated to 1.38.0. (#1481) -
Transaction serialization format was changed to
protobuf
. (#1283) -
create_checkpoint
method has been implemented for theRocksDB
struct. This method uses RocksDB checkpoints functionality under the hood. -
NotFound
error message forexplorer/v1/block
endpoint now includes the actual blockchain height. (#1498) -
system/v1/rebroadcast
endpoint has been removed. (#1445) -
Added a possibility to specify compression algorithm for the database. (#1447)
-
Updated
hex
dependency with changes in the methods signatures of theToHex
trait. (#1468) -
Validator keys are now derived from single master key. Master key is stored in encrypted file. (#1459)
-
Command line parameters
--service-key-pass
and--consensus-key-pass
was removed in favor of--master-key-pass
parameter. For example now you can run the node with the command below. (#1459)cargo run -- run -d 0/db/ -c 0/node.toml --master-key-pass pass:123
-
StoppedTestKit::resume
accepts list of runtimes instead of a list of services. -
Removed obsolete
TestKit::blockchain_mut
method andTestKit::blockchain
now returns value instead of reference.
-
-
Dot symbol is not allowed in service names anymore. (#1558)
-
Services can now use
BlockchainData
andSnapshotExt
types to access data from the blockchain in a more structured manner. (#1523) -
GenesisConfig
is extracted into separate entity.BlockchainBuilder
,Node
andTestkit
explicitly accepts it during creation. (#1541) -
Added
DefaultInstance
trait for declaration of builtin services. (#1541)
-
Nested proofs for
ProofListIndex
are replaced with a flat (non-recursive) format. (#1450) -
Differentiated (read-only / read-write) access to the database was introduced. (#1523)
-
It is now possible to have readonly access to indexes given a
Fork
via aReadonlyFork
wrapper. Readonly access works likeRefCell::borrow
(vsRefCell::borrow_mut
forFork
); it is possible to create an unlimited number of indexes with readonly access based on the same fork. (#1523) -
Service schemas can now use a declarative layout, in which every field corresponds to a separate index or a group of indexes. It is possible to derive a constructor for such schemas via
FromAccess
derive macro. (#1523, #1562) -
New index name restrictions has been added. (#1558)
-
Dot symbol is not allowed anymore in indexes with prefixed access.
-
Index names starting from
__
and not containing a dot.
are reserved and used only for system indexes.
-
- Introduced a new crate
exonum-proto
. TraitProtobufConvert
is moved to this crate. (#1496)
-
Introduced a new crate
exonum-protobuf-convert
. Derive macroProtobufConvert
is moved to this crate. (#1501) -
Derive macro
ProtobufConvert
now does not derive theBinaryValue
andObjectHash
traits. There are separate derive macros for them in theexonum-derive
crate. (#1501)
-
Method
protobuf_generate
is now private, useexonum_build::ProtobufGenerator
instead (#1496). -
Method
ProtobufGenerator::frequently_used
has been removed (#1581).
-
Methods
read_keys_from_file
andgenerate_keys
are moved to newkeys
module in theexonum
. (#1459) -
Protobuf serialization for crypto types is now implemented in the
exonum-crypto
crate. (#1496)
In exonum
0.13, a new service workflow is introduced, named
"Dynamic Services".
Key points of this feature are the following:
-
exonum
now supports different environments of code execution (runtimes). Only nativerust
runtime is enabled by default, but support of different programming languages can be added quite easily.For details see the
Runtime
trait docs and thesample_runtime
example. -
Services are not statically tied to the compiled binary anymore. There is support of adding new service types (aka artifacts) dynamically and starting new instances of services.
For details see
runtime
module docs. -
Services now can have initialization parameters, provided within service start procedure.
-
Services now support configuration changes via
Configure
interface. -
configuration
service was replaced with thesupervisor
service, which is capable of not only changing configuration, but of deploying and starting services as well. For details seesupervisor
service.
There are a lot of backward-incompatible changes introduced within 0.13 release.
So to make the changes apparent, compare the Cryptocurrency
example service versions
for 0.12.1 and 0.13.0 releases.
Key points:
-
Merkledb schema is now declarative and can contain indices as fields.
-
Access to the database is now isolated for services. A service cannot get the write access to another service or the blockchain schema.
-
Transactions do not have the
execute
method anymore. Instead, a service defines and implements an interface trait which contains all the business logic. -
Services do not launch at the node start by default. For launching a service, use an
exonum-launcher
tool.
Below you can find a list of pull requests which have significant meaning for the implementation of the Dynamic Services feature. Pull requests are ordered chronologically.
-
#1253: Interface mocks for dynamic services
-
#1263: Add new rust services interface
-
#1261: Basic dispatcher functionality
-
#1275: Dynamic services integration
-
#1345: Implement a new
Transaction
trait [ECR-3222] -
#1361: First step of persistent dynamic services implementation [ECR-3276]
-
#1371: Basic supervisor service implementation [ECR-3291], [ECR-3298]
-
#1376: Restore system API endpoints
-
#1389: Check and improve messages verification procedure [ECR-3272]
-
#1446: Service interfaces MVP. [ECR-3474], [ECR-3484]
-
#1467: Implement Configure interface [ECR-3306]
-
#1473: Extract supervisor service from core
-
#1482: Add shutdown method into runtime trait
-
#1484: Implement configuration update logic in Supervisor [ECR-3583]
-
#1492: Do start and initialize service at single step [ECR-3222]
-
#1537: Finalize Exonum-derive macros [ECR-3800]
-
#1538: Supervisor modes [ECR-3794] [ECR-3771]
Below you can find a list of all pull requests related to the implementation of the Dynamic Services feature. Pull requests are ordered chronologically.
-
#1243: Old behavior dispatcher
-
#1509: Make dispatcher mostly synchronous
-
#1245: Add basic runtime env interface + rust implementation
-
#1253: Interface mocks for dynamic services
-
#1261: Basic dispatcher functionality
-
#1263: Add new rust services interface
-
#1267: Move configuration service to the core
-
#1269: Rust artifact and additional functionality for rust runtime.
-
#1270: Dynamic configuration service
-
#1275: Dynamic services integration
-
#1287: Remove macro from service interface trait definition
-
#1290: Add support of state hash calculation into runtimes & services
-
#1291: Change service builder and web api.
-
#1325: Dynamic services: fix time service compilation
-
#1326: Remove genesis_init from dynamic services [ECR-3226]
-
#1327: Remove unsafe code from runtimes
-
#1330: A small amount of code improvements. [ECR-3222]
-
#1331: Rename dispatch to call_info
-
#1332: Fix tests in blockchain module
-
#1334: Fix sandbox tests in dynamic services [ECR-3230]
-
#1336: Rename traits methods in dynamic services [ECR-3222]
-
#1337: Fix a lot of tests in dynamic services
-
#1338: Refine
start_service
logic [ECR-3222, ECR-3235] -
#1340: Fix testkit [ECR-3229]
-
#1343: Add service name and id to
Service
trait methods. [ECR-3235] -
#1345: Implement a new
Transaction
trait [ECR-3222] -
#1346: Fix transactions benchmarks in dynamic services
-
#1348: Fix big performance regression in dynamic services
-
#1349: Don't verify SignedMessage during the deserialization
-
#1350: Refactor signature verification code [ECR-3222]
-
#1353: Rework blockchain explorer [ECR-3259]
-
#1354: Fix
cargo test --all
compilation -
#1357: Some refactoring by clippy suggestion
-
#1361: FIrst step of persistent dynamic services implementation [ECR-3276]
-
#1367: Rename ArtifactSpec to ArtifactId [ECR-3291]
-
#1371: Basic supervisor service implementation [ECR-3291], [ECR-3298]
-
#1374: Polish code and make travis almost happy
-
#1375: Add deadline_height to StartService transaction [ECR-3298]
-
#1376: Restore system API endpoints
-
#1378: Finalize artifact deployment logic [ECR-3291]
-
#1379: Implement state_hash computation for dispatcher.
-
#1380: Make tests green again.
-
#1381: Include proto file sources in artifact information. [ECR-3309]
-
#1382: Replace impl_service_dispatcher by the attribute in service_interface [ECR-3222]
-
#1387: Improve execution error handling for dynamic services [ECR-3236]
-
#1389: Check and improve messages verification procedure [ECR-3272]
-
#1392: Implement verification for ArtifactId and InstanceSpec with the unit tests [ECR-3360]
-
#1393: Add macro to implement hex serde representation for the BinaryValue types [ECR-3222]
-
#1394: Update documentation of the messages module [ECR-3275]
-
#1396: Document runtime life cycle [ECR-3275]
-
#1405: Dynamic services supervisor tests [ECR-3266]
-
#1411: Refine Runtime trait [ECR-3412]
-
#1427: Try to re deploy artifact before registration.
-
#1429: Review unwraps in dynamic services [ECR-3419]
-
#1430: Expand documentation on configuration parameters usage [ECR-3463]
-
#1431: Update dispatcher info to show changes in list of deployed artifacts
-
#1432: Refine exonum-derive crate on top of darling [ECR-3343]
-
#1434: Replace
dispatcher
attribute inexonum_service
by theservice_interface
inServiceFactory
[ECR-3474] -
#1438: Remove dispatcher reference from Runtime trait
-
#1443: Replace fabric module with exonum-cli crate [ECR-3457]
-
#1446: Service interfaces MVP. [ECR-3474], [ECR-3484]
-
#1451: Add the service interface name option to the proto files
-
#1452: Remove default state_hash implementation
-
#1454: Simplify blockchain configuration [ECR-3357]
-
#1462: Fix API Freeze on startup
-
#1465: Improve ProtobufConvert for enum variants
-
#1467: Implement Configure interface [ECR-3306]
-
#1472: Fix some of the testkit ignored doctests
-
#1473: Extract supervisor service from core
-
#1476: Improve support for additional runtimes in TestKit [ECR-3444]
-
#1482: Add shutdown method into runtime trait
-
#1483: Use strings for protobuf files
-
#1484: Implement configuration update logic in Supervisor [ECR-3583]
-
#1488: Add support of external runtimes to exonum-cli
-
#1489: Avoid waiting in the
add_transaction
endpoint [ECR-3222] -
#1490: Fix supervisor creation
-
#1491: Polish testkit [ECR-3222]
-
#1492: Do start and initialize service at single step [ECR-3222]
-
#1493: Document Rust runtime services traits [ECR-3275]
-
#1494: Enhancements in Testkit
-
#1495: Implement API endpoints that shows config proposals in Supervisor [ECR-3610]
-
#1504: Clarify runtime shutdown method [ECR-3696]
-
#1505: Proto optimization [ECR-3472]
-
#1508: Remove validator_id method from AfterCommitContext
-
#1509: Make dispatcher mostly synchronous
-
#1511: Add includes to proto-sources
-
#1514: Use enum to represent ErrorKind [ECR-3717]
-
#1515: Introduce test-suite directory
-
#1517: Clarify SignedMessage documentation [ECR-3478]
-
#1518: Remove data duplication from DeployConfirmation [ECR-3770]
-
#1519: Add anonymous lifetimes [ECR-3757]
-
#1520: SimpleSupervisor: Verify that config proposal is sent by validator [ECR-3742]
-
#1521: Implement ObjectHash for SignedMessage
-
#1522: Remove ApiContext structure [ECR-3745]
-
#1525: Make protobuf artifacts implementation detail
of Rust runtime [ECR-3776]
-
#1526: Sending an empty POST request to /shutdown endpoint doesn't work [ECR-3756]
-
#1528: Document parts of Rust runtime [ECR-3285]
-
#1530: Improve
Runtime
docs -
#1531: ProofMapIndex variants for hashed and raw keys [ECR-3777]
-
#1537: Finalize Exonum-derive macros [ECR-3800]
-
#1538: Supervisor modes [ECR-3794] [ECR-3771]
-
#1539: Restore warn(missing_docs) in the Exonum crate [ECR-3821]
-
#1540: Deploy workflow
-
#1542: Write proper examples for the Exonum traits derivation [ECR-3822]
-
#1544: Remove atty dependency
-
#1546: Move multisig module to the supervisor crate [ECR-3823]
-
#1547: Remove metrics module
-
#1548: Remove TransactionMessage alias [ECR-3222]
-
#1549: Encapsulate Blockchain fields [ECR-3222]
-
#1550: Remove isolate method [ECR-3820]
-
#1552: Assign instance IDs in the Supervisor [ECR-3746]
-
#1555: Update MerkleDB docs
-
#1568: Make DispatcherSchema merkelized again [ECR-3810]
-
#1592: Fix node freeze after re-enabling consensus [ERC-3111]
-
New config params
http_backend_config.server_restart_max_retries
andhttp_backend_config.server_restart_retry_timeout
added intoNetworkConfiguration
. They are intended to configure restart settings of the HTTP-server (#1536). -
exonum
now has apython
library for implementing integration tests. (#1516) -
BlockchainMut
now has acheck_tx
method used to verify transactions before adding them to the transactions pool. Transactions for whichcheck_tx
fails are considered invalid and can't be included to the block. (#1579)
-
ProofListIndex
now implementstruncate()
andpop()
methods, allowing to eject elements from the list. (#1455) -
IndexAccess
trait is implemented for several new types, notably,Rc<dyn Snapshot>
,Arc<dyn Snapshot>
andRc<Fork>
. (#1455) -
HashTag::hash_list()
was extended to support values of any appropriate type, not onlyHash
. (#1455) -
ProtobufConvert
has been implemented forMapProof
(#1512) andListProof
(#1513). -
New variant of the
ProofMapIndex
have been introduced -RawProofMapIndex
. It is used for keys that maps directly toProofPath
, for exampleHash
andPublicKey
. (#1531)-
By default
ProofMapIndex
is used for keys that implementObjectHash
. -
For
Hash
keys both map variants works the same, becauseObjectHash
implementation forHash
returns the hash itself.
-
-
Old
fabric
module is replaced with newexonum-cli
crate. (#1443) -
exonum-cli
provides a public reexport ofstructopt
crate. (#1461)
-
system/v1/shutdown
endpoint has been modified and now accepts empty POST requests. (#1526) -
exonum-protobuf-convert
has been replaced with externalprotobuf-convert
crate. (#1561) -
keys
module has been moved intoexonum-keys
crate. (#1497)
-
ProofListIndex::extend()
method has been refactored, leading to up to 10x performance improvements for large lists. (#1455) -
Proofs building mechanisms have been heavily refactored. (#1460)
- Configuration change example has been moved to
exonum-supervisor
crate. (#1582)
- Now input directory is always added to includes to reduce boilerplate code. (#1581)
- Localhost ports 8080/8081 are now allowed in CORS within the
run-dev
mode. (#1415)
index_metadata
now correctly loads the provided index address name (#1478).
- A message length checking has been fixed (#1463)
-
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)
-
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.
- bits_len - total length of the given
- Removed deprecated
CryptoHash
trait, useexonum-merkledb::ObjectHash
instead (#1361)
-
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)
- Fixed
TestKit::add_tx()
method, which previously did not persist transactions. (#1278)
-
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)
-
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.
-
-
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)
- Implemented "stopping" and "resuming" a
TestKit
, allowing to emulate node restarts. (#1278)
-
Node secret keys are now stored in separate files in a secure way. CLI for generating node configs and starting nodes has been extended in order to reflect these changes. (#1222, #1096, #1235)
-
Changed a response for
/healthcheck
endpoint. (#1252) -
Changed a response code for the
/block
endpoint for the case when the requested block doesn't exist. (#1262) -
Removed a sub-command
generate-testnet
from CLI. (#1264)
- Renamed
create_keys_file
function togenerate_keys_file
inutils
module. (#1222, #1096)
- All Exonum crates have been updated to Rust 2018 edition. This means that it is required to use Rust 1.31 or newer for compilation. (#1230)
-
Added
allow-origin
forlocalhost
for public and private api in development mode by default. (#1234) -
Added
ProtobufConvert
implementation forSignature
. (#1241)
- Unpin versions of dependencies. (#1237)
- Added i128/u128 support for
StorageKey
,StorageValue
. (#1179)
- Added i128/u128 support for
CryptoHash
. (#1179)
-
Dependencies have been updated. (#1111, #1162, #1167, #1168)
-
ctrl+c
handler has been added for correct node stopping. (#1163)
pwbox
dependency has been updated. (#1164)
-
Changed the message format, which, in turn, has led to changes in the byte representation of transactions and precommit messages. (#916)
-
Transaction::execute
now acceptsTransactionContext
as the second parameter.TransactionContext
provides the public key of transaction author, ID of current service, and transaction hash. (#943) -
Transaction::verify
method has been removed. (#1085) -
Every transaction that contains the public key of the author was refactored to use the author indicated in
TransactionContext
. (#984 #980 #979 #975 #971) -
/transactions/
endpoint can now handle transaction messages in hex format. Services that used custom endpoints were refactored to useexplorer/v1/transactions
. (#943 #984 #980 #979 #975 #971) -
majority_count
parameter has been moved fromStoredConfiguration
toConfigurationService
configuration. (#828) -
Removed obsolete
enable_blockchain_explorer
option fromNodeApiConfig
. (#891) -
Consensus messages and inner structs are now serialized with protobuf. (#1028)
-
tx_pool_capacity
parameter has been removed fromMemoryPoolConfig
. (#1036) -
Custom serialization has been removed. (#1088)
-
Trait
TransactionSend
was removed.ApiSender
now containsbroadcast_transaction
method. (#943) -
api::Error::InternalError
now containsfailure::Error
instead ofBox<::std::error::Error>
. (#879) -
TransactionSend::send
now returnsResult<(), failure::Error>
instead ofio::Result
. (#879) -
ApiSender
methodssend_external_message
andpeer_add
now returnsResult<(), failure::Error>
instead ofio::Result
. (#879) -
majority_count
parameter has been added togenerate-template
andgenerate-testnet
commands. (#828) -
NodePrivateConfig
fields have been renamed:listen_addr
tolisten_address
andexternal_addr
toexternal_address
. (#809) -
NodePublicConfig
addr
field has been renamed toaddress
. (#809) -
Config parameter
external_address
is now a required value. (#826) -
Config parameter
round_timeout
has been renamed tofirst_round_timeout
. Now timeout for round r isfirst_round_timeout + (r-1)*round_timeout_increase
, whereround_timeout_increase
is determined as a certain percentage offirst_round_timeout
. The value of this percentage is defined inConsensusConfig::TIMEOUT_LINEAR_INCREASE_PERCENT
constant (10%). (#848) -
missing_keys
,entries
,all_entries
methods ofCheckedMapProof
andMapProof::missing_keys_unchecked
method now returnimpl Iterator
instead ofVec
. (#918) -
Connect
message fieldaddr
withSocketAddr
has been removed,pub_addr
withstr
of unresolved external address of the peer is used instead. (#942) -
Endpoint
v1/peers
now returnsConnectInfo
in incoming connections instead of single IP-addresses. (#959) -
Fork::remove_by_prefix()
method now specifies prefix asOption<&[u8]>
instead ofOption<&Vec<u8>>
. (#1042) -
TransactionResult
is now serialized using protobuf. Empty description of the result is now the equivalent of there being no description of the result. (#1075) -
Service::tx_from_raw
now usesfailure::Error
as an error type. (#1088) -
transactions!
macro has been removed,TransactionSet
derive macro fromexonum-derive
should be used instead. (#1088) -
encoding_struct!
macro has been removed, protobuf should be used instead. (#1088)
- Structures in tests and examples are serialized using protobuf now. (#1078)
- Structures in tests and examples are serialized using protobuf now. (#1081)
- Structures in tests and examples are serialized using protobuf now. (#1081)
-
The
Vote
andVoteAgainst
now save the transaction hash instead of full transaction message. (#984) -
Structures are serialized using protobuf now. (#1086)
- Structures are serialized using protobuf now. (#1086)
- Added
utils
module with functionscreate_keys_file
for creating andread_keys_from_file
for reading files that contain a public key and encrypted secret key. (#1056)
-
Added possibility to use domain names instead of IP addresses as a peer's addresses. (#826)
-
Added
v1/rebroadcast
endpoint that can be used to broadcast all transactions from the pool to other nodes. (#859) -
Now each consecutive round is longer than previous by some constant percentage of
first_round_timeout
. (#848) -
Added
/v1/blocks/subscribe
endpoint for following block commit events through WebSockets (#792). -
Added
MapProof::all_entries_unchecked
method. It is used for more efficient calculations in Exonum Java Bindings, but can be used for debug purposes as well. (#918) -
Added
listen-address
command line argument to specify different external address (peer-address
) and listen address when generating config files. (#942) -
Peer address is resolved on connect instead of resolving on node startup. (#942)
-
Now peers require only one connection to exchange messages between them. (#945)
exonum-build
crate has been added to simplify writingbuild.rs
files for services that use protobuf code generation. (#1076)
exonum-derive
crate has been added with custom derives forProtobufConvert
andTransactionSet
. (#1055)
-
Bug with pool size overflow has been fixed. (#853)
-
Bug in
NoiseWrapper::decrypt_msg
caused by wrong calculation of encrypted and decrypted message sizes has been fixed. (#873) -
Transactions (signature) verification benchmark has been fixed. (#673)
-
Node no longer panics when transaction pool has a lot of transactions and consensus is at round 0. (#673)
-
Node now works correctly after consensus re-enable via API. (#902)
-
Bug with incorrect EOF handling while decoding network messages has been fixed. (#917)
-
Bug leading to deletion of excessive data when
clear
ing an index belonging to an index family has been fixed. (#1042)
new_in_family
index constructor introduced in #531 now accepts&str
and&[u8]
as anindex_id
value.
-
NodeHandler::run_handler
now returnsResult<(), failure::Error>
instead ofio::Result
. (#879) -
Transactions (signature) verification benchmark has been added. (#808)
-
A new function
storage::proof_list_index::root_hash()
has been added to efficiently compute Merkle root hash from a list of hashes without an intermediateProofListIndex
. Verification of block root hashes has been optimized as well. (#802) -
NoiseHandshake::finalize
now returns error if remote peer's public key is not inConnectList
. (#811) -
Now nodes will switch to
min_propose_timeout
for block proposal timeout faster if they receive more thanpropose_timeout_threshold
transactions duringmax_propose_timeout
. (#844) -
Custom log formatting (along with
colored
andterm
dependencies) has been removed in favor ofenv_logger
. (#857). -
Several dependencies have been updated. (#861, #865, #871)
-
Transactions are now verified in a thread pool. Thread pool size is set to optimal value by default (CPU count) or can be configured manually. (#673)
-
The
finalize
command now does not include the node itself as its own trusted peer in the generated configuration. (#892) -
Added a possibility to create
ServiceApiBuilder
with blockchain. (#929) -
ConnectInfo
andConnectList
now stores unresolved addresses as strings. (#942) -
Now
network
module usesPublicKeys
to identify peers. (#942) -
system/v1/peers
endpoint now properly returns incoming and outgoing connections of the node. (#942)
- A version of
snow
dependency has been updated.
- SegmentField implementation for Option has been added, allowing to store optional values inside of transactions. (#1004)
- Config parameter
external_address
is now a required value. (#826)
- Added possibility to use domain names instead of IP addresses as a peer's
addresses. In config file domain names can be used in
ConnectList
configuration and addresses will be resolved once on startup. (#826)
- Added a possibility to create
ServiceApiBuilder
with blockchain. (#929)
-
failure
version has been updated to0.1.2
in order to fix the build issue withfailure_derive
. (#845) -
Bug with "unknown propose" execution has been fixed. (#841)
-
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 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"
.
- Replace
-
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)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.
-
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)
-
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)
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)
-
RunDev
structure has been made public, so it can be extended now. -
RunDev
command now generates default values for api addresses in the config.
- Dependencies versions have been updated:
exonum_sodiumoxide
to0.0.19
.exonum_rocksdb
to0.7.4
.
-
handle_commit
method inService
trait has been renamed toafter_commit
. (#715) -
TimeoutAdjusterConfig
has been removed along with different timeout adjusters. Current behavior is similar to theDynamic
timeout adjuster and can be modified throughmin_propose_timeout
,max_propose_timeout
andpropose_timeout_threshold
fields in theConsensusConfig
. (#643)Migration path:
Constant
timeout adjuster can be emulated by setting equalmin_propose_timeout
andmax_propose_timeout
values.- For
Dynamic
timeout adjuster simply movemin
,max
andthreshold
values intomin_propose_timeout
,max_propose_timeout
andpropose_timeout_threshold
correspondingly. - There is no possibility to emulate
MovingAverage
now, soDynamic
should be used as the closest alternative.
-
Network connections are now encrypted using Noise Protocol. Nodes compiled with old version will not connect to the new ones. Therefore you need to update all node instances for the network to work. (#678)
-
storage::Error
constructor has been made private. (#689) -
ConsensusConfig::validate_configuration
method has been renamed to thewarn_if_nonoptimal
. (#690)
- The service has been refactored and the following public structs has been
moved to separate modules:
TimeSchema
toexonum_time::schema
,TimeProvider
andMockTimeProvider
toexonum_time::time_provider
,ValidatorTime
toexonum_time::api
. (#604)
-
Private API now support CORS. (#675)
-
The
--public-allow-origin
and--private-allow-origin
parameters have been added to thefinalize
command. (#675) -
IPv6 addressing is now supported. (#615)
-
Field
,CryptoHash
,StorageValue
andExonumJson
traits have been implemented forchrono::Duration
structure. (#653) -
before_commit
method has been added inService
trait. (#667) (#715) -
Field
,CryptoHash
,StorageKey
,StorageValue
andExonumJson
traits have been implemented forrust_decimal::Decimal
. (#671) -
Maintenance CLI command for node management has been added. Currently the only supported command is
clear-cache
which clears node message cache. (#676) -
StoredConfiguration
validation has been extended withtxs_block_limit
parameter check. (#690) -
A warning for non-optimal
StoredConfiguration::txs_block_limit
value has been added. (#690) -
Private api
/v1/network/
endpoint now returns core version in addition to service info. (#701)
- Additional service example has been added along with frontend. (#646)
- Advanced cryptocurrency example becomes a public library (is published on crates.io). (#709)
-
Already processed transactions are rejected now in
NodeHandler::handle_incoming_tx
method. (#642) -
Fixed bug with shutdown requests handling. (#666)
-
Fixed deserialization of the
MapProof
data structure. (#674) -
Fixed a bug which prevented the node from reaching the actual round. (#680 #681)
- Error description has been added to the return value of the transactions. (#695)
- Error description has been added to the return value of the transactions. (#695)
- 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)
- 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) -
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.