CodeChain's official implementation in Rust.

Overview

CodeChain Build Status Gitter: CodeChain License: AGPL v3

CodeChain is a programmable open source blockchain technology optimal for developing and customizing multi-asset management systems.

Build

Download CodeChain code

git clone [email protected]:CodeChain-io/codechain.git
cd codechain

Build in release mode

cargo build --release

This will produce an executable in the ./target/release directory.

Setup

Using Docker

CodeChain supports the use of Docker to provide an easy and seamless installation process by providing a single package that gives the user everything he/she needs to get CodeChain up and running. In order to get the installation package, run the following command after installing Docker:

docker build -f docker/ubuntu/Dockerfile --tag kodebox/codechain:branch_or_tag_name .

WSL users may find difficulty in using Docker, and thus, it is highly recommended to use Ubuntu, or install Docker for Windows. When using Docker for Windows, it is necessary to enable Hyper-V in BIOS settings.

To see the Docker images created, run the following:

docker images

It will result in something like this:

REPOSITORY               TAG                  IMAGE ID            CREATED              SIZE
kodebox/codechain        branch_or_tag_name   6f8474d9bc7a        About a minute ago   1.85GB
ubuntu                   14.04                971bb384a50a        6 days ago           188MB

If you want to run the first image file, run the following command:

docker run -it kodebox/codechain:branch_or_tag_name

This should result in CodeChain running.

Making local database and keys persistent

CodeChain depends on the local database and keys commonly stored under the directories keys and db. A Docker container is independent of host environment and other Docker images. Therefore, when running a new Docker container with an image with a new CodeChain version or even with the same image, the database and keys are not persistent. To solve the problem, one can take advantage of the Docker's volume option. With the command below,

docker run -it -v codechain-db-vol:/app/codechain/db -v codechain-keys-vol:/app/codechain/keys kodebox/codechain:branch_or_tag_name

one can mount the volume codechain-db-vol into /app/db and the volume codechain-keys-vol into /app/keys in the container. This command will automatically create volumes if existing volumes with specified names do not exist. Because the default working directory specified in Dockerfile is /app/codechain, the default db and keys path are /app/codechain/db and app/codechian/keys. One can also customize the paths with CodeChain cli arguments base-path, key-path and db-path.

docker run -it -v codechain-db-vol:custom_base_path/db -v codechain-keys-vol:custom_base_path/keys kodebox/codechain:branch_or_tag_name --base-path custom_base_path
docker run -it -v codechain-db-vol:custom_db_path -v codechain-keys-vol:custom_keys_path kodebox/codechain:branch_or_tag_name --db-path custom_db_path --keys-path custom_keys_path

With the methods above, node organizers can manage their local persistent data using docker images.

Building From Source

Build Dependencies

CodeChain requires Rust version 1.40.0 to build. Using rustup is recommended.

  • For Linux Systems:

    • Ubuntu

      cmake, gcc, g++ and make are required for installing packages.

      $ curl https://sh.rustup.rs -sSf | sh
  • For Mac Systems:

    • MacOS 10.13.2 (17C88) tested

      cmake and clang are required for installing packages.

      $ curl https://sh.rustup.rs -sSf | sh
  • For Windows Systems:

    • Currently not supported for Windows. If on a Windows system, please install WSL to continue as Ubuntu.

Please make sure that all of the binaries above are included in your PATH. These conditions must be fulfilled before building CodeChain from source.

Download CodeChain's source code and go into its directory.

git clone [email protected]:CodeChain-io/codechain.git
cd codechain

Build as Release Version

cargo build --release

This will produce an executable in the ./target/release directory.

Using CodeChain SDK

Before starting to use the CodeChain SDK, please install node.js by going to this page.

Next, install the package with the following command:

npm install codechain-sdk or yarn add codechain-sdk

Run

To run CodeChain, just run

./target/release/codechain -c solo

You can create a block by sending a transaction through JSON-RPC or JavaScript SDK.

Formatting

Make sure you run rustfmt before creating a PR to the repo. You need to install the nightly-2019-12-19 version of rustfmt.

rustup toolchain install nightly-2019-12-19
rustup component add rustfmt --toolchain nightly-2019-12-19

To run rustfmt,

cargo +nightly-2019-12-19 fmt

Linting

You should run clippy also. This is a lint tool for rust. It suggests more efficient/readable code. You can see the clippy document for more information. You need to install the nightly-2019-12-19 version of clippy.

Install

rustup toolchain install nightly-2019-12-19
rustup component add clippy --toolchain nightly-2019-12-19

Run

cargo +nightly-2019-12-19 clippy --all --all-targets

Testing

Developers are strongly encouraged to write unit tests for new code, and to submit new unit tests for old code. Unit tests can be compiled and run with: cargo test --all. For more details, please reference Unit Tests.

License

CodeChain is licensed under the AGPL License - see the LICENSE file for details

Comments
  • CodeChain crashes on SIGINT

    CodeChain crashes on SIGINT

    $ cargo run
        Finished dev [unoptimized + debuginfo] target(s) in 0.17s
         Running `target/debug/codechain`
    #469691130 2018-07-09 17:19:56  main INFO codechain  Starting client
    #469691130 2018-07-09 17:19:57  main INFO codechain  Handshake Listening on 3485
    #469691130 2018-07-09 17:19:57  main INFO discovery  Node runs with unstructured discovery
    #469691130 2018-07-09 17:19:57  main INFO codechain  RPC Listening on 8080
    #469691130 2018-07-09 17:19:57  IO Worker #1 INFO sync  Sync extension initialized
    #469691130 2018-07-09 17:19:57  main INFO codechain  IPC Listening on /tmp/jsonrpc.ipc
    #469691130 2018-07-09 17:19:57  main INFO test_script  Initialization complete
    ^Cpure virtual method called
    terminate called without an active exception
    Aborted (core dumped)
    

    I bisected and it seems 9447945867d907589c9ef8313a3308e3467b4e37 caused this issue.

    bug cli 
    opened by sgkim126 14
  • Fix the integration test that tests block sync between 2 nodes

    Fix the integration test that tests block sync between 2 nodes

    Observations:

      ● 2 nodes › A-B diverged › nodeA becomes ahead › It should be synced when A-B connected
    
        Failed: Object {
          "code": -32031,
          "data": "ParcelAlreadyImported",
          "message": "Already Imported",
        }
    
          84 |
          85 |     describe("nodeA becomes ahead", () => {
        > 86 |       beforeEach(async () => {
             |       ^
          87 |         await nodeA.sendSignedParcel();
          88 |         expect(await nodeA.getBestBlockNumber()).toEqual(await nodeB.getBestBlockNumber() + 1);
          89 |       });
    
          at Env.beforeEach (node_modules/jest-jasmine2/build/jasmine_async.js:55:24)
          at Suite.describe (src/integration/sync.test.ts:86:7)
          at Suite.describe (src/integration/sync.test.ts:85:5)
    
      ● 2 nodes › A-B diverged › nodeA becomes ahead › It should be synced when A-B connected
    
        CodeChain exited with code 1
    
          84 |         })
          85 |         .on("close", (code, _signal) => {
        > 86 |           reject(Error(`CodeChain exited with code ${code}`));
             |                  ^
          87 |         });
          88 |
          89 |       const readline = createReadline({ input: this.process!.stderr });
    
          at ChildProcess.process.on.on (src/helper/spawn.ts:86:18)
    
    bug sync test 
    opened by joojis 13
  • Early stage of sync is slow with many 'AlreadyQueued' log

    Early stage of sync is slow with many 'AlreadyQueued' log

    #!/usr/bin/env bash
    set -e
    
    cargo build --release
    
    export ENABLE_DELEGATIONS=true
    export ENABLE_ORDER=true
    export RUST_LOG=info,mio=warn,tokio=warn,hyper=warn,rpc=info
    
    ./target/release/codechain -c corgi --jsonrpc-port 8080 --port 3485 --enable-devel-api --no-miner --no-discovery --bootstrap-addresses $BOOTSTRAP
    

    Sync on corgi is slow (less than few dozens per sec) on its early stage (less than 10000 blocks). After that suspicious logs such as 'AlreadyQueued' is reduced and synchronization speed become more faster (few hundreds per sec).

    It is not an accurate report. We should investigate more on this. sgkim suggested --no-tx-relay would help to speed up, but it seems not.

    sync performance 
    opened by foriequal0 12
  • Enhance Tendermint gossip

    Enhance Tendermint gossip

    We are now using push-based gossip. Since push-based gossip cannot get votes when it is needed, the node should keep future messages without verification, and that makes the code too complicated.

    Changing the gossip to ignore future messages and receive only valid messages at current state makes the code simpler.

    consensus performance 
    opened by majecty 11
  • Upgrade fixed-hash

    Upgrade fixed-hash

    Currently, CodeChain uses [email protected] that has a duplicated macro definition. The duplicated macro makes the latest clippy fail, so we should upgrade it to 0.2.5. You can read https://doc.rust-lang.org/cargo/commands/cargo-update.html to find how to do it.

    good first issue foundry 
    opened by sgkim126 10
  • Change signer public to signer index on Tendermint messages

    Change signer public to signer index on Tendermint messages

    VoteCollector now stores index(usize) instead of Public. EngineError::NotAuthorized is split to two: BlockNotAuthorized and MessageNotAuthorized. Because messages only have the index of the signer while blocks has the author field.

    I'm concerned about two points:

    1. Is it good to put the indices of the signers of the precommits on the block? This will improve the speed of verification because it'll use verify instead of recover.
    2. Is validators are thread-safe? (Search for self.validators and t.validators.)
    consensus 
    opened by hyunsikjeong 10
  • Proposal for chain_getPossibleAuthors

    Proposal for chain_getPossibleAuthors

    I want to propose the new RPC chain_getPossibleAuthors. Currently, there is no way to get the validator list. To generalize this, I want to add an RPC to get the authors that can be author of the block.

    The purpose of this RPC is returning the sets of the account that can generate the blocks at the given block number. It will return three of one.

    • []
      • It returns an empty list if anyone can be the block author.
      • PoW chain will return an empty list always.
    • PlatformAddress[]
      • Only some accounts can be the block author in PoA or Tendermint.
      • CodeChain will return the accounts that can be a block author in the given block number.
    • null
      • The node returns null if it cannot calculate the possible author set.
      • If the chain supports dynamic validators and the given block number is larger than the next block, the node cannot calculate the possible author set.

    Params

    1. block number: number | null
      • null means the possible authors of the next block.

    Returns

    null | PlatformAddress[]

    rpc 
    opened by sgkim126 9
  • Add reseal timer to miner

    Add reseal timer to miner

    1. Remove global codechain-timer types in codechain-network Now, codechain-timer is not an external package.
    2. Add timer to the client To resolve #239, resolve #613
    miner 
    opened by hyunsikjeong 9
  • Move PRs from Foundry

    Move PRs from Foundry

    @dynaxis @sgkim126 @Byeongjee @junbeomlee @MSNTCS Could you check the commits you made? I moved commits from Foundty to CodeChain. Please tell me if there are omitted commits that should be moved to CodeChain or if I moved commits that should not be moved.

    I run tests on my local machine. There are some flaky tests. If I run the tests multiple times, they eventually succeed.

    I've moved refactoring and bug fix PRs from Foundry to CodeChain

    • Execute self-nomination transactions on a new thread https://github.com/CodeChain-io/foundry/pull/98 @MSNTCS
    • Refactor BodyDownloader https://github.com/CodeChain-io/foundry/pull/116 @sgkim126
    • Add RPCs for checking peer best blocks & target blocks https://github.com/CodeChain-io/foundry/pull/117 @Byeongjee
    • Fix auto-self-nonimante https://github.com/CodeChain-io/foundry/pull/118 @majecty
    • Add an RPC getting minimum fees confiugred by each machine https://github.com/CodeChain-io/foundry/pull/127 @Byeongjee
    • Remove duplicated TermInfo https://github.com/CodeChain-io/foundry/pull/135 @majecty
    • Change constants to enumerations https://github.com/CodeChain-io/foundry/pull/136 @sgkim126
    • Fix typos https://github.com/CodeChain-io/foundry/pull/138 @Byeongjee
    • Upgrade codechain-crypto to 0.2.0 https://github.com/CodeChain-io/foundry/pull/141 @sgkim126
    • Fix typo https://github.com/CodeChain-io/foundry/pull/152 @Byeongjee
    • Report double votes in commit messages. https://github.com/CodeChain-io/foundry/pull/181 @Byeongjee
    • Fix typo in test helper's constants https://github.com/CodeChain-io/foundry/pull/224 Seonpyo
    • Assign unbound port numbers in test instances https://github.com/CodeChain-io/foundry/pull/255 @Byeongjee
    • Fix a wrong argument name https://github.com/CodeChain-io/foundry/pull/270 @Byeongjee
    • Remove ChainNotify::transactions_received() https://github.com/CodeChain-io/foundry/pull/282 @sgkim126
    • Fix wrong debug message https://github.com/CodeChain-io/foundry/pull/293 @Byeongjee
    • Change the error message that Foundry prints when account is not unlocked https://github.com/CodeChain-io/foundry/pull/294 @majecty
    • Disconnect a socket If Foundry meets EOF while reading the socket https://github.com/CodeChain-io/foundry/pull/309 @majecty
    • Remove unused dependencies in the sync module https://github.com/CodeChain-io/foundry/pull/313 @majecty
    • Cleanup code by removing unnecessary code https://github.com/CodeChain-io/foundry/pull/315 @sgkim126
    • Use ctypes::Header instead of encoded::Header in HeaderDownloader https://github.com/CodeChain-io/foundry/pull/325 @majecty
    • Remove unnecessary initialization of genesis header extra data https://github.com/CodeChain-io/foundry/pull/329 @Byeongjee
    • Remove unused verification code https://github.com/CodeChain-io/foundry/pull/330 @majecty
    • Remove unnecessary serialize/deserialize while calling import_header https://github.com/CodeChain-io/foundry/pull/331 @majecty
    • Rename import functions https://github.com/CodeChain-io/foundry/pull/332 @majecty
    • Simplify miner, client and block. https://github.com/CodeChain-io/foundry/pull/333 @sgkim126
    • Run mock tests https://github.com/CodeChain-io/foundry/pull/369 @majecty
    • Fix header RLP encoding in mock code https://github.com/CodeChain-io/foundry/pull/376 @majecty
    • Fix few things in test code https://github.com/CodeChain-io/foundry/pull/398 @majecty
    • Make the client hold the miner directly https://github.com/CodeChain-io/foundry/pull/410 @sgkim126
    • Upgrade parking_lot to 0.11.0 https://github.com/CodeChain-io/foundry/pull/435 @junha1
    • Upgrade vergen 3 https://github.com/CodeChain-io/foundry/pull/436 @dynaxis
    opened by majecty 7
  • Remove unused epoch-related code

    Remove unused epoch-related code

    This patch should not introduce breaking-change. I'll check that by synchronizing with the testnet. Resolve: https://github.com/CodeChain-io/codechain/issues/1507

    consensus 
    opened by foriequal0 7
  • Fix Tendermint timeout token nonce generation to be atomic

    Fix Tendermint timeout token nonce generation to be atomic

    1. Fix nonce generation to be atomic Atomic types should use fetch_* atomic operations.
    2. Move timeout_token_nonce to TendermintExtension from Tendermint.
    3. Fix nonce expiration check

    More explanation to 3., on fn on_timeout(&self, token: usize), nonce expiration was not worked as expected since token starts from ENGINE_TIMEOUT_TOKEN, while timeout_token_counter is starts from 0. ENGINE_TIMEOUT_TOKEN was 23, so the expiration check will simply become if 23 + i < 0 + i { return }

    Merge after: https://github.com/CodeChain-io/codechain/pull/1038 This is a separate patch with #1038, but this is too close to it, so this might cause conflicts.

    opened by foriequal0 7
  • Bump qs from 6.5.2 to 6.5.3 in /test

    Bump qs from 6.5.2 to 6.5.3 in /test

    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)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump node-fetch from 2.6.1 to 2.6.7 in /test

    Bump node-fetch from 2.6.1 to 2.6.7 in /test

    Bumps node-fetch from 2.6.1 to 2.6.7.

    Release notes

    Sourced from node-fetch's releases.

    v2.6.7

    Security patch release

    Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th party host while a redirect occurred

    What's Changed

    Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7

    v2.6.6

    What's Changed

    Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.5...v2.6.6

    v2.6.2

    fixed main path in package.json

    Commits
    • 1ef4b56 backport of #1449 (#1453)
    • 8fe5c4e 2.x: Specify encoding as an optional peer dependency in package.json (#1310)
    • f56b0c6 fix(URL): prefer built in URL version when available and fallback to whatwg (...
    • b5417ae fix: import whatwg-url in a way compatible with ESM Node (#1303)
    • 18193c5 fix v2.6.3 that did not sending query params (#1301)
    • ace7536 fix: properly encode url with unicode characters (#1291)
    • 152214c Fix(package.json): Corrected main file path in package.json (#1274)
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by endless, a new releaser for node-fetch since your current version.


    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)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump net2 from 0.2.32 to 0.2.37

    Bump net2 from 0.2.32 to 0.2.37

    Bumps net2 from 0.2.32 to 0.2.37.

    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)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies rust 
    opened by dependabot[bot] 0
  • Bump miow from 0.2.1 to 0.2.2

    Bump miow from 0.2.1 to 0.2.2

    Bumps miow from 0.2.1 to 0.2.2.

    Commits
    • 6fd7b9c Bump version to 0.2.2
    • 550efc2 Merge branch 'fix-sockaddr-convertion-v0.2.x' into 0.2.x
    • ca8db53 Stop using from_ne_bytes to be compatible with Rust < 1.32.0
    • 3e217e3 Bump net2 dep to 0.2.36 without invalid SocketAddr convertion
    • 27b77cc Adapt to winapi 0.2
    • 2783715 Safely convert SocketAddr into raw SOCKADDR
    • f6662ef Clarify wording of license information in README.
    • See full diff 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)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies rust 
    opened by dependabot[bot] 0
  • Bump crossbeam-channel from 0.3.8 to 0.4.4

    Bump crossbeam-channel from 0.3.8 to 0.4.4

    Bumps crossbeam-channel from 0.3.8 to 0.4.4.

    Changelog

    Sourced from crossbeam-channel's changelog.

    Version 0.8.1

    • Support targets that do not have atomic CAS on stable Rust (#698)

    Version 0.8.0

    • Bump the minimum supported Rust version to 1.36.
    • Bump crossbeam-channel to 0.5.
    • Bump crossbeam-deque to 0.8.
    • Bump crossbeam-epoch to 0.9.
    • Bump crossbeam-queue to 0.3.
    • Bump crossbeam-utils to 0.8.

    Version 0.7.3

    • Fix breakage with nightly feature due to rust-lang/rust#65214.
    • Bump crossbeam-channel to 0.4.
    • Bump crossbeam-epoch to 0.8.
    • Bump crossbeam-queue to 0.2.
    • Bump crossbeam-utils to 0.7.

    Version 0.7.2

    • Bump crossbeam-channel to 0.3.9.
    • Bump crossbeam-epoch to 0.7.2.
    • Bump crossbeam-utils to 0.6.6.

    Version 0.7.1

    • Bump crossbeam-utils to 0.6.5.

    Version 0.7.0

    • Remove ArcCell, MsQueue, and TreiberStack.
    • Change the interface of ShardedLock to match RwLock.
    • Add SegQueue::len().
    • Rename SegQueue::try_pop() to SegQueue::pop().
    • Change the return type of SegQueue::pop() to Result.
    • Introduce ArrayQueue.
    • Update dependencies.

    Version 0.6.0

    • Update dependencies.

    Version 0.5.0

    • Update crossbeam-channel to 0.3.
    • Update crossbeam-utils to 0.6.
    • Add AtomicCell, SharedLock, and WaitGroup.

    ... (truncated)

    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)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies rust 
    opened by dependabot[bot] 0
  • Bump socket2 from 0.3.6 to 0.3.19

    Bump socket2 from 0.3.6 to 0.3.19

    Bumps socket2 from 0.3.6 to 0.3.19.

    Changelog

    Sourced from socket2's changelog.

    0.4.5

    Changed

    Added

    Fixed

    0.4.4

    Fixed

    • Libc v0.2.114 fixed an issue where ip_mreqn where was not defined for Linux s390x.

    0.4.3 (yanked)

    Added

    0.4.2

    ... (truncated)

    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)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies rust 
    opened by dependabot[bot] 0
Releases(v2.2.5)
  • v2.2.5(Nov 25, 2020)

  • v2.2.4(Aug 18, 2020)

  • v2.2.1(Nov 20, 2019)

    | OS | Binary | SHA256 | |-------|---------------------------|------------| | Linux | codechain-2.2.1-x86_64-linux.tar.gz | 7fcfd6ad128b856ef6f86c437ac03a811aaea4da54da73eea997657c581db895 | | OS X | codechain-2.2.1-x86_64-darwin.tar.gz | 7665e2d249060b9d9667d945bed1d047ae38a006b8db74d6df5af78a1e6f8bd8 |

    • ~~Set finalized_view to None when restoring in the Commit step https://github.com/CodeChain-io/codechain/pull/1866~~ Reverted, and replaced by #1871
    • Do not assert the finalized_view while restoring https://github.com/CodeChain-io/codechain/pull/1871

    Misc:

    • Update build task to follow the release process #1858

    PR for this release: https://github.com/CodeChain-io/codechain/pull/1867

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Nov 11, 2019)

    | OS | Binary | SHA256 | |-------|---------------------------|------------| | Linux | codechain-2.2.0-x86_64-linux.tar.gz | 025f285934dd1499d68c44a5565d0b5f09139a1e9040357492d390546cc3d16d | | OS X | codechain-2.2.0-x86_64-darwin.tar.gz | 36bfceaff8f835262264c1b6045dc28037f2f6b3a2b7e5f90bbb55d0f536a9f8 |

    • Try to unlock account only when it is imported #1798
    • Block double vote attempts #1799 #1800 #1801
    • Do not generate a seal if the block is generated from a past view #1807
    • Recover TendermintState when empty the proposal timer is fired in a wrong time #1808
    • Fix the condition to check whether the new block could change the best block #1811
    • Block malicous users #1434
    • Enable all grandchild of the best block to become a best proposal block #1813
    • Fix crashes on SIGINT #1814
    • Fix the view calculation bug #1820
    • Distingush BlockHash and Tracker from H256 #1829
    • Extract packages
      • the crypto module #1803
      • secp256k1 #1809
    • Upgrade, updates
      • Upgrade rust to 1.37.0 #1806
      • Update clippy and rustfmt #1821
      • Upgrade url 1.7.2 #1810
      • Upgrade jsonrpc version to 14.0.3 #1830
      • Update README to correspond to rust toolchains #1825
    • Misc
      • Enable IPC in production build #1802
      • Fix typo in meatdata #1812
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Oct 2, 2019)

    | OS | Binary | SHA256 | |-------|---------------------------|------------| | Linux | codechain-2.1.0-x86_64-linux.tar.gz | 49c365794ff66cefbf6b4f258406f53be820c8d07a4e1ec1e342a884b27de880 | | OS X | codechain-2.1.0-x86_64-darwin.tar.gz | ad9d3ff0eafe13e36ac26c80768d27e5482aa8ee58147fa38015fa2c96e17008 |

    • Turn on lto for the release build #1757
    • Move to Commit state if enough precommits are collected #1771
    • Fix a step regression bug in Tendermint::worker::new_blocks #1772
    • Add Commit message in Tendermint #1770
    • Fix possible regression issue caused by ProposeWaitEmptyBlockTimer #1774
    • Remove compose and decompose transaction #1775
    • Import following downloaded blocks if the preceding block is already queued #1786
    • If the best block is not changed don't move to the next height #1789
    • Call new_blocks even though block verification queue is not empty
    • Fill the missing fields in the Transaction spec #1790
    • Remove order #1782
    • Remove locks in VoteCollector #1797
    • Stop generating block if consensus cannot make a seal #1792
    • Handle multiple proposals in a view correctly in Tendermint #1793
    • Make the order of votes consistent
    • Do not panic when height, view or step is changed while creating a block #1795
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Aug 30, 2019)

    | OS | Binary | SHA256 | |-------|---------------------------|------------| | Linux | codechain-2.0.0-x86_64-linux.tar.gz | ceeb1618881c69087413571c679affa01a12436ed2467d0eb3504c1c8c7152d1 | | OS X | codechain-2.0.0-x86_64-darwin.tar.gz | f61e6fd9f23cf3a89ea9f491126829be679878ef2f5490fd5003ededde9ef219 |

    • Store CommonParams in the states
    • Make the acceptable time gaps configurable #1512
    • Use the child of the best header to verify transactions #1545
    • Postpone the verification that needs CommonParams until runtime #1546
    • Fix chain_getMinTransactionFee to take null as the block number #1549
    • Fix the bug that doesn't store the tracker of WCCC #1547
    • Store the term id in the states
    • Implement the ChangeParams transaction
    • Implement chain_getCommonParams RPC #1604
    • Implement chain_getTermMetadata #1604
    • Make the sync module release memory aggressively #1585
    • Implement chain_getPossibleAuthors #1618
    • Fix a bug that Tendermint fails when a locked proposal is not imported #1626
    • Implement chain_getMetadataSeq #1636
    • Make the validator to refuse the block that has the same timestamp with the parent #1647
    • Implement chain_getTransactionSigner #1661
    • Make the order be able to have the same type of "fee asset" and "from asset" or the same type of "fee asset" and "to asset."
    • Reduce tendermint timeouts #1756
    • Fix the memory leak in the block sync process (#1749, #1753, #1755)
    • Punish a validator who voted two different blocks in the same round (#1640)
    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(May 30, 2019)

  • v1.3.0(May 13, 2019)

    • Fixed the broken commitHash RPC in a docker image #1443
    • Fixed the crash in Tendermint #1514
    • Added base-path option #236
    • Fixed the crash on exit #348
    • Reduced the booting time #1513

    | OS | Binary | SHA256 | |-------|---------------------------|------------| | Linux | codechain-1.3.0-x86_64-linux.tar.gz | 8c622452df9452b238620715cc1d037d6c42287b3597e246a3f963408a506f4a | | OS X | codechain-1.3.0-x86_64-darwin.tar.gz | 438856f1dfe7faac32974c232be25fae4d34b8ccd894c34dbe86e28c7caf1be1 |

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Apr 19, 2019)

    • Fixed the bug of version flag
    • Added "commit-hash" command
    • Added "net_recentNetworkUsage" RPC
    • Added "chain_getMinTransactionFee" RPC
    • Reduced network traffic
      • Request the header only it need
      • Send new header to random peer instead of all.
    • Disabled Order and stake delegation by default
    • Enhanced unit tests and e2e tests

    | OS | Binary | SHA256 | |-------|---------------------------|------------| | Linux | codechain-1.2.0-x86_64-linux.tar.gz | 83ae9b222e6a9afbab2ada81301783e411eb23777e812486bef048a614cd7616 | | OS X | codechain-1.2.0-x86_64-darwin.tar.gz | bc45c1fac0b41d540cf60badedda89c57aa1fc0860e9b3865d86714168292777 |

    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Apr 8, 2019)

  • v1.1.0(Apr 4, 2019)

  • v1.0.0(Apr 1, 2019)

Owner
CodeChain
A programmable open source blockchain engine
CodeChain
CodeChain's official implementation in Rust.

CodeChain CodeChain is a programmable open source blockchain technology optimal for developing and customizing multi-asset management systems. Build D

CodeChain 259 Dec 21, 2022
Official implementation of the YeeCo Root Chain (Layer 1)

yeeroot Official implementation of the YeeCo Root Chain (Layer 1) YeeCo is a permissionless, secure, high performance and scalable public blockchain p

YeeCo 29 Sep 20, 2022
the official Rust and C implementations of the BLAKE3 cryptographic hash function

BLAKE3 is a cryptographic hash function that is: Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2. Secure, unlike MD5 and SHA-1. And secure again

BLAKE3 team 3.7k Jan 6, 2023
Official Repository for the InvArch platform.

InvArch The Future of Innovation The world’s first intellectual property tokenization & networking platform. Official Repository for the InvArch platf

InvArch 29 Jan 4, 2023
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
IBC modules and relayer - Formal specifications and Rust implementation

ibc-rs Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project comprises primarily four crates: The ibc crate defines t

Informal Systems 296 Dec 31, 2022
A Rust implementation of BIP-0039

bip39-rs A Rust implementation of BIP0039 Changes See the changelog file, or the Github releases for specific tags. Documentation Add bip39 to your Ca

Infincia LLC 49 Dec 9, 2022
Rust implementation of Zcash protocol

The Parity Zcash client. Gitter Blog: Parity teams up with Zcash Foundation for Parity Zcash client Installing from source Installing the snap Running

Parity Technologies 183 Sep 8, 2022
A (mostly) pure-Rust implementation of various cryptographic algorithms.

Rust-Crypto A (mostly) pure-Rust implementation of various common cryptographic algorithms. Rust-Crypto seeks to create practical, auditable, pure-Rus

null 1.2k Dec 27, 2022
A pure-Rust implementation of group operations on Ristretto and Curve25519

curve25519-dalek A pure-Rust implementation of group operations on Ristretto and Curve25519. curve25519-dalek is a library providing group operations

dalek cryptography 611 Dec 25, 2022
[INACTIVE] TLS 1.2 implementation in Rust

suruga is Rust implementation of TLS 1.2. It currently implements some core parts of TLS 1.2, NIST P-256 ECDHE and chacha20-poly1305. Usage extern cra

klutzy/defunct 123 Dec 27, 2022
A prototype implementation of the Host Identity Protocol v2 for bare-metal systems, written in pure-rust.

Host Identity Protocol for bare-metal systems, using Rust I've been evaluating TLS replacements in constrained environments for a while now. Embedded

null 31 Dec 12, 2022
An implementation of the FP-Growth algorithm in pure Rust.

fp-growth-rs An implementation of the FP-Growth algorithm in pure Rust, which is inspired by enaeseth/python-fp-growth. Usage Add this to your Cargo.t

JmPotato 13 Dec 20, 2022
A pure-Rust implementation of various threshold secret sharing schemes

Threshold Secret Sharing Efficient pure-Rust library for secret sharing, offering efficient share generation and reconstruction for both traditional S

Snips 137 Dec 29, 2022
A Rust implementation of the Message Layer Security group messaging protocol

Molasses An extremely early implementation of the Message Layer Security group messaging protocol. This repo is based on draft 4 of the MLS protocol s

Trail of Bits 109 Dec 13, 2022
Pure Rust implementation of the RNCryptor cryptographic format by Rob Napier

rncryptor Rust Implementation of the RNCryptor spec This library implements the specification for the RNCryptor encrypted file format by Rob Napier. d

null 7 Jun 29, 2022
Implementation of the Web Cryptography specification in Rust.

[wip] webcrypto Implementation of the Web Cryptography specification in Rust. This crate hopes to ease interoperability between WASM and native target

Divy Srivastava 5 Mar 7, 2022
Implementation of Plonk by Hand in rust

plonk-by-fingers This is a toy implementation of the excellent Joshua Fitzgerald Plonk by hand (part2) (part3) tutorial all written from scratch, do n

adria0.eth 34 Dec 19, 2022
A Rust implementation of Trojan with QUIC tunnel, Lite-TLS and more.

Trojan-Oxide A Rust implementation of Trojan with QUIC tunnel, Lite-TLS and more. Overview Full support for the original Trojan Protocol, including TC

null 13 Oct 17, 2022