exonum v0.13.0-rc.2 Release Notes
Release Date: 2019-12-04 // over 4 years ago-
๐ฅ 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