Changelog History
Page 1
-
v1.0.0 Changes
March 31, 2020๐ฅ Breaking Changes
exonum-api
ApiManagerConfig
was made non-exhaustive. (#1834)
๐ New Features
exonum-node
- Exonum nodes now gracefully terminate on receiving SIGINT, SIGTERM
๐ and SIGQUIT signals (on Unix platforms), or actrl + c
break (on Windows).
๐ฆ These signal handlers may be switched off by usingNodeBuilder::disable_signals()
.
(#1834)
๐ Bug Fixes
exonum-cli
- ๐ Fixed bug in
run-dev
command. Previously, using the existing configuration
files inblockchain-path
led to an error. (#1827)
-
v1.0.0-rc.3 Changes
March 25, 2020๐ฅ Breaking changes
exonum
create_patch
andcommit
methods inBlockchainMut
have been generalized
๐ to support block skipping (see New Features section for more details). (#1820)
exonum-cli
run-dev
command has been reworked. It now does not clear database files
after the launch.artifacts-dir
parameter has been renamed to
๐งblockchain-path
. Configuration files are now stored insideconfig
subdirectory. (#1822)
exonum-supervisor
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)๐ New Features
exonum-cli
- Several constants in the
command
module became public. (#1821)
exonum-node
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 viaproposer
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)exonum-rust-runtime
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)
โ exonum-testkit
- โ Testkit can send Protobuf-encoded payloads to POST endpoints. (#1831)
๐ Bug Fixes
exonum-api
- ๐ Introduced a workaround for the HTTP restart hanging up on Windows. (#1828)
exonum-node
- ๐ 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)
exonum-rust-runtime
- ๐ Fixed updating HTTP endpoints if the Rust runtime does not contain
active services during node start. (#1831)
exonum-supervisor
- ๐
DeployRequest
andMigrationRequest
now have cryptographic seeds
to retry the same request multiple times. (#1823)
-
v1.0.0-rc.2 Changes
March 13, 2020๐ฅ Breaking changes
General
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)
exonum
โ 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 comprehensive
call_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)exonum-api
- Data types were made non-exhaustive where appropriate. (#1799)
exonum-cli
- ๐จ
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)
exonum-explorer
- Data types were made non-exhaustive where appropriate. (#1799)
exonum-proto
impl_binary_value_for_pb_message
macro was removed. Use theBinaryValue
derive macro from theexonum-derive
crate instead. (#1805)
exonum-rust-runtime
- Data types were made non-exhaustive where appropriate. (#1799)
exonum-supervisor
- Data types were made non-exhaustive where appropriate. (#1799)
exonum-system-api
๐ 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)
โ exonum-testkit
๐จ
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)
๐ New Features
exonum
๐ 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)exonum-supervisor
๐ 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)
exonum-rust-runtime
๐ Rust services support freezing. (#1780)
HTTP API of Rust services is now switched on during data migrations. (#1780)
โ exonum-testkit
- โ Testkit server now returns info on emulated nodes. (#1799)
Internal Improvements
exonum
- Core now provides more thorough / context-dependent error descriptions
related to service lifecycle. (#1806)
exonum-merkledb
- Index clearing now uses range deletions for RocksDB, providing
๐ a significant performance boost for this operation. (#1791)
๐ Bug Fixes
exonum
- ๐ 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)
exonum-node
๐ 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 themempool.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)โ exonum-testkit
โ 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) - Endpoint definitions in the
-
v1.0.0-rc.1 Changes
February 07, 2020๐ฅ Breaking changes
exonum
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)
exonum-cli
supervisor-mode
parameter has been added forgenerate-template
subcommand. (#1598)NodeBuilder::with_service
has been renamed to thewith_rust_service
. (#1765)
exonum-crypto
- ๐ฆ Protobuf declarations were organized according to their packages. (#1756)
exonum-explorer
- The field
content
of theCommittedTransaction
struct and theInPool
variant of theTransactionInfo
enum has been renamed tomessage
. (#1721)
exonum-supervisor
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)
exonum-merkledb
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)
exonum-proto
- ๐ฆ Protobuf declarations were organized according to their packages. (#1756)
exonum-rust-runtime
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)
โ exonum-testkit
๐ 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)
exonum-time
- Modules were made private, crate now provides re-exports of necessary types instead. (#1716)
๐ New features
exonum
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
๐
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)
exonum-cli
โ 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)
exonum-crypto
KeyPair
now can has constructors for generating a random keypair and generating a keypair from the specified seed. (#1761)
exonum-merkledb
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)
exonum-node
- ๐ Node logic (including P2P networking and consensus algorithm) was moved
from the
exonum
crate into the separateexonum-node
crate. (#1698)
exonum-rust-runtime
๐ Rust runtime module was moved from the
exonum
crate into the separateexonum-rust-runtime
crate. (#1641)CallContext
has been replaced by theExecutionContext
. (#1711)
exonum-supervisor
๐ง
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)
exonum-middleware-service
- 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)
Internal Improvements
exonum
๐
sandbox
module was moved to thetest-suite/consensus-tests
. (#1627)๐ Some of general-purpose tests were moved to the
test-suite/node-tests
. (#1633)
๐ Bug Fixes
exonum-merkledb
๐
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)
-
v1.0.0-beta.1
February 07, 2020 -
v0.13.0-rc.2 Changes
December 04, 2019๐ฅ Breaking changes
exonum
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)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)exonum-merkledb
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 viaFromAccess
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.exonum-proto
- ๐ Introduced a new crate
exonum-proto
. TraitProtobufConvert
is moved
to this crate. (#1496)
exonum-protobuf-convert
Introduced a new crate
exonum-protobuf-convert
. Derive macro
๐ProtobufConvert
is moved to this crate. (#1501)Derive macro
ProtobufConvert
now does not derive theBinaryValue
and
ObjectHash
traits. There are separate derive macros for them in
theexonum-derive
crate. (#1501)๐ exonum-build
Method
protobuf_generate
is now private, useexonum_build::ProtobufGenerator
instead (#1496).๐ Method
ProtobufGenerator::frequently_used
has been removed (#1581).exonum-crypto
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)Dynamic Services Feature
Overview
In
exonum
0.13.0-rc.2, 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).
0๏ธโฃ 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 the
โsample_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.Migration Guide
๐ There are a lot of backward-incompatible changes introduced within 0.13.0-rc.2 release candidate.
So to make the changes apparent, compare theCryptocurrency
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.0๏ธโฃ Services do not launch at the node start by default. For launching a
service, use anexonum-launcher
tool.Important PRs for Dynamic Services
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]
Full History of the Dynamic Services Implementation
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 Features
exonum
New config params
http_backend_config.server_restart_max_retries
and
http_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)exonum-merkledb
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
and
PublicKey
. (#1531)0๏ธโฃ 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.exonum-cli
Old
fabric
module is replaced with newexonum-cli
crate. (#1443)exonum-cli
provides a public reexport ofstructopt
crate. (#1461)Internal Improvements
exonum
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)exonum-merkledb
๐จ
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)
โ exonum-testkit
- ๐ง Configuration change example has been moved to
exonum-supervisor
crate. (#1582)
๐ exonum-build
- Now input directory is always added to includes to reduce boilerplate
code. (#1581)
๐ Bug Fixes
exonum
- Localhost ports 8080/8081 are now allowed in CORS within the
run-dev
mode. (#1415)
exonum-merkledb
- ๐
index_metadata
now correctly loads the provided index address name (#1478).
- ๐ Introduced a new crate
-
v0.12.1 Changes
September 19, 2019 -
v0.12.0 Changes
August 14, 2019๐ฅ Breaking changes
exonum
- ๐ Module
storage
has been replace byexonum-merkledb
crate. See related section Signatures of methods
Service::initialize
andService::before_commit
has been changed. Now they take immutable reference toFork
instead of mutable. (#1293)Trait
BinaryForm
has been replaced byBinaryValue
. (#1298)
To implement
BinaryValue
for types that implementsProtobuf::Message
useimpl_binary_value_for_pb_message
macros.๐ Module
storage
has been replaced byexonum-merkledb
crate. See related section in changelog for details. (#1293)Bootstrapping workflow has been simplified (#1292)
generate-config
subcommand now uses singleOUTPUT_DIR
instead of set of options. So to generate node config you should write something like example bellow.cargo run --bin exonum-timestamping -- \ generate-template /tmp/exonum/template.toml --validators-count 4 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/0 \ --peer-address 0.0.0.0:8000 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/1 \ --peer-address 0.0.0.0:8001 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/2 \ --peer-address 0.0.0.0:8002 cargo run --bin exonum-timestamping -- \ generate-config /tmp/exonum/template.toml /tmp/exonum/cfg/3 \ --peer-address 0.0.0.0:8003 cargo run --bin exonum-timestamping -- \ finalize /tmp/exonum/nodes/0/sec.toml /tmp/exonum/nodes/0/node.toml \ --public-configs /tmp/exonum/cfg/{0,1,2,3}/pub.toml cargo run --bin exonum-timestamping -- \ run -d /tmp/exonum/db/0 -c /tmp/exonum/nodes/0/node.toml
explorer/v1/block
endpoint returns a response in a "flat" format. (#1386)explorer/v1/blocks
endpoint withadd_blocks_time
param switched on now returns median precommit times in thetime
field within each returned block, rather than in a separate array. (#1278)system/v1/mempool
endpoint has been renamed intosystem/v1/stats
. An additional field in the response of the endpoint was added. The field corresponds to the total number of transactions in the blockchain. (#1289)system/v1/mempool
endpoint has been renamed intosystem/v1/stats
. An additional field in the response of the endpoint was added. The field corresponds to the total number of transactions in the blockchain. (#1289)
exonum-merkledb
โ Added restrictions to index names. Allowable characters in index name: ASCII characters, digits, underscores and dashes. (#1388)
โ Added
Debug
implementation forDatabase
,Snapshot
,Iterator
dynamic traits (#1363)๐ Changed storage layout (#1293)
- Changed indexes metadata layout in the database.
- Introduced a generic
IndexState
structure that can be used to store global index properties like total number of items.
๐ Changed
ProofMapIndex
hashing rules for branch nodes and root node. Branch nodes is hashing now with 0x04 prefix, root node with 0x03 (#1293).๐ Renamed method
merkle_root
ofProofMapIndex
andProofListIndex
toobject_hash
(#1293).Several mutable indexes now can be create from immutable reference to
Fork
(#1293)๐ Relaxed trait bounds for the
ProofMapIndex
keys (#1293)
Now keys should just implement
BinaryKey
trait instead of theProofMapKey
, which will be ordered according to their binary representation, as in theMapIndex
.๐ Changed
ProofListIndex
hashing rules for leaf nodes and branch nodes according to the certificate transparency specification. Leaf nodes contain hashes with 0x00 prefix, branch nodes - with 0x01. (#1293)StorageValue
andStorageKey
have been renamed to theBinaryValue
andBinaryKey
. (#1293)- Added
to_bytes
method to theBinaryValue
trait which doesn't consume original value instead of theinto_bytes
. BinaryKey::write
now returns total number of written bytes.CryptoHash
has been replaced by theObjectHash
.
- Added
๐ Changed the hash algorithm of the intermediate nodes in
ProofMapIndex
. (#1293)
ProofPath
now uses compact binary representation in theBranchNode
hash calculation.Binary representation is
|bits_len|bytes|
, where:- bits_len - total length of the given
ProofPath
in bits compressed by theleb128
algorithm - bytes - non-null bytes of the given
ProofPath
, i.e. the first(bits_len + 7) / 8
bytes.
exonum-crypto
- โ Removed deprecated
CryptoHash
trait, useexonum-merkledb::ObjectHash
instead (#1361)
๐ New features
exonum
๐ New endpoint:
v1/transactions/subscribe
, which subscribe to new transaction events. This endpoint accept optional parameters:service_id
andmessage_id
(message_id
as in derive macroTransactionSet
). (#1335)๐ New endpoint:
v1/ws
, which open websocket connection and allow to set multiple subscription (for blocks and transaction, filtered by service and transaction id) and send transactions (in hex, like in explorer) to blockchain (examples can be found in related pull request). (#1335)
๐ Bug Fixes
โ exonum-testkit
- ๐ Fixed
TestKit::add_tx()
method, which previously did not persist transactions. (#1278)
Internal improvements
exonum
๐
explorer/v1/blocks
endpoint supportsadd_precommits
param, which supplies each returned block with theprecommits
field. (#1278)explorer/v1/blocks
endpoint allows to specify the lower bound on the returned block height with theearliest
query param. (#1278)โ Added
ProtobufConvert
implementation for byte array with fixed sizes (#1279)โ Added
service_name
getter to theTransactionContext
. (#1274)๐ Allowed to use symbol
-
in index names. (#1277)rocksdb
crate is now used instead ofexonum_rocksdb
. (#1286)โ Added a new endpoint
system/v1/services
for displaying information about available services. (#1288)Endpoints
explorer/v1/block
andexplorer/v1/transactions
were extended with adding additional fieldsservice_id
andtime
. (#1386)โ Added
tx_cache
field toState
to cache incoming transactions before adding them to persistent pool. (#1398)โ Added new request message
PoolTransactionsRequest
to obtain pool transactions from another peers. (#1404)Endpoints
explorer/v1/block
andexplorer/v1/transactions
were extended with adding additional fieldsservice_id
andtime
. (#1386)
exonum-merkledb
- โก๏ธ Updated
ProofMapIndex
data layout. (#1293)
Path to the root node in merkle patricia tree now has been stored in the index state.
๐ New API for getting and creating indexes. (#1293)
- Now indexes can be accessed via immutable references from
Snapshot
and mutable/immutable references fromFork
. - Introduced method
fork::get_object
to get or create object by address. get_object_existed
andget_object_existed_mut
methods ofFork
andSnapshot
returns optional references to index.
- Now indexes can be accessed via immutable references from
rocksdb
crate is now used instead ofexonum_rocksdb
. (#1286)โ Added a new endpoint
system/v1/services
for displaying information about available services. (#1288)rocksdb
crate is now used instead ofexonum_rocksdb
. (#1286)โ Added
From<Patch>
trait implementation toFork
. (#1403)
โ exonum-testkit
- โ
Implemented "stopping" and "resuming" a
TestKit
, allowing to emulate node restarts. (#1278)
- ๐ Module
-
v0.11.2
December 04, 2019 -
v0.11.1
September 24, 2019