An extensible open-source framework for creating private/permissioned blockchain applications

Overview

Exonum

Status: Travis Build Status dependency status codecov

Project info: Docs.rs License: Apache-2.0 LoC rust 1.46.0+ required

Community: Join the chat at https://gitter.im/exonum/exonum Join the chat at https://t.me/exonum_blockchain Join the chat at https://gitter.im/exonum/ruExonum Join the chat at https://t.me/ExonumRU Website

Exonum is an extensible open-source framework for creating blockchain applications. Exonum can be used to create cryptographically powered distributed ledgers in virtually any problem domain, including FinTech, GovTech, and LegalTech. The Exonum framework is oriented towards creating permissioned blockchains, that is, blockchains with the known set of blockchain infrastructure providers.

If you are using Exonum in your project and want to be listed on our website & GitHub list — write us a line to [email protected].

Contents

This is the main Exonum repository containing the bulk of Rust crates used in Exonum. Rust crates for Exonum are intended to be reasonably small and reusable, hence there is relatively large number of them.

Main Crates

Upstream Dependencies

Tools for Building Services

Services and Node Plugins

Examples

Versioning Policy

Exonum crates follow semantic versioning.

The exonum crate and its re-exported dependencies (exonum-crypto, exonum-merkledb and exonum-keys) are released at the same time; their version is considered the version of the Exonum framework. On the other hand, the crates downstream of exonum (e.g., exonum-node) or independent of it (e.g., exonum-api) may evolve at different speeds, including major releases not tied to a major Exonum release.

Throughout the Exonum codebase, certain APIs are described in the API docs as unstable or experimental. Such APIs may be removed or changed in a semantically non-breaking release (for example, a minor release) of the corresponding crate. Similarly, nominally public APIs that are hidden from the docs via #[doc(hidden)] are considered unstable and thus exempt from semantic versioning limitations.

Supported Rust Versions

The Exonum crates are built against a specific stable Rust version (1.45.0). Newer stable versions are supported as a result. (Feel free to file an issue if any Exonum crate does not build on a newer stable version.) Newer beta and nightly versions should be supported as well, but no specific effort is allocated into supporting them.

Due to at least some external dependencies not factoring the minimum supported Rust version into their semantic versioning policy, the Exonum crates effectively have no choice but to do the same. Namely, a bump of the minimum supported Rust version will not be considered a semantically breaking change. It is, however, guaranteed that the Exonum crates will build on some stable Rust.

Note that due to versioning policies of external dependencies, the effective minimum supported Rust version may increase as a result of the activities out of control of Exonum developers. The decision how to deal with this situation (pin the dependency or bump the minimum supported Rust version) will be made on the case-by-case basis.

Contributing

To contribute to Exonum, please see CONTRIBUTING.

See Also

Some Exonum stuff that is not in this repository:

Comments
  • Performance degradation on a long running network

    Performance degradation on a long running network

    Description:

    We have a demo network of 4 nodes running in Aws. At the start, the network performs well, blocks are committed according to configured timeouts. After a couple of weeks, performance starts degrading. Intervals between blocks become about 30 seconds. Height of one of the nodes becomes much less than the height of others.

    There is still a lot of RAM (>3 GB) and SSD (>10 GB) free space. Size of DB folder is about 4 GB.

    The most interesting part is that restarting of all node processes helps to fix the issue. Not sure if the laggard node is able to catch up others, but other nodes start working as at the beginning.

    It would be great to know how to fix this issue or at least where to look at and how to efficiently debug such cases.

    Thanks!

    Configuration:

    Network size: 4 nodes Node OS: Ubuntu 18.04 Exonum version: 1.0.0 Consensus configuration:

    [consensus]
    first_round_timeout = 3000
    max_message_len = 1048576
    max_propose_timeout = 2000
    min_propose_timeout = 1000
    peers_timeout = 10000
    propose_timeout_threshold = 50
    status_timeout = 5000
    txs_block_limit = 1000
    

    Steps to reproduce:

    1. Strart a network of 4 nodes in the same region in AWS
    2. Wait for a cople of weeks

    Result:

    Network performance is degraded. Intervals between blocks become about 30 seconds.

    Expected result:

    Network performance is not degraded.

    opened by askolesov 41
  • Add/replace fields to block(proposer_id, tx_count)

    Add/replace fields to block(proposer_id, tx_count)

    Fixes #138

    This commit removes round from the Block, BlockState and State. Blocks purified of any round information burden.

    The downside is that we lost round={}, proposer={}, information in the logs. If possible should I try to take round information back from somewhere?

    First mile. Cut some slack, please )

    breaking change :warning: 
    opened by DenisKolodin 22
  • Alternative `MapProof` implementation

    Alternative `MapProof` implementation

    This PR changes the format of MapProofs and principles of their generation.

    More detailed description is coming.

    See the description on the wiki: https://wiki.bf.local/display/EXN/Flat+proofs+for+ProofMapIndex

    discussion :speech_balloon: 
    opened by slowli 20
  • Timestamping Demo

    Timestamping Demo

    Hello, I have an issue while trying to make a timestamp. I believe it has been set up correctly. Followed tutorial from the README.md file inside timestamping folder. Any idea how to fix this issue? screenshot from 2019-01-16 12-22-03 screenshot from 2019-01-16 12-22-20 screenshot from 2019-01-16 12-22-26

    opened by SabrinaOmerefendic 19
  • Separate keys for signing consensus messages and transactions

    Separate keys for signing consensus messages and transactions

    Fixes #62.

    :warning: Although changes are straightforward and trivial, this is a breaking change for (all?) services as they now should use txs-keys for own transactions. Still, fix should be simple.

    I'm not sure about several things, so please take a look and comment. Among other things I don't like keys naming (consensus_..._key and txs_..._key). Another point to consider - how to better restrict services from using the wrong pair of keys.

    discussion :speech_balloon: breaking change :warning: 
    opened by stanislav-tkach 19
  • Add transaction execution status [ECR-332]

    Add transaction execution status [ECR-332]

    Motivation: sometimes it is convenient to know transaction execution status. I suppose core can provide this functionality, so services shouldn't reinvent the wheel for themselves.

    Further improvements: execution status can be returned as part of v1/transactions request.

    discussion :speech_balloon: breaking change :warning: 
    opened by stanislav-tkach 18
  • Check bounds of fields in messages

    Check bounds of fields in messages

    This PR checks bounds of fields in messages.

    It prevents of:

    • Empty space
    • Wrong sizes of fields
    • Overlaps of neighbour fields

    What do you think about it?

    breaking change :warning: 
    opened by DenisKolodin 17
  • Automatically calculate field offsets

    Automatically calculate field offsets

    This PR uses macro magic to automatically calculate fields offset. Only implementation of macro is changed at the moment: that is, the user of message! still has to specify offsets, but they are ignored. In other words, the change is backwards compatible (if the user does not import exonum macros selectively).

    Currently, only message! macro implementation is updated, encode_struct! will be next, but I've decided I'd send a PR to gauge feedback.

    breaking change :warning: 
    opened by matklad 16
  • How to build my network

    How to build my network

    Hi.. I need to start with this platform, I started reading the documentation which shows lots of great efforts but honestly speaking I could not know how to build the network, my be it is my mistake. If I have 2 PCs, each one has its own IP address, what shall I do in each one, and how to connect them together as peers!

    Can you please explain with little details, or guide me if there are such blogs!

    opened by hasanAjsf 15
  • Hash of the proof is not equal to the trusted hash of the index after committing new block with at least 50% probability

    Hash of the proof is not equal to the trusted hash of the index after committing new block with at least 50% probability

    Hi,

    I am exposing API that returns proof based on ProofMapIndex. The problem that client receives malformed proof in about 50% of cases. After new block is committed the situation changes every time.

    To exclude probability of client/node miscommunication i added verification of the proof in API handler and got the same results as on client side.

    Looks like when new block is committed with 50% of probability entity proof doesn't match to index proof.

    My code just mirrors the code from your example:

    pub async fn get_permission_set(
            state: ServiceApiState,
            query: EntityQuery,
        ) -> api::Result<EntityInfo<PermissionSet>> {
            let IndexProof {
                block_proof,
                index_proof,
                ..
            } = state
                .data()
                .proof_for_service_index(name_of!(permission_sets in IotlSchema<&dyn Snapshot>))
                .unwrap();
    
            let schema = IotlSchema::new(state.service_data());
            let entity_proof = schema.permission_sets.get_proof(query.id);
    
            Ok(EntityInfo::new(block_proof, index_proof, entity_proof))
        }
    

    I use exonum 1.0.0, rustc 1.41.1 on MacOS. Please see short attached video how it works.

    opened by vimmerru 13
  • WIP: Implement `TransactionSet` derivation

    WIP: Implement `TransactionSet` derivation

    Seeing the struggles with #532, I've decided to try implementing it with procedural macros:

    #[derive(Clone, TransactionSet)]
    pub enum Transactions {
        CreateWallet(CreateWallet),
        Transfer(Transfer),
    }
    

    I'd be eager to expand the approach to the messages themselves as well, but it is hindered by uncertainties with their serialization.

    discussion :speech_balloon: 
    opened by slowli 13
  • Bump flat and mocha in /test-suite/testkit/server

    Bump flat and mocha in /test-suite/testkit/server

    Bumps flat to 5.0.2 and updates ancestor dependency mocha. These dependencies need to be updated together.

    Updates flat from 4.1.0 to 5.0.2

    Commits
    • e5ffd66 Release 5.0.2
    • fdb79d5 Update dependencies, refresh lockfile, format with standard.
    • e52185d Test against node 14 in CI.
    • 0189cb1 Avoid arrow function syntax.
    • f25d3a1 Release 5.0.1
    • 54cc7ad use standard formatting
    • 779816e drop dependencies
    • 2eea6d3 Bump lodash from 4.17.15 to 4.17.19
    • a61a554 Bump acorn from 7.1.0 to 7.4.0
    • 20ef0ef Fix prototype pollution on unflatten
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by timoxley, a new releaser for flat since your current version.


    Updates mocha from 6.2.3 to 10.2.0

    Release notes

    Sourced from mocha's releases.

    v10.2.0

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    v10.1.0

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    v10.0.0

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Changelog

    Sourced from mocha's changelog.

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
  • Update base64 requirement from 0.13.0 to 0.20.0

    Update base64 requirement from 0.13.0 to 0.20.0

    Updates the requirements on base64 to permit the latest version.

    Changelog

    Sourced from base64's changelog.

    0.20.0

    Breaking changes

    • Update MSRV to 1.57.0
    • Decoding can now either ignore padding, require correct padding, or require no padding. The default is to require correct padding.
      • The NO_PAD config now requires that padding be absent when decoding.

    0.20.0-alpha.1

    Breaking changes

    • Extended the Config concept into the Engine abstraction, allowing the user to pick different encoding / decoding implementations.
      • What was formerly the only algorithm is now the FastPortable engine, so named because it's portable (works on any CPU) and relatively fast.
      • This opens the door to a portable constant-time implementation (#153, presumably ConstantTimePortable?) for security-sensitive applications that need side-channel resistance, and CPU-specific SIMD implementations for more speed.
      • Standard base64 per the RFC is available via DEFAULT_ENGINE. To use different alphabets or other settings (padding, etc), create your own engine instance.
    • CharacterSet is now Alphabet (per the RFC), and allows creating custom alphabets. The corresponding tables that were previously code-generated are now built dynamically.
    • Since there are already multiple breaking changes, various functions are renamed to be more consistent and discoverable.
    • MSRV is now 1.47.0 to allow various things to use const fn.
    • DecoderReader now owns its inner reader, and can expose it via into_inner(). For symmetry, EncoderWriter can do the same with its writer.
    • encoded_len is now public so you can size encode buffers precisely.

    0.13.1

    • More precise decode buffer sizing, avoiding unnecessary allocation in decode_config.

    0.13.0

    • Config methods are const
    • Added EncoderStringWriter to allow encoding directly to a String
    • EncoderWriter now owns its delegate writer rather than keeping a reference to it (though refs still work)
      • As a consequence, it is now possible to extract the delegate writer from an EncoderWriter via finish(), which returns Result<W> instead of Result<()>. If you were calling finish() explicitly, you will now need to use let _ = foo.finish() instead of just foo.finish() to avoid a warning about the unused value.
    • When decoding input that has both an invalid length and an invalid symbol as the last byte, InvalidByte will be emitted instead of InvalidLength to make the problem more obvious.

    0.12.2

    • Add BinHex alphabet

    0.12.1

    • Add Bcrypt alphabet

    0.12.0

    • A Read implementation (DecoderReader) to let users transparently decoded data from a b64 input source
    • IMAP's modified b64 alphabet
    • Relaxed type restrictions to just AsRef<[ut8]> for main encode*/decode* functions
    • A minor performance improvement in encoding

    0.11.0

    • Minimum rust version 1.34.0

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies rust 
    opened by dependabot[bot] 0
  • Bump express from 4.17.1 to 4.17.3 in /examples/timestamping/frontend

    Bump express from 4.17.1 to 4.17.3 in /examples/timestamping/frontend

    Bumps express from 4.17.1 to 4.17.3.

    Release notes

    Sourced from express's releases.

    4.17.3

    4.17.2

    Changelog

    Sourced from express's changelog.

    4.17.3 / 2022-02-16

    4.17.2 / 2021-12-16

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump express from 4.17.1 to 4.17.3 in /examples/cryptocurrency-advanced/frontend

    Bump express from 4.17.1 to 4.17.3 in /examples/cryptocurrency-advanced/frontend

    Bumps express from 4.17.1 to 4.17.3.

    Release notes

    Sourced from express's releases.

    4.17.3

    4.17.2

    Changelog

    Sourced from express's changelog.

    4.17.3 / 2022-02-16

    4.17.2 / 2021-12-16

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3 in /examples/timestamping/frontend

    Bump qs from 6.5.2 to 6.5.3 in /examples/timestamping/frontend

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge`: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3 in /examples/cryptocurrency-advanced/frontend

    Bump qs from 6.5.2 to 6.5.3 in /examples/cryptocurrency-advanced/frontend

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge`: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
Releases(v1.0.0)
  • v1.0.0(Mar 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 a ctrl + c break (on Windows). These signal handlers may be switched off by using NodeBuilder::disable_signals(). (#1834)

    Bug Fixes

    exonum-cli

    • Fixed bug in run-dev command. Previously, using the existing configuration files in blockchain-path led to an error. (#1827)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.3(Mar 25, 2020)

    Breaking changes

    exonum

    • create_patch and commit methods in BlockchainMut 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 inside config 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. Use Supervisor::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 via proposer 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 to application/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 and MigrationRequest now have cryptographic seeds to retry the same request multiple times. (#1823)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.2(Mar 13, 2020)

    Breaking changes

    General

    • Error handling is now performed with the anyhow crate instead of failure. (#1805)

    • APIs which previously used futures from the futures 0.1 crate are now made async, or are using Futures from the standard library. (#1796, #1804) The main affected APIs are as follows:

      • Endpoint definitions in the exonum-api crate and their counterparts in exonum-rust-runtime
      • Transaction sending with ApiSender from the exonum crate
      • Node start-up with Node::run (exonum-node crate) and NodeBuilder::run (exonum-cli crate), and shutdown with ShutdownHandle (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 returns Box<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 and Blockchain::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 general InvalidServiceTransition 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 the command 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 the BinaryValue derive macro from the exonum-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 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)

    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)

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.1(Feb 7, 2020)

    This release marks the significant milestone in Exonum evolution – the minimum viable lifecycle for Exonum services. Besides dynamic deployment of services implemented in 0.13.0-rc.2 release, Exonum now supports stopping and upgrading service instances (including the possibility of data migrations). Like other lifecycle events, stopping and upgrades are implemented by the core and controlled by the supervisor service, providing flexibility and upgradeability of the control logic.

    As a part of service upgrade workflow, Exonum now supports background (aka asynchronous) data migrations. This allows to migrate data from one schema to the other without stopping a node or the blockchain network; the whole process is performed in the background while the node continues processing transactions and other requests. Relevant migration support was added to the storage backend (MerkleDB) and can be used independently.

    Other significant changes:

    • The crate structure was significantly refactored. The node logic, Rust runtime, HTTP API wrapper, explorer endpoints and system endpoints, all of which were previously parts of the main crate, were moved to separate crates. This provides greater flexibility for core and service developers and allows to evolve downstream crates independently of the core.
    • MerkleDB now performs fully automated state aggregation, requiring zero efforts from the core and services. The aggregation logic in core and runtimes was thus removed.
    • MerkleDB now supports generic database accesses and shared iterator types for all indexes, allowing to simplify the support code for bindings.
    • Service interfaces were reworked in the Rust runtime; now, they are fully represented by traits. These interface traits are automatically implemented for an assortment of stub types, such as keypairs; more stub types can be defined by a user. See the stubs module in the Rust runtime crate for a literary code explainer.
    • Preparations have been made to make potential changes to the core interfaces non-breaking. Relevant structures and enumerations were made non-exhaustive, and some unstable interfaces were marked as such in the documentation (or hidden from the docs).

    See more detailed list of changes in CHANGELOG.md.

    Stability Notice

    No changes to the core functionality are expected between this release candidate and the 1.0.0 release. At the same time, there may be breaking changes to the APIs documented as unstable (for example, data migration). Another kind of potential breaking changes is related to updating core dependencies. Right now, Exonum core targets compatibility with Rust 1.36 due to the problems of compiling the Java runtime with the more recent versions. If this restriction is lifted, some core dependencies will be updated, which could result in breaking changes (at least technically).

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0-rc.2(Dec 4, 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 the RocksDB struct. This method uses RocksDB checkpoints functionality under the hood.

    • NotFound error message for explorer/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 the ToHex 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 and TestKit::blockchain now returns value instead of reference.

    • Dot symbol is not allowed in service names anymore. (#1558)

    • Services can now use BlockchainData and SnapshotExt types to access data from the blockchain in a more structured manner. (#1523)

    • GenesisConfig is extracted into separate entity. BlockchainBuilder, Node and Testkit 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 a ReadonlyFork wrapper. Readonly access works like RefCell::borrow (vs RefCell::borrow_mut for Fork); 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.

    exonum-proto

    • Introduced a new crate exonum-proto. Trait ProtobufConvert 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 the BinaryValue and ObjectHash traits. There are separate derive macros for them in the exonum-derive crate. (#1501)

    exonum-build

    • Method protobuf_generate is now private, use exonum_build::ProtobufGenerator instead (#1496).

    • Method ProtobufGenerator::frequently_used has been removed (#1581).

    exonum-crypto

    • Methods read_keys_from_file and generate_keys are moved to new keys module in the exonum. (#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). Only native rust 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 the supervisor service, which is capable of not only changing configuration, but of deploying and starting services as well. For details see supervisor 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 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.

    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 in exonum_service by the service_interface in ServiceFactory [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 into NetworkConfiguration. They are intended to configure restart settings of the HTTP-server (#1536).

    • exonum now has a python library for implementing integration tests. (#1516)

    • BlockchainMut now has a check_tx method used to verify transactions before adding them to the transactions pool. Transactions for which check_tx fails are considered invalid and can't be included to the block. (#1579)

    exonum-merkledb

    • ProofListIndex now implements truncate() and pop() methods, allowing to eject elements from the list. (#1455)

    • IndexAccess trait is implemented for several new types, notably, Rc<dyn Snapshot>, Arc<dyn Snapshot> and Rc<Fork>. (#1455)

    • HashTag::hash_list() was extended to support values of any appropriate type, not only Hash. (#1455)

    • ProtobufConvert has been implemented for MapProof (#1512) and ListProof (#1513).

    • New variant of the ProofMapIndex have been introduced - RawProofMapIndex. It is used for keys that maps directly to ProofPath, for example Hash and PublicKey. (#1531)

      • By default ProofMapIndex is used for keys that implement ObjectHash.

      • For Hash keys both map variants works the same, because ObjectHash implementation for Hash returns the hash itself.

    exonum-cli

    • Old fabric module is replaced with new exonum-cli crate. (#1443)

    • exonum-cli provides a public reexport of structopt 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 external protobuf-convert crate. (#1561)

    • keys module has been moved into exonum-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).
    Source code(tar.gz)
    Source code(zip)
  • v0.12.1(Sep 19, 2019)

  • v0.10.4(Sep 6, 2019)

  • v0.12(Aug 14, 2019)

    Breaking changes

    exonum

    • Signatures of methods Service::initialize and Service::before_commit has been changed. Now they take immutable reference to Fork instead of mutable. (#1293)

    • Trait BinaryForm has been replaced by BinaryValue. (#1298)

      To implement BinaryValue for types that implements Protobuf::Message use impl_binary_value_for_pb_message macros.

    • Module storage has been replaced by exonum-merkledb crate. See related section in changelog for details. (#1293)

    • Bootstrapping workflow has been simplified (#1292)

      generate-config subcommand now uses single OUTPUT_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/blocks endpoint with add_blocks_time param switched on now returns median precommit times in the time field within each returned block, rather than in a separate array. (#1278)

    • system/v1/mempool endpoint has been renamed into system/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 for Database, 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 of ProofMapIndex and ProofListIndex to object_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 the ProofMapKey, which will be ordered according to their binary representation, as in the MapIndex.

    • 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 and StorageKey have been renamed to the BinaryValue and BinaryKey. (#1293)

      • Added to_bytes method to the BinaryValue trait which doesn't consume original value instead of the into_bytes.
      • BinaryKey::write now returns total number of written bytes.
      • CryptoHash has been replaced by the ObjectHash.
    • Changed the hash algorithm of the intermediate nodes in ProofMapIndex. (#1293)

      ProofPath now uses compact binary representation in the BranchNode hash calculation.

      Binary representation is |bits_len|bytes|, where:

      • bits_len - total length of the given ProofPath in bits compressed by the leb128 algorithm
      • bytes - non-null bytes of the given ProofPath, i.e. the first (bits_len + 7) / 8 bytes.

    New features

    exonum

    • New endpoint: v1/transactions/subscribe, which subscribe to new transaction events. This endpoint accept optional parameters: service_id and message_id (message_id as in derive macro TransactionSet). (#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 supports add_precommits param, which supplies each returned block with the precommits field. (#1278)

    • explorer/v1/blocks endpoint allows to specify the lower bound on the returned block height with the earliest query param. (#1278)

    • Added ProtobufConvert implementation for byte array with fixed sizes (#1279)

    • Added service_name getter to the TransactionContext. (#1274)

    • Allowed to use symbol - in index names. (#1277)

    • rocksdb crate is now used instead of exonum_rocksdb. (#1286)

    • Added a new endpoint system/v1/services for displaying information about available services. (#1288)

    • Endpoints explorer/v1/block and explorer/v1/transactions were extended with adding additional fields service_id and time. (#1386)

    • Added tx_cache field to State to cache incoming transactions before adding them to persistent pool. (#1398)

    • Added new request message PoolTransactionsRequest to obtain pool transactions from another peers. (#1404)

    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 from Fork.

      • Introduced method fork::get_object to get or create object by address.

      • get_object_existed and get_object_existed_mut methods of Fork and Snapshot returns optional references to index.

    • rocksdb crate is now used instead of exonum_rocksdb. (#1286)

    • Added From<Patch> trait implementation to Fork. (#1403)

    exonum-testkit

    • Implemented "stopping" and "resuming" a TestKit, allowing to emulate node restarts. (#1278)
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Mar 15, 2019)

    Breaking Changes

    exonum

    • 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)

    exonum-crypto

    • Renamed create_keys_file function to generate_keys_file in utils module. (#1222, #1096)

    Internal improvements

    • 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)

    exonum

    • Added allow-origin for localhost for public and private api in development mode by default. (#1234)

    • Added ProtobufConvert implementation for Signature. (#1241)

    Source code(tar.gz)
    Source code(zip)
  • v0.9.7(Jan 23, 2019)

  • v0.10.3(Jan 22, 2019)

  • v0.10.2(Jan 14, 2019)

    0.10.2 - 2019-01-14

    New features

    exonum

    • Added i128/u128 support for StorageKey, StorageValue. (#1179)

    exonum-crypto

    • Added i128/u128 support for CryptoHash. (#1179)
    Source code(tar.gz)
    Source code(zip)
  • v0.9.6(Jan 14, 2019)

    Internal Improvements

    exonum

    • Disabled default features of the actix-web dependency to get rid of a ring dependency which leads to build crash.

    exonum-testkit

    • Disabled default features of the actix-web dependency to get rid of a ring dependency which leads to build crash.
    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Jan 4, 2019)

    Internal Improvements

    exonum

    • Dependencies have been updated. (#1111, #1162, #1167, #1168)

    • ctrl+c handler has been added for correct node stopping. (#1163)

    exonum-crypto

    • pwbox dependency has been updated. (#1164)
    Source code(tar.gz)
    Source code(zip)
  • v0.9.5(Dec 18, 2018)

  • v0.10(Dec 14, 2018)

    Breaking Changes

    • Changed the message format, which, in turn, has led to changes in the byte representation of transactions and precommit messages. (#916)

    • Transaction::execute now accepts TransactionContext 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 use explorer/v1/transactions. (#943 #984 #980 #979 #975 #971)

    • majority_count parameter has been moved from StoredConfiguration to ConfigurationService configuration. (#828)

    • Removed obsolete enable_blockchain_explorer option from NodeApiConfig. (#891)

    • Consensus messages and inner structs are now serialized with protobuf. (#1028)

    • tx_pool_capacity parameter has been removed from MemoryPoolConfig. (#1036)

    exonum

    • Trait TransactionSend was removed. ApiSender now contains broadcast_transaction method. (#943)

    • api::Error::InternalError now contains failure::Error instead of Box<::std::error::Error>. (#879)

    • TransactionSend::send now returns Result<(), failure::Error> instead of io::Result. (#879)

    • ApiSender methods send_external_message and peer_add now returns Result<(), failure::Error> instead of io::Result. (#879)

    • majority_count parameter has been added to generate-template and generate-testnet commands (#828)

    • NodePrivateConfig fields have been renamed: listen_addr to listen_address and external_addr to external_address. (#809)

    • NodePublicConfig addr field has been renamed to address. (#809)

    • Config parameter external_address is now a required value. (#826)

    • Config parameter round_timeout has been renamed to first_round_timeout. Now timeout for round r is first_round_timeout + (r-1)*round_timeout_increase where round_timeout_increase is determined as a certain percentage of first_round_timeout. The value of this percentage is defined in ConsensusConfig::TIMEOUT_LINEAR_INCREASE_PERCENT` constant (10%). (#848)

    • missing_keys, entries, all_entries methods of CheckedMapProof and MapProof::missing_keys_unchecked method now return impl Iterator instead of Vec. (#918)

    • Connect message field addr with SocketAddr has been removed, pub_addr with str of unresolved external address of the peer is used instead. (#942)

    • Endpoint v1/peers now returns ConnectInfo in incoming connections instead of single IP-addresses. (#959)

    • Fork::remove_by_prefix() method now specifies prefix as Option<&[u8]> instead of Option<&Vec<u8>>. (#1042)

    • exonum_derive crate has been added with custom derives for ProtobufConvert and TransactionSet (#1055)

    • TransactionResult is now serialized using protobuf. Empty description of the result is now the equivalent of there being no description of the result. (#1075)

    exonum-testkit

    • Structures in tests and examples are serialized using protobuf now. (#1078)

    exonum-timestamping

    • Structures in tests and examples are serialized using protobuf now. (#1081)

    exonum-cryptocurrency

    • Structures in tests and examples are serialized using protobuf now. (#1081)

    exonum-configuration

    • The Vote and VoteAgainst now save the transaction hash instead of full transaction message. (#984)

    • Structures are serialized using protobuf now. (#1086)

    exonum-time

    • Structures are serialized using protobuf now. (#1086)

    New Features

    exonum

    • 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-crypto

    • Added utils module with functions create_keys_file for creating and read_keys_from_file for reading files that contain a public key and encrypted secret key. (#1056)

    exonum-build

    • exonum-build crate has been added to simplify writing build.rs files for services that use protobuf code generation. (#1076)

    Bug Fixes

    exonum

    • 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 clearing an index belonging to an index family has been fixed. (#1042)

    API Improvements

    exonum

    • new_in_family index constructor introduced in #531 now accepts &str and &[u8] as an index_id value.

    Internal Improvements

    exonum

    • NodeHandler::run_handler now returns Result<(), failure::Error> instead of io::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 intermediate ProofListIndex. Verification of block root hashes has been optimized as well. (#802)

    • NoiseHandshake::finalize now returns error if remote peer's public key is not in ConnectList. (#811)

    • Now nodes will switch to min_propose_timeout for block proposal timeout faster if they receive more than propose_timeout_threshold transactions during max_propose_timeout. (#844)

    • Custom log formatting (along with colored and term dependencies) has been removed in favor of env_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 and ConnectList now stores unresolved addresses as strings. (#942)

    • Now network module uses PublicKeys to identify peers. (#942)

    • system/v1/peers endpoint now properly returns incoming and outgoing connections of the node. (#942)

    Source code(tar.gz)
    Source code(zip)
  • v0.9.4(Oct 24, 2018)

    New features

    exonum

    • SegmentField implementation for Option has been added, allowing to store optional values inside of transactions. (#1004)
    Source code(tar.gz)
    Source code(zip)
  • v0.9.3(Oct 4, 2018)

    Breaking Changes

    exonum

    • Config parameter external_address is now a required value. (#826)

    New features

    exonum

    • 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)
    Source code(tar.gz)
    Source code(zip)
  • v0.9.2(Sep 11, 2018)

  • v0.9.1(Aug 2, 2018)

    Bug Fixes

    exonum

    • failure version has been updated to 0.1.2 in order to fix the build issue with failure_derive. (#845)

    • Bug with "unknown propose" execution has been fixed. (#841)

    Source code(tar.gz)
    Source code(zip)
  • v0.9(Jul 19, 2018)

    Breaking Changes

    exonum

    • Command trait in helpers::fabric module became public. (#778)

      Migration path:

      If you override ServiceFactory::command method and do a match by a command name, just add use helpers::fabric::Command import.

    • schema_version field in Block 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 on actix-web. (#727)

      Migration path:

      For backend:

      • Remove old dependencies on iron and its companions bodyparser, router and others.
      • Simplify the API handlers as follows:
        fn my_handler(state: &ServiceApiState, query: MyQueryType)
        -> Result<MyResponse, ApiError>
        {
          // ...
        }
        

        where MyQueryType type implements Deserialize trait and MyResponse implements Serialize trait.

      • Replace old methods public_api_handler and private_api_handler of Service trait by a single wire_api method which takes ServiceApiBuilder. You can use this builder as a factory for your service API.
      • get, get_err and post methods in TestKitApi have been replaced by the more convenient RequestBuilder. 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 like GET api/my_method/:first/:second should be replaced by the GET api/my_method?first=value1&second=value2.
      • JSON parser for POST requests is now more strict. In this way you should send null in request body even for handlers without query parameters.

      See our examples for more details.

    • storage::base_index module has become private along with BaseIndex and BaseIndexIter types. (#723)

    • ServiceFactory trait has been extended with service_name function. (#730)

    • Method name has been removed from Run, GenerateCommonConfig, GenerateNodeConfig, Finalize, GenerateTestnet and Maintenance structures (helpers/fabric module). (#731)

    • Whitelist has been replaced by ConnectList. 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 example 16ef83ca...da72 = "127.0.0.1:6333".
    • Healthcheck and consensus endpoints (v1/healthcheck and v1/consensus_status) have been merged to v1/healthcheck. (#736, #766)

    • Node configuration file is now updated at ConnectList update. This is achieved via new ConfigManager entity. (#777)

      Migration path (required only if you create Node manually):

      If you need to update ConnectList on file system, pass Some(path_to_node_config) as the last argument of the Node::new method. Otherwise, pass None.

    • exonum::crypto types now have truncated Display/Debug representations. (#797)

      Migration path:

      Use encoding::serialize::ToHex instead of Display 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 of FromStr for reverse conversion. FromStr implementation has been removed from crypto types to avoid errors.

    New Features

    exonum

    • 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 with take and swap methods. (#781)

    Bug Fixes

    exonum

    • 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 the Entry index. (#790)

    • Added missing external_address field to the auditor final configuration. (#805)

    Internal Improvements

    • BlockResponse sends transactions by Hash instead of RawMessage. 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)
    Source code(tar.gz)
    Source code(zip)
  • v0.8.1(Jun 15, 2018)

    New features

    exonum

    • RunDev structure has been made public, so it can be extended now.

    • RunDev command now generates default values for api addresses in the config.

    Internal improvements

    exonum

    • Dependencies versions have been updated:
      • exonum_sodiumoxide to 0.0.19.
      • exonum_rocksdb to 0.7.4.
    Source code(tar.gz)
    Source code(zip)
  • v0.8(Jun 2, 2018)

    Breaking changes

    exonum

    • handle_commit method in Service trait has been renamed to after_commit. (#715)

    • TimeoutAdjusterConfig has been removed along with different timeout adjusters. Current behavior is similar to the Dynamic timeout adjuster and can be modified through min_propose_timeout, max_propose_timeout and propose_timeout_threshold fields in the ConsensusConfig. (#643)

      Migration path:

      • Constant timeout adjuster can be emulated by setting equal min_propose_timeout and max_propose_timeout values.
      • For Dynamic timeout adjuster simply move min, max and threshold values into min_propose_timeout, max_propose_timeout and propose_timeout_threshold correspondingly.
      • There is no possibility to emulate MovingAverage now, so Dynamic 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 the warn_if_nonoptimal. (#690)

    New features

    exonum

    • Private API now support CORS. (#675)

    • The --public-allow-origin and --private-allow-origin parameters have been added to the finalize command. (#675)

    • IPv6 addressing is now supported. (#615)

    • Field, CryptoHash, StorageValue and ExonumJson traits have been implemented for chrono::Duration structure. (#653)

    • before_commit method has been added in Service trait. (#667) (#715)

    • Field, CryptoHash, StorageKey, StorageValue and ExonumJson traits have been implemented for rust_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 with txs_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)

    exonum-timestamping

    • Additional service example has been added along with frontend. (#646)

    exonum-cryptocurrency-advanced

    • Advanced cryptocurrency example becomes a public library (is published on crates.io). (#709)

    Bug fixes

    exonum

    • 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)

    exonum-configuration

    • Error description has been added to the return value of the transactions. (#695)

    exonum-time

    • Error description has been added to the return value of the transactions. (#695)

    exonum-cryptocurrency-advanced

    • Frontend has been updated to reflect latest backend changes. (#602 #611)

    Internal improvements

    exonum

    • Default implementation of check method was added to Field trait to reduce boilerplate. (#639)

    • Metrics are now using chrono::DateTime<Utc> instead of SystemTime. (#620)

    exonum-time

    • Split service components to separate modules. (#604)

    exonum-configuration

    • Method ProposeData::set_history_hash has been removed. (#604)
    Source code(tar.gz)
    Source code(zip)
  • v0.7.1(May 15, 2018)

    New features

    exonum

    • Maintenance CLI command for node management has been added. Currently the only supported command is clear-cache which clears node message cache. (#676)

    Bug fixes

    exonum

    • Fixed a bug which prevented the node from reaching the actual round. (#680 #681)
    Source code(tar.gz)
    Source code(zip)
  • v0.6.1(May 15, 2018)

    New features

    exonum

    • Maintenance CLI command for node management has been added. Currently the only supported command is clear-cache which clears node message cache. (#676)

    Bug fixes

    exonum

    • Fixed a bug which prevented the node from reaching the actual round. (#680 #681)
    Source code(tar.gz)
    Source code(zip)
  • v0.7(Apr 11, 2018)

    Breaking changes

    exonum

    • POST-requests are now handled with bodyparser crate, so all the parameters must be passed in the body. (#529)

    • ProofListIndex and ProofMapIndex root_hash method has been renamed to merkle_root. (#547)

    • Proofs of existence / absence for ProofMapIndexs 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 MapProofs.
      • See the README in the storage::proof_map_index module for theoretical details about the new proof structure.
    • with_prefix constructor of all index types has been renamed to new_in_family. Now it uses index_id instead of prefixes. Moreover, blockchain::gen_prefix method has been removed. Instead, any type that implements StorageKey trait, can serve as an index_id. (#531)

    • Several Schema's methods have been renamed (#565):

      • tx_location_by_tx_hash to transactions_locations.
      • block_txs to block_transactions.
    • SystemTime previously used as storage key or value turned out to show different behavior on different platforms and, hence, has been replaced with chrono::DateTime<Utc> that behaves the same in any environment. (#557)

      Migration path:

      • Replace all SystemTime fields with chrono::DateTime<Utc> ones.
      • Use DateTime::from and into() methods to convert your existing SystemTime instances into suitable type when constructing transactions or working with database.
    • Blockchain method tx_from_raw() now returns Result<Box<Transaction>, MessageError> instead of Option<Box<Transaction>>. (#567)

    • events module becomes private. (#568)

    • CryptoHash trait is no longer implemented for Hash. (#578)

    • network_id attribute has been removed from NodeInfo and RawMessage. HEADER_LENGTH remains the same, first byte of RawMessage is now reserved and always set to 0. (#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 and tx_info methods of the explorer are renamed to block and transaction respectively.
      • TransactionInfo moved from the api::public module to the explorer module.
      • BlocksRange moved from the explorer module to the api::public module.
      • TxInfo is renamed to CommittedTransaction.
      • 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 and CommittedTransaction (e.g., TransactionInfo<serde_json::Value> or TransactionInfo<MyTransaction>) if you need to deserialize transaction-related data returned from the explorer HTTP API.
      • Consult explorer module docs for further possible changes in API.
    • validators-count command-line parameter has been added. Now, when generating config template using generate-template command, you must specify the number of validators. (#586)

    • majority_count parameter has been added to the StoredConfiguration. See exonum-configuration changes for more details. (#546)

    exonum-testkit

    • Rollback mechanism in Testkit is reworked to work with checkpoints (#582):

      • old rollback by blocks in Testkit 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 of checkpoint() and rollback().
    • 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 use is_tx_in_pool or add_tx methods.
    • TestKitApi::get_err method now returns ApiError, rather than a deserialized object, as it is for get. For checking such results in tests you may want to use assert_matches.

    exonum-configuration

    • majority_count: Option<u16> configuration parameter is introduced. Allows to increase the threshold amount of votes required to commit a new configuration proposal. By default the number of votes is calculated as 2/3 + 1 of total validators count. (#546)

    exonum-time

    • SystemTime has been replaced with chrono::DateTime<Utc>, as it provides more predictable behavior on all systems. (#557)

    New features

    exonum

    • ExecutionError::with_description method now takes Into<String> instead of String which allows to pass &str directly. (#592)

    • New database field added to the NodeConfig. 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 of get_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 and StorageValue traits are implemented for the uuid::Uuid. (#588)

    • Display trait is implemented for types from the crypto module. (#590)

    • transactions! macro now allows empty body. (#593)

    exonum-testkit

    • create_block* methods of the TestKit now return the information about the created block. (#535)

    • TestKit::explorer() method allows to access the blockchain explorer. (#535)

    exonum-cryptocurrency-advanced

    • A more complex example has been added featuring best practices for service writing. (#595)

    Internal improvements

    exonum

    • RawTransaction now has its own implementation of fmt::Debug trait instead of #[derive(Debug)]. The template of RawTransaction’s debug message is Transaction { version: #, service_id: #, message_type: #, length: #, hash: Hash(###) }. (#603)

    • Non-committed transactions are now stored persistently in the storage instead of memory pool. (#549)

    • Sandbox tests have been moved inside of the exonum core. (#568)

    • The requested transactions in the TransactionsRequest are now sent by batches, rather than one by one. The number of batches depends on the size limits of the message. (#583)

    exonum-testkit

    • Request logging for TestKitApi now encompasses all requests. The log format is slightly changed to allow for the generic request / response form. (#601)
    Source code(tar.gz)
    Source code(zip)
  • v0.6(Mar 6, 2018)

    Breaking changes

    exonum

    • exonum::crypto::CryptoHash trait is introduced, and StorageValue::hash and Message::hash methods are removed. (#442)

      Migration path:

      • For implementations of StorageValue, move the hash method to CryptoHash implementation instead.
      • For implementations of Message simply remove hash method, there's a blanket impl of CryptoHash for Message.
      • Add use exonum::crypto::CryptoHash to use the hash method.
    • The StorageKey trait is re-implemented for signed integer types (i8, i16, i32 and i64) 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 implement StorageKey for it using big endian encoding. Then, use the wrapper instead of the int type in indices. See the unit tests for StorageKey for an example.

    • Transaction::execute method now returns TransactionResult that is stored in the blockchain and can be accessed through api. The changes made by transactions that return Err are discarded. To migrate, add Ok(()) as the last line to the execute method. More generally, make sure that the method returns Ok(()) 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 one transactions! macro.
      • Remove ID constants.
      • Replace TYPE constants with a single SERVICE_ID constant.
    • Several variants were removed from ApiError enum. (#474)

      Migration path:

      • Use generic ApiError::BadRequest variant or create IronError directly.
    • CommandExtension uses failure::Error instead of Box<std::error::Error> for errors. (#474)

      Migration path:

      • std::error::Error can be converted to failure::Error via .into() method.
    • storage::Error implements failure::Fail instead of std::error::Error. (#474)

    • CryptoHash for () now correctly calculates a hash of an empty byte array instead of returning Hash::zero(). (#483)

    • Removed the 'static bound from the return value of the blockchain::Service::service_name() method. (#485)

    • StorageKey trait now requires ToOwned 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 the generate-testnet command has been renamed to output-dir. (#528)

    • peer_addr argument of the generate-config command has been renamed to peer-address. (#528)

    • Blockchain::new and Node::new now accept Into<Arc<Database>> instead of Box<Database>. (#530)

      Migration path:

      • Just pass database argument as is, for example instead of Box::new(MemoryDb::new()) use MemoryDb::new().

    exonum-configuration

    • Most types renamed to avoid stuttering (see here for an explanation of the term) (#496):

      • ConfigurationService to Service
      • ConfigurationServiceFactory to ServiceFactory
      • TxConfigPropose to Propose
      • TxConfigVote to Vote
      • ConfigurationSchema to Schema
      • StorageValueConfigProposeData to ProposeData
      • CONFIG_SERVICE constant to SERVICE_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 the MaybeVote type, which is now used instead of Vote in the schema method signatures. The storage format itself is unchanged (#496).

    exonum-time

    • The structure Time is removed, use SystemTime for saving validators time in ProofMapIndex instead. (#20)

    • Renamed methods validators_time/validators_time_mut to validators_times/validators_times_mut in Schema. (#20)

    New features

    exonum

    • StorageKey and StorageValue traits are implemented for SystemTime. (#456)

    • StorageValue and CryptoHash traits are implemented for bool. (#385)

    • Height implements std::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)

    exonum-testkit

    • Modified signature of the TestKitApi::send method, which previously did not accept Box<Transaction>. (#505)

    • Added possibility to init a logger in TestKitBuilder. (#524)

    exonum-configuration

    • 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).

    Bug fixes

    exonum

    • ExonumJsonDeserialize trait is implemented for F32 and F64. (#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)

    Internal improvements

    exonum

    • 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)

    Source code(tar.gz)
    Source code(zip)
  • v0.5.1(Feb 1, 2018)

  • v0.5(Jan 30, 2018)

    Breaking changes

    • The order of bytes and bits in the DBKey keys of ProofMapIndex became consistent. The change influences how Merkle Patricia trees are built for ProofMapIndex: the bits in each byte of a DBKey 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. (#419)
    • The Database trait is simplified: it is no longer required to implement state-sharing clone method. Instead, the merge method now takes a shared reference to self. (#422)
    • message! and encoding_struct! no longer require manual SIZE and offset specification. (#413)
    • from_raw(raw: RawMessage) method is moved to the Message trait. To migrate, add use exonum::messages::Message. (#427)
    • Changed iterators over Patch and Changes data into custom types instead of standard collection iterators. (#393)
    • Fixed typo in SparceListIndexKeys and SparceListIndexValues. (#398)
    • Removed default state_hash implementation in the Service trait. (#399)
    • Removed info method from the Transaction. (#402)
    • Replaced config param timeout_events_capacity with internal_events_capacity. (#388)
    • The Transaction trait now inherits from ExonumJson. (#402)
    • Renamed DBKey to ProofPath and moved a part of its functionality to the BitsRange trait. (#420)

    New features

    • Added patch method to the Fork structure. (#393)
    • Added a public healthcheck endpoint. (#405)
    • Added serialization support of floating point types through special wrapper (F32 and F64). This feature is hidden behind float_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 in ConsensusConfig). (#426)
    • Added support for CORS. (#406)
    • Added run-dev command that performs a simplified node launch for testing purposes. (#423)

    Bug fixes

    • 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)

    Internal improvements

    • 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)
    Source code(tar.gz)
    Source code(zip)
  • v0.4(Dec 8, 2017)

    Added

    • 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 or Transaction 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 the message! macro. (#372)
    • Implemented additional checks for conversion from raw message. (#372)

    Changed

    • Changed a signature of open function in a rocksdb module. RocksDBOptions should pass by the reference. (#369)
    • ValidatorState in the ServiceContext replaced by the ValidatorId. (#366)
    • add_transaction in the ServiceContext replaced by the transaction_sender which implements the TransactionSend trait. (#366)
    • The Node constructor now requires db and services variables instead of blockchain instance. (#366)
    • The Blockchain constructor now requires services keypair and an ApiSender instance. (#366)
    • mount_*_api methods in Blockchain instance now do not require ApiContext. (#366)
    • Rename method last_height to height in Schema. (#379)
    • last_block now returns Block instead of Option<Block>. (#379)
    • Replaced rocksdb commandline parameter to more generic db-path. (#376)
    • Obsolete trait HexValue replaced by the FromHex and ToHex traits. (#372)
    • Changed Patch and Changes from typedefs into opaque structures. (#371)
    • Help text is displayed if required argument is not specified. (#390)

    Removed

    • Removed round method from the ServiceContext. (#366)
    • Removed redundant FromRaw trait. (#372)
    • Removed redundant current_height method in Schema. (#379)

    Fixed

    • 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)
    Source code(tar.gz)
    Source code(zip)
Owner
Exonum
A framework for private blockchains
Exonum
Marvin-Blockchain-Rust: A Rust-based blockchain implementation, part of the Marvin blockchain project.

Marvin Blockchain - Rust Implementation Welcome to the Rust implementation of the Marvin Blockchain. This project is part of a comparative study on bu

João Henrique Machado Silva 3 Sep 6, 2024
Torii ⛩️ is a simple, powerful and extensible open-source Internal Developer Portal

Torii ⛩️ Torii is a simple, powerful and extensible open-source Internal Developer Portal where developers can find all the tools and services they ne

Qovery 64 Dec 17, 2023
Rust implementation of Namada, a sovereign proof-of-stake blockchain that enables asset-agnostic private transfers

Namada Overview Namada is a sovereign proof-of-stake blockchain, using Tendermint BFT consensus, that enables multi-asset private transfers for any na

anoma 144 Jan 2, 2023
HyperCube is a free and open source blockchain project for everyone to use.

XPZ Public Chain HyperCube is a free and open source blockchain project for everyone to use. 日本語 简体中文 正體中文 HyperCube Wiki Wha is HyperCube HyperCube i

null 949 Dec 31, 2022
Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

Genolis 2 May 4, 2022
Tradechain is an open source blockchain designed for fast trading & interoperability for new, existing assets

Tradechain is an open source blockchain designed for fast trading & interoperability for new, existing assets. Help build the future of trading with other Tradians.

Matt Shaver 5 Jul 5, 2022
[Open Source] Blockchain Decentralized Lightweight VPN in Rust

[Open Source] Blockchain Decentralized Lightweight VPN in Rust DCVPN_Rust (Decentralized VPN in Rust) is an open-source initiative started by @anandgo

Anand Gokul 29 Jun 2, 2023
A lightweight and flexible framework to build your tailored blockchain applications.

TRINCI Blockchain Core A lightweight and flexible framework to build your tailored blockchain applications. Requirements The required dependencies to

Affidaty S.p.A. 11 Sep 26, 2022
Automated security testing for open source libraries and applications.

autovet continuously searches for security breaches in open source libraries and applications. Recently processed packages package version channel las

null 5 Aug 23, 2022
Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin.

OPI - Open Protocol Indexer Open Protocol Indexer, OPI, is the best-in-slot open-source indexing client for meta-protocols on Bitcoin. OPI uses a fork

Best in Slot 33 Dec 16, 2023
🧩Creating a blockchain wallet and integrating a couple of cryptographic algorithms to securely save the secrets.🧩

Rust Library For Cryptocurrency Wallet Folder Structure src : contains the source code of the library examples : contains some examples of the library

rstkey 3 Aug 12, 2024
Selendra is a multichains interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications.

Selendra An interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications. Read

Selendra 16 Nov 29, 2022
This monorepository contains the source code for the smart contracts implementing bAsset Protocol on the Terra blockchain.

Crll bAsset Contracts This monorepository contains the source code for the smart contracts implementing bAsset Protocol on the Terra blockchain. You c

null 3 Mar 29, 2024
A framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way

Solana PoC Framework DISCLAIMER: any illegal usage of this framework is heavily discouraged. Most projects on Solana offer a more than generous bug bo

Neodyme 165 Dec 18, 2022
Node implementation for aleph blockchain built with Substrate framework

This repository contains the Rust implementation of Aleph Zero blockchain node based on the Substrate framework. Aleph Zero is an open-source layer 1

Aleph Zero Foundation 55 Dec 15, 2022
Polkadex - An Orderbook-based Decentralized Exchange using the Substrate Blockchain Framework.

What is Polkadex? ?? Polkadex is a Open Source, Decentralized Exchange Platform made using Substrate Blockchain Framework that provides traders with t

Polkadex 243 Dec 16, 2022
Private payments for mobile devices.

MobileCoin Fog This is the README file for MobileCoin Fog. Note to Developers MobileCoin Fog is a prototype. Expect substantial changes before and aft

MobileCoin Foundation 36 May 6, 2022
Private payments for mobile devices.

Testing your first payment Please see TESTNET.md for instructions on participating in the TestNet! Sending your first payment Please see MAINNET.md fo

MobileCoin Foundation 1.1k Dec 30, 2022
Convert private keys to PKCS#8 format in pure Rust

topk8 Convert private keys to PKCS#8 format in pure Rust. The following formats are supported at the moment: PKCS#1 PEM (RSA PRIVATE KEY) SEC1 PEM (EC

kazk 1 Dec 10, 2021