Full Code of nervosnetwork/muta for AI

master 28f2a60c574d cached
348 files
1.8 MB
486.9k tokens
3561 symbols
1 requests
Download .txt
Showing preview only (1,976K chars total). Download the full file or copy to clipboard to get everything.
Repository: nervosnetwork/muta
Branch: master
Commit: 28f2a60c574d
Files: 348
Total size: 1.8 MB

Directory structure:
gitextract_lg42y7z7/

├── .dockerignore
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug-report.md
│   │   ├── feature.md
│   │   └── help.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── semantic.yml
├── .gitignore
├── .helmignore
├── CHANGELOG/
│   ├── CHANGELOG-0.1.md
│   ├── CHANGELOG-0.2.md
│   └── README.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── Makefile
├── OWNERS
├── OWNERS_ALIASES
├── README.md
├── README_CN.md
├── SECURITY.md
├── benchmark/
│   ├── bench_executor.rs
│   ├── bench_mempool.rs
│   ├── benchmark_genesis.toml
│   ├── governance/
│   │   ├── mod.rs
│   │   └── types.rs
│   └── mod.rs
├── binding-macro/
│   ├── Cargo.toml
│   ├── src/
│   │   ├── common.rs
│   │   ├── cycles.rs
│   │   ├── hooks.rs
│   │   ├── lib.rs
│   │   ├── read_write.rs
│   │   └── service.rs
│   └── tests/
│       └── mod.rs
├── built-in-services/
│   ├── asset/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── tests/
│   │       │   └── mod.rs
│   │       └── types.rs
│   ├── authorization/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── metadata/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       └── tests/
│   │           └── mod.rs
│   ├── multi-signature/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── tests/
│   │       │   ├── curd_test.rs
│   │       │   ├── mod.rs
│   │       │   └── recursion_test.rs
│   │       └── types.rs
│   └── util/
│       ├── Cargo.toml
│       └── src/
│           ├── lib.rs
│           ├── tests/
│           │   └── mod.rs
│           └── types.rs
├── byzantine/
│   ├── Cargo.toml
│   ├── README.md
│   ├── generators.toml
│   ├── src/
│   │   ├── behaviors.rs
│   │   ├── commander.rs
│   │   ├── config.rs
│   │   ├── default_start.rs
│   │   ├── invalid_types.rs
│   │   ├── lib.rs
│   │   ├── message.rs
│   │   ├── strategy.rs
│   │   ├── utils.rs
│   │   └── worker.rs
│   └── tests/
│       ├── byz.test.ts
│       ├── jest.config.js
│       └── package.json
├── charts/
│   ├── deploy-chaos/
│   │   ├── .helmignore
│   │   ├── Chart.yaml
│   │   ├── templates/
│   │   │   ├── _helpers.tpl
│   │   │   ├── muta-benchmark.yaml
│   │   │   └── muta-chaos-crd.yaml
│   │   └── values.yaml
│   ├── muta/
│   │   ├── .helmignore
│   │   ├── Chart.yaml
│   │   ├── Makefile
│   │   ├── README.md
│   │   ├── templates/
│   │   │   ├── NOTES.txt
│   │   │   ├── _helpers.tpl
│   │   │   ├── canary.yaml
│   │   │   ├── deployment.yaml
│   │   │   ├── hpa.yaml
│   │   │   ├── ingress.yaml
│   │   │   ├── ksvc.yaml
│   │   │   └── service.yaml
│   │   └── values.yaml
│   └── preview/
│       ├── Chart.yaml
│       ├── Makefile
│       ├── requirements.yaml
│       └── values.yaml
├── clippy.toml
├── common/
│   ├── apm/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── metrics/
│   │       │   ├── api.rs
│   │       │   ├── consensus.rs
│   │       │   ├── mempool.rs
│   │       │   ├── network.rs
│   │       │   └── storage.rs
│   │       └── metrics.rs
│   ├── channel/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── config-parser/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       └── types.rs
│   ├── crypto/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── logger/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── log.yml
│   │   └── src/
│   │       ├── date_fixed_roller.rs
│   │       └── lib.rs
│   ├── merkle/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   └── pubsub/
│       ├── Cargo.toml
│       └── src/
│           └── lib.rs
├── core/
│   ├── api/
│   │   ├── Cargo.toml
│   │   ├── source/
│   │   │   └── graphiql.html
│   │   └── src/
│   │       ├── adapter/
│   │       │   └── mod.rs
│   │       ├── config.rs
│   │       ├── lib.rs
│   │       └── schema/
│   │           ├── block.rs
│   │           ├── mod.rs
│   │           ├── receipt.rs
│   │           └── transaction.rs
│   ├── cli/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── error.rs
│   │       ├── lib.rs
│   │       └── tests/
│   │           ├── config.toml
│   │           ├── genesis.toml
│   │           ├── mod.rs
│   │           └── service_mapping.rs
│   ├── consensus/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── adapter.rs
│   │       ├── consensus.rs
│   │       ├── engine.rs
│   │       ├── fixed_types.rs
│   │       ├── lib.rs
│   │       ├── message.rs
│   │       ├── status.rs
│   │       ├── synchronization.rs
│   │       ├── tests/
│   │       │   ├── engine.rs
│   │       │   ├── mod.rs
│   │       │   ├── status.rs
│   │       │   └── synchronization.rs
│   │       ├── util.rs
│   │       ├── wal.rs
│   │       └── wal_proto.rs
│   ├── mempool/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── adapter/
│   │       │   ├── message.rs
│   │       │   └── mod.rs
│   │       ├── context.rs
│   │       ├── lib.rs
│   │       ├── map.rs
│   │       ├── tests/
│   │       │   ├── mempool.rs
│   │       │   └── mod.rs
│   │       └── tx_cache.rs
│   ├── network/
│   │   ├── Cargo.toml
│   │   ├── examples/
│   │   │   └── buycopy.rs
│   │   ├── src/
│   │   │   ├── common.rs
│   │   │   ├── compression/
│   │   │   │   ├── mod.rs
│   │   │   │   └── snappy.rs
│   │   │   ├── config.rs
│   │   │   ├── connection/
│   │   │   │   ├── control.rs
│   │   │   │   ├── keeper.rs
│   │   │   │   └── mod.rs
│   │   │   ├── endpoint.rs
│   │   │   ├── error.rs
│   │   │   ├── event.rs
│   │   │   ├── lib.rs
│   │   │   ├── message/
│   │   │   │   ├── mod.rs
│   │   │   │   ├── serde.rs
│   │   │   │   └── serde_multi.rs
│   │   │   ├── metrics.rs
│   │   │   ├── outbound/
│   │   │   │   ├── gossip.rs
│   │   │   │   ├── mod.rs
│   │   │   │   └── rpc.rs
│   │   │   ├── peer_manager/
│   │   │   │   ├── addr_set.rs
│   │   │   │   ├── diagnostic.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── peer.rs
│   │   │   │   ├── retry.rs
│   │   │   │   ├── save_restore.rs
│   │   │   │   ├── session_book.rs
│   │   │   │   ├── shared.rs
│   │   │   │   ├── tags.rs
│   │   │   │   ├── test_manager.rs
│   │   │   │   ├── time.rs
│   │   │   │   └── trust_metric.rs
│   │   │   ├── protocols/
│   │   │   │   ├── core.rs
│   │   │   │   ├── discovery/
│   │   │   │   │   ├── addr.rs
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   ├── protocol.rs
│   │   │   │   │   └── substream.rs
│   │   │   │   ├── discovery.rs
│   │   │   │   ├── identify/
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── common.rs
│   │   │   │   │   ├── identification.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   ├── protocol.rs
│   │   │   │   │   └── tests.rs
│   │   │   │   ├── identify.rs
│   │   │   │   ├── macro.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── ping/
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   └── protocol.rs
│   │   │   │   ├── ping.rs
│   │   │   │   ├── transmitter/
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   └── protocol.rs
│   │   │   │   └── transmitter.rs
│   │   │   ├── reactor/
│   │   │   │   ├── mod.rs
│   │   │   │   ├── router.rs
│   │   │   │   └── rpc_map.rs
│   │   │   ├── rpc.rs
│   │   │   ├── selfcheck.rs
│   │   │   ├── service.rs
│   │   │   ├── test/
│   │   │   │   └── mock.rs
│   │   │   ├── test.rs
│   │   │   └── traits.rs
│   │   └── tests/
│   │       ├── common.rs
│   │       └── gossip_test.rs
│   ├── run/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   └── storage/
│       ├── Cargo.toml
│       ├── examples/
│       │   └── bench.rs
│       └── src/
│           ├── adapter/
│           │   ├── memory.rs
│           │   ├── mod.rs
│           │   └── rocks.rs
│           ├── lib.rs
│           └── tests/
│               ├── adapter.rs
│               ├── mod.rs
│               └── storage.rs
├── devtools/
│   ├── chain/
│   │   ├── README.md
│   │   ├── config.toml
│   │   └── genesis.toml
│   ├── docker-build/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.build-env
│   │   └── Dockerfile.e2e-env
│   ├── keypair/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── keypair.yml
│   │       └── main.rs
│   └── kube/
│       └── deploy-chaos-crd-template.yml
├── docs/
│   ├── _config.yml
│   ├── build/
│   │   └── gql_api.sh
│   ├── graphql_api.md
│   ├── how_to_deploy_a_core_crate.md
│   ├── layout.md
│   └── resources.md
├── examples/
│   ├── byzantine_node.rs
│   ├── config-1.toml
│   ├── config-2.toml
│   ├── config-3.toml
│   ├── config-4.toml
│   ├── genesis.toml
│   └── muta-chain.rs
├── framework/
│   ├── Cargo.toml
│   └── src/
│       ├── binding/
│       │   ├── mod.rs
│       │   ├── sdk/
│       │   │   ├── chain_querier.rs
│       │   │   └── mod.rs
│       │   ├── state/
│       │   │   ├── mod.rs
│       │   │   ├── trie.rs
│       │   │   └── trie_db.rs
│       │   ├── store/
│       │   │   ├── array.rs
│       │   │   ├── map.rs
│       │   │   ├── mod.rs
│       │   │   └── primitive.rs
│       │   └── tests/
│       │       ├── mod.rs
│       │       ├── sdk.rs
│       │       ├── state.rs
│       │       └── store.rs
│       ├── executor/
│       │   ├── error.rs
│       │   ├── factory.rs
│       │   ├── mod.rs
│       │   └── tests/
│       │       ├── framework.rs
│       │       ├── framework_genesis_services.toml
│       │       ├── genesis_services.toml
│       │       ├── mod.rs
│       │       └── test_service.rs
│       └── lib.rs
├── jenkins-x-chaos.yml
├── jenkins-x-e2e.yml
├── jenkins-x-lint.yml
├── jenkins-x-unit.yml
├── jenkins-x.yml
├── protocol/
│   ├── Cargo.toml
│   └── src/
│       ├── codec/
│       │   ├── block.rs
│       │   ├── macro.rs
│       │   ├── mod.rs
│       │   ├── primitive.rs
│       │   ├── receipt.rs
│       │   ├── tests/
│       │   │   └── mod.rs
│       │   └── transaction.rs
│       ├── fixed_codec/
│       │   ├── mod.rs
│       │   ├── primitive.rs
│       │   ├── receipt.rs
│       │   ├── tests/
│       │   │   ├── fixed_codec.rs
│       │   │   └── mod.rs
│       │   └── transaction.rs
│       ├── lib.rs
│       ├── traits/
│       │   ├── api.rs
│       │   ├── binding.rs
│       │   ├── consensus.rs
│       │   ├── executor.rs
│       │   ├── mempool.rs
│       │   ├── mod.rs
│       │   ├── network.rs
│       │   └── storage.rs
│       └── types/
│           ├── block.rs
│           ├── genesis.rs
│           ├── mod.rs
│           ├── primitive.rs
│           ├── receipt.rs
│           ├── service_context.rs
│           └── transaction.rs
├── rust-toolchain
├── rustfmt.toml
├── src/
│   └── lib.rs
└── tests/
    ├── common/
    │   ├── mod.rs
    │   ├── node/
    │   │   ├── config.rs
    │   │   ├── consts.rs
    │   │   ├── diagnostic.rs
    │   │   ├── full_node/
    │   │   │   ├── builder.rs
    │   │   │   ├── default_start.rs
    │   │   │   ├── error.rs
    │   │   │   └── memory_db.rs
    │   │   ├── full_node.rs
    │   │   └── sync.rs
    │   └── node.rs
    ├── e2e/
    │   ├── jest.config.js
    │   ├── package.json
    │   ├── sdk.test.ts
    │   ├── tsconfig.json
    │   ├── utils.ts
    │   └── wait-for-it.sh
    ├── trust_metric.rs
    ├── trust_metric_all/
    │   ├── client_node.rs
    │   ├── common.rs
    │   ├── consensus.rs
    │   ├── logger.rs
    │   ├── mempool.rs
    │   └── mod.rs
    └── verify_chain_id.rs

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
devtools/chain/data
devtools/dex
.github
docs
tests/e2e/node_modules


================================================
FILE: .github/CODEOWNERS
================================================
/ @nervosnetwork/muta-dev-team

================================================
FILE: .github/ISSUE_TEMPLATE/bug-report.md
================================================
---
name: Bug Report
about: Report a bug
labels: t:bug
---

<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
-->

**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:

**Environment**:

- MutaChain version or commit hash (`MutaChain -V`):
- OS (e.g: `cat /etc/os-release`):
- Kernel (e.g. `uname -a`):
- Others:


================================================
FILE: .github/ISSUE_TEMPLATE/feature.md
================================================
---
name: Feature Request
about: Suggest a feature to the Muta-Chain project
labels: t:feature
---

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

**Why is this needed**:


================================================
FILE: .github/ISSUE_TEMPLATE/help.md
================================================
---
name: Help me
about: What kind of help do you want?
labels: t:help
---


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--  Thanks for sending a pull request! -->
<!--  Have I run `make ci`? -->

**What this PR does / why we need it**:


**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #


**Which docs this PR relation**:

Ref #


**Which toolchain this PR adaption**:

No Breaking Change


**Special notes for your reviewer**:


================================================
FILE: .github/semantic.yml
================================================
# By default types specified in commitizen/conventional-commit-types is used.
# See: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json
# You can override the valid types

# Angular
types:
    - build # Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
    - ci # Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
    - docs # Documentation only changes
    - feat # A new feature
    - fix # A bug fix
    - perf # A code change that improves performance
    - refactor # A code change that neither fixes a bug nor adds a feature
    - style # Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
    - test # Adding missing tests or correcting existing tests


================================================
FILE: .gitignore
================================================
# Generated by Cargo
# will have compiled files and executables
/target/

# These are backup files generated by rustfmt
**/*.rs.bk

# Added by cargo
#
# already existing elements are commented out

/target
#**/*.rs.bk

# OS
.DS_Store

# IDE
.idea/
.vscode/

# dev
devtools/chain/data

tests/e2e/node_modules
tests/e2e/yarn-error.log

# rocksdb
**/rocksdb/
logs/

# cargo.lock
Cargo.lock

# free space, you can store anything you want here
free-space

byzantine/tests/node_modules


================================================
FILE: .helmignore
================================================
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
*.png

# known compile time folders
target/
node_modules/
vendor/

================================================
FILE: CHANGELOG/CHANGELOG-0.1.md
================================================


## [0.1.2-beta](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta2...v0.1.2-beta) (2020-06-04)



## [0.1.2-beta2](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta1...v0.1.2-beta2) (2020-06-03)


### Features

* supported storage metrics ([#307](https://github.com/nervosnetwork/muta/issues/307)) ([2531b8d](https://github.com/nervosnetwork/muta/commit/2531b8da8e8f2a839484adef62dd93f1deff12dd))



## [0.1.2-beta1](https://github.com/nervosnetwork/muta/compare/v0.1.0-rc.2-huobi...v0.1.2-beta1) (2020-06-01)


### Bug Fixes

* **ci:** Increase timeout in ci ([#262](https://github.com/nervosnetwork/muta/issues/262)) ([a12124a](https://github.com/nervosnetwork/muta/commit/a12124a115512196894a7ca88fc42555db927666))
* **mempool:** check exsit before insert a transaction ([#257](https://github.com/nervosnetwork/muta/issues/257)) ([be3c139](https://github.com/nervosnetwork/muta/commit/be3c13929d2a59f21655b040aa6738c3d43db611))
* **network:** broken users_cast ([#261](https://github.com/nervosnetwork/muta/issues/261)) ([f36eabd](https://github.com/nervosnetwork/muta/commit/f36eabdc5040bc5cbf0d2011c942867150534a41))
* **network:** reconnection fialure ([#273](https://github.com/nervosnetwork/muta/issues/273)) ([9f594b8](https://github.com/nervosnetwork/muta/commit/9f594b8af12e1810bd0cbf23f20ca718d96f6e3a))
* reboot when the diff between height and exec_height more than one ([#267](https://github.com/nervosnetwork/muta/issues/267)) ([e8f8595](https://github.com/nervosnetwork/muta/commit/e8f85958d85e3363fccbfde3971684ebf2fceb4d))
* **sync:** Avoid requesting redundant transactions ([#259](https://github.com/nervosnetwork/muta/issues/259)) ([8ece029](https://github.com/nervosnetwork/muta/commit/8ece0299fe185667ac23fed92d8c2f156c0e2c5b))
* binding store type should return Option None instead of panic when get none ([#238](https://github.com/nervosnetwork/muta/issues/238)) ([54bdbb9](https://github.com/nervosnetwork/muta/commit/54bdbb93df1a1a85a83814dcb29461acf3645d10))
* **config:** use serde(default) for rocksdb conf ([#229](https://github.com/nervosnetwork/muta/issues/229)) ([2a03e73](https://github.com/nervosnetwork/muta/commit/2a03e73c77807e80020c50bb287adf4d428632e5))
* **storage:** fix rocksdb too many open files error ([#228](https://github.com/nervosnetwork/muta/issues/228)) ([96c32cd](https://github.com/nervosnetwork/muta/commit/96c32cd7956220beddca33b22d4663a675573ba9))
* **sync:** set crypto info when synchronization ([#235](https://github.com/nervosnetwork/muta/issues/235)) ([84ccfc1](https://github.com/nervosnetwork/muta/commit/84ccfc1d8422265028ad7a0b460b4e297d161fe3))
* docker compose configs ([#210](https://github.com/nervosnetwork/muta/issues/210)) ([acc5265](https://github.com/nervosnetwork/muta/commit/acc52653d304ac5cd25a9d643b263a2f462f7d43))
* hang when kill it ([#225](https://github.com/nervosnetwork/muta/issues/225)) ([dc51240](https://github.com/nervosnetwork/muta/commit/dc512405f32854f165f3145c01d022bca4fff93b))
* panic when start ([#214](https://github.com/nervosnetwork/muta/issues/214)) ([d2da69b](https://github.com/nervosnetwork/muta/commit/d2da69b5941a88376b64453f7d3c10eca3f67d81))
* **muta:** hangs up on one cpu core ([#203](https://github.com/nervosnetwork/muta/issues/203)) ([555dd9e](https://github.com/nervosnetwork/muta/commit/555dd9e694fda043be01f90c91396efd7fe0ace5))


### Features

* split monitor network url  ([#300](https://github.com/nervosnetwork/muta/issues/300)) ([1237354](https://github.com/nervosnetwork/muta/commit/12373544598d0dae852321cbe3b4e8dab5c70e54))
* supported mempool monitor ([#298](https://github.com/nervosnetwork/muta/issues/298)) ([cc7fdfa](https://github.com/nervosnetwork/muta/commit/cc7fdfa7a7c99466d76d4fe9c1a3537ab8754837))
* supported new metrics ([#294](https://github.com/nervosnetwork/muta/issues/294)) ([e59364a](https://github.com/nervosnetwork/muta/commit/e59364a7759960d8a3279dc78844965f54f4bf62))
* **apm:** add api get_block metrics ([#276](https://github.com/nervosnetwork/muta/issues/276)) ([6ea21e3](https://github.com/nervosnetwork/muta/commit/6ea21e3e0fe08898264f13938cf849c197531afa))
* **apm:** Add opentracing ([#270](https://github.com/nervosnetwork/muta/issues/270)) ([cece21d](https://github.com/nervosnetwork/muta/commit/cece21d8e865223c8679e54d0253ced70dab4c0a))
* **apm:** tracing height and round in OverlordMsg ([#287](https://github.com/nervosnetwork/muta/issues/287)) ([a8c09ff](https://github.com/nervosnetwork/muta/commit/a8c09ff363e8caac9c0977db2fc6cffb782961d7))
* **ci:** add e2e ([#236](https://github.com/nervosnetwork/muta/issues/236)) ([3058722](https://github.com/nervosnetwork/muta/commit/3058722081084b7cb8f423c26eba9e88707fca18))
* **consensus:** add proof check logic for sync and consensus ([#224](https://github.com/nervosnetwork/muta/issues/224)) ([b19502f](https://github.com/nervosnetwork/muta/commit/b19502f48e6d314717a8a2286ada58f6097c6f31))
* **consensus:** change validator list ([#211](https://github.com/nervosnetwork/muta/issues/211)) ([bb04d2c](https://github.com/nervosnetwork/muta/commit/bb04d2c961110276d38cf0e07239d5e72e8125a8))
* **consensus:** integrate trust metric to consensus ([#244](https://github.com/nervosnetwork/muta/issues/244)) ([3dd6bc1](https://github.com/nervosnetwork/muta/commit/3dd6bc1796ca3e6c76cb99beefd5911d35a5e8ee))
* **mempool:** integrate trust metric ([#245](https://github.com/nervosnetwork/muta/issues/245)) ([49474fd](https://github.com/nervosnetwork/muta/commit/49474fddde3ffc45d564544bb5887bb09a37da1d))
* **metric:** introduce metric using prometheus ([#271](https://github.com/nervosnetwork/muta/issues/271)) ([3d1dc4f](https://github.com/nervosnetwork/muta/commit/3d1dc4fcf196b8616f41dc4cd2a5ba0c0a5ab422))
* **metrics:** mempool, consensus and sync ([#275](https://github.com/nervosnetwork/muta/issues/275)) ([12e4918](https://github.com/nervosnetwork/muta/commit/12e4918d9925868407f854af29410d8ecafe4d48))
* **network:** add metrics ([#274](https://github.com/nervosnetwork/muta/issues/274)) ([56a9b62](https://github.com/nervosnetwork/muta/commit/56a9b62251106d44df33c43d4590575df25df61a))
* **network:** add trace header to network msg ([#281](https://github.com/nervosnetwork/muta/issues/281)) ([6509cbe](https://github.com/nervosnetwork/muta/commit/6509cbec2f700238b2259943212e0968b58404ce))
* **network:** peer trust metric ([#231](https://github.com/nervosnetwork/muta/issues/231)) ([5abefeb](https://github.com/nervosnetwork/muta/commit/5abefebddacfb58415f2a319098bb164ceaa8c81))
* add tx hook in framework ([#218](https://github.com/nervosnetwork/muta/issues/218)) ([cdeb9fd](https://github.com/nervosnetwork/muta/commit/cdeb9fd1e18e198636fa59d91aead85d65cf9852))
* re-execute blocks to recover current status ([#222](https://github.com/nervosnetwork/muta/issues/222)) ([1cd7cb6](https://github.com/nervosnetwork/muta/commit/1cd7cb6d4fbc599bac65bd2c36b507088a3fa041))
* **network:** rpc remote server error response ([#205](https://github.com/nervosnetwork/muta/issues/205)) ([bb993ac](https://github.com/nervosnetwork/muta/commit/bb993ac1f5fe44a2f6a72c8718572accacb27dc3))
* **sync:** Split a transaction in a block into multiple requests ([#221](https://github.com/nervosnetwork/muta/issues/221)) ([0bbf43c](https://github.com/nervosnetwork/muta/commit/0bbf43c49d2df49d70b4bc816ac24c3bc3603a1a))
* add actix payload size limit config ([#204](https://github.com/nervosnetwork/muta/issues/204)) ([97319d6](https://github.com/nervosnetwork/muta/commit/97319d6d22c8143ba35c3fe42d56f2cfbc131e37))


### BREAKING CHANGES

* **network:** change rpc response

* change(network): bump transmitter protocol version



# [0.1.0-rc.2-huobi](https://github.com/nervosnetwork/muta/compare/v0.0.1-rc1-huobi...v0.1.0-rc.2-huobi) (2020-02-24)


### Bug Fixes

* **mempool:** fix repeat txs, add flush_incumbent_queue ([#189](https://github.com/nervosnetwork/muta/issues/189)) ([e0db745](https://github.com/nervosnetwork/muta/commit/e0db745419c5ada3d6e9dc4416945a0775a8f18b))
* **muta:** hangs up running on single core environment ([#201](https://github.com/nervosnetwork/muta/issues/201)) ([09f5b4e](https://github.com/nervosnetwork/muta/commit/09f5b4ed70a519155933f7fd4c2015ff512dfdb1))
* block hash from bytes ([#192](https://github.com/nervosnetwork/muta/issues/192)) ([7ca0af4](https://github.com/nervosnetwork/muta/commit/7ca0af46edbd00e4ba43e8646e77fa41aba781cf))


### Features

* check size and cycle limit when insert tx into mempool ([#195](https://github.com/nervosnetwork/muta/issues/195)) ([92bdf2d](https://github.com/nervosnetwork/muta/commit/92bdf2d5147502e1d250fdae47b8ae2c2cfce23f))
* remove redundant wal transactions when commit ([#197](https://github.com/nervosnetwork/muta/issues/197)) ([3aff1db](https://github.com/nervosnetwork/muta/commit/3aff1dbb2dcdabaaf9cbecb9c3e9757a2c737354))
* Supports actix in tokio ([#200](https://github.com/nervosnetwork/muta/issues/200)) ([266c1cb](https://github.com/nervosnetwork/muta/commit/266c1cb2cf6223759eba4ca9771ee21b244db3a4))
* **api:** Supports configuring the max number of connections. ([#194](https://github.com/nervosnetwork/muta/issues/194)) ([6cbdd26](https://github.com/nervosnetwork/muta/commit/6cbdd267b7ff56eefbe23bffc8e4dc589272111d))
* **service:** upgrade asset service ([#150](https://github.com/nervosnetwork/muta/issues/150)) ([8925390](https://github.com/nervosnetwork/muta/commit/8925390b59353d853dd1266cdcfe6db1258a8296))


### Reverts

* Revert "fix(muta): hangs up running on single core environment (#201)" (#202) ([28e685a](https://github.com/nervosnetwork/muta/commit/28e685a62b82c1a91699b4495d430b0757e5438d)), closes [#201](https://github.com/nervosnetwork/muta/issues/201) [#202](https://github.com/nervosnetwork/muta/issues/202)



## [0.0.1-rc1-huobi](https://github.com/nervosnetwork/muta/compare/v0.0.1-rc.1-huobi...v0.0.1-rc1-huobi) (2020-02-15)


### Bug Fixes

* **ci:** fail to install sccache after new rust-toolchain ([#68](https://github.com/nervosnetwork/muta/issues/68)) ([f961415](https://github.com/nervosnetwork/muta/commit/f961415803ae6d38b70e97a810f33a1b60639d43))
* **consensus:** check logs bloom when check block ([#168](https://github.com/nervosnetwork/muta/issues/168)) ([0984989](https://github.com/nervosnetwork/muta/commit/09849893270cc0908e2ee965e7e8b7c46ada0f16))
* **consensus:** empty block receipts root ([#61](https://github.com/nervosnetwork/muta/issues/61)) ([89ed4d2](https://github.com/nervosnetwork/muta/commit/89ed4d2c4a708f278e7cd777c562f1f1fb5a9755))
* **consensus:** encode overlord message and verify signature ([#39](https://github.com/nervosnetwork/muta/issues/39)) ([b11e69e](https://github.com/nervosnetwork/muta/commit/b11e69e49ed195d0d23f22b6abf1387f4a4c0c94))
* **consensus:** fix check state roots ([#107](https://github.com/nervosnetwork/muta/issues/107)) ([cf45c3b](https://github.com/nervosnetwork/muta/commit/cf45c3ba39eb65bdb012165e232352a9187a6f0d))
* **consensus:** Get authority list returns none. ([#4](https://github.com/nervosnetwork/muta/issues/4)) ([2a7eb3c](https://github.com/nervosnetwork/muta/commit/2a7eb3c26fade5a065ec2435b4ba46b6c16f223a))
* **consensus:** state root can not be clear ([#140](https://github.com/nervosnetwork/muta/issues/140)) ([4ea1df4](https://github.com/nervosnetwork/muta/commit/4ea1df425620482f36daf61b4b50edb83807efdd))
* **consensus:** sync txs context no session id ([#167](https://github.com/nervosnetwork/muta/issues/167)) ([53136c3](https://github.com/nervosnetwork/muta/commit/53136c3dfdf0e7b29762cd72f51eeb35d52804c2))
* **doc:** fix graphql_api doc link and doc-api build sh ([#161](https://github.com/nervosnetwork/muta/issues/161)) ([e67e2b2](https://github.com/nervosnetwork/muta/commit/e67e2b24bf0609c263f59381a83fcf04d2227583))
* **executor:** wrong hook logic ([#127](https://github.com/nervosnetwork/muta/issues/127)) ([8c6a246](https://github.com/nervosnetwork/muta/commit/8c6a246a1b64a197371305856148b034320f1fa0))
* **framework/executor:** Catch any errors in the call. ([#92](https://github.com/nervosnetwork/muta/issues/92)) ([739a126](https://github.com/nervosnetwork/muta/commit/739a126c86643b28e1c47aef87d8bd803b9fe8d9))
* **keypair:** Use hex encoding common_ref. ([#79](https://github.com/nervosnetwork/muta/issues/79)) ([abbce4c](https://github.com/nervosnetwork/muta/commit/abbce4c15919f45f824bd4967ea64f8234548765))
* **makefile:** Docker push to the correct image ([#146](https://github.com/nervosnetwork/muta/issues/146)) ([05f6396](https://github.com/nervosnetwork/muta/commit/05f6396f1786b46b4cf9c41e3f700b37ebaddb68))
* **mempool:** Always get the latest epoch id when `package`. ([#30](https://github.com/nervosnetwork/muta/issues/30)) ([9a77ebf](https://github.com/nervosnetwork/muta/commit/9a77ebf9ecba6323cc81cd094774e32fd28b946e))
* **mempool:** broadcast new transactions ([#32](https://github.com/nervosnetwork/muta/issues/32)) ([086ec7e](https://github.com/nervosnetwork/muta/commit/086ec7eb6ca2c8f6afc14767d51efdb91533f932))
* **mempool:** Fix concurrent insert bug of mempool ([#19](https://github.com/nervosnetwork/muta/issues/19)) ([515eec2](https://github.com/nervosnetwork/muta/commit/515eec2ab65a2d57a5ca742c774daeb9cef99354))
* **mempool:** Resize the queue to ensure correct switching. ([#18](https://github.com/nervosnetwork/muta/issues/18)) ([ebf1ae3](https://github.com/nervosnetwork/muta/commit/ebf1ae34861fc48297813cdc465e4d9c99e059d4))
* **mempool:** sync proposal txs doesn't insert txs at all ([#179](https://github.com/nervosnetwork/muta/issues/179)) ([33f39c5](https://github.com/nervosnetwork/muta/commit/33f39c5bac0235a8261c53327c558864a6149c8a))
* **network:** dead lock in peer manager ([#24](https://github.com/nervosnetwork/muta/issues/24)) ([a74017a](https://github.com/nervosnetwork/muta/commit/a74017aa9d84b6b862683860e63c000b4048e459))
* **network:** default rpc timeout to 4 seconds ([#115](https://github.com/nervosnetwork/muta/issues/115)) ([666049c](https://github.com/nervosnetwork/muta/commit/666049c54c8eee8291cc173230caccb35de137ca))
* **network:** fail to bootstrap if bootstrap isn't start already ([#46](https://github.com/nervosnetwork/muta/issues/46)) ([9dd515a](https://github.com/nervosnetwork/muta/commit/9dd515a3e09f1c158dff6536ed38eb5116f4317f))
* **network:** give up retry ([#152](https://github.com/nervosnetwork/muta/issues/152)) ([34d052a](https://github.com/nervosnetwork/muta/commit/34d052aaba1684333fdd49f86e54c103064fa2f6))
* **network:** never reconnect bootstrap again after failure ([#22](https://github.com/nervosnetwork/muta/issues/22)) ([79d66bd](https://github.com/nervosnetwork/muta/commit/79d66bd06e61ff6ef41c12ada91cf6485482aa43))
* **network:** NoSessionId Error ([#33](https://github.com/nervosnetwork/muta/issues/33)) ([4761d79](https://github.com/nervosnetwork/muta/commit/4761d797dded9534e0c0b5e43c6e519055542c2c))
* **network:** rpc memory leak if rpc call future is dropped ([#166](https://github.com/nervosnetwork/muta/issues/166)) ([8476a4b](https://github.com/nervosnetwork/muta/commit/8476a4b85bf3cf923adcd7555cef04ae73a225f1))
* **sync:** Check the height again after get the lock ([#171](https://github.com/nervosnetwork/muta/issues/171)) ([68164f3](https://github.com/nervosnetwork/muta/commit/68164f3f75d83b9507ee68a099fb712492339edb))
* **sync:** Flush the memory pool when the storage success ([#165](https://github.com/nervosnetwork/muta/issues/165)) ([3b9cbd5](https://github.com/nervosnetwork/muta/commit/3b9cbd55310993c783b0a5794237df75accf118e))
* fix overlord not found error ([#95](https://github.com/nervosnetwork/muta/issues/95)) ([0754c64](https://github.com/nervosnetwork/muta/commit/0754c64973f7fca92e49080c3a03a869b43a4c46))
* Ignore bootstraps when empty. ([#41](https://github.com/nervosnetwork/muta/issues/41)) ([2b3566b](https://github.com/nervosnetwork/muta/commit/2b3566b4acb91f6086b9cca2b1ea4d2883a75be9))


### Features

* **config:** move bls_pub_key config to genesis.toml ([#162](https://github.com/nervosnetwork/muta/issues/162)) ([337b01f](https://github.com/nervosnetwork/muta/commit/337b01fda21fc33f4d4817d93a27d86af9e2b164))
* **network:** interval report pending data size ([#160](https://github.com/nervosnetwork/muta/issues/160)) ([3c46aca](https://github.com/nervosnetwork/muta/commit/3c46aca4873abf9b8afd01d5f464df57bb1b9b9a))
* **sync:** Trigger sync after waiting for consensus interval ([#169](https://github.com/nervosnetwork/muta/issues/169)) ([fe355f1](https://github.com/nervosnetwork/muta/commit/fe355f1d7d6359dfa97809f1bc603cb99975ba46))
* add api schema ([#90](https://github.com/nervosnetwork/muta/issues/90)) ([3f8adfa](https://github.com/nervosnetwork/muta/commit/3f8adfa0a717b055a4455fd102de68003f835bf2))
* add common_ref argument for keypair tool ([#154](https://github.com/nervosnetwork/muta/issues/154)) ([2651346](https://github.com/nervosnetwork/muta/commit/26513469206aa8a4480c5fffad9d134d5d0e8ded))
* add panic hook to logger ([#156](https://github.com/nervosnetwork/muta/issues/156)) ([93b65fe](https://github.com/nervosnetwork/muta/commit/93b65feb89502b7d7836d7f4c423db37fbd1ef4f))
* Extract muta as crate. ([1b62fe7](https://github.com/nervosnetwork/muta/commit/1b62fe786fbd576b67ea28df3d304d235ae3e94e))
* Metadata service ([#133](https://github.com/nervosnetwork/muta/issues/133)) ([a588b12](https://github.com/nervosnetwork/muta/commit/a588b12de4f3c0de666b66e2a5dea65d71977f5f))
* spawn sync txs in check epoch ([6dca1dd](https://github.com/nervosnetwork/muta/commit/6dca1ddcd9256a3061f132a5abc5d784d466c168))
* support specify module log level via config ([#105](https://github.com/nervosnetwork/muta/issues/105)) ([c06061b](https://github.com/nervosnetwork/muta/commit/c06061b4ccd755177385dfee000783e2b11b0dcd))
* Update juniper, supports async ([#149](https://github.com/nervosnetwork/muta/issues/149)) ([cbabf50](https://github.com/nervosnetwork/muta/commit/cbabf507c25ee8feb8a57de408bc97efc8a4a4ab))
* update overlord with brake engine ([#159](https://github.com/nervosnetwork/muta/issues/159)) ([8cd886a](https://github.com/nervosnetwork/muta/commit/8cd886a79fec934a53d409a27de941f16166c176)), closes [#156](https://github.com/nervosnetwork/muta/issues/156) [#158](https://github.com/nervosnetwork/muta/issues/158)
* **api:** Add the exec_height field to the block ([#138](https://github.com/nervosnetwork/muta/issues/138)) ([417153c](https://github.com/nervosnetwork/muta/commit/417153c632793c7ac4e7bc3ffa5b2832dd2dbe66))
* **binding-macro:** service method supports none payload and none response ([#103](https://github.com/nervosnetwork/muta/issues/103)) ([3a5783e](https://github.com/nervosnetwork/muta/commit/3a5783eadd1090cf739d4fdbe94f049115eb65f0))
* **consensus:** develop aggregate crypto with overlord ([#60](https://github.com/nervosnetwork/muta/issues/60)) ([2bc0869](https://github.com/nervosnetwork/muta/commit/2bc0869e928b35c674b4cafdf48540298752b5b5))
* **core/binding:** Implementation of service state. ([#48](https://github.com/nervosnetwork/muta/issues/48)) ([301be6f](https://github.com/nervosnetwork/muta/commit/301be6f39379bd3826b5f605c999ce107f7404e4))
* **core/binding-macro:** Add `read` and `write` proc-macro. ([#49](https://github.com/nervosnetwork/muta/issues/49)) ([687b6e1](https://github.com/nervosnetwork/muta/commit/687b6e1e1a960f679394843c42b861981828d8aa))
* **core/binding-macro:** Add cycles proc-marco. ([#52](https://github.com/nervosnetwork/muta/issues/52)) ([e2289a2](https://github.com/nervosnetwork/muta/commit/e2289a2481510b59c18e37d0fc8bedd9f5d4537e))
* **core/binding-macro:** Support for returning a struct. ([#70](https://github.com/nervosnetwork/muta/issues/70)) ([e13b1ff](https://github.com/nervosnetwork/muta/commit/e13b1ff7834279de9c2df5a0df6967035b7fb8b3))
* **framework:** add ExecutorParams into hook method ([#116](https://github.com/nervosnetwork/muta/issues/116)) ([8036bd6](https://github.com/nervosnetwork/muta/commit/8036bd6f9be1f49eedbc40bbc260ad82952c2e71))
* **framework:** add extra: Option<Bytes> to ServiceContext ([#118](https://github.com/nervosnetwork/muta/issues/118)) ([694c4a3](https://github.com/nervosnetwork/muta/commit/694c4a34f32dc1ba4940db19e304de7a927e1531))
* **framework:** add tx_hash, nonce to ServiceContext ([#111](https://github.com/nervosnetwork/muta/issues/111)) ([352f71f](https://github.com/nervosnetwork/muta/commit/352f71fb3b8b024d533d26c7a344fad801b7a91c))
* **framework/executor:** create service genesis from config ([#104](https://github.com/nervosnetwork/muta/issues/104)) ([8988ccb](https://github.com/nervosnetwork/muta/commit/8988ccb3e5cb2a25bfeabe93c5a63ac1600290a2))
* **graphql:** Modify the API to fit the framework data structure. ([#74](https://github.com/nervosnetwork/muta/issues/74)) ([a1ca2b0](https://github.com/nervosnetwork/muta/commit/a1ca2b0d68e32e335d8d388b70bca83137519f5a))
* **muta:** flush metadata while commit  ([#137](https://github.com/nervosnetwork/muta/issues/137)) ([383a481](https://github.com/nervosnetwork/muta/commit/383a481c348efdf73fd690b42b2430fca6d9a0db))
* **muta:** link up metadata service with muta ([#136](https://github.com/nervosnetwork/muta/issues/136)) ([ba65b80](https://github.com/nervosnetwork/muta/commit/ba65b80dffd128f12336b44d4e80ed40cced8e75))
* **protocol/traits:** Add traits of binding. ([#47](https://github.com/nervosnetwork/muta/issues/47)) ([c6b85ee](https://github.com/nervosnetwork/muta/commit/c6b85ee7bee5b14c5da1676ff44d743c031a0fa6))
* **protocol/types:** Add cycles_price for raw_transaction. ([#46](https://github.com/nervosnetwork/muta/issues/46)) ([55f64a4](https://github.com/nervosnetwork/muta/commit/55f64a49634061ca05c75cbf5923f183fc83936d))
* **sync:** Wait for the execution queue. ([#132](https://github.com/nervosnetwork/muta/issues/132)) ([a8d2013](https://github.com/nervosnetwork/muta/commit/a8d2013991cc6b5b579429954c8411c7954b1da4))
* add end to end test ([#42](https://github.com/nervosnetwork/muta/issues/42)) ([e84756d](https://github.com/nervosnetwork/muta/commit/e84756d1734ad58943309c3c2299393f5a2022e4))
* Extract muta as crate. ([#75](https://github.com/nervosnetwork/muta/issues/75)) ([fc576ea](https://github.com/nervosnetwork/muta/commit/fc576eaa67a3b4b4fa459b0ab970251d63b06b4f)), closes [#46](https://github.com/nervosnetwork/muta/issues/46) [#47](https://github.com/nervosnetwork/muta/issues/47) [#48](https://github.com/nervosnetwork/muta/issues/48) [#49](https://github.com/nervosnetwork/muta/issues/49) [#52](https://github.com/nervosnetwork/muta/issues/52) [#51](https://github.com/nervosnetwork/muta/issues/51) [#55](https://github.com/nervosnetwork/muta/issues/55) [#58](https://github.com/nervosnetwork/muta/issues/58) [#56](https://github.com/nervosnetwork/muta/issues/56) [#64](https://github.com/nervosnetwork/muta/issues/64) [#65](https://github.com/nervosnetwork/muta/issues/65) [#70](https://github.com/nervosnetwork/muta/issues/70) [#71](https://github.com/nervosnetwork/muta/issues/71) [#72](https://github.com/nervosnetwork/muta/issues/72) [#73](https://github.com/nervosnetwork/muta/issues/73) [#43](https://github.com/nervosnetwork/muta/issues/43) [#54](https://github.com/nervosnetwork/muta/issues/54) [#53](https://github.com/nervosnetwork/muta/issues/53) [#57](https://github.com/nervosnetwork/muta/issues/57) [#45](https://github.com/nervosnetwork/muta/issues/45) [#62](https://github.com/nervosnetwork/muta/issues/62) [#63](https://github.com/nervosnetwork/muta/issues/63) [#66](https://github.com/nervosnetwork/muta/issues/66) [#61](https://github.com/nervosnetwork/muta/issues/61) [#67](https://github.com/nervosnetwork/muta/issues/67) [#68](https://github.com/nervosnetwork/muta/issues/68) [#60](https://github.com/nervosnetwork/muta/issues/60) [#46](https://github.com/nervosnetwork/muta/issues/46) [#47](https://github.com/nervosnetwork/muta/issues/47) [#48](https://github.com/nervosnetwork/muta/issues/48) [#49](https://github.com/nervosnetwork/muta/issues/49) [#52](https://github.com/nervosnetwork/muta/issues/52) [#51](https://github.com/nervosnetwork/muta/issues/51) [#55](https://github.com/nervosnetwork/muta/issues/55) [#58](https://github.com/nervosnetwork/muta/issues/58) [#56](https://github.com/nervosnetwork/muta/issues/56) [#64](https://github.com/nervosnetwork/muta/issues/64) [#65](https://github.com/nervosnetwork/muta/issues/65) [#70](https://github.com/nervosnetwork/muta/issues/70) [#72](https://github.com/nervosnetwork/muta/issues/72) [#74](https://github.com/nervosnetwork/muta/issues/74)
* metrics logger ([#43](https://github.com/nervosnetwork/muta/issues/43)) ([d633309](https://github.com/nervosnetwork/muta/commit/d6333091959da6ab0a12630282f6ea783d509319))
* support consensus tracing ([#53](https://github.com/nervosnetwork/muta/issues/53)) ([03942f0](https://github.com/nervosnetwork/muta/commit/03942f08cfdcc573d7feef3a1111e59f63d077f1))
* **api:** make API more user-friendly ([#38](https://github.com/nervosnetwork/muta/issues/38)) ([ba33467](https://github.com/nervosnetwork/muta/commit/ba33467e52c114576b82850e11662d168ede293a))
* **mempool:** implement cached batch txs broadcast ([#20](https://github.com/nervosnetwork/muta/issues/20)) ([d2af811](https://github.com/nervosnetwork/muta/commit/d2af811bb99becc9600d784ce19e021fec11627d))
* **sync:** synchronization epoch ([#9](https://github.com/nervosnetwork/muta/issues/9)) ([fb4bf0d](https://github.com/nervosnetwork/muta/commit/fb4bf0d7c4bde7c86d1b09f469037ff1219f15fa)), closes [#17](https://github.com/nervosnetwork/muta/issues/17) [#18](https://github.com/nervosnetwork/muta/issues/18)
* add compile and run in README ([#11](https://github.com/nervosnetwork/muta/issues/11)) ([1058322](https://github.com/nervosnetwork/muta/commit/10583224053ab91c32dbec815cd0a5af6b0dbeb3))
* add docker ([#31](https://github.com/nervosnetwork/muta/issues/31)) ([8a4386a](https://github.com/nervosnetwork/muta/commit/8a4386ad4c1f66783cada885db9851609b6f5f8d))
* change rlp in executor to fixed-codec ([#29](https://github.com/nervosnetwork/muta/issues/29)) ([7f737cd](https://github.com/nervosnetwork/muta/commit/7f737cdfc9353148b945ad52dd5ab3fd46e2c4db))
* Get balance. ([#28](https://github.com/nervosnetwork/muta/issues/28)) ([8c4a3f9](https://github.com/nervosnetwork/muta/commit/8c4a3f9af8b9e1e8f19cc50b280b66b5d8e270bb))
* **codec:** Add codec tests and benchmarks ([#22](https://github.com/nervosnetwork/muta/issues/22)) ([dcbe522](https://github.com/nervosnetwork/muta/commit/dcbe522be22596059280f6ef845a6d6f4e798551))
* **consensus:** develop consensus interfaces ([#21](https://github.com/nervosnetwork/muta/issues/21)) ([62e3c06](https://github.com/nervosnetwork/muta/commit/62e3c063cd4f82efda43ca5c87c042db5adb9abb))
* **consensus:** develop consensus provider and engine ([#28](https://github.com/nervosnetwork/muta/issues/28)) ([b2ccf9c](https://github.com/nervosnetwork/muta/commit/b2ccf9c84502a6dd476b1737aa9cbb2a283ced32))
* **consensus:** Execute the transactions on commit. ([#7](https://github.com/nervosnetwork/muta/issues/7)) ([b54e7d2](https://github.com/nervosnetwork/muta/commit/b54e7d2bbd5d0ac45ef0d4c728e398b87a1f5450))
* **consensus:** joint overlord and chain ([#32](https://github.com/nervosnetwork/muta/issues/32)) ([72cec41](https://github.com/nervosnetwork/muta/commit/72cec41c86824455ad35cfb1da8a246c50731568))
* **consensus:** mutex lock and timer config ([#45](https://github.com/nervosnetwork/muta/issues/45)) ([cf09687](https://github.com/nervosnetwork/muta/commit/cf09687299b5be39a9c40f13d4b88a496ec7c943))
* **consensus:** Support trsanction executor. ([#6](https://github.com/nervosnetwork/muta/issues/6)) ([e1188f9](https://github.com/nervosnetwork/muta/commit/e1188f9296b3947f833d6bc9a9beff22ebbbf4e7))
* **executor:** Create genesis. ([#1](https://github.com/nervosnetwork/muta/issues/1)) ([a1111d8](https://github.com/nervosnetwork/muta/commit/a1111d8db709c62d119edf3238a22dd656e8035f))
* **graphql:** Support transfer and contract deployment ([#44](https://github.com/nervosnetwork/muta/issues/44)) ([bfcb520](https://github.com/nervosnetwork/muta/commit/bfcb5203fe245e364922d5d8966197a8a8f8d91c))
* **mempool:** fix fixed_codec ([#25](https://github.com/nervosnetwork/muta/issues/25)) ([c1ac607](https://github.com/nervosnetwork/muta/commit/c1ac607ac9b61f4867c17f69c50dad9797dc1c2b))
* **mempool:** Remove cycle_limit ([#23](https://github.com/nervosnetwork/muta/issues/23)) ([8a19ae8](https://github.com/nervosnetwork/muta/commit/8a19ae867fd5b82c4fd56a1f8b59a83e24ca5bc0))
* **native-contract:** Support for asset creation and transfer. ([#37](https://github.com/nervosnetwork/muta/issues/37)) ([1c505fb](https://github.com/nervosnetwork/muta/commit/1c505fbdd57fcb2ef3df3e8b19c65599d77c9bf1))
* **network:** log connected peer ips ([#23](https://github.com/nervosnetwork/muta/issues/23)) ([1691bfa](https://github.com/nervosnetwork/muta/commit/1691bfa47ac561a2f27243e21b1b2fad2fb64be9))
* develop merkle root ([#17](https://github.com/nervosnetwork/muta/issues/17)) ([03cec31](https://github.com/nervosnetwork/muta/commit/03cec318645ee49158f09ec59e356210a80f8bbf))
* Fill in the main function ([#36](https://github.com/nervosnetwork/muta/issues/36)) ([d783f3b](https://github.com/nervosnetwork/muta/commit/d783f3b2d36507a695abd47b303b6c0108e2030b))
* **mempool:** Develop mempool's tests and benches  ([#9](https://github.com/nervosnetwork/muta/issues/9)) ([5ddd5f4](https://github.com/nervosnetwork/muta/commit/5ddd5f4d0c1fa9630971ade538dcf954b6aa8f54))
* **mempool:** Implement MemPool interfaces ([#8](https://github.com/nervosnetwork/muta/issues/8)) ([934ce58](https://github.com/nervosnetwork/muta/commit/934ce58b7a7a6b89b65ff931ce5487e553dd927d))
* **native_contract:** Add an adapter that provides access to the world state. ([#27](https://github.com/nervosnetwork/muta/issues/27)) ([3281bea](https://github.com/nervosnetwork/muta/commit/3281beab2d054470b5edf330515df933cc713bb8))
* **protocol:** Add the mempool traits ([#7](https://github.com/nervosnetwork/muta/issues/7)) ([9f6c19b](https://github.com/nervosnetwork/muta/commit/9f6c19bbfbff6c8f82bb732c3503d757833f837e))
* **protocol:** Add the underlying data structure. ([#5](https://github.com/nervosnetwork/muta/issues/5)) ([5dae189](https://github.com/nervosnetwork/muta/commit/5dae189104c986348adddd43fbaa47af01781828))
* **protocol:** Protobuf serialize ([#6](https://github.com/nervosnetwork/muta/issues/6)) ([ff00595](https://github.com/nervosnetwork/muta/commit/ff00595d100e44148b1cc243437798db8233ca2b))
* **storage:** add storage test ([#18](https://github.com/nervosnetwork/muta/issues/18)) ([f78df5b](https://github.com/nervosnetwork/muta/commit/f78df5b0357eade7855152eee9c79070866477ac))
* **storage:** Implement memory adapter API ([#11](https://github.com/nervosnetwork/muta/issues/11)) ([b0a8090](https://github.com/nervosnetwork/muta/commit/b0a80901229f85e8cf89bd806dcb32c95ae059b8))
* **storage:** Implement storage ([#17](https://github.com/nervosnetwork/muta/issues/17)) ([7728b5b](https://github.com/nervosnetwork/muta/commit/7728b5b0307bd58b11671f123f37e3e365b14b97))
* **types:** Add account structure. ([#24](https://github.com/nervosnetwork/muta/issues/24)) ([f6b93f0](https://github.com/nervosnetwork/muta/commit/f6b93f0f08b03a20761aef47f08343eb5d8e6a85))


### Performance Improvements

* **storage:** cache latest epoch ([#128](https://github.com/nervosnetwork/muta/issues/128)) ([da4d7a9](https://github.com/nervosnetwork/muta/commit/da4d7a92363596b7339518e24c64ab49648749dd))


### Reverts

* Revert "[ᚬdebug-muta] feat(service): Upgrade asset (#181)" (#182) ([dad3f99](https://github.com/nervosnetwork/muta/commit/dad3f99f7c694eea57b546c6b2169950c5692ea1)), closes [#181](https://github.com/nervosnetwork/muta/issues/181) [#182](https://github.com/nervosnetwork/muta/issues/182)
* Revert "feat: Extract muta as crate. (#75)" (#77) ([3baacc5](https://github.com/nervosnetwork/muta/commit/3baacc5c781615377e9a6ba50cfc7b17dcb0ec6e)), closes [#75](https://github.com/nervosnetwork/muta/issues/75) [#77](https://github.com/nervosnetwork/muta/issues/77)



# [0.1.0](https://github.com/nervosnetwork/muta/compare/733ee8e6be7649c9aa2d772bb1dc661bd0879917...v0.1.0) (2019-09-22)


### Bug Fixes

* **ci:** build on push and pull request ([d28aa55](https://github.com/nervosnetwork/muta/commit/d28aa55f5df240277e2b75e87aa948cdcf11ea7f))
* **ci:** temporarily amend code to pass lint ([9441236](https://github.com/nervosnetwork/muta/commit/9441236a5107e0042753915ed943b487cd02d6a5))
* **consensus:** Clear cache of last proposal. ([#199](https://github.com/nervosnetwork/muta/issues/199)) ([f548653](https://github.com/nervosnetwork/muta/commit/f5486531f43fa720171941ad4be5ec7646a269c2))
* **consensus:** fix lock free too early problem and add state root check ([#277](https://github.com/nervosnetwork/muta/issues/277)) ([7238c5b](https://github.com/nervosnetwork/muta/commit/7238c5bc057bd6c6f31773fa4bd3e06aaea72255))
* **consensus:** Makes sure that proposer is this node. ([#281](https://github.com/nervosnetwork/muta/issues/281)) ([d7f4e50](https://github.com/nervosnetwork/muta/commit/d7f4e5081f00a04aee934d0ce700cd107f4f345f))
* **core-network:** CallbackItemNotFound ([#243](https://github.com/nervosnetwork/muta/issues/243)) ([47365fa](https://github.com/nervosnetwork/muta/commit/47365faf5fa7171dde8951661fa095a6c43bcb1f))
* **core-network:** false bootstrapped connections ([#275](https://github.com/nervosnetwork/muta/issues/275)) ([26e76f0](https://github.com/nervosnetwork/muta/commit/26e76f0a2879aed3da745529f64ba3828a1cc30e))
* **core-types:** compilation failure ([#269](https://github.com/nervosnetwork/muta/issues/269)) ([56d8649](https://github.com/nervosnetwork/muta/commit/56d86491f69ab16fd2c76b66b28ad76df78c6ca7))
* **core/crypto:** pubkey_to_address() consistent with cita ([acb5e63](https://github.com/nervosnetwork/muta/commit/acb5e63ea577429bc94c16a3430035ea139aaf15))
* **executor:** Save the full node data. ([b57a1c5](https://github.com/nervosnetwork/muta/commit/b57a1c5fa775479b85d1531f7d2dced817de4729))
* **jsonrpc:** give default value for newFilter ([#289](https://github.com/nervosnetwork/muta/issues/289)) ([17069b4](https://github.com/nervosnetwork/muta/commit/17069b49067dd7335f243d248e3c8d633e455a73))
* **jsonrpc:** logic error in getTransactionCount ([#290](https://github.com/nervosnetwork/muta/issues/290)) ([464bfdf](https://github.com/nervosnetwork/muta/commit/464bfdf08a9954206bb595b3861c52208fc9630d))
* **jsonrpc:** make the response compatible with jsonrpc 2.0 spec ([1db5190](https://github.com/nervosnetwork/muta/commit/1db5190bc91d431bacce6bb44a1185b19520c1a2))
* **jsonrpc:** prefix with 0x by API getTransactionProof ([#295](https://github.com/nervosnetwork/muta/issues/295)) ([b1c0160](https://github.com/nervosnetwork/muta/commit/b1c0160b65fc91e8a2bcfd908943fb238d1101c1))
* **jsonrpc:** raise error when key not found in state ([#294](https://github.com/nervosnetwork/muta/issues/294)) ([7a7c294](https://github.com/nervosnetwork/muta/commit/7a7c294df5ae75f50ec0fe3620634c7280f837e7))
* **jsonrpc:** returns the correct block hash ([#280](https://github.com/nervosnetwork/muta/issues/280)) ([f6a58d0](https://github.com/nervosnetwork/muta/commit/f6a58d0cfc743d1fa84fe5de99798157ba5f25a6))
* Call header.hash ([#94](https://github.com/nervosnetwork/muta/issues/94)) ([636aa54](https://github.com/nervosnetwork/muta/commit/636aa549c21a04611b6f4575dfc7e78fa47d768e))
* change the blocking thread from rayon to std::thread ([5b80476](https://github.com/nervosnetwork/muta/commit/5b804765d0a76055e6e730560a6d7ecd576703be))
* return err if tx not found in get_batch to avoid forking ([#279](https://github.com/nervosnetwork/muta/issues/279)) ([6aed2fe](https://github.com/nervosnetwork/muta/commit/6aed2fe5ffcd0eb6a699cff00d92e9dd3ab7d7b3))
* **sync:** proof and proposal_hash hash not match. ([#239](https://github.com/nervosnetwork/muta/issues/239)) ([51f332e](https://github.com/nervosnetwork/muta/commit/51f332ee8c4a10b88844a272bc51a116b4d25dd2))
* tokio::spawn panic. ([#238](https://github.com/nervosnetwork/muta/issues/238)) ([12d8d01](https://github.com/nervosnetwork/muta/commit/12d8d01ed42f9cc5d9cc341edfd76a6076aa37e1))
* **common/logger:** cargo fmt ([e3a7f5a](https://github.com/nervosnetwork/muta/commit/e3a7f5a2217956b86191881caeb3ca6cea7ec2fc))
* **compoents/transaction-pool:** Use the latest crypto API. ([#86](https://github.com/nervosnetwork/muta/issues/86)) ([f6c94d3](https://github.com/nervosnetwork/muta/commit/f6c94d307d6e89afba75ed8b83b99088fc7ca9de))
* **components/transaction-pool:** Check if the transaction is repeated in histories block. ([dba25fe](https://github.com/nervosnetwork/muta/commit/dba25fe09d8e82f0e396415055ce08efbf1fe159))
* **core-p2p:** transmission example: a clippy warning ([6d2f42a](https://github.com/nervosnetwork/muta/commit/6d2f42ae97194333a823581406fc75d2c47536b2))
* **core-p2p:** transmission example: remove unreachable match branch ([0082bd6](https://github.com/nervosnetwork/muta/commit/0082bd6a3fb956f9ee17a9eba6ada77fc91f3dfe))
* **core-p2p:** transmission: future task starvation ([ba14db0](https://github.com/nervosnetwork/muta/commit/ba14db035413220ed7eba5e5543b8a6496267641))
* **devchain:** correct addresses matched with privkey ([#114](https://github.com/nervosnetwork/muta/issues/114)) ([f56744e](https://github.com/nervosnetwork/muta/commit/f56744e7809b39da79434a3fbcf3deb127fded27))
* **network:** RepeatedConnection and ConnectSelf errors ([#196](https://github.com/nervosnetwork/muta/issues/196)) ([2e5e888](https://github.com/nervosnetwork/muta/commit/2e5e888cdb0869e7622639919b12e62eca06f137))
* **p2p:** Make sure the "poll" is triggered. ([#182](https://github.com/nervosnetwork/muta/issues/182)) ([88daed1](https://github.com/nervosnetwork/muta/commit/88daed1e3e175c21e7923ddd5f1b4eb4ef4d6286))
* **p2p-identify:** empty local listen addresses ([#198](https://github.com/nervosnetwork/muta/issues/198)) ([c40ad8a](https://github.com/nervosnetwork/muta/commit/c40ad8a8dedd999efd17a88b9c30b198d4a0035a))
* **synchronizer:** add a pull_txs_sync method to sync txs from block ([#207](https://github.com/nervosnetwork/muta/issues/207)) ([317fca8](https://github.com/nervosnetwork/muta/commit/317fca8b8d2f270e5d140a94bb1a9227c4b7271b))
* **transaction-pool:** duplicate insertion transactions from network ([#191](https://github.com/nervosnetwork/muta/issues/191)) ([2c095bb](https://github.com/nervosnetwork/muta/commit/2c095bbe5649454abf2663df7355c0a56f54a71f))
* **tx-pool:** "get_count" returns the repeat transaction. ([f5612d0](https://github.com/nervosnetwork/muta/commit/f5612d09d02e9183b702f0233aecc14c31779945))
* **tx-pool:** `ensure` method always pull all txs from remote peer ([#194](https://github.com/nervosnetwork/muta/issues/194)) ([9ff300e](https://github.com/nervosnetwork/muta/commit/9ff300e191aa39b6301e481f8f287287b645ba39))
* **tx-pool:** Ensure the number of transactions meets expectations ([dcbf0dd](https://github.com/nervosnetwork/muta/commit/dcbf0dd8cf548ddfe3afb3226d7596637ae615dd))
* **tx-pool:** replace chashmap ([#211](https://github.com/nervosnetwork/muta/issues/211)) ([717f55e](https://github.com/nervosnetwork/muta/commit/717f55e4772c5818ab17e2b1c320b0b98f174122))
* Aviod drop ([4d0f986](https://github.com/nervosnetwork/muta/commit/4d0f986741c392489893f036989db7218db54743))
* build failure ([18ce8e4](https://github.com/nervosnetwork/muta/commit/18ce8e4642d8d27892fee53b9695e4ced7921055))
* jsonrpc call return value ([#104](https://github.com/nervosnetwork/muta/issues/104)) ([1fe41eb](https://github.com/nervosnetwork/muta/commit/1fe41eb491a16588019218144985eec143613c65))
* logic error of bloom filter ([#176](https://github.com/nervosnetwork/muta/issues/176)) ([70269cb](https://github.com/nervosnetwork/muta/commit/70269cb5cefd82f1a14eb5e85df419c1587d19c8))
* merkle typo ([4f63585](https://github.com/nervosnetwork/muta/commit/4f6358565ee8d486be18ac8ff6069b95b597ea4d))
* rlp encode ([b852ac1](https://github.com/nervosnetwork/muta/commit/b852ac147db818cf289b972f054028d293218a19))
* rlp hash ([837055a](https://github.com/nervosnetwork/muta/commit/837055a4eb78ba941004dbc0466955895de8bcab))
* Set quota limit for the genesis. ([#106](https://github.com/nervosnetwork/muta/issues/106)) ([931fe40](https://github.com/nervosnetwork/muta/commit/931fe404453a6f936cbd27bf37d0e326a03e4484))
* write lock ([de80439](https://github.com/nervosnetwork/muta/commit/de80439cb4e7889c1220fc7821604f9ef792422e))


### Features

* add business model support for executor ([#308](https://github.com/nervosnetwork/muta/issues/308)) ([e03396b](https://github.com/nervosnetwork/muta/commit/e03396bb6b964a0c93f43c2684a0e76a55db5540))
* add Deserialize for Hash and Address ([#259](https://github.com/nervosnetwork/muta/issues/259)) ([fef188c](https://github.com/nervosnetwork/muta/commit/fef188c5950fb7f64a92312894efdb4955201a93))
* add docker config for dev ([#197](https://github.com/nervosnetwork/muta/issues/197)) ([6e74aec](https://github.com/nervosnetwork/muta/commit/6e74aec0b51c2bf80c1d1b893130ea74f4a1a8f0))
* add fabric devops scripts ([fcdc25c](https://github.com/nervosnetwork/muta/commit/fcdc25c05b5c30ba38bf6af57885c2f45233d3fc))
* add height to the end of proposal msg ([#255](https://github.com/nervosnetwork/muta/issues/255)) ([c5cbc5e](https://github.com/nervosnetwork/muta/commit/c5cbc5ec70f1dc0fb46ef0bb87c3b994596b4571))
* add more info to version ([#298](https://github.com/nervosnetwork/muta/issues/298)) ([fd02a17](https://github.com/nervosnetwork/muta/commit/fd02a17a68bb6ef59bbd4cded13d69da221237ee))
* peerCount RPC API ([#257](https://github.com/nervosnetwork/muta/issues/257)) ([736ae8c](https://github.com/nervosnetwork/muta/commit/736ae8c7f537a56b01d648cf066f220e47108820))
* **components/cita-jsonrpc:** impl executor related apis ([#80](https://github.com/nervosnetwork/muta/issues/80)) ([bc8f340](https://github.com/nervosnetwork/muta/commit/bc8f34015617e1a01fb2fbb30d9709cdd806daea))
* **components/cita-jsonrpc:** impl get_code and finish some todo ([#87](https://github.com/nervosnetwork/muta/issues/87)) ([e1b0b9d](https://github.com/nervosnetwork/muta/commit/e1b0b9dc8c39965366c5b572905e63cacecdc958))
* **components/databse:** Implement RocksDB ([#72](https://github.com/nervosnetwork/muta/issues/72)) ([3516fbc](https://github.com/nervosnetwork/muta/commit/3516fbc41338a2f423e0ba56eb96c7fa697a6c77))
* **components/executor:** Add trie db for executor. ([#85](https://github.com/nervosnetwork/muta/issues/85)) ([fd7dc1d](https://github.com/nervosnetwork/muta/commit/fd7dc1da97a4b7dafb1ecbc2813c9506423689a5))
* **components/executor:** Implement EVM executor. ([#68](https://github.com/nervosnetwork/muta/issues/68)) ([021893d](https://github.com/nervosnetwork/muta/commit/021893db432f1ddadc89da9c9251bdb6fb79d925))
* **components/jsonrpc:** implement getStateProof ([#178](https://github.com/nervosnetwork/muta/issues/178)) ([69499fb](https://github.com/nervosnetwork/muta/commit/69499fbb98cbe7f23d426c15ebe67de552dd5d2b))
* **components/jsonrpc:** implement getTransactionProof ([0db8785](https://github.com/nervosnetwork/muta/commit/0db8785475e9d9c098fa123b9c23b4f0eab286dc))
* **components/jsonrpc:** running on microscope ([#200](https://github.com/nervosnetwork/muta/issues/200)) ([1c63a0e](https://github.com/nervosnetwork/muta/commit/1c63a0e3db751b7b7be6f053bed2b66245b105cd))
* **components/jsonrpc:** Try to convert tx to cita::tx ([#221](https://github.com/nervosnetwork/muta/issues/221)) ([b8ab16b](https://github.com/nervosnetwork/muta/commit/b8ab16b05ad01a0c6ef5a7b8d7ad76961e7749ff))
* **core-network:** expost send_buffer_size and recv_buffer_size ([#248](https://github.com/nervosnetwork/muta/issues/248)) ([e5120ad](https://github.com/nervosnetwork/muta/commit/e5120ad646c9d206b43b0d50911303507bdfe381))
* **core-network:** implement peer count feature ([#256](https://github.com/nervosnetwork/muta/issues/256)) ([8f7e7eb](https://github.com/nervosnetwork/muta/commit/8f7e7eb51cdeebfb9c679d88626ac2ec3fa651a4))
* add performance test lua script ([#244](https://github.com/nervosnetwork/muta/issues/244)) ([c727b73](https://github.com/nervosnetwork/muta/commit/c727b733340029f72d9280a57e07522f635eff44))
* **core-network:** implement concurrent reactor and real chained reactor ([#175](https://github.com/nervosnetwork/muta/issues/175)) ([dc9f897](https://github.com/nervosnetwork/muta/commit/dc9f897f08801d7b8a418750ed516a8acac057ca))
* **core-p2p:** implement datagram transport protocol ([fee2d45](https://github.com/nervosnetwork/muta/commit/fee2d4546552bd6c46376309eb399126219c55fb))
* **core-p2p:** transmission: use `poll` func to do broadcast ([b376cbe](https://github.com/nervosnetwork/muta/commit/b376cbef9211e55f809f16bb9bab1360dd4b3523))
* **core/consensus:** Implement solo mode for consensus ([e071b15](https://github.com/nervosnetwork/muta/commit/e071b1533b1107f65eb0f97563f011f644d73be6))
* **core/crypto:** Add secp256k1 ([8349eaa](https://github.com/nervosnetwork/muta/commit/8349eaa2817ee8c27e9e8367c89f3469e52b6f8a))
* **core/crypto:** Modify the return type to result. ([9f2424c](https://github.com/nervosnetwork/muta/commit/9f2424ca11fa300f7269f7a32195ec8bbde096e0))
* **core/network:** Support broadcast message ([#185](https://github.com/nervosnetwork/muta/issues/185)) ([992c55f](https://github.com/nervosnetwork/muta/commit/992c55f87458a38629944fb78ee69982d8329b2b))
* **core/types:** Add hash function for the header and receipts ([c982a52](https://github.com/nervosnetwork/muta/commit/c982a52ce29da7f0e783b2a7a52f1d541c15ea10))
* **executor:** Add flush for trie db. ([#240](https://github.com/nervosnetwork/muta/issues/240)) ([23fd538](https://github.com/nervosnetwork/muta/commit/23fd53849ac626cdeaabb165c0534bb90651aa90))
* **jsonrpc:** Implement filter APIs ([#190](https://github.com/nervosnetwork/muta/issues/190)) ([c97ed22](https://github.com/nervosnetwork/muta/commit/c97ed2273b6ddb2385d6d0285f2d5b4d267b130b))
* **tx-pool:** Batch broadcast transactions. ([#234](https://github.com/nervosnetwork/muta/issues/234)) ([d297b1a](https://github.com/nervosnetwork/muta/commit/d297b1a4d655fdfac25f7f5630253f7e8f6f70ea))
* add synchronizer ([#167](https://github.com/nervosnetwork/muta/issues/167)) ([38db7aa](https://github.com/nervosnetwork/muta/commit/38db7aa3f83e4a35417440e4787c5249b9eace63))
* Implement many JSONRPC APIs ([#166](https://github.com/nervosnetwork/muta/issues/166)) ([807b6a7](https://github.com/nervosnetwork/muta/commit/807b6a73cb098087179d9b086fa0070b6ced74d0))
* Implement RPC getTransactionCount ([#169](https://github.com/nervosnetwork/muta/issues/169)) ([dbf0c51](https://github.com/nervosnetwork/muta/commit/dbf0c51a17f3e285e1146eee3b5e9def08d16d50))
* rewrite network component ([#230](https://github.com/nervosnetwork/muta/issues/230)) ([585dabb](https://github.com/nervosnetwork/muta/commit/585dabb2d52dd70de7ebc26eee59345596301c1a))
* **components/jsonrpc:** Implements sendRawTransaction ([#159](https://github.com/nervosnetwork/muta/issues/159)) ([112d345](https://github.com/nervosnetwork/muta/commit/112d34582c00bea3c05d1663cf07d79aefbfa6a9))
* **core-context:** add `CommonValue` trait and `p2p_session_id` method ([#165](https://github.com/nervosnetwork/muta/issues/165)) ([216b743](https://github.com/nervosnetwork/muta/commit/216b74381c00b15ba61444cf462528ee170fcc41))
* **core/consensus:** Implements BFT ([#158](https://github.com/nervosnetwork/muta/issues/158)) ([e7a3bfd](https://github.com/nervosnetwork/muta/commit/e7a3bfd2f667c9bb8d6b9deb29a57c837ae296b9))
* **core/notify:** add notify as message-bus between components ([b53c50d](https://github.com/nervosnetwork/muta/commit/b53c50dc04090b6b0d5b6725b5c32697446aa5f8))
* **core/serialization:** Add proto file ([0bf7c59](https://github.com/nervosnetwork/muta/commit/0bf7c59200ad4a4cc7994efecaec5d8c683f175a))
* **core/storage:** Add the storage trait ([ffc8776](https://github.com/nervosnetwork/muta/commit/ffc8776b02bc0a4cf785c7c5c47a88266f186b49))
* **core/types:** Add the transactions hash calculation function. ([67d8170](https://github.com/nervosnetwork/muta/commit/67d817072c4c03b2fc2eaae5d1dc99d2d41240e0))
* **core/types:** Define serialization and deserialization methods ([f28c63d](https://github.com/nervosnetwork/muta/commit/f28c63d2b4c7b77dbe24e2b50e70cf649a6c714c))
* **database:** Add memory db ([d21a5a2](https://github.com/nervosnetwork/muta/commit/d21a5a29bd20e02f3ddd29f77c3df2963f8f3b4b))
* **jsonrpc:** support batch ([0a0c680](https://github.com/nervosnetwork/muta/commit/0a0c680993ff9be231f1ae8e583171e1f304f79b))
* **main:** add init command for genesis ([#96](https://github.com/nervosnetwork/muta/issues/96)) ([ec752b0](https://github.com/nervosnetwork/muta/commit/ec752b0602800055990fbfcc54bd2c2ab0b2cb60))
* **p2p:** Update to tentacle0.2.0-alpha.5 ([#177](https://github.com/nervosnetwork/muta/issues/177)) ([f6f83b6](https://github.com/nervosnetwork/muta/commit/f6f83b6b263579d66160cfab29b83bd5a709eeb4))
* **pubsub:** Implement pubsub components ([#143](https://github.com/nervosnetwork/muta/issues/143)) ([a079770](https://github.com/nervosnetwork/muta/commit/a079770b0e66e22552bd8cf504a9e1ba0c520d0e))
* **runtime:** add `Context` struct ([#155](https://github.com/nervosnetwork/muta/issues/155)) ([27e5aa7](https://github.com/nervosnetwork/muta/commit/27e5aa7f01f3559d2a9dd17346595c9161a9c0f6))
* Add project framework ([#24](https://github.com/nervosnetwork/muta/issues/24)) ([733ee8e](https://github.com/nervosnetwork/muta/commit/733ee8e6be7649c9aa2d772bb1dc661bd0879917))
* Add transaction pool component. ([360c935](https://github.com/nervosnetwork/muta/commit/360c93540ea77dc51551a3739e17682600d2b1b7))
* Fill main.rs ([#102](https://github.com/nervosnetwork/muta/issues/102)) ([b5b4c72](https://github.com/nervosnetwork/muta/commit/b5b4c7233efcd1c35e92248b7726ca20644800e9))
* impl cita-jsonrpc ([49e2a2d](https://github.com/nervosnetwork/muta/commit/49e2a2d22d094b2b6a2f71bc5201ccfe28308797))
* update db interface and storage interface ([#137](https://github.com/nervosnetwork/muta/issues/137)) ([36b3d07](https://github.com/nervosnetwork/muta/commit/36b3d07f23e2c7ada870cb699bf138cdd66c2860))


### Reverts

* Revert "chore: Update bft-rs (#203)" (#204) ([cc15ba9](https://github.com/nervosnetwork/muta/commit/cc15ba9ed302ab1389838a4a6c745675106179e9)), closes [#203](https://github.com/nervosnetwork/muta/issues/203) [#204](https://github.com/nervosnetwork/muta/issues/204)



# [](https://github.com/nervosnetwork/muta/compare/v0.2.0-alpha.1...v) (2020-08-03)


### Bug Fixes

* **consensus:** return an error when committing an outdated block ([#371](https://github.com/nervosnetwork/muta/issues/371)) ([b3d518b](https://github.com/nervosnetwork/muta/commit/b3d518b52658b40746ef708fa8cde5c96a39a539))
* **mempool:** Ensure that there are no duplicate transactions in the order transaction ([#379](https://github.com/nervosnetwork/muta/issues/379)) ([97708ac](https://github.com/nervosnetwork/muta/commit/97708ac385be2243344d700a0d7c928f18fd51b3))
* **storage:** test batch receipts get panic ([#373](https://github.com/nervosnetwork/muta/issues/373)) ([300a3c6](https://github.com/nervosnetwork/muta/commit/300a3c65cf0399c2ba37a3bd655e06719b660330))


### Features

* **network:** tag consensus peer ([#364](https://github.com/nervosnetwork/muta/issues/364)) ([9b27df1](https://github.com/nervosnetwork/muta/commit/9b27df1015a25792cc210c5aa0dd473a45ae885d)), closes [#354](https://github.com/nervosnetwork/muta/issues/354) [#2](https://github.com/nervosnetwork/muta/issues/2) [#3](https://github.com/nervosnetwork/muta/issues/3) [#4](https://github.com/nervosnetwork/muta/issues/4) [#5](https://github.com/nervosnetwork/muta/issues/5) [#6](https://github.com/nervosnetwork/muta/issues/6) [#7](https://github.com/nervosnetwork/muta/issues/7)
* Add global panic hook ([#376](https://github.com/nervosnetwork/muta/issues/376)) ([7382279](https://github.com/nervosnetwork/muta/commit/738227962771a6a66b85f2fd199df2e699b43adc))


### Performance Improvements

* **executor:** use inner call instead of service dispatcher ([#365](https://github.com/nervosnetwork/muta/issues/365)) ([7b1d2a3](https://github.com/nervosnetwork/muta/commit/7b1d2a32d5c20306af3868e5265bd2530dd9493b))


### BREAKING CHANGES

* **network:** - replace Validator address bytes with pubkey bytes

* change(consensus): log validator address instead of its public key

Block proposer is address instead public key

* fix: compilation failed
* **network:** - change users_cast to multicast, take peer_ids bytes instead of Address
- network bootstrap configuration now takes peer id instead of pubkey hex

* refactor(network): PeerId api



# [0.2.0-alpha.1](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta...v0.2.0-alpha.1) (2020-07-22)


### Bug Fixes

* **executor:** The logic to deal with tx_hook and tx_body ([#367](https://github.com/nervosnetwork/muta/issues/367)) ([749d558](https://github.com/nervosnetwork/muta/commit/749d558b8b58a1943bfa2842dcedcc45218c0f78))
* **executor:** tx events aren't cleared on execution error ([#313](https://github.com/nervosnetwork/muta/issues/313)) ([1605cf5](https://github.com/nervosnetwork/muta/commit/1605cf59b558b97889bb431da7f81fd424b90a89))
* **proof:** Verify aggregated signature in checking proof ([#308](https://github.com/nervosnetwork/muta/issues/308)) ([d2a98b0](https://github.com/nervosnetwork/muta/commit/d2a98b06e44449ca756f135c1b235ff0d80eaf67))
* **trust_metric_test:** unreliable full node exit check ([#327](https://github.com/nervosnetwork/muta/issues/327)) ([a4ab4a6](https://github.com/nervosnetwork/muta/commit/a4ab4a6209e0978148983e88447ac2d9178fa42a))
* **WAL:** Ignore path already exist ([#304](https://github.com/nervosnetwork/muta/issues/304)) ([02df937](https://github.com/nervosnetwork/muta/commit/02df937fb6449c9b3b0b50e790e0ecf6bfc1ee3d))


### Performance Improvements

* **mempool:** parallel verifying signatures in mempool ([#359](https://github.com/nervosnetwork/muta/issues/359)) ([2ccdf1a](https://github.com/nervosnetwork/muta/commit/2ccdf1a67a40cd483749a98a1a68c37bcf1d473c))


### Reverts

* Revert "refactor(consensus)!: replace Validator address bytes with pubkey bytes (#354)" (#361) ([4dabfa2](https://github.com/nervosnetwork/muta/commit/4dabfa231961d1ec8be1ba42bf05781f55395aed)), closes [#354](https://github.com/nervosnetwork/muta/issues/354) [#361](https://github.com/nervosnetwork/muta/issues/361)


* refactor(consensus)!: replace Validator address bytes with pubkey bytes (#354) ([e4433d7](https://github.com/nervosnetwork/muta/commit/e4433d793e8a63788ec682880afc93474e0d2414)), closes [#354](https://github.com/nervosnetwork/muta/issues/354)


### Features

* **executor:** allow cancel execution units through context ([#317](https://github.com/nervosnetwork/muta/issues/317)) ([eafb489](https://github.com/nervosnetwork/muta/commit/eafb489f78f7521487c6b2d25dd9912e43f76500))
* **executor:** indenpendent tx hook states commit ([#316](https://github.com/nervosnetwork/muta/issues/316)) ([fde6450](https://github.com/nervosnetwork/muta/commit/fde645010363a4664033370e4109e4d1f08b13bc))
* **protocol:** Remove the logs bloom from block header ([#312](https://github.com/nervosnetwork/muta/issues/312)) ([ff1e0df](https://github.com/nervosnetwork/muta/commit/ff1e0df1e8a65cc480825a49eed9495cc31ecee0))


================================================
FILE: CHANGELOG/CHANGELOG-0.2.md
================================================
# [](https://github.com/nervosnetwork/muta/compare/v0.2.0-rc.2.1...v) (2020-09-15)


### Bug Fixes

* **cli:** expose version, author and app_name to be customized ([#456](https://github.com/nervosnetwork/muta/issues/456)) ([93c551e](https://github.com/nervosnetwork/muta/commit/93c551e09ae0d79e5d1e3a03f3882c3ddc883da0))
* **logger:** add structured api ([#450](https://github.com/nervosnetwork/muta/issues/450)) ([4ef3d93](https://github.com/nervosnetwork/muta/commit/4ef3d93f2ff466d69dd22805c91812a8b74605b6))
* **metric:** network broadcast all data size ([#452](https://github.com/nervosnetwork/muta/issues/452)) ([5a8999a](https://github.com/nervosnetwork/muta/commit/5a8999ade29ad54e72caf85115c424361caaf379))
* **network:** wrong connected consensus peer count ([#451](https://github.com/nervosnetwork/muta/issues/451)) ([43357fa](https://github.com/nervosnetwork/muta/commit/43357fa29339d4540b5d86ed51f42277fe657a7d))
* **state:** If value is an empty byte it needs to return none ([#448](https://github.com/nervosnetwork/muta/issues/448)) ([5e1e4b6](https://github.com/nervosnetwork/muta/commit/5e1e4b631d692b2673d5fb039925cafafb8fcd06))


### Features

* **logger:** add a json macro to generate json object ([#455](https://github.com/nervosnetwork/muta/issues/455)) ([ffb1b45](https://github.com/nervosnetwork/muta/commit/ffb1b45159bad2d444f81b44ab57fae0dca16550))
* cli for maintance ([#436](https://github.com/nervosnetwork/muta/issues/436)) ([aebd85f](https://github.com/nervosnetwork/muta/commit/aebd85fd99424ddb50afcf434045bd0b78bcd53e))
* **api:** dump profile data through http request ([#446](https://github.com/nervosnetwork/muta/issues/446)) ([31d66ab](https://github.com/nervosnetwork/muta/commit/31d66ab5928f046af46630609c82e91eb916afc5))
* **metric:** add accumulated network message size count ([#449](https://github.com/nervosnetwork/muta/issues/449)) ([eda8f75](https://github.com/nervosnetwork/muta/commit/eda8f756a5de72601d6dc2bc1ac0abdae065467c))



# [0.2.0-rc.2.1](https://github.com/nervosnetwork/muta/compare/v0.2.0-rc...v0.2.0-rc.2.1) (2020-09-04)


### Bug Fixes

* update example configs, fix send transaction in byzantine ([#442](https://github.com/nervosnetwork/muta/issues/442)) ([d6a1a85](https://github.com/nervosnetwork/muta/commit/d6a1a8513e9fdf9166839f5c6aaccd0b5dc9cee3))
* **consensus:** recover and insert tx to mempool to avoid inactivation ([#414](https://github.com/nervosnetwork/muta/issues/414)) ([fd9716e](https://github.com/nervosnetwork/muta/commit/fd9716e078289453b70dd0e378a4a94a6531d9b7))
* **network:** identify protocol: possible dead lock in identification ([#439](https://github.com/nervosnetwork/muta/issues/439)) ([b676c4c](https://github.com/nervosnetwork/muta/commit/b676c4ca3deb98d76cb5c2f6d771e69174cef632))
* fix framework to deal with state while tx runs fail ([#440](https://github.com/nervosnetwork/muta/issues/440)) ([d186505](https://github.com/nervosnetwork/muta/commit/d186505da89afe62840d406052125244bee357c7))
* **network:** cannot process message after reactor exit ([#412](https://github.com/nervosnetwork/muta/issues/412)) ([36af704](https://github.com/nervosnetwork/muta/commit/36af7047544628dd098d6cb34cbe2b5d3c0b1770))
* **network:** double decrease connecting gauge ([#424](https://github.com/nervosnetwork/muta/issues/424)) ([0a1cfcf](https://github.com/nervosnetwork/muta/commit/0a1cfcfa7ddedcc236243f9dc3e317610742ca5c))
* **network:** give up a peer without log a reason ([#423](https://github.com/nervosnetwork/muta/issues/423)) ([7151cd4](https://github.com/nervosnetwork/muta/commit/7151cd435e6bec2a961eac67cb779708c0ab0fd0))
* **network:** give up peer because of handshake timeout ([#418](https://github.com/nervosnetwork/muta/issues/418)) ([2627c00](https://github.com/nervosnetwork/muta/commit/2627c005485466373d632a60fb41d897db63fedc))
* **network:** give up peer due to secio io error ([#425](https://github.com/nervosnetwork/muta/issues/425)) ([27a8e8b](https://github.com/nervosnetwork/muta/commit/27a8e8ba5ce644f316d1cedb48230cab398a31da))
* **network:** negative connecting metric number ([#430](https://github.com/nervosnetwork/muta/issues/430)) ([dae62ae](https://github.com/nervosnetwork/muta/commit/dae62aeb760c3acb18b14be7f03da032dd495e9b))
* update to latest overlord ([#421](https://github.com/nervosnetwork/muta/issues/421)) ([c8f018c](https://github.com/nervosnetwork/muta/commit/c8f018c89eb9b7bf64c5525768c66f8d5f5038da))


### Features

* **logger:** add structured log api ([#434](https://github.com/nervosnetwork/muta/issues/434)) ([2e4de12](https://github.com/nervosnetwork/muta/commit/2e4de12f1d386af90f2fbb19d57d3832cd5d2e2a))
* **logger:** split log file by size ([#435](https://github.com/nervosnetwork/muta/issues/435)) ([5c4f075](https://github.com/nervosnetwork/muta/commit/5c4f075da31231a92100e8ba85438bde4e5c65b6))
* add byzantine test script ([#433](https://github.com/nervosnetwork/muta/issues/433)) ([b7ceda0](https://github.com/nervosnetwork/muta/commit/b7ceda00a65ebe87b500e5b0c489e5325e22747a))
* log the overlord view change reason ([#432](https://github.com/nervosnetwork/muta/issues/432)) ([8b25191](https://github.com/nervosnetwork/muta/commit/8b251917f28bc0762fa91e15127f659fe8f4685b))
* **apm:** add executing block num to apm ([#429](https://github.com/nervosnetwork/muta/issues/429)) ([b27ac99](https://github.com/nervosnetwork/muta/commit/b27ac99486f376075fb393fa0f80db6ecfb7b955))
* **network:** add more metrics ([#416](https://github.com/nervosnetwork/muta/issues/416)) ([d03ddde](https://github.com/nervosnetwork/muta/commit/d03ddde2763b43e77cced2ff8552910c5fcff1eb))
* **network:** add tentacle_metrics feature ([#417](https://github.com/nervosnetwork/muta/issues/417)) ([5181562](https://github.com/nervosnetwork/muta/commit/5181562c947a34d3c344e766171b60ba161dff29))



# [0.2.0-rc](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.4...v0.2.0-rc) (2020-08-12)


### Features

* **network:** split transmitter data ([#380](https://github.com/nervosnetwork/muta/issues/380)) ([0322cd6](https://github.com/nervosnetwork/muta/commit/0322cd690cb118f56153e424e9a6bf4b2a11d8b4))
* **network:** verify chain id during protocol handshake ([#406](https://github.com/nervosnetwork/muta/issues/406)) ([e678e92](https://github.com/nervosnetwork/muta/commit/e678e92bf01bc4bc914e74b6fed22c8b55b3cdc7))



# [0.2.0-beta.4](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.3...v0.2.0-beta.4) (2020-08-10)


### Bug Fixes

* load hrp before deserializing genesis payload to take hrp effect ([#405](https://github.com/nervosnetwork/muta/issues/405)) ([828e6d5](https://github.com/nervosnetwork/muta/commit/828e6d539cf4da9cf042c450418e75a944315014))


### Features

* **api:** Support enabled TLS ([#402](https://github.com/nervosnetwork/muta/issues/402)) ([c2908a3](https://github.com/nervosnetwork/muta/commit/c2908a3ba6a5ab1219ddc9b14ff6d7320cf70228))


### Performance Improvements

* **state:** add state cache for trieDB ([#404](https://github.com/nervosnetwork/muta/issues/404)) ([2a08c14](https://github.com/nervosnetwork/muta/commit/2a08c147571707507b72882788fd51f7a799f3ec))



# [0.2.0-beta.3](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.2...v0.2.0-beta.3) (2020-08-07)


### Bug Fixes

* **apm:** Return the correct time ([#400](https://github.com/nervosnetwork/muta/issues/400)) ([fd6549a](https://github.com/nervosnetwork/muta/commit/fd6549a6352633cee7b5b747448129df7a0532ca))


### Features

* **network:** limit connections from same ip ([#388](https://github.com/nervosnetwork/muta/issues/388)) ([dc78c13](https://github.com/nervosnetwork/muta/commit/dc78c13b8aa25f3e4535e588149042f6345e4d25))
* **network:** limit inbound and outbound connections ([#393](https://github.com/nervosnetwork/muta/issues/393)) ([3a3111e](https://github.com/nervosnetwork/muta/commit/3a3111e1e332529bc8636c54526920c292c04f8a))
* **sync:** Limit the maximum height of once sync ([#390](https://github.com/nervosnetwork/muta/issues/390)) ([f951a95](https://github.com/nervosnetwork/muta/commit/f951a953daf307ffc98b4df0fe1a77a6a810ac71))



# [0.2.0-beta.2](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.1...v0.2.0-beta.2) (2020-08-04)


### Bug Fixes

* **consensus:** Add timestamp checking ([#377](https://github.com/nervosnetwork/muta/issues/377)) ([382ede9](https://github.com/nervosnetwork/muta/commit/382ede9367b910a06b59f3562ecd28ab8100d39e))


### Features

* **benchmark:** add a perf benchmark macro ([#391](https://github.com/nervosnetwork/muta/issues/391)) ([eb24311](https://github.com/nervosnetwork/muta/commit/eb2431149b6865a82d0e4286536f65319a5e1d1f))
* **Cargo:** add random leader feature for muta ([#385](https://github.com/nervosnetwork/muta/issues/385)) ([43da977](https://github.com/nervosnetwork/muta/commit/43da9772b22b97ab4797b80ce5161f1a49827543))


### Performance Improvements

* **metrics:** Add metrics of state ([#397](https://github.com/nervosnetwork/muta/issues/397)) ([5822764](https://github.com/nervosnetwork/muta/commit/5822764240f8b4e8cfeca4bccf7d399a0bf71897))



# [0.2.0-beta.1](https://github.com/nervosnetwork/muta/compare/v0.2.0-alpha.1...v0.2.0-beta.1) (2020-08-03)


### Bug Fixes

* **consensus:** return an error when committing an outdated block ([#371](https://github.com/nervosnetwork/muta/issues/371)) ([b3d518b](https://github.com/nervosnetwork/muta/commit/b3d518b52658b40746ef708fa8cde5c96a39a539))
* **mempool:** Ensure that there are no duplicate transactions in the order transaction ([#379](https://github.com/nervosnetwork/muta/issues/379)) ([97708ac](https://github.com/nervosnetwork/muta/commit/97708ac385be2243344d700a0d7c928f18fd51b3))
* **storage:** test batch receipts get panic ([#373](https://github.com/nervosnetwork/muta/issues/373)) ([300a3c6](https://github.com/nervosnetwork/muta/commit/300a3c65cf0399c2ba37a3bd655e06719b660330))


### Features

* **network:** tag consensus peer ([#364](https://github.com/nervosnetwork/muta/issues/364)) ([9b27df1](https://github.com/nervosnetwork/muta/commit/9b27df1015a25792cc210c5aa0dd473a45ae885d)), closes [#354](https://github.com/nervosnetwork/muta/issues/354) [#2](https://github.com/nervosnetwork/muta/issues/2) [#3](https://github.com/nervosnetwork/muta/issues/3) [#4](https://github.com/nervosnetwork/muta/issues/4) [#5](https://github.com/nervosnetwork/muta/issues/5) [#6](https://github.com/nervosnetwork/muta/issues/6) [#7](https://github.com/nervosnetwork/muta/issues/7)
* Add global panic hook ([#376](https://github.com/nervosnetwork/muta/issues/376)) ([7382279](https://github.com/nervosnetwork/muta/commit/738227962771a6a66b85f2fd199df2e699b43adc))


### Performance Improvements

* **executor:** use inner call instead of service dispatcher ([#365](https://github.com/nervosnetwork/muta/issues/365)) ([7b1d2a3](https://github.com/nervosnetwork/muta/commit/7b1d2a32d5c20306af3868e5265bd2530dd9493b))


### BREAKING CHANGES

* **network:** - replace Validator address bytes with pubkey bytes

* change(consensus): log validator address instead of its public key

Block proposer is address instead public key

* fix: compilation failed
* **network:** - change users_cast to multicast, take peer_ids bytes instead of Address
- network bootstrap configuration now takes peer id instead of pubkey hex

* refactor(network): PeerId api



# [0.2.0-alpha.1](https://github.com/nervosnetwork/muta/compare/v0.2.0-dev.2...v0.2.0-alpha.1) (2020-07-22)


### Bug Fixes

* **executor:** The logic to deal with tx_hook and tx_body ([#367](https://github.com/nervosnetwork/muta/issues/367)) ([749d558](https://github.com/nervosnetwork/muta/commit/749d558b8b58a1943bfa2842dcedcc45218c0f78))


### Performance Improvements

* **mempool:** parallel verifying signatures in mempool ([#359](https://github.com/nervosnetwork/muta/issues/359)) ([2ccdf1a](https://github.com/nervosnetwork/muta/commit/2ccdf1a67a40cd483749a98a1a68c37bcf1d473c))


### Reverts

* Revert "refactor(consensus)!: replace Validator address bytes with pubkey bytes (#354)" (#361) ([4dabfa2](https://github.com/nervosnetwork/muta/commit/4dabfa231961d1ec8be1ba42bf05781f55395aed)), closes [#354](https://github.com/nervosnetwork/muta/issues/354) [#361](https://github.com/nervosnetwork/muta/issues/361)


* refactor(consensus)!: replace Validator address bytes with pubkey bytes (#354) ([e4433d7](https://github.com/nervosnetwork/muta/commit/e4433d793e8a63788ec682880afc93474e0d2414)), closes [#354](https://github.com/nervosnetwork/muta/issues/354)


### BREAKING CHANGES

* - replace Validator address bytes with pubkey bytes

* change(consensus): log validator address instead of its public key

Block proposer is address instead public key

* fix: compilation failed



# [0.2.0-dev.2](https://github.com/nervosnetwork/muta/compare/v0.2.0-dev.1...v0.2.0-dev.2) (2020-07-14)



# [0.2.0-dev.1](https://github.com/nervosnetwork/muta/compare/v0.2.0-dev.0...v0.2.0-dev.1) (2020-07-09)


### Bug Fixes

* **trust_metric_test:** unreliable full node exit check ([#327](https://github.com/nervosnetwork/muta/issues/327)) ([a4ab4a6](https://github.com/nervosnetwork/muta/commit/a4ab4a6209e0978148983e88447ac2d9178fa42a))



# [0.2.0-dev.0](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta...v0.2.0-dev.0) (2020-07-01)


### Bug Fixes

* **executor:** tx events aren't cleared on execution error ([#313](https://github.com/nervosnetwork/muta/issues/313)) ([1605cf5](https://github.com/nervosnetwork/muta/commit/1605cf59b558b97889bb431da7f81fd424b90a89))
* **proof:** Verify aggregated signature in checking proof ([#308](https://github.com/nervosnetwork/muta/issues/308)) ([d2a98b0](https://github.com/nervosnetwork/muta/commit/d2a98b06e44449ca756f135c1b235ff0d80eaf67))
* **WAL:** Ignore path already exist ([#304](https://github.com/nervosnetwork/muta/issues/304)) ([02df937](https://github.com/nervosnetwork/muta/commit/02df937fb6449c9b3b0b50e790e0ecf6bfc1ee3d))


### Features

* **executor:** allow cancel execution units through context ([#317](https://github.com/nervosnetwork/muta/issues/317)) ([eafb489](https://github.com/nervosnetwork/muta/commit/eafb489f78f7521487c6b2d25dd9912e43f76500))
* **executor:** indenpendent tx hook states commit ([#316](https://github.com/nervosnetwork/muta/issues/316)) ([fde6450](https://github.com/nervosnetwork/muta/commit/fde645010363a4664033370e4109e4d1f08b13bc))
* **protocol:** Remove the logs bloom from block header ([#312](https://github.com/nervosnetwork/muta/issues/312)) ([ff1e0df](https://github.com/nervosnetwork/muta/commit/ff1e0df1e8a65cc480825a49eed9495cc31ecee0))



## [0.1.2-beta](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta2...v0.1.2-beta) (2020-06-04)



## [0.1.2-beta2](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta1...v0.1.2-beta2) (2020-06-03)


### Features

* supported storage metrics ([#307](https://github.com/nervosnetwork/muta/issues/307)) ([2531b8d](https://github.com/nervosnetwork/muta/commit/2531b8da8e8f2a839484adef62dd93f1deff12dd))



## [0.1.2-beta1](https://github.com/nervosnetwork/muta/compare/v0.1.0-rc.2-huobi...v0.1.2-beta1) (2020-06-01)


### Bug Fixes

* **ci:** Increase timeout in ci ([#262](https://github.com/nervosnetwork/muta/issues/262)) ([a12124a](https://github.com/nervosnetwork/muta/commit/a12124a115512196894a7ca88fc42555db927666))
* **mempool:** check exsit before insert a transaction ([#257](https://github.com/nervosnetwork/muta/issues/257)) ([be3c139](https://github.com/nervosnetwork/muta/commit/be3c13929d2a59f21655b040aa6738c3d43db611))
* **network:** broken users_cast ([#261](https://github.com/nervosnetwork/muta/issues/261)) ([f36eabd](https://github.com/nervosnetwork/muta/commit/f36eabdc5040bc5cbf0d2011c942867150534a41))
* **network:** reconnection fialure ([#273](https://github.com/nervosnetwork/muta/issues/273)) ([9f594b8](https://github.com/nervosnetwork/muta/commit/9f594b8af12e1810bd0cbf23f20ca718d96f6e3a))
* reboot when the diff between height and exec_height more than one ([#267](https://github.com/nervosnetwork/muta/issues/267)) ([e8f8595](https://github.com/nervosnetwork/muta/commit/e8f85958d85e3363fccbfde3971684ebf2fceb4d))
* **sync:** Avoid requesting redundant transactions ([#259](https://github.com/nervosnetwork/muta/issues/259)) ([8ece029](https://github.com/nervosnetwork/muta/commit/8ece0299fe185667ac23fed92d8c2f156c0e2c5b))
* binding store type should return Option None instead of panic when get none ([#238](https://github.com/nervosnetwork/muta/issues/238)) ([54bdbb9](https://github.com/nervosnetwork/muta/commit/54bdbb93df1a1a85a83814dcb29461acf3645d10))
* **config:** use serde(default) for rocksdb conf ([#229](https://github.com/nervosnetwork/muta/issues/229)) ([2a03e73](https://github.com/nervosnetwork/muta/commit/2a03e73c77807e80020c50bb287adf4d428632e5))
* **storage:** fix rocksdb too many open files error ([#228](https://github.com/nervosnetwork/muta/issues/228)) ([96c32cd](https://github.com/nervosnetwork/muta/commit/96c32cd7956220beddca33b22d4663a675573ba9))
* **sync:** set crypto info when synchronization ([#235](https://github.com/nervosnetwork/muta/issues/235)) ([84ccfc1](https://github.com/nervosnetwork/muta/commit/84ccfc1d8422265028ad7a0b460b4e297d161fe3))
* docker compose configs ([#210](https://github.com/nervosnetwork/muta/issues/210)) ([acc5265](https://github.com/nervosnetwork/muta/commit/acc52653d304ac5cd25a9d643b263a2f462f7d43))
* hang when kill it ([#225](https://github.com/nervosnetwork/muta/issues/225)) ([dc51240](https://github.com/nervosnetwork/muta/commit/dc512405f32854f165f3145c01d022bca4fff93b))
* panic when start ([#214](https://github.com/nervosnetwork/muta/issues/214)) ([d2da69b](https://github.com/nervosnetwork/muta/commit/d2da69b5941a88376b64453f7d3c10eca3f67d81))
* **muta:** hangs up on one cpu core ([#203](https://github.com/nervosnetwork/muta/issues/203)) ([555dd9e](https://github.com/nervosnetwork/muta/commit/555dd9e694fda043be01f90c91396efd7fe0ace5))


### Features

* split monitor network url  ([#300](https://github.com/nervosnetwork/muta/issues/300)) ([1237354](https://github.com/nervosnetwork/muta/commit/12373544598d0dae852321cbe3b4e8dab5c70e54))
* supported mempool monitor ([#298](https://github.com/nervosnetwork/muta/issues/298)) ([cc7fdfa](https://github.com/nervosnetwork/muta/commit/cc7fdfa7a7c99466d76d4fe9c1a3537ab8754837))
* supported new metrics ([#294](https://github.com/nervosnetwork/muta/issues/294)) ([e59364a](https://github.com/nervosnetwork/muta/commit/e59364a7759960d8a3279dc78844965f54f4bf62))
* **apm:** add api get_block metrics ([#276](https://github.com/nervosnetwork/muta/issues/276)) ([6ea21e3](https://github.com/nervosnetwork/muta/commit/6ea21e3e0fe08898264f13938cf849c197531afa))
* **apm:** Add opentracing ([#270](https://github.com/nervosnetwork/muta/issues/270)) ([cece21d](https://github.com/nervosnetwork/muta/commit/cece21d8e865223c8679e54d0253ced70dab4c0a))
* **apm:** tracing height and round in OverlordMsg ([#287](https://github.com/nervosnetwork/muta/issues/287)) ([a8c09ff](https://github.com/nervosnetwork/muta/commit/a8c09ff363e8caac9c0977db2fc6cffb782961d7))
* **ci:** add e2e ([#236](https://github.com/nervosnetwork/muta/issues/236)) ([3058722](https://github.com/nervosnetwork/muta/commit/3058722081084b7cb8f423c26eba9e88707fca18))
* **consensus:** add proof check logic for sync and consensus ([#224](https://github.com/nervosnetwork/muta/issues/224)) ([b19502f](https://github.com/nervosnetwork/muta/commit/b19502f48e6d314717a8a2286ada58f6097c6f31))
* **consensus:** change validator list ([#211](https://github.com/nervosnetwork/muta/issues/211)) ([bb04d2c](https://github.com/nervosnetwork/muta/commit/bb04d2c961110276d38cf0e07239d5e72e8125a8))
* **consensus:** integrate trust metric to consensus ([#244](https://github.com/nervosnetwork/muta/issues/244)) ([3dd6bc1](https://github.com/nervosnetwork/muta/commit/3dd6bc1796ca3e6c76cb99beefd5911d35a5e8ee))
* **mempool:** integrate trust metric ([#245](https://github.com/nervosnetwork/muta/issues/245)) ([49474fd](https://github.com/nervosnetwork/muta/commit/49474fddde3ffc45d564544bb5887bb09a37da1d))
* **metric:** introduce metric using prometheus ([#271](https://github.com/nervosnetwork/muta/issues/271)) ([3d1dc4f](https://github.com/nervosnetwork/muta/commit/3d1dc4fcf196b8616f41dc4cd2a5ba0c0a5ab422))
* **metrics:** mempool, consensus and sync ([#275](https://github.com/nervosnetwork/muta/issues/275)) ([12e4918](https://github.com/nervosnetwork/muta/commit/12e4918d9925868407f854af29410d8ecafe4d48))
* **network:** add metrics ([#274](https://github.com/nervosnetwork/muta/issues/274)) ([56a9b62](https://github.com/nervosnetwork/muta/commit/56a9b62251106d44df33c43d4590575df25df61a))
* **network:** add trace header to network msg ([#281](https://github.com/nervosnetwork/muta/issues/281)) ([6509cbe](https://github.com/nervosnetwork/muta/commit/6509cbec2f700238b2259943212e0968b58404ce))
* **network:** peer trust metric ([#231](https://github.com/nervosnetwork/muta/issues/231)) ([5abefeb](https://github.com/nervosnetwork/muta/commit/5abefebddacfb58415f2a319098bb164ceaa8c81))
* add tx hook in framework ([#218](https://github.com/nervosnetwork/muta/issues/218)) ([cdeb9fd](https://github.com/nervosnetwork/muta/commit/cdeb9fd1e18e198636fa59d91aead85d65cf9852))
* re-execute blocks to recover current status ([#222](https://github.com/nervosnetwork/muta/issues/222)) ([1cd7cb6](https://github.com/nervosnetwork/muta/commit/1cd7cb6d4fbc599bac65bd2c36b507088a3fa041))
* **network:** rpc remote server error response ([#205](https://github.com/nervosnetwork/muta/issues/205)) ([bb993ac](https://github.com/nervosnetwork/muta/commit/bb993ac1f5fe44a2f6a72c8718572accacb27dc3))
* **sync:** Split a transaction in a block into multiple requests ([#221](https://github.com/nervosnetwork/muta/issues/221)) ([0bbf43c](https://github.com/nervosnetwork/muta/commit/0bbf43c49d2df49d70b4bc816ac24c3bc3603a1a))
* add actix payload size limit config ([#204](https://github.com/nervosnetwork/muta/issues/204)) ([97319d6](https://github.com/nervosnetwork/muta/commit/97319d6d22c8143ba35c3fe42d56f2cfbc131e37))


### BREAKING CHANGES

* **network:** change rpc response

* change(network): bump transmitter protocol version



# [0.1.0-rc.2-huobi](https://github.com/nervosnetwork/muta/compare/v0.0.1-rc1-huobi...v0.1.0-rc.2-huobi) (2020-02-24)


### Bug Fixes

* **mempool:** fix repeat txs, add flush_incumbent_queue ([#189](https://github.com/nervosnetwork/muta/issues/189)) ([e0db745](https://github.com/nervosnetwork/muta/commit/e0db745419c5ada3d6e9dc4416945a0775a8f18b))
* **muta:** hangs up running on single core environment ([#201](https://github.com/nervosnetwork/muta/issues/201)) ([09f5b4e](https://github.com/nervosnetwork/muta/commit/09f5b4ed70a519155933f7fd4c2015ff512dfdb1))
* block hash from bytes ([#192](https://github.com/nervosnetwork/muta/issues/192)) ([7ca0af4](https://github.com/nervosnetwork/muta/commit/7ca0af46edbd00e4ba43e8646e77fa41aba781cf))


### Features

* check size and cycle limit when insert tx into mempool ([#195](https://github.com/nervosnetwork/muta/issues/195)) ([92bdf2d](https://github.com/nervosnetwork/muta/commit/92bdf2d5147502e1d250fdae47b8ae2c2cfce23f))
* remove redundant wal transactions when commit ([#197](https://github.com/nervosnetwork/muta/issues/197)) ([3aff1db](https://github.com/nervosnetwork/muta/commit/3aff1dbb2dcdabaaf9cbecb9c3e9757a2c737354))
* Supports actix in tokio ([#200](https://github.com/nervosnetwork/muta/issues/200)) ([266c1cb](https://github.com/nervosnetwork/muta/commit/266c1cb2cf6223759eba4ca9771ee21b244db3a4))
* **api:** Supports configuring the max number of connections. ([#194](https://github.com/nervosnetwork/muta/issues/194)) ([6cbdd26](https://github.com/nervosnetwork/muta/commit/6cbdd267b7ff56eefbe23bffc8e4dc589272111d))
* **service:** upgrade asset service ([#150](https://github.com/nervosnetwork/muta/issues/150)) ([8925390](https://github.com/nervosnetwork/muta/commit/8925390b59353d853dd1266cdcfe6db1258a8296))


### Reverts

* Revert "fix(muta): hangs up running on single core environment (#201)" (#202) ([28e685a](https://github.com/nervosnetwork/muta/commit/28e685a62b82c1a91699b4495d430b0757e5438d)), closes [#201](https://github.com/nervosnetwork/muta/issues/201) [#202](https://github.com/nervosnetwork/muta/issues/202)



## [0.0.1-rc1-huobi](https://github.com/nervosnetwork/muta/compare/v0.0.1-rc.1-huobi...v0.0.1-rc1-huobi) (2020-02-15)


### Bug Fixes

* **ci:** fail to install sccache after new rust-toolchain ([#68](https://github.com/nervosnetwork/muta/issues/68)) ([f961415](https://github.com/nervosnetwork/muta/commit/f961415803ae6d38b70e97a810f33a1b60639d43))
* **consensus:** check logs bloom when check block ([#168](https://github.com/nervosnetwork/muta/issues/168)) ([0984989](https://github.com/nervosnetwork/muta/commit/09849893270cc0908e2ee965e7e8b7c46ada0f16))
* **consensus:** empty block receipts root ([#61](https://github.com/nervosnetwork/muta/issues/61)) ([89ed4d2](https://github.com/nervosnetwork/muta/commit/89ed4d2c4a708f278e7cd777c562f1f1fb5a9755))
* **consensus:** encode overlord message and verify signature ([#39](https://github.com/nervosnetwork/muta/issues/39)) ([b11e69e](https://github.com/nervosnetwork/muta/commit/b11e69e49ed195d0d23f22b6abf1387f4a4c0c94))
* **consensus:** fix check state roots ([#107](https://github.com/nervosnetwork/muta/issues/107)) ([cf45c3b](https://github.com/nervosnetwork/muta/commit/cf45c3ba39eb65bdb012165e232352a9187a6f0d))
* **consensus:** Get authority list returns none. ([#4](https://github.com/nervosnetwork/muta/issues/4)) ([2a7eb3c](https://github.com/nervosnetwork/muta/commit/2a7eb3c26fade5a065ec2435b4ba46b6c16f223a))
* **consensus:** state root can not be clear ([#140](https://github.com/nervosnetwork/muta/issues/140)) ([4ea1df4](https://github.com/nervosnetwork/muta/commit/4ea1df425620482f36daf61b4b50edb83807efdd))
* **consensus:** sync txs context no session id ([#167](https://github.com/nervosnetwork/muta/issues/167)) ([53136c3](https://github.com/nervosnetwork/muta/commit/53136c3dfdf0e7b29762cd72f51eeb35d52804c2))
* **doc:** fix graphql_api doc link and doc-api build sh ([#161](https://github.com/nervosnetwork/muta/issues/161)) ([e67e2b2](https://github.com/nervosnetwork/muta/commit/e67e2b24bf0609c263f59381a83fcf04d2227583))
* **executor:** wrong hook logic ([#127](https://github.com/nervosnetwork/muta/issues/127)) ([8c6a246](https://github.com/nervosnetwork/muta/commit/8c6a246a1b64a197371305856148b034320f1fa0))
* **framework/executor:** Catch any errors in the call. ([#92](https://github.com/nervosnetwork/muta/issues/92)) ([739a126](https://github.com/nervosnetwork/muta/commit/739a126c86643b28e1c47aef87d8bd803b9fe8d9))
* **keypair:** Use hex encoding common_ref. ([#79](https://github.com/nervosnetwork/muta/issues/79)) ([abbce4c](https://github.com/nervosnetwork/muta/commit/abbce4c15919f45f824bd4967ea64f8234548765))
* **makefile:** Docker push to the correct image ([#146](https://github.com/nervosnetwork/muta/issues/146)) ([05f6396](https://github.com/nervosnetwork/muta/commit/05f6396f1786b46b4cf9c41e3f700b37ebaddb68))
* **mempool:** Always get the latest epoch id when `package`. ([#30](https://github.com/nervosnetwork/muta/issues/30)) ([9a77ebf](https://github.com/nervosnetwork/muta/commit/9a77ebf9ecba6323cc81cd094774e32fd28b946e))
* **mempool:** broadcast new transactions ([#32](https://github.com/nervosnetwork/muta/issues/32)) ([086ec7e](https://github.com/nervosnetwork/muta/commit/086ec7eb6ca2c8f6afc14767d51efdb91533f932))
* **mempool:** Fix concurrent insert bug of mempool ([#19](https://github.com/nervosnetwork/muta/issues/19)) ([515eec2](https://github.com/nervosnetwork/muta/commit/515eec2ab65a2d57a5ca742c774daeb9cef99354))
* **mempool:** Resize the queue to ensure correct switching. ([#18](https://github.com/nervosnetwork/muta/issues/18)) ([ebf1ae3](https://github.com/nervosnetwork/muta/commit/ebf1ae34861fc48297813cdc465e4d9c99e059d4))
* **mempool:** sync proposal txs doesn't insert txs at all ([#179](https://github.com/nervosnetwork/muta/issues/179)) ([33f39c5](https://github.com/nervosnetwork/muta/commit/33f39c5bac0235a8261c53327c558864a6149c8a))
* **network:** dead lock in peer manager ([#24](https://github.com/nervosnetwork/muta/issues/24)) ([a74017a](https://github.com/nervosnetwork/muta/commit/a74017aa9d84b6b862683860e63c000b4048e459))
* **network:** default rpc timeout to 4 seconds ([#115](https://github.com/nervosnetwork/muta/issues/115)) ([666049c](https://github.com/nervosnetwork/muta/commit/666049c54c8eee8291cc173230caccb35de137ca))
* **network:** fail to bootstrap if bootstrap isn't start already ([#46](https://github.com/nervosnetwork/muta/issues/46)) ([9dd515a](https://github.com/nervosnetwork/muta/commit/9dd515a3e09f1c158dff6536ed38eb5116f4317f))
* **network:** give up retry ([#152](https://github.com/nervosnetwork/muta/issues/152)) ([34d052a](https://github.com/nervosnetwork/muta/commit/34d052aaba1684333fdd49f86e54c103064fa2f6))
* **network:** never reconnect bootstrap again after failure ([#22](https://github.com/nervosnetwork/muta/issues/22)) ([79d66bd](https://github.com/nervosnetwork/muta/commit/79d66bd06e61ff6ef41c12ada91cf6485482aa43))
* **network:** NoSessionId Error ([#33](https://github.com/nervosnetwork/muta/issues/33)) ([4761d79](https://github.com/nervosnetwork/muta/commit/4761d797dded9534e0c0b5e43c6e519055542c2c))
* **network:** rpc memory leak if rpc call future is dropped ([#166](https://github.com/nervosnetwork/muta/issues/166)) ([8476a4b](https://github.com/nervosnetwork/muta/commit/8476a4b85bf3cf923adcd7555cef04ae73a225f1))
* **sync:** Check the height again after get the lock ([#171](https://github.com/nervosnetwork/muta/issues/171)) ([68164f3](https://github.com/nervosnetwork/muta/commit/68164f3f75d83b9507ee68a099fb712492339edb))
* **sync:** Flush the memory pool when the storage success ([#165](https://github.com/nervosnetwork/muta/issues/165)) ([3b9cbd5](https://github.com/nervosnetwork/muta/commit/3b9cbd55310993c783b0a5794237df75accf118e))
* fix overlord not found error ([#95](https://github.com/nervosnetwork/muta/issues/95)) ([0754c64](https://github.com/nervosnetwork/muta/commit/0754c64973f7fca92e49080c3a03a869b43a4c46))
* Ignore bootstraps when empty. ([#41](https://github.com/nervosnetwork/muta/issues/41)) ([2b3566b](https://github.com/nervosnetwork/muta/commit/2b3566b4acb91f6086b9cca2b1ea4d2883a75be9))


### Features

* **config:** move bls_pub_key config to genesis.toml ([#162](https://github.com/nervosnetwork/muta/issues/162)) ([337b01f](https://github.com/nervosnetwork/muta/commit/337b01fda21fc33f4d4817d93a27d86af9e2b164))
* **network:** interval report pending data size ([#160](https://github.com/nervosnetwork/muta/issues/160)) ([3c46aca](https://github.com/nervosnetwork/muta/commit/3c46aca4873abf9b8afd01d5f464df57bb1b9b9a))
* **sync:** Trigger sync after waiting for consensus interval ([#169](https://github.com/nervosnetwork/muta/issues/169)) ([fe355f1](https://github.com/nervosnetwork/muta/commit/fe355f1d7d6359dfa97809f1bc603cb99975ba46))
* add api schema ([#90](https://github.com/nervosnetwork/muta/issues/90)) ([3f8adfa](https://github.com/nervosnetwork/muta/commit/3f8adfa0a717b055a4455fd102de68003f835bf2))
* add common_ref argument for keypair tool ([#154](https://github.com/nervosnetwork/muta/issues/154)) ([2651346](https://github.com/nervosnetwork/muta/commit/26513469206aa8a4480c5fffad9d134d5d0e8ded))
* add panic hook to logger ([#156](https://github.com/nervosnetwork/muta/issues/156)) ([93b65fe](https://github.com/nervosnetwork/muta/commit/93b65feb89502b7d7836d7f4c423db37fbd1ef4f))
* Extract muta as crate. ([1b62fe7](https://github.com/nervosnetwork/muta/commit/1b62fe786fbd576b67ea28df3d304d235ae3e94e))
* Metadata service ([#133](https://github.com/nervosnetwork/muta/issues/133)) ([a588b12](https://github.com/nervosnetwork/muta/commit/a588b12de4f3c0de666b66e2a5dea65d71977f5f))
* spawn sync txs in check epoch ([6dca1dd](https://github.com/nervosnetwork/muta/commit/6dca1ddcd9256a3061f132a5abc5d784d466c168))
* support specify module log level via config ([#105](https://github.com/nervosnetwork/muta/issues/105)) ([c06061b](https://github.com/nervosnetwork/muta/commit/c06061b4ccd755177385dfee000783e2b11b0dcd))
* Update juniper, supports async ([#149](https://github.com/nervosnetwork/muta/issues/149)) ([cbabf50](https://github.com/nervosnetwork/muta/commit/cbabf507c25ee8feb8a57de408bc97efc8a4a4ab))
* update overlord with brake engine ([#159](https://github.com/nervosnetwork/muta/issues/159)) ([8cd886a](https://github.com/nervosnetwork/muta/commit/8cd886a79fec934a53d409a27de941f16166c176)), closes [#156](https://github.com/nervosnetwork/muta/issues/156) [#158](https://github.com/nervosnetwork/muta/issues/158)
* **api:** Add the exec_height field to the block ([#138](https://github.com/nervosnetwork/muta/issues/138)) ([417153c](https://github.com/nervosnetwork/muta/commit/417153c632793c7ac4e7bc3ffa5b2832dd2dbe66))
* **binding-macro:** service method supports none payload and none response ([#103](https://github.com/nervosnetwork/muta/issues/103)) ([3a5783e](https://github.com/nervosnetwork/muta/commit/3a5783eadd1090cf739d4fdbe94f049115eb65f0))
* **consensus:** develop aggregate crypto with overlord ([#60](https://github.com/nervosnetwork/muta/issues/60)) ([2bc0869](https://github.com/nervosnetwork/muta/commit/2bc0869e928b35c674b4cafdf48540298752b5b5))
* **core/binding:** Implementation of service state. ([#48](https://github.com/nervosnetwork/muta/issues/48)) ([301be6f](https://github.com/nervosnetwork/muta/commit/301be6f39379bd3826b5f605c999ce107f7404e4))
* **core/binding-macro:** Add `read` and `write` proc-macro. ([#49](https://github.com/nervosnetwork/muta/issues/49)) ([687b6e1](https://github.com/nervosnetwork/muta/commit/687b6e1e1a960f679394843c42b861981828d8aa))
* **core/binding-macro:** Add cycles proc-marco. ([#52](https://github.com/nervosnetwork/muta/issues/52)) ([e2289a2](https://github.com/nervosnetwork/muta/commit/e2289a2481510b59c18e37d0fc8bedd9f5d4537e))
* **core/binding-macro:** Support for returning a struct. ([#70](https://github.com/nervosnetwork/muta/issues/70)) ([e13b1ff](https://github.com/nervosnetwork/muta/commit/e13b1ff7834279de9c2df5a0df6967035b7fb8b3))
* **framework:** add ExecutorParams into hook method ([#116](https://github.com/nervosnetwork/muta/issues/116)) ([8036bd6](https://github.com/nervosnetwork/muta/commit/8036bd6f9be1f49eedbc40bbc260ad82952c2e71))
* **framework:** add extra: Option<Bytes> to ServiceContext ([#118](https://github.com/nervosnetwork/muta/issues/118)) ([694c4a3](https://github.com/nervosnetwork/muta/commit/694c4a34f32dc1ba4940db19e304de7a927e1531))
* **framework:** add tx_hash, nonce to ServiceContext ([#111](https://github.com/nervosnetwork/muta/issues/111)) ([352f71f](https://github.com/nervosnetwork/muta/commit/352f71fb3b8b024d533d26c7a344fad801b7a91c))
* **framework/executor:** create service genesis from config ([#104](https://github.com/nervosnetwork/muta/issues/104)) ([8988ccb](https://github.com/nervosnetwork/muta/commit/8988ccb3e5cb2a25bfeabe93c5a63ac1600290a2))
* **graphql:** Modify the API to fit the framework data structure. ([#74](https://github.com/nervosnetwork/muta/issues/74)) ([a1ca2b0](https://github.com/nervosnetwork/muta/commit/a1ca2b0d68e32e335d8d388b70bca83137519f5a))
* **muta:** flush metadata while commit  ([#137](https://github.com/nervosnetwork/muta/issues/137)) ([383a481](https://github.com/nervosnetwork/muta/commit/383a481c348efdf73fd690b42b2430fca6d9a0db))
* **muta:** link up metadata service with muta ([#136](https://github.com/nervosnetwork/muta/issues/136)) ([ba65b80](https://github.com/nervosnetwork/muta/commit/ba65b80dffd128f12336b44d4e80ed40cced8e75))
* **protocol/traits:** Add traits of binding. ([#47](https://github.com/nervosnetwork/muta/issues/47)) ([c6b85ee](https://github.com/nervosnetwork/muta/commit/c6b85ee7bee5b14c5da1676ff44d743c031a0fa6))
* **protocol/types:** Add cycles_price for raw_transaction. ([#46](https://github.com/nervosnetwork/muta/issues/46)) ([55f64a4](https://github.com/nervosnetwork/muta/commit/55f64a49634061ca05c75cbf5923f183fc83936d))
* **sync:** Wait for the execution queue. ([#132](https://github.com/nervosnetwork/muta/issues/132)) ([a8d2013](https://github.com/nervosnetwork/muta/commit/a8d2013991cc6b5b579429954c8411c7954b1da4))
* add end to end test ([#42](https://github.com/nervosnetwork/muta/issues/42)) ([e84756d](https://github.com/nervosnetwork/muta/commit/e84756d1734ad58943309c3c2299393f5a2022e4))
* Extract muta as crate. ([#75](https://github.com/nervosnetwork/muta/issues/75)) ([fc576ea](https://github.com/nervosnetwork/muta/commit/fc576eaa67a3b4b4fa459b0ab970251d63b06b4f)), closes [#46](https://github.com/nervosnetwork/muta/issues/46) [#47](https://github.com/nervosnetwork/muta/issues/47) [#48](https://github.com/nervosnetwork/muta/issues/48) [#49](https://github.com/nervosnetwork/muta/issues/49) [#52](https://github.com/nervosnetwork/muta/issues/52) [#51](https://github.com/nervosnetwork/muta/issues/51) [#55](https://github.com/nervosnetwork/muta/issues/55) [#58](https://github.com/nervosnetwork/muta/issues/58) [#56](https://github.com/nervosnetwork/muta/issues/56) [#64](https://github.com/nervosnetwork/muta/issues/64) [#65](https://github.com/nervosnetwork/muta/issues/65) [#70](https://github.com/nervosnetwork/muta/issues/70) [#71](https://github.com/nervosnetwork/muta/issues/71) [#72](https://github.com/nervosnetwork/muta/issues/72) [#73](https://github.com/nervosnetwork/muta/issues/73) [#43](https://github.com/nervosnetwork/muta/issues/43) [#54](https://github.com/nervosnetwork/muta/issues/54) [#53](https://github.com/nervosnetwork/muta/issues/53) [#57](https://github.com/nervosnetwork/muta/issues/57) [#45](https://github.com/nervosnetwork/muta/issues/45) [#62](https://github.com/nervosnetwork/muta/issues/62) [#63](https://github.com/nervosnetwork/muta/issues/63) [#66](https://github.com/nervosnetwork/muta/issues/66) [#61](https://github.com/nervosnetwork/muta/issues/61) [#67](https://github.com/nervosnetwork/muta/issues/67) [#68](https://github.com/nervosnetwork/muta/issues/68) [#60](https://github.com/nervosnetwork/muta/issues/60) [#46](https://github.com/nervosnetwork/muta/issues/46) [#47](https://github.com/nervosnetwork/muta/issues/47) [#48](https://github.com/nervosnetwork/muta/issues/48) [#49](https://github.com/nervosnetwork/muta/issues/49) [#52](https://github.com/nervosnetwork/muta/issues/52) [#51](https://github.com/nervosnetwork/muta/issues/51) [#55](https://github.com/nervosnetwork/muta/issues/55) [#58](https://github.com/nervosnetwork/muta/issues/58) [#56](https://github.com/nervosnetwork/muta/issues/56) [#64](https://github.com/nervosnetwork/muta/issues/64) [#65](https://github.com/nervosnetwork/muta/issues/65) [#70](https://github.com/nervosnetwork/muta/issues/70) [#72](https://github.com/nervosnetwork/muta/issues/72) [#74](https://github.com/nervosnetwork/muta/issues/74)
* metrics logger ([#43](https://github.com/nervosnetwork/muta/issues/43)) ([d633309](https://github.com/nervosnetwork/muta/commit/d6333091959da6ab0a12630282f6ea783d509319))
* support consensus tracing ([#53](https://github.com/nervosnetwork/muta/issues/53)) ([03942f0](https://github.com/nervosnetwork/muta/commit/03942f08cfdcc573d7feef3a1111e59f63d077f1))
* **api:** make API more user-friendly ([#38](https://github.com/nervosnetwork/muta/issues/38)) ([ba33467](https://github.com/nervosnetwork/muta/commit/ba33467e52c114576b82850e11662d168ede293a))
* **mempool:** implement cached batch txs broadcast ([#20](https://github.com/nervosnetwork/muta/issues/20)) ([d2af811](https://github.com/nervosnetwork/muta/commit/d2af811bb99becc9600d784ce19e021fec11627d))
* **sync:** synchronization epoch ([#9](https://github.com/nervosnetwork/muta/issues/9)) ([fb4bf0d](https://github.com/nervosnetwork/muta/commit/fb4bf0d7c4bde7c86d1b09f469037ff1219f15fa)), closes [#17](https://github.com/nervosnetwork/muta/issues/17) [#18](https://github.com/nervosnetwork/muta/issues/18)
* add compile and run in README ([#11](https://github.com/nervosnetwork/muta/issues/11)) ([1058322](https://github.com/nervosnetwork/muta/commit/10583224053ab91c32dbec815cd0a5af6b0dbeb3))
* add docker ([#31](https://github.com/nervosnetwork/muta/issues/31)) ([8a4386a](https://github.com/nervosnetwork/muta/commit/8a4386ad4c1f66783cada885db9851609b6f5f8d))
* change rlp in executor to fixed-codec ([#29](https://github.com/nervosnetwork/muta/issues/29)) ([7f737cd](https://github.com/nervosnetwork/muta/commit/7f737cdfc9353148b945ad52dd5ab3fd46e2c4db))
* Get balance. ([#28](https://github.com/nervosnetwork/muta/issues/28)) ([8c4a3f9](https://github.com/nervosnetwork/muta/commit/8c4a3f9af8b9e1e8f19cc50b280b66b5d8e270bb))
* **codec:** Add codec tests and benchmarks ([#22](https://github.com/nervosnetwork/muta/issues/22)) ([dcbe522](https://github.com/nervosnetwork/muta/commit/dcbe522be22596059280f6ef845a6d6f4e798551))
* **consensus:** develop consensus interfaces ([#21](https://github.com/nervosnetwork/muta/issues/21)) ([62e3c06](https://github.com/nervosnetwork/muta/commit/62e3c063cd4f82efda43ca5c87c042db5adb9abb))
* **consensus:** develop consensus provider and engine ([#28](https://github.com/nervosnetwork/muta/issues/28)) ([b2ccf9c](https://github.com/nervosnetwork/muta/commit/b2ccf9c84502a6dd476b1737aa9cbb2a283ced32))
* **consensus:** Execute the transactions on commit. ([#7](https://github.com/nervosnetwork/muta/issues/7)) ([b54e7d2](https://github.com/nervosnetwork/muta/commit/b54e7d2bbd5d0ac45ef0d4c728e398b87a1f5450))
* **consensus:** joint overlord and chain ([#32](https://github.com/nervosnetwork/muta/issues/32)) ([72cec41](https://github.com/nervosnetwork/muta/commit/72cec41c86824455ad35cfb1da8a246c50731568))
* **consensus:** mutex lock and timer config ([#45](https://github.com/nervosnetwork/muta/issues/45)) ([cf09687](https://github.com/nervosnetwork/muta/commit/cf09687299b5be39a9c40f13d4b88a496ec7c943))
* **consensus:** Support trsanction executor. ([#6](https://github.com/nervosnetwork/muta/issues/6)) ([e1188f9](https://github.com/nervosnetwork/muta/commit/e1188f9296b3947f833d6bc9a9beff22ebbbf4e7))
* **executor:** Create genesis. ([#1](https://github.com/nervosnetwork/muta/issues/1)) ([a1111d8](https://github.com/nervosnetwork/muta/commit/a1111d8db709c62d119edf3238a22dd656e8035f))
* **graphql:** Support transfer and contract deployment ([#44](https://github.com/nervosnetwork/muta/issues/44)) ([bfcb520](https://github.com/nervosnetwork/muta/commit/bfcb5203fe245e364922d5d8966197a8a8f8d91c))
* **mempool:** fix fixed_codec ([#25](https://github.com/nervosnetwork/muta/issues/25)) ([c1ac607](https://github.com/nervosnetwork/muta/commit/c1ac607ac9b61f4867c17f69c50dad9797dc1c2b))
* **mempool:** Remove cycle_limit ([#23](https://github.com/nervosnetwork/muta/issues/23)) ([8a19ae8](https://github.com/nervosnetwork/muta/commit/8a19ae867fd5b82c4fd56a1f8b59a83e24ca5bc0))
* **native-contract:** Support for asset creation and transfer. ([#37](https://github.com/nervosnetwork/muta/issues/37)) ([1c505fb](https://github.com/nervosnetwork/muta/commit/1c505fbdd57fcb2ef3df3e8b19c65599d77c9bf1))
* **network:** log connected peer ips ([#23](https://github.com/nervosnetwork/muta/issues/23)) ([1691bfa](https://github.com/nervosnetwork/muta/commit/1691bfa47ac561a2f27243e21b1b2fad2fb64be9))
* develop merkle root ([#17](https://github.com/nervosnetwork/muta/issues/17)) ([03cec31](https://github.com/nervosnetwork/muta/commit/03cec318645ee49158f09ec59e356210a80f8bbf))
* Fill in the main function ([#36](https://github.com/nervosnetwork/muta/issues/36)) ([d783f3b](https://github.com/nervosnetwork/muta/commit/d783f3b2d36507a695abd47b303b6c0108e2030b))
* **mempool:** Develop mempool's tests and benches  ([#9](https://github.com/nervosnetwork/muta/issues/9)) ([5ddd5f4](https://github.com/nervosnetwork/muta/commit/5ddd5f4d0c1fa9630971ade538dcf954b6aa8f54))
* **mempool:** Implement MemPool interfaces ([#8](https://github.com/nervosnetwork/muta/issues/8)) ([934ce58](https://github.com/nervosnetwork/muta/commit/934ce58b7a7a6b89b65ff931ce5487e553dd927d))
* **native_contract:** Add an adapter that provides access to the world state. ([#27](https://github.com/nervosnetwork/muta/issues/27)) ([3281bea](https://github.com/nervosnetwork/muta/commit/3281beab2d054470b5edf330515df933cc713bb8))
* **protocol:** Add the mempool traits ([#7](https://github.com/nervosnetwork/muta/issues/7)) ([9f6c19b](https://github.com/nervosnetwork/muta/commit/9f6c19bbfbff6c8f82bb732c3503d757833f837e))
* **protocol:** Add the underlying data structure. ([#5](https://github.com/nervosnetwork/muta/issues/5)) ([5dae189](https://github.com/nervosnetwork/muta/commit/5dae189104c986348adddd43fbaa47af01781828))
* **protocol:** Protobuf serialize ([#6](https://github.com/nervosnetwork/muta/issues/6)) ([ff00595](https://github.com/nervosnetwork/muta/commit/ff00595d100e44148b1cc243437798db8233ca2b))
* **storage:** add storage test ([#18](https://github.com/nervosnetwork/muta/issues/18)) ([f78df5b](https://github.com/nervosnetwork/muta/commit/f78df5b0357eade7855152eee9c79070866477ac))
* **storage:** Implement memory adapter API ([#11](https://github.com/nervosnetwork/muta/issues/11)) ([b0a8090](https://github.com/nervosnetwork/muta/commit/b0a80901229f85e8cf89bd806dcb32c95ae059b8))
* **storage:** Implement storage ([#17](https://github.com/nervosnetwork/muta/issues/17)) ([7728b5b](https://github.com/nervosnetwork/muta/commit/7728b5b0307bd58b11671f123f37e3e365b14b97))
* **types:** Add account structure. ([#24](https://github.com/nervosnetwork/muta/issues/24)) ([f6b93f0](https://github.com/nervosnetwork/muta/commit/f6b93f0f08b03a20761aef47f08343eb5d8e6a85))


### Performance Improvements

* **storage:** cache latest epoch ([#128](https://github.com/nervosnetwork/muta/issues/128)) ([da4d7a9](https://github.com/nervosnetwork/muta/commit/da4d7a92363596b7339518e24c64ab49648749dd))


### Reverts

* Revert "[ᚬdebug-muta] feat(service): Upgrade asset (#181)" (#182) ([dad3f99](https://github.com/nervosnetwork/muta/commit/dad3f99f7c694eea57b546c6b2169950c5692ea1)), closes [#181](https://github.com/nervosnetwork/muta/issues/181) [#182](https://github.com/nervosnetwork/muta/issues/182)
* Revert "feat: Extract muta as crate. (#75)" (#77) ([3baacc5](https://github.com/nervosnetwork/muta/commit/3baacc5c781615377e9a6ba50cfc7b17dcb0ec6e)), closes [#75](https://github.com/nervosnetwork/muta/issues/75) [#77](https://github.com/nervosnetwork/muta/issues/77)



# [0.1.0](https://github.com/nervosnetwork/muta/compare/733ee8e6be7649c9aa2d772bb1dc661bd0879917...v0.1.0) (2019-09-22)


### Bug Fixes

* **ci:** build on push and pull request ([d28aa55](https://github.com/nervosnetwork/muta/commit/d28aa55f5df240277e2b75e87aa948cdcf11ea7f))
* **ci:** temporarily amend code to pass lint ([9441236](https://github.com/nervosnetwork/muta/commit/9441236a5107e0042753915ed943b487cd02d6a5))
* **consensus:** Clear cache of last proposal. ([#199](https://github.com/nervosnetwork/muta/issues/199)) ([f548653](https://github.com/nervosnetwork/muta/commit/f5486531f43fa720171941ad4be5ec7646a269c2))
* **consensus:** fix lock free too early problem and add state root check ([#277](https://github.com/nervosnetwork/muta/issues/277)) ([7238c5b](https://github.com/nervosnetwork/muta/commit/7238c5bc057bd6c6f31773fa4bd3e06aaea72255))
* **consensus:** Makes sure that proposer is this node. ([#281](https://github.com/nervosnetwork/muta/issues/281)) ([d7f4e50](https://github.com/nervosnetwork/muta/commit/d7f4e5081f00a04aee934d0ce700cd107f4f345f))
* **core-network:** CallbackItemNotFound ([#243](https://github.com/nervosnetwork/muta/issues/243)) ([47365fa](https://github.com/nervosnetwork/muta/commit/47365faf5fa7171dde8951661fa095a6c43bcb1f))
* **core-network:** false bootstrapped connections ([#275](https://github.com/nervosnetwork/muta/issues/275)) ([26e76f0](https://github.com/nervosnetwork/muta/commit/26e76f0a2879aed3da745529f64ba3828a1cc30e))
* **core-types:** compilation failure ([#269](https://github.com/nervosnetwork/muta/issues/269)) ([56d8649](https://github.com/nervosnetwork/muta/commit/56d86491f69ab16fd2c76b66b28ad76df78c6ca7))
* **core/crypto:** pubkey_to_address() consistent with cita ([acb5e63](https://github.com/nervosnetwork/muta/commit/acb5e63ea577429bc94c16a3430035ea139aaf15))
* **executor:** Save the full node data. ([b57a1c5](https://github.com/nervosnetwork/muta/commit/b57a1c5fa775479b85d1531f7d2dced817de4729))
* **jsonrpc:** give default value for newFilter ([#289](https://github.com/nervosnetwork/muta/issues/289)) ([17069b4](https://github.com/nervosnetwork/muta/commit/17069b49067dd7335f243d248e3c8d633e455a73))
* **jsonrpc:** logic error in getTransactionCount ([#290](https://github.com/nervosnetwork/muta/issues/290)) ([464bfdf](https://github.com/nervosnetwork/muta/commit/464bfdf08a9954206bb595b3861c52208fc9630d))
* **jsonrpc:** make the response compatible with jsonrpc 2.0 spec ([1db5190](https://github.com/nervosnetwork/muta/commit/1db5190bc91d431bacce6bb44a1185b19520c1a2))
* **jsonrpc:** prefix with 0x by API getTransactionProof ([#295](https://github.com/nervosnetwork/muta/issues/295)) ([b1c0160](https://github.com/nervosnetwork/muta/commit/b1c0160b65fc91e8a2bcfd908943fb238d1101c1))
* **jsonrpc:** raise error when key not found in state ([#294](https://github.com/nervosnetwork/muta/issues/294)) ([7a7c294](https://github.com/nervosnetwork/muta/commit/7a7c294df5ae75f50ec0fe3620634c7280f837e7))
* **jsonrpc:** returns the correct block hash ([#280](https://github.com/nervosnetwork/muta/issues/280)) ([f6a58d0](https://github.com/nervosnetwork/muta/commit/f6a58d0cfc743d1fa84fe5de99798157ba5f25a6))
* Call header.hash ([#94](https://github.com/nervosnetwork/muta/issues/94)) ([636aa54](https://github.com/nervosnetwork/muta/commit/636aa549c21a04611b6f4575dfc7e78fa47d768e))
* change the blocking thread from rayon to std::thread ([5b80476](https://github.com/nervosnetwork/muta/commit/5b804765d0a76055e6e730560a6d7ecd576703be))
* return err if tx not found in get_batch to avoid forking ([#279](https://github.com/nervosnetwork/muta/issues/279)) ([6aed2fe](https://github.com/nervosnetwork/muta/commit/6aed2fe5ffcd0eb6a699cff00d92e9dd3ab7d7b3))
* **sync:** proof and proposal_hash hash not match. ([#239](https://github.com/nervosnetwork/muta/issues/239)) ([51f332e](https://github.com/nervosnetwork/muta/commit/51f332ee8c4a10b88844a272bc51a116b4d25dd2))
* tokio::spawn panic. ([#238](https://github.com/nervosnetwork/muta/issues/238)) ([12d8d01](https://github.com/nervosnetwork/muta/commit/12d8d01ed42f9cc5d9cc341edfd76a6076aa37e1))
* **common/logger:** cargo fmt ([e3a7f5a](https://github.com/nervosnetwork/muta/commit/e3a7f5a2217956b86191881caeb3ca6cea7ec2fc))
* **compoents/transaction-pool:** Use the latest crypto API. ([#86](https://github.com/nervosnetwork/muta/issues/86)) ([f6c94d3](https://github.com/nervosnetwork/muta/commit/f6c94d307d6e89afba75ed8b83b99088fc7ca9de))
* **components/transaction-pool:** Check if the transaction is repeated in histories block. ([dba25fe](https://github.com/nervosnetwork/muta/commit/dba25fe09d8e82f0e396415055ce08efbf1fe159))
* **core-p2p:** transmission example: a clippy warning ([6d2f42a](https://github.com/nervosnetwork/muta/commit/6d2f42ae97194333a823581406fc75d2c47536b2))
* **core-p2p:** transmission example: remove unreachable match branch ([0082bd6](https://github.com/nervosnetwork/muta/commit/0082bd6a3fb956f9ee17a9eba6ada77fc91f3dfe))
* **core-p2p:** transmission: future task starvation ([ba14db0](https://github.com/nervosnetwork/muta/commit/ba14db035413220ed7eba5e5543b8a6496267641))
* **devchain:** correct addresses matched with privkey ([#114](https://github.com/nervosnetwork/muta/issues/114)) ([f56744e](https://github.com/nervosnetwork/muta/commit/f56744e7809b39da79434a3fbcf3deb127fded27))
* **network:** RepeatedConnection and ConnectSelf errors ([#196](https://github.com/nervosnetwork/muta/issues/196)) ([2e5e888](https://github.com/nervosnetwork/muta/commit/2e5e888cdb0869e7622639919b12e62eca06f137))
* **p2p:** Make sure the "poll" is triggered. ([#182](https://github.com/nervosnetwork/muta/issues/182)) ([88daed1](https://github.com/nervosnetwork/muta/commit/88daed1e3e175c21e7923ddd5f1b4eb4ef4d6286))
* **p2p-identify:** empty local listen addresses ([#198](https://github.com/nervosnetwork/muta/issues/198)) ([c40ad8a](https://github.com/nervosnetwork/muta/commit/c40ad8a8dedd999efd17a88b9c30b198d4a0035a))
* **synchronizer:** add a pull_txs_sync method to sync txs from block ([#207](https://github.com/nervosnetwork/muta/issues/207)) ([317fca8](https://github.com/nervosnetwork/muta/commit/317fca8b8d2f270e5d140a94bb1a9227c4b7271b))
* **transaction-pool:** duplicate insertion transactions from network ([#191](https://github.com/nervosnetwork/muta/issues/191)) ([2c095bb](https://github.com/nervosnetwork/muta/commit/2c095bbe5649454abf2663df7355c0a56f54a71f))
* **tx-pool:** "get_count" returns the repeat transaction. ([f5612d0](https://github.com/nervosnetwork/muta/commit/f5612d09d02e9183b702f0233aecc14c31779945))
* **tx-pool:** `ensure` method always pull all txs from remote peer ([#194](https://github.com/nervosnetwork/muta/issues/194)) ([9ff300e](https://github.com/nervosnetwork/muta/commit/9ff300e191aa39b6301e481f8f287287b645ba39))
* **tx-pool:** Ensure the number of transactions meets expectations ([dcbf0dd](https://github.com/nervosnetwork/muta/commit/dcbf0dd8cf548ddfe3afb3226d7596637ae615dd))
* **tx-pool:** replace chashmap ([#211](https://github.com/nervosnetwork/muta/issues/211)) ([717f55e](https://github.com/nervosnetwork/muta/commit/717f55e4772c5818ab17e2b1c320b0b98f174122))
* Aviod drop ([4d0f986](https://github.com/nervosnetwork/muta/commit/4d0f986741c392489893f036989db7218db54743))
* build failure ([18ce8e4](https://github.com/nervosnetwork/muta/commit/18ce8e4642d8d27892fee53b9695e4ced7921055))
* jsonrpc call return value ([#104](https://github.com/nervosnetwork/muta/issues/104)) ([1fe41eb](https://github.com/nervosnetwork/muta/commit/1fe41eb491a16588019218144985eec143613c65))
* logic error of bloom filter ([#176](https://github.com/nervosnetwork/muta/issues/176)) ([70269cb](https://github.com/nervosnetwork/muta/commit/70269cb5cefd82f1a14eb5e85df419c1587d19c8))
* merkle typo ([4f63585](https://github.com/nervosnetwork/muta/commit/4f6358565ee8d486be18ac8ff6069b95b597ea4d))
* rlp encode ([b852ac1](https://github.com/nervosnetwork/muta/commit/b852ac147db818cf289b972f054028d293218a19))
* rlp hash ([837055a](https://github.com/nervosnetwork/muta/commit/837055a4eb78ba941004dbc0466955895de8bcab))
* Set quota limit for the genesis. ([#106](https://github.com/nervosnetwork/muta/issues/106)) ([931fe40](https://github.com/nervosnetwork/muta/commit/931fe404453a6f936cbd27bf37d0e326a03e4484))
* write lock ([de80439](https://github.com/nervosnetwork/muta/commit/de80439cb4e7889c1220fc7821604f9ef792422e))


### Features

* add business model support for executor ([#308](https://github.com/nervosnetwork/muta/issues/308)) ([e03396b](https://github.com/nervosnetwork/muta/commit/e03396bb6b964a0c93f43c2684a0e76a55db5540))
* add Deserialize for Hash and Address ([#259](https://github.com/nervosnetwork/muta/issues/259)) ([fef188c](https://github.com/nervosnetwork/muta/commit/fef188c5950fb7f64a92312894efdb4955201a93))
* add docker config for dev ([#197](https://github.com/nervosnetwork/muta/issues/197)) ([6e74aec](https://github.com/nervosnetwork/muta/commit/6e74aec0b51c2bf80c1d1b893130ea74f4a1a8f0))
* add fabric devops scripts ([fcdc25c](https://github.com/nervosnetwork/muta/commit/fcdc25c05b5c30ba38bf6af57885c2f45233d3fc))
* add height to the end of proposal msg ([#255](https://github.com/nervosnetwork/muta/issues/255)) ([c5cbc5e](https://github.com/nervosnetwork/muta/commit/c5cbc5ec70f1dc0fb46ef0bb87c3b994596b4571))
* add more info to version ([#298](https://github.com/nervosnetwork/muta/issues/298)) ([fd02a17](https://github.com/nervosnetwork/muta/commit/fd02a17a68bb6ef59bbd4cded13d69da221237ee))
* peerCount RPC API ([#257](https://github.com/nervosnetwork/muta/issues/257)) ([736ae8c](https://github.com/nervosnetwork/muta/commit/736ae8c7f537a56b01d648cf066f220e47108820))
* **components/cita-jsonrpc:** impl executor related apis ([#80](https://github.com/nervosnetwork/muta/issues/80)) ([bc8f340](https://github.com/nervosnetwork/muta/commit/bc8f34015617e1a01fb2fbb30d9709cdd806daea))
* **components/cita-jsonrpc:** impl get_code and finish some todo ([#87](https://github.com/nervosnetwork/muta/issues/87)) ([e1b0b9d](https://github.com/nervosnetwork/muta/commit/e1b0b9dc8c39965366c5b572905e63cacecdc958))
* **components/databse:** Implement RocksDB ([#72](https://github.com/nervosnetwork/muta/issues/72)) ([3516fbc](https://github.com/nervosnetwork/muta/commit/3516fbc41338a2f423e0ba56eb96c7fa697a6c77))
* **components/executor:** Add trie db for executor. ([#85](https://github.com/nervosnetwork/muta/issues/85)) ([fd7dc1d](https://github.com/nervosnetwork/muta/commit/fd7dc1da97a4b7dafb1ecbc2813c9506423689a5))
* **components/executor:** Implement EVM executor. ([#68](https://github.com/nervosnetwork/muta/issues/68)) ([021893d](https://github.com/nervosnetwork/muta/commit/021893db432f1ddadc89da9c9251bdb6fb79d925))
* **components/jsonrpc:** implement getStateProof ([#178](https://github.com/nervosnetwork/muta/issues/178)) ([69499fb](https://github.com/nervosnetwork/muta/commit/69499fbb98cbe7f23d426c15ebe67de552dd5d2b))
* **components/jsonrpc:** implement getTransactionProof ([0db8785](https://github.com/nervosnetwork/muta/commit/0db8785475e9d9c098fa123b9c23b4f0eab286dc))
* **components/jsonrpc:** running on microscope ([#200](https://github.com/nervosnetwork/muta/issues/200)) ([1c63a0e](https://github.com/nervosnetwork/muta/commit/1c63a0e3db751b7b7be6f053bed2b66245b105cd))
* **components/jsonrpc:** Try to convert tx to cita::tx ([#221](https://github.com/nervosnetwork/muta/issues/221)) ([b8ab16b](https://github.com/nervosnetwork/muta/commit/b8ab16b05ad01a0c6ef5a7b8d7ad76961e7749ff))
* **core-network:** expost send_buffer_size and recv_buffer_size ([#248](https://github.com/nervosnetwork/muta/issues/248)) ([e5120ad](https://github.com/nervosnetwork/muta/commit/e5120ad646c9d206b43b0d50911303507bdfe381))
* **core-network:** implement peer count feature ([#256](https://github.com/nervosnetwork/muta/issues/256)) ([8f7e7eb](https://github.com/nervosnetwork/muta/commit/8f7e7eb51cdeebfb9c679d88626ac2ec3fa651a4))
* add performance test lua script ([#244](https://github.com/nervosnetwork/muta/issues/244)) ([c727b73](https://github.com/nervosnetwork/muta/commit/c727b733340029f72d9280a57e07522f635eff44))
* **core-network:** implement concurrent reactor and real chained reactor ([#175](https://github.com/nervosnetwork/muta/issues/175)) ([dc9f897](https://github.com/nervosnetwork/muta/commit/dc9f897f08801d7b8a418750ed516a8acac057ca))
* **core-p2p:** implement datagram transport protocol ([fee2d45](https://github.com/nervosnetwork/muta/commit/fee2d4546552bd6c46376309eb399126219c55fb))
* **core-p2p:** transmission: use `poll` func to do broadcast ([b376cbe](https://github.com/nervosnetwork/muta/commit/b376cbef9211e55f809f16bb9bab1360dd4b3523))
* **core/consensus:** Implement solo mode for consensus ([e071b15](https://github.com/nervosnetwork/muta/commit/e071b1533b1107f65eb0f97563f011f644d73be6))
* **core/crypto:** Add secp256k1 ([8349eaa](https://github.com/nervosnetwork/muta/commit/8349eaa2817ee8c27e9e8367c89f3469e52b6f8a))
* **core/crypto:** Modify the return type to result. ([9f2424c](https://github.com/nervosnetwork/muta/commit/9f2424ca11fa300f7269f7a32195ec8bbde096e0))
* **core/network:** Support broadcast message ([#185](https://github.com/nervosnetwork/muta/issues/185)) ([992c55f](https://github.com/nervosnetwork/muta/commit/992c55f87458a38629944fb78ee69982d8329b2b))
* **core/types:** Add hash function for the header and receipts ([c982a52](https://github.com/nervosnetwork/muta/commit/c982a52ce29da7f0e783b2a7a52f1d541c15ea10))
* **executor:** Add flush for trie db. ([#240](https://github.com/nervosnetwork/muta/issues/240)) ([23fd538](https://github.com/nervosnetwork/muta/commit/23fd53849ac626cdeaabb165c0534bb90651aa90))
* **jsonrpc:** Implement filter APIs ([#190](https://github.com/nervosnetwork/muta/issues/190)) ([c97ed22](https://github.com/nervosnetwork/muta/commit/c97ed2273b6ddb2385d6d0285f2d5b4d267b130b))
* **tx-pool:** Batch broadcast transactions. ([#234](https://github.com/nervosnetwork/muta/issues/234)) ([d297b1a](https://github.com/nervosnetwork/muta/commit/d297b1a4d655fdfac25f7f5630253f7e8f6f70ea))
* add synchronizer ([#167](https://github.com/nervosnetwork/muta/issues/167)) ([38db7aa](https://github.com/nervosnetwork/muta/commit/38db7aa3f83e4a35417440e4787c5249b9eace63))
* Implement many JSONRPC APIs ([#166](https://github.com/nervosnetwork/muta/issues/166)) ([807b6a7](https://github.com/nervosnetwork/muta/commit/807b6a73cb098087179d9b086fa0070b6ced74d0))
* Implement RPC getTransactionCount ([#169](https://github.com/nervosnetwork/muta/issues/169)) ([dbf0c51](https://github.com/nervosnetwork/muta/commit/dbf0c51a17f3e285e1146eee3b5e9def08d16d50))
* rewrite network component ([#230](https://github.com/nervosnetwork/muta/issues/230)) ([585dabb](https://github.com/nervosnetwork/muta/commit/585dabb2d52dd70de7ebc26eee59345596301c1a))
* **components/jsonrpc:** Implements sendRawTransaction ([#159](https://github.com/nervosnetwork/muta/issues/159)) ([112d345](https://github.com/nervosnetwork/muta/commit/112d34582c00bea3c05d1663cf07d79aefbfa6a9))
* **core-context:** add `CommonValue` trait and `p2p_session_id` method ([#165](https://github.com/nervosnetwork/muta/issues/165)) ([216b743](https://github.com/nervosnetwork/muta/commit/216b74381c00b15ba61444cf462528ee170fcc41))
* **core/consensus:** Implements BFT ([#158](https://github.com/nervosnetwork/muta/issues/158)) ([e7a3bfd](https://github.com/nervosnetwork/muta/commit/e7a3bfd2f667c9bb8d6b9deb29a57c837ae296b9))
* **core/notify:** add notify as message-bus between components ([b53c50d](https://github.com/nervosnetwork/muta/commit/b53c50dc04090b6b0d5b6725b5c32697446aa5f8))
* **core/serialization:** Add proto file ([0bf7c59](https://github.com/nervosnetwork/muta/commit/0bf7c59200ad4a4cc7994efecaec5d8c683f175a))
* **core/storage:** Add the storage trait ([ffc8776](https://github.com/nervosnetwork/muta/commit/ffc8776b02bc0a4cf785c7c5c47a88266f186b49))
* **core/types:** Add the transactions hash calculation function. ([67d8170](https://github.com/nervosnetwork/muta/commit/67d817072c4c03b2fc2eaae5d1dc99d2d41240e0))
* **core/types:** Define serialization and deserialization methods ([f28c63d](https://github.com/nervosnetwork/muta/commit/f28c63d2b4c7b77dbe24e2b50e70cf649a6c714c))
* **database:** Add memory db ([d21a5a2](https://github.com/nervosnetwork/muta/commit/d21a5a29bd20e02f3ddd29f77c3df2963f8f3b4b))
* **jsonrpc:** support batch ([0a0c680](https://github.com/nervosnetwork/muta/commit/0a0c680993ff9be231f1ae8e583171e1f304f79b))
* **main:** add init command for genesis ([#96](https://github.com/nervosnetwork/muta/issues/96)) ([ec752b0](https://github.com/nervosnetwork/muta/commit/ec752b0602800055990fbfcc54bd2c2ab0b2cb60))
* **p2p:** Update to tentacle0.2.0-alpha.5 ([#177](https://github.com/nervosnetwork/muta/issues/177)) ([f6f83b6](https://github.com/nervosnetwork/muta/commit/f6f83b6b263579d66160cfab29b83bd5a709eeb4))
* **pubsub:** Implement pubsub components ([#143](https://github.com/nervosnetwork/muta/issues/143)) ([a079770](https://github.com/nervosnetwork/muta/commit/a079770b0e66e22552bd8cf504a9e1ba0c520d0e))
* **runtime:** add `Context` struct ([#155](https://github.com/nervosnetwork/muta/issues/155)) ([27e5aa7](https://github.com/nervosnetwork/muta/commit/27e5aa7f01f3559d2a9dd17346595c9161a9c0f6))
* Add project framework ([#24](https://github.com/nervosnetwork/muta/issues/24)) ([733ee8e](https://github.com/nervosnetwork/muta/commit/733ee8e6be7649c9aa2d772bb1dc661bd0879917))
* Add transaction pool component. ([360c935](https://github.com/nervosnetwork/muta/commit/360c93540ea77dc51551a3739e17682600d2b1b7))
* Fill main.rs ([#102](https://github.com/nervosnetwork/muta/issues/102)) ([b5b4c72](https://github.com/nervosnetwork/muta/commit/b5b4c7233efcd1c35e92248b7726ca20644800e9))
* impl cita-jsonrpc ([49e2a2d](https://github.com/nervosnetwork/muta/commit/49e2a2d22d094b2b6a2f71bc5201ccfe28308797))
* update db interface and storage interface ([#137](https://github.com/nervosnetwork/muta/issues/137)) ([36b3d07](https://github.com/nervosnetwork/muta/commit/36b3d07f23e2c7ada870cb699bf138cdd66c2860))


### Reverts

* Revert "chore: Update bft-rs (#203)" (#204) ([cc15ba9](https://github.com/nervosnetwork/muta/commit/cc15ba9ed302ab1389838a4a6c745675106179e9)), closes [#203](https://github.com/nervosnetwork/muta/issues/203) [#204](https://github.com/nervosnetwork/muta/issues/204)



# [](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.4...v) (2020-08-12)


### Features

* **network:** split transmitter data ([#380](https://github.com/nervosnetwork/muta/issues/380)) ([0322cd6](https://github.com/nervosnetwork/muta/commit/0322cd690cb118f56153e424e9a6bf4b2a11d8b4))
* **network:** verify chain id during protocol handshake ([#406](https://github.com/nervosnetwork/muta/issues/406)) ([e678e92](https://github.com/nervosnetwork/muta/commit/e678e92bf01bc4bc914e74b6fed22c8b55b3cdc7))



# [0.2.0-beta.4](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.3...v0.2.0-beta.4) (2020-08-10)


### Bug Fixes

* load hrp before deserializing genesis payload to take hrp effect ([#405](https://github.com/nervosnetwork/muta/issues/405)) ([828e6d5](https://github.com/nervosnetwork/muta/commit/828e6d539cf4da9cf042c450418e75a944315014))


### Features

* **api:** Support enabled TLS ([#402](https://github.com/nervosnetwork/muta/issues/402)) ([c2908a3](https://github.com/nervosnetwork/muta/commit/c2908a3ba6a5ab1219ddc9b14ff6d7320cf70228))


### Performance Improvements

* **state:** add state cache for trieDB ([#404](https://github.com/nervosnetwork/muta/issues/404)) ([2a08c14](https://github.com/nervosnetwork/muta/commit/2a08c147571707507b72882788fd51f7a799f3ec))



# [0.2.0-beta.3](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.2...v0.2.0-beta.3) (2020-08-07)


### Bug Fixes

* **apm:** Return the correct time ([#400](https://github.com/nervosnetwork/muta/issues/400)) ([fd6549a](https://github.com/nervosnetwork/muta/commit/fd6549a6352633cee7b5b747448129df7a0532ca))


### Features

* **network:** limit connections from same ip ([#388](https://github.com/nervosnetwork/muta/issues/388)) ([dc78c13](https://github.com/nervosnetwork/muta/commit/dc78c13b8aa25f3e4535e588149042f6345e4d25))
* **network:** limit inbound and outbound connections ([#393](https://github.com/nervosnetwork/muta/issues/393)) ([3a3111e](https://github.com/nervosnetwork/muta/commit/3a3111e1e332529bc8636c54526920c292c04f8a))
* **sync:** Limit the maximum height of once sync ([#390](https://github.com/nervosnetwork/muta/issues/390)) ([f951a95](https://github.com/nervosnetwork/muta/commit/f951a953daf307ffc98b4df0fe1a77a6a810ac71))



# [0.2.0-beta.2](https://github.com/nervosnetwork/muta/compare/v0.2.0-beta.1...v0.2.0-beta.2) (2020-08-04)


### Bug Fixes

* **consensus:** Add timestamp checking ([#377](https://github.com/nervosnetwork/muta/issues/377)) ([382ede9](https://github.com/nervosnetwork/muta/commit/382ede9367b910a06b59f3562ecd28ab8100d39e))


### Features

* **benchmark:** add a perf benchmark macro ([#391](https://github.com/nervosnetwork/muta/issues/391)) ([eb24311](https://github.com/nervosnetwork/muta/commit/eb2431149b6865a82d0e4286536f65319a5e1d1f))
* **Cargo:** add random leader feature for muta ([#385](https://github.com/nervosnetwork/muta/issues/385)) ([43da977](https://github.com/nervosnetwork/muta/commit/43da9772b22b97ab4797b80ce5161f1a49827543))


### Performance Improvements

* **metrics:** Add metrics of state ([#397](https://github.com/nervosnetwork/muta/issues/397)) ([5822764](https://github.com/nervosnetwork/muta/commit/5822764240f8b4e8cfeca4bccf7d399a0bf71897))



# [0.2.0-beta.1](https://github.com/nervosnetwork/muta/compare/v0.2.0-alpha.1...v0.2.0-beta.1) (2020-08-03)


### Bug Fixes

* **consensus:** return an error when committing an outdated block ([#371](https://github.com/nervosnetwork/muta/issues/371)) ([b3d518b](https://github.com/nervosnetwork/muta/commit/b3d518b52658b40746ef708fa8cde5c96a39a539))
* **mempool:** Ensure that there are no duplicate transactions in the order transaction ([#379](https://github.com/nervosnetwork/muta/issues/379)) ([97708ac](https://github.com/nervosnetwork/muta/commit/97708ac385be2243344d700a0d7c928f18fd51b3))
* **storage:** test batch receipts get panic ([#373](https://github.com/nervosnetwork/muta/issues/373)) ([300a3c6](https://github.com/nervosnetwork/muta/commit/300a3c65cf0399c2ba37a3bd655e06719b660330))


### Features

* **network:** tag consensus peer ([#364](https://github.com/nervosnetwork/muta/issues/364)) ([9b27df1](https://github.com/nervosnetwork/muta/commit/9b27df1015a25792cc210c5aa0dd473a45ae885d)), closes [#354](https://github.com/nervosnetwork/muta/issues/354) [#2](https://github.com/nervosnetwork/muta/issues/2) [#3](https://github.com/nervosnetwork/muta/issues/3) [#4](https://github.com/nervosnetwork/muta/issues/4) [#5](https://github.com/nervosnetwork/muta/issues/5) [#6](https://github.com/nervosnetwork/muta/issues/6) [#7](https://github.com/nervosnetwork/muta/issues/7)
* Add global panic hook ([#376](https://github.com/nervosnetwork/muta/issues/376)) ([7382279](https://github.com/nervosnetwork/muta/commit/738227962771a6a66b85f2fd199df2e699b43adc))


### Performance Improvements

* **executor:** use inner call instead of service dispatcher ([#365](https://github.com/nervosnetwork/muta/issues/365)) ([7b1d2a3](https://github.com/nervosnetwork/muta/commit/7b1d2a32d5c20306af3868e5265bd2530dd9493b))


### BREAKING CHANGES

* **network:** - replace Validator address bytes with pubkey bytes

* change(consensus): log validator address instead of its public key

Block proposer is address instead public key

* fix: compilation failed
* **network:** - change users_cast to multicast, take peer_ids bytes instead of Address
- network bootstrap configuration now takes peer id instead of pubkey hex

* refactor(network): PeerId api



# [0.2.0-alpha.1](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta...v0.2.0-alpha.1) (2020-07-22)


### Bug Fixes

* **executor:** The logic to deal with tx_hook and tx_body ([#367](https://github.com/nervosnetwork/muta/issues/367)) ([749d558](https://github.com/nervosnetwork/muta/commit/749d558b8b58a1943bfa2842dcedcc45218c0f78))
* **executor:** tx events aren't cleared on execution error ([#313](https://github.com/nervosnetwork/muta/issues/313)) ([1605cf5](https://github.com/nervosnetwork/muta/commit/1605cf59b558b97889bb431da7f81fd424b90a89))
* **proof:** Verify aggregated signature in checking proof ([#308](https://github.com/nervosnetwork/muta/issues/308)) ([d2a98b0](https://github.com/nervosnetwork/muta/commit/d2a98b06e44449ca756f135c1b235ff0d80eaf67))
* **trust_metric_test:** unreliable full node exit check ([#327](https://github.com/nervosnetwork/muta/issues/327)) ([a4ab4a6](https://github.com/nervosnetwork/muta/commit/a4ab4a6209e0978148983e88447ac2d9178fa42a))
* **WAL:** Ignore path already exist ([#304](https://github.com/nervosnetwork/muta/issues/304)) ([02df937](https://github.com/nervosnetwork/muta/commit/02df937fb6449c9b3b0b50e790e0ecf6bfc1ee3d))


### Performance Improvements

* **mempool:** parallel verifying signatures in mempool ([#359](https://github.com/nervosnetwork/muta/issues/359)) ([2ccdf1a](https://github.com/nervosnetwork/muta/commit/2ccdf1a67a40cd483749a98a1a68c37bcf1d473c))


### Reverts

* Revert "refactor(consensus)!: replace Validator address bytes with pubkey bytes (#354)" (#361) ([4dabfa2](https://github.com/nervosnetwork/muta/commit/4dabfa231961d1ec8be1ba42bf05781f55395aed)), closes [#354](https://github.com/nervosnetwork/muta/issues/354) [#361](https://github.com/nervosnetwork/muta/issues/361)


* refactor(consensus)!: replace Validator address bytes with pubkey bytes (#354) ([e4433d7](https://github.com/nervosnetwork/muta/commit/e4433d793e8a63788ec682880afc93474e0d2414)), closes [#354](https://github.com/nervosnetwork/muta/issues/354)


### Features

* **executor:** allow cancel execution units through context ([#317](https://github.com/nervosnetwork/muta/issues/317)) ([eafb489](https://github.com/nervosnetwork/muta/commit/eafb489f78f7521487c6b2d25dd9912e43f76500))
* **executor:** indenpendent tx hook states commit ([#316](https://github.com/nervosnetwork/muta/issues/316)) ([fde6450](https://github.com/nervosnetwork/muta/commit/fde645010363a4664033370e4109e4d1f08b13bc))
* **protocol:** Remove the logs bloom from block header ([#312](https://github.com/nervosnetwork/muta/issues/312)) ([ff1e0df](https://github.com/nervosnetwork/muta/commit/ff1e0df1e8a65cc480825a49eed9495cc31ecee0))


### BREAKING CHANGES

* - replace Validator address bytes with pubkey bytes

* change(consensus): log validator address instead of its public key

Block proposer is address instead public key

* fix: compilation failed



================================================
FILE: CHANGELOG/README.md
================================================
# CHANGELOGs
> use: conventional-changelog
>
> example command: conventional-changelog -p angular -i CHANGELOG-0.2.md -s -r 0.2

- [CHANGELOG-0.1.md](./CHANGELOG-0.1.md)
- [CHANGELOG-0.2.md](./CHANGELOG-0.2.md)


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

Our goal is to make contributing to the `muta` project easy and transparent.

When contributing to this repository, please first discuss the change you wish to make via issue, or any other method with the community before making a change. 

### Report Issue

* Read known issues to see whether the issue is already addressed there.

* Search existing issues to see whether others had already posted a similar issue.
  
* **Do not open up a GitHub issue to report security vulnerabilities**. Instead,
  refer to the [security policy](SECURITY.md).

* When creating a new issue, be sure to include a title and clear description. It is appreciated that if you can also attach as much relevant information as possible, such as version, environment, reproducing steps, samples.

### Send PR

* See [Code Standards]() for code guidelines.
  
* See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

1. Fork the `muta` repo and create your branch from master.
2. If you have added code that should be tested, add unit tests.
3. Verify and ensure that the test suite passes.
4. Run `make ci` to lint and test the code before commit.
5. Make sure your code passes CI.
6. Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
7. Submit your pull request.


## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment

include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
 advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
 address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
 professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at hello@nervos.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

================================================
FILE: Cargo.toml
================================================
[package]
name = "muta"
version = "0.2.1"
authors = ["Muta Dev <muta@nervos.org>"]
edition = "2018"
repository = "https://github.com/nervosnetwork/muta"

[dependencies]
cli = { path = "./core/cli"}
byzantine = { path = "./byzantine" }
common-apm = { path = "./common/apm" }
common-config-parser = { path = "./common/config-parser" }
common-crypto = { path = "./common/crypto" }
common-logger = { path = "./common/logger" }
protocol = { path = "./protocol", package = "muta-protocol" }
core-api = { path = "./core/api" }
core-storage = { path = "./core/storage" }
core-mempool = { path = "./core/mempool" }
core-network = { path = "./core/network" }
core-consensus = { path = "./core/consensus" }

binding-macro = { path = "./binding-macro" }
framework = { path = "./framework" }

backtrace = "0.3"
actix-rt = "1.0"
derive_more = "0.99"
futures = "0.3"
parking_lot = "0.11"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
log = "0.4"
clap = "2.33"
bytes = "0.5"
hex = "0.4"
rlp = "0.4"
toml = "0.5"
tokio = { version = "0.2", features = ["macros", "sync", "rt-core", "rt-util", "signal", "time"] }
muta-apm = "0.1.0-alpha.7"
futures-timer="3.0"
cita_trie = "2.0"
fs_extra = "1.2.0"

[dev-dependencies]
cita_trie = "2.0"
async-trait = "0.1"
toml = "0.5"
lazy_static = "1.4"
muta-codec-derive = "0.2"
asset = { path = "built-in-services/asset" }
multi-signature = { path = "built-in-services/multi-signature" }
authorization = { path = "built-in-services/authorization" }
metadata = { path = "built-in-services/metadata"}
util = { path = "built-in-services/util"}
rand = "0.7"
core-network = { path = "./core/network", features = ["diagnostic"] }
tokio = { version = "0.2", features = ["full"] }

[workspace]
members = [
  "devtools/keypair",

  "common/channel",
  "common/config-parser",
  "common/crypto",
  "common/logger",
  "common/merkle",
  "common/pubsub",

  "core/api",
  "core/consensus",
  "core/mempool",
  "core/network",
  "core/storage",
  "core/cli",
  "core/run",

  "binding-macro",
  "framework",
  "built-in-services/asset",
  "built-in-services/metadata",
  "built-in-services/multi-signature",
  "built-in-services/authorization",

  "protocol",

  "byzantine",
]

[features]
default = []
random_leader = ["core-consensus/random_leader"]
tentacle_metrics = ["core-network/tentacle_metrics"]

[[example]]
name = "muta-chain"
crate-type = ["bin"]

[[test]]
name = "trust_metric"
path = "tests/trust_metric.rs"
required-features = [ "core-network/diagnostic" ]

[[test]]
name = "verify_chain_id"
path = "tests/verify_chain_id.rs"
required-features = [ "core-network/diagnostic" ]

[[bench]]
name = "bench_execute"
path = "benchmark/mod.rs"


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2019 Nervos Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Makefile
================================================
ERBOSE := $(if ${CI},--verbose,)

COMMIT := $(shell git rev-parse --short HEAD)

ifneq ("$(wildcard /usr/lib/librocksdb.so)","")
	SYS_LIB_DIR := /usr/lib
else ifneq ("$(wildcard /usr/lib64/librocksdb.so)","")
	SYS_LIB_DIR := /usr/lib64
else
	USE_SYS_ROCKSDB :=
endif

USE_SYS_ROCKSDB :=
SYS_ROCKSDB := $(if ${USE_SYS_ROCKSDB},ROCKSDB_LIB_DIR=${SYS_LIB_DIR},)

CARGO := env ${SYS_ROCKSDB} cargo

test:
	${CARGO} test ${VERBOSE} --all -- --skip trust_metric --nocapture

doc:
	cargo doc --all --no-deps

doc-deps:
	cargo doc --all

# generate GraphQL API documentation
doc-api:
	bash docs/build/gql_api.sh

check:
	${CARGO} check ${VERBOSE} --all

build:
	${CARGO} build ${VERBOSE} --release

prod-muta-chain:
	${CARGO} build ${VERBOSE} --release --example muta-chain

fmt:
	cargo fmt ${VERBOSE} --all -- --check

clippy:
	${CARGO} clippy ${VERBOSE} --all --all-targets --all-features -- \
		-D warnings -D clippy::clone_on_ref_ptr -D clippy::enum_glob_use


ci: fmt clippy test

info:
	date
	pwd
	env

e2e-test:
	cargo build --example muta-chain
	rm -rf ./devtools/chain/data
	./target/debug/examples/muta-chain -c ./devtools/chain/config.toml -g ./devtools/chain/genesis.toml > /tmp/log 2>&1 &
	cd tests/e2e && yarn && ./wait-for-it.sh -t 300 localhost:8000 -- yarn run test
	pkill -2 muta-chain

byz-test:
	cargo build --example muta-chain
	cargo build --example byzantine_node
	rm -rf ./devtools/chain/data
	CONFIG=./examples/config-1.toml GENESIS=./examples/genesis.toml ./target/debug/examples/muta-chain > /tmp/log 2>&1 &
	CONFIG=./examples/config-2.toml GENESIS=./examples/genesis.toml ./target/debug/examples/muta-chain > /tmp/log 2>&1 &
	CONFIG=./examples/config-3.toml GENESIS=./examples/genesis.toml ./target/debug/examples/muta-chain > /tmp/log 2>&1 &
	CONFIG=./examples/config-4.toml GENESIS=./examples/genesis.toml ./target/debug/examples/byzantine_node > /tmp/log 2>&1 &
	cd byzantine/tests && yarn && ../../tests/e2e/wait-for-it.sh -t 300 localhost:8000 -- yarn run test
	pkill -2 muta-chain byzantine_node

e2e-test-via-docker:
	docker-compose -f tests/e2e/docker-compose-e2e-test.yaml up --exit-code-from e2e-test --force-recreate

# For counting lines of code
stats:
	@cargo count --version || cargo +nightly install --git https://github.com/kbknapp/cargo-count
	@cargo count --separator , --unsafe-statistics

# Use cargo-audit to audit Cargo.lock for crates with security vulnerabilities
# expecting to see "Success No vulnerable packages found"
security-audit:
	@cargo audit --version || cargo install cargo-audit
	@cargo audit

.PHONY: build prod prod-test
.PHONY: fmt test clippy doc doc-deps doc-api check stats
.PHONY: ci info security-audit


================================================
FILE: OWNERS
================================================
# See the OWNERS docs at https://go.k8s.io/owners

approvers:
- yejiayu
- zeroqn
- KaoImin 
- LycrusHamster 
- rev-chaos 
- homura 
- zhouyun-zoe 
reviewers:
- yejiayu
- zeroqn
- KaoImin 
- LycrusHamster 
- rev-chaos 
- homura 
- zhouyun-zoe 


================================================
FILE: OWNERS_ALIASES
================================================
aliases:
- yejiayu
- zeroqn
- KaoImin 
- LycrusHamster 
- rev-chaos 
- homura 
best-approvers:
- yejiayu
- zeroqn
- KaoImin 
- LycrusHamster 
- rev-chaos 
- homura 
best-reviewers:
- yejiayu
- zeroqn
- KaoImin 
- LycrusHamster 
- rev-chaos 
- homura 


================================================
FILE: README.md
================================================
<p align="center">
  <a href="https://github.com/nervosnetwork/muta">
    <img src="https://github.com/nervosnetwork/muta-docs/blob/master/static/docs-img/muta-logo1.png" width="270">
  </a>
  <h3 align="center">Build your own blockchain,today</h3>
  <p align="center">
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-green.svg"></a>
    <a href="https://github.com/nervosnetwork/muta/blob/master/rust-toolchain"><img src="https://img.shields.io/badge/rustc-nightly-informational.svg"></a>
    <a href="https://travis-ci.com/nervosnetwork/muta"><img src="https://travis-ci.com/nervosnetwork/muta.svg?branch=master"></a>
     <a href="https://discord.gg/QXkFT88"><img src="https://img.shields.io/discord/674846745607536651?logo=discord"
    alt="chat on Discord"></a>
    <a href="https://github.com/nervosnetwork/muta"><img src="https://img.shields.io/github/stars/nervosnetwork/muta.svg?style=social"></a>
    <a href="https://github.com/nervosnetwork/muta"><img src="https://img.shields.io/github/forks/nervosnetwork/muta.svg?style=social"></a>
  </p>
  <p align="center">
     Developed by Nervos<br>
  </p>
</p>

English | [简体中文](./README_CN.md)

## What is Muta?

Muta is a highly customizable high-performance blockchain framework. It has a built-in BFT-like consensus algorithm "Overlord" with high throughput and low latency, and it can also support different virtual machines, including CKB-VM, EVM, and WASM. Muta has interoperability across VMs. Different virtual machines can be used in a Muta-based blockchain at the same time. Developed by the Nervos team, Muta is designed to allow anyone in the world to build their own blockchain while enjoying the security and finality brought by Nervos CKB.

Developers can customize PoA, PoS or DPoS chains based on Muta, and use different economic models and governance models. Developers can also develop different application chains (such as DEX chains) based on Muta to implement a specific business logic.

Muta's core design philosophy is to make the development of a blockchain state transition as flexible and simple as possible, which means that while reducing the obstacles to build high-performance blockchains, it still maximizes its flexibility to facilitate developers to customize their business logic. Therefore, as a highly customizable high-performance blockchain framework, Muta provides a basic core component that a blockchain system needs, and developers can customize the functional parts of the chain freely.

## Getting Started!

[Muta Documentation](https://nervosnetwork.github.io/muta-docs/)

Quickly build a simple chain and try some simple interaction, please refer to [Quick Start](https://nervosnetwork.github.io/muta-docs/#/en-us/getting_started.md)。

## The basic core component Muta provided
 
Muta provided all the core components needed to build a blockchain:

* [Transaction Pool](https://nervosnetwork.github.io/muta-docs/#/en-us/transaction_pool.md)
* [P2P Network](https://nervosnetwork.github.io/muta-docs/#/en-us/network.md)
* [Consensus](https://nervosnetwork.github.io/muta-docs/#/en-us/overlord.md)
* [Storage](https://nervosnetwork.github.io/muta-docs/#/en-us/storage.md)

## Customizable Part

Developers can customize the functional parts of the chain by developing Services.

Service is an abstraction layer for extension in Muta framework. Users can define block management, add VMs, etc. based on Service. Each Service, as a relatively independent logical component, can implement its specific function, and at the same time, different services can directly interact with each other, so that more complex functional logic can be constructed. More flexible is that services from different chains can also be reused, which makes it easier for developers to build their own functional modules.

We provide detailed service development guides and some service examples.

* [Service Development Guide](https://nervosnetwork.github.io/muta-docs/#/en-us/service_dev.md)
* [Service Examples](https://nervosnetwork.github.io/muta-docs/#/en-us/service_eg.md)
* [Develop a DEX Chain](https://nervosnetwork.github.io/muta-docs/#/en-us/dex.md)

## Developer Resources

Developer resources can be found [here](./docs/resources.md)

## Who is using Muta?

Muta powers some open source projects.

<p align="left">
  <a href="https://www.huobichain.com/">
    <img src="https://github.com/nervosnetwork/muta-docs/blob/master/static/docs-img/user/s_huobichain.jpg" width="150">
  </a>
</p>

Is your project using Muta? Edit this page with a Pull Request to add your logo.:tada:

## How to Contribute

The contribution workflow is described in [CONTRIBUTING.md](CONTRIBUTING.md), and security policy is described in [SECURITY.md](SECURITY.md).


================================================
FILE: README_CN.md
================================================
<p align="center">
  <a href="https://github.com/nervosnetwork/muta">
    <img src="https://github.com/nervosnetwork/muta-docs/blob/master/static/docs-img/muta-logo1.png" width="270">
  </a>
  <h3 align="center">让世界上任何一个人都可以搭建属于他们自己的区块链</h3>
  <p align="center">
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-green.svg"></a>
    <a href="https://github.com/nervosnetwork/muta/blob/master/rust-toolchain"><img src="https://img.shields.io/badge/rustc-nightly-informational.svg"></a>
    <a href="https://travis-ci.com/nervosnetwork/muta"><img src="https://travis-ci.com/nervosnetwork/muta.svg?branch=master"></a>
     <a href="https://discord.gg/QXkFT88"><img src="https://img.shields.io/discord/674846745607536651?logo=discord"
    alt="chat on Discord"></a>
    <a href="https://github.com/nervosnetwork/muta"><img src="https://img.shields.io/github/stars/nervosnetwork/muta.svg?style=social"></a>
    <a href="https://github.com/nervosnetwork/muta"><img src="https://img.shields.io/github/forks/nervosnetwork/muta.svg?style=social"></a>
  </p>
  <p align="center">
     由 Nervos 团队开发<br>
  </p>
</p>

[English](./README.md) | 简体中文

## 什么是 Muta?

Muta 是一个高度可定制的高性能区块链框架。它内置了具有高吞吐量和低延迟特性的类 BFT 共识算法「Overlord」,并且可以支持不同的虚拟机,包括 CKB-VM、EVM 和 WASM。Muta 具有跨 VM 的互操作性,不同的虚拟机可以同时在一条基于 Muta 搭建的区块链中使用。Muta 由 Nervos 团队开发,旨在让世界上任何一个人都可以搭建属于他们自己的区块链,同时享受 Nervos CKB 所带来的安全性和最终性。

开发者可以基于 Muta 定制开发 PoA、PoS 或者 DPoS 链,并且可以使用不同的经济模型和治理模型进行部署。开发者也可以基于 Muta 来开发不同的应用链(例如 DEX 链),以实现某种特定的业务逻辑。

Muta 的核心理念是使一个区块链状态转换的开发尽可能的灵活和简便,也就是说在降低开发者搭建高性能区块链障碍的同时,仍然最大限度地保证其灵活性以方便开发者可以自由定制他们的协议。因此,作为一个高度可定制的高性能区块链框架,Muta 提供了一个区块链系统需要有的基础核心组件,开发者可以自由定制链的功能部分。

## 快速开始!

[Muta 文档网站](https://nervosnetwork.github.io/muta-docs/)

快速搭建一条简单的链并尝试简单的交互,请参考[快速开始](https://nervosnetwork.github.io/muta-docs/#/getting_started.md)。

## Muta 提供哪些基础核心组件?

Muta 框架提供了搭建一个分布式区块链网络所需的全部核心组件:

* [交易池](https://nervosnetwork.github.io/muta-docs/#/transaction_pool.md)
* [P2P 网络](https://nervosnetwork.github.io/muta-docs/#/network.md)
* [共识](https://nervosnetwork.github.io/muta-docs/#/overlord.md)
* [存储](https://nervosnetwork.github.io/muta-docs/#/storage.md)

## 开发者需要自己实现哪些部分?

开发者可以通过开发 Service 来定制链的功能部分。

Service 是 Muta 框架中用于扩展的抽象层,用户可以基于 Service 定义区块治理、添加 VM 等等。每一个 Service 作为一个相对独立的逻辑化组件,可以实现其特定的功能,同时,不同的 Service 之间又可以直接进行交互,从而可以构建更为复杂的功能逻辑。更为灵活的是,不同链的 Service 还可以复用,这使得开发者们可以更为轻松的搭建自己的功能模块。

我们提供了详细的 Service 开发指南,以及一些 Service 示例。

* [Service 开发指南](https://nervosnetwork.github.io/muta-docs/#service_dev.md)
* [Service 示例](https://nervosnetwork.github.io/muta-docs/#service_eg.md)

## 开发资源

可以在[这边](./docs/resources.md)找到相关的开发资源

## 谁在使用 Muta?

<p align="left">
  <a href="https://www.huobichain.com/">
    <img src="https://github.com/nervosnetwork/muta-docs/blob/master/static/docs-img/user/s_huobichain.jpg" width="150">
  </a>
</p>

您的项目使用的是 Muta 吗?欢迎在这里添加您项目的 logo 和链接,请点击顶部的 `Edit Document` ,修改本文档的相关内容,并提交 Pull Request 即可:tada:

## 贡献 ![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)

如何贡献请参考 [CONTRIBUTING.md](CONTRIBUTING.md),Security Policy 请参考 [SECURITY.md](SECURITY.md)。


================================================
FILE: SECURITY.md
================================================
# Security Policy

This project is still under development, the primary goal at this stage is to implement features but we also take security very seriously. This document defines the policy on how to report vulnerabilities and receive updates when patches to those are released.


## Reporting a vulnerability

All security bugs should be reported by sending email to [Nervos Security Team](mailto:security@nervos.org). This will deliver a message to Nervos Security Team who handle security issues. Your report will be acknowledged within 24 hours, and you'll receive a more detailed response to your email within 72 hours indicating the next steps in handling your report.

After the initial reply to your report the security team will endeavor to keep you informed of the progress being made towards a fix and full announcement.

## Disclosure process

1. Security report received and is assigned a primary handler. This person will coordinate the fix and release process. Problem is confirmed and all affected versions is determinted. Code is audited to find any potential similar problems.
2. Fixes are prepared for all supported releases. These fixes are not committed to the public repository but rather held locally pending the announcement.
3. A suggested embargo date for this vulnerability is chosen. This notification will include patches for all supported versions.
4. On the embargo date, the [Nervos security mailing list](#TBD) is sent a copy of the announcement. The changes are pushed to the public repository. At least 6 hours after the mailing list is notified, a copy of the advisory will be published on Nervos community channels.

This process can take some time, especially when coordination is required with maintainers of other projects. Every effort will be made to handle the bug in as timely a manner as possible, however it's important that we follow the release process above to ensure that the disclosure is handled in a consistent manner.

## Receiving disclosures

If you require prior notification of vulnerabilities please subscribe to the [Nervos Security mailing list](#TBD). The mailing list is very low traffic, and it receives the public notifications the moment the embargo is lifted.

If you have any suggestions to improve this policy, please send an email to [Nervos Security Team](security@nervos.org).


================================================
FILE: benchmark/bench_executor.rs
================================================
#![allow(clippy::needless_collect)]

use asset::types::TransferPayload;

use super::*;

#[rustfmt::skip]
/// Bench in Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)
/// 100 txs bench_execute ... bench:  11,299,912 ns/iter (+/- 3,402,276)
/// 1000 txs bench::bench_execute ... bench: 101,187,934 ns/iter (+/- 26,000,469)
#[bench]
fn bench_execute(b: &mut Bencher) {
    let mut bench_adapter = BenchmarkAdapter::new();

    let payload = TransferPayload {
        asset_id: NATIVE_ASSET_ID.clone(),
        to:       FEE_INLET_ACCOUNT.clone(),
        value:    1u64,
    };

    let req = (0..1000).map(|_| TransactionRequest {
        service_name: "asset".to_string(),
        method:       "transfer".to_string(),
        payload:      serde_json::to_string(&payload).unwrap(),
    }).collect::<Vec<_>>();

    perf_exec!(bench_adapter, req, b);
}

#[rustfmt::skip]
/// 10 assets bench::perf_execute  ... bench: 109,202,563 ns/iter (+/- 6,378,009)
/// 100 assets bench::perf_execute  ... bench: 108,859,512 ns/iter (+/- 2,977,622)
/// 1000 assets bench::bench_execute ... bench: 108,037,404 ns/iter (+/- 4,539,634)
/// 10000 assets test bench::perf_execute  ... bench: 100,244,123 ns/iter (+/- 18,935,087)
#[bench]
fn bench_execute_with_assets(b: &mut Bencher) {
    let mut bench_adapter = BenchmarkAdapter::new();
    create_assets(&mut bench_adapter, 10000);

    let payload = TransferPayload {
        asset_id: NATIVE_ASSET_ID.clone(),
        to:       FEE_INLET_ACCOUNT.clone(),
        value:    1u64,
    };

    let req = (0..1000).map(|_| TransactionRequest {
        service_name: "asset".to_string(),
        method:       "transfer".to_string(),
        payload:      serde_json::to_string(&payload).unwrap(),
    }).collect::<Vec<_>>();

    perf_exec!(bench_adapter, req, b);
}

fn create_assets(bench_adapter: &mut BenchmarkAdapter, num: u64) {
    let create_assets = (0..num)
        .map(|n| {
            let payload = asset::types::CreateAssetPayload {
                name:   "muta_".to_string() + n.to_string().as_str(),
                symbol: "muta_".to_string() + n.to_string().as_str(),
                supply: 100_000,
            };

            TransactionRequest {
                service_name: "asset".to_string(),
                method:       "create_asset".to_string(),
                payload:      serde_json::to_string(&payload).unwrap(),
            }
        })
        .collect::<Vec<_>>();

    exec!(bench_adapter, create_assets);
}


================================================
FILE: benchmark/bench_mempool.rs
================================================



================================================
FILE: benchmark/benchmark_genesis.toml
================================================
timestamp = 0
prevhash = "0x44915be5b6c20b0678cf05fcddbbaa832e25d7e6ac538784cd5c24de00d47472"

[[services]]
name = "asset"
payload = '''
{
   "id": "0xf56924db538e77bb5951eb5ff0d02b88983c49c45eea30e8ae3e7234b311436c",
   "name": "MutaToken",
   "symbol": "MT",
   "supply": 320000011,
   "issuer": "muta14e0lmgck835vm2dfm0w3ckv6svmez8fdgdl705"
}
'''

# private key of this admin:
# 5ec982173d54d830b6789cbbbe43eaa2853a5ff752d1ebc1b266cf9790314f8a
[[services]]
name = "governance"
payload = '''
{
   "info": {
       "admin": "muta14e0lmgck835vm2dfm0w3ckv6svmez8fdgdl705",
       "tx_failure_fee": 10,
       "tx_floor_fee": 20,
       "profit_deduct_rate_per_million": 3,
        "tx_fee_discount": [
            {
                "threshold": 1000,
                "discount_percent": 90
            },
            {
                "threshold": 10000,
                "discount_percent": 70
            },
            {
                "threshold": 100000,
                "discount_percent": 50
            }
        ],
       "miner_benefit": 10
   },
   "tx_fee_inlet_address": "muta15a8a9ksxe3hhjpw3l7wz7ry778qg8h9wz8y35p",
   "miner_profit_outlet_address": "muta14e0lmgck835vm2dfm0w3ckv6svmez8fdgdl705",
   "miner_charge_map": []
}
'''


================================================
FILE: benchmark/governance/mod.rs
================================================
mod types;

use std::cell::RefCell;
use std::convert::From;
use std::rc::Rc;

use bytes::Bytes;
use derive_more::{Display, From};

use binding_macro::{genesis, hook_after, service, tx_hook_after, tx_hook_before};
use protocol::traits::{ExecutorParams, ServiceResponse, ServiceSDK, StoreMap};
use protocol::try_service_response;
use protocol::types::{Address, Hash, ServiceContext, ServiceContextParams};

use asset::types::TransferPayload;
use asset::Assets;
use types::{GovernanceInfo, InitGenesisPayload};

const INFO_KEY: &str = "admin";
const TX_FEE_INLET_KEY: &str = "fee_address";
const MINER_PROFIT_OUTLET_KEY: &str = "miner_address";
static ADMISSION_TOKEN: Bytes = Bytes::from_static(b"governance");

lazy_static::lazy_static! {
    pub static ref NATIVE_ASSET_ID: Hash = Hash::from_hex("0xf56924db538e77bb5951eb5ff0d02b88983c49c45eea30e8ae3e7234b311436c").unwrap();
}

pub struct GovernanceService<A, SDK> {
    sdk:     SDK,
    profits: Box<dyn StoreMap<Address, u64>>,
    miners:  Box<dyn StoreMap<Address, Address>>,
    asset:   A,
}

#[service]
impl<A: Assets, SDK: ServiceSDK> GovernanceService<A, SDK> {
    pub fn new(mut sdk: SDK, asset: A) -> Self {
        let profits: Box<dyn StoreMap<Address, u64>> = sdk.alloc_or_recover_map("profit");
        let miners: Box<dyn StoreMap<Address, Address>> = sdk.alloc_or_recover_map("miner_address");
        Self {
            sdk,
            profits,
            miners,
            asset,
        }
    }

    #[genesis]
    fn init_genesis(&mut self, payload: InitGenesisPayload) {
        assert!(self.profits.is_empty());

        let mut info = payload.info;
        info.tx_fee_discount.sort();
        self.sdk.set_value(INFO_KEY.to_string(), info);
        self.sdk
            .set_value(TX_FEE_INLET_KEY.to_string(), payload.tx_fee_inlet_address);
        self.sdk.set_value(
            MINER_PROFIT_OUTLET_KEY.to_string(),
            payload.miner_profit_outlet_address,
        );

        for miner in payload.miner_charge_map.into_iter() {
            self.miners
                .insert(miner.address, miner.miner_charge_address);
        }
    }

    #[tx_hook_before]
    fn pledge_fee(&mut self, ctx: ServiceContext) -> ServiceResponse<String> {
        let info = self
            .sdk
            .get_value::<_, GovernanceInfo>(&INFO_KEY.to_owned());
        let tx_fee_inlet_address = self
            .sdk
            .get_value::<_, Address>(&TX_FEE_INLET_KEY.to_owned());

        if info.is_none() || tx_fee_inlet_address.is_none() {
            return ServiceError::MissingInfo.into();
        }

        let info = info.unwrap();
        let tx_fee_inlet_address = tx_fee_inlet_address.unwrap();
        let payload = TransferPayload {
            asset_id: NATIVE_ASSET_ID.clone(),
            to:       tx_fee_inlet_address,
            value:    info.tx_failure_fee,
        };

        // Pledge the tx failure fee before executed the transaction.
        let res = self.asset.transfer_(&ctx, payload);
        try_service_response!(res);
        ServiceResponse::from_succeed(String::new())
    }

    #[tx_hook_after]
    fn deduct_fee(&mut self, ctx: ServiceContext) -> ServiceResponse<String> {
        let tx_fee_inlet_address = self
            .sdk
            .get_value::<_, Address>(&TX_FEE_INLET_KEY.to_owned());
        if tx_fee_inlet_address.is_none() {
            return ServiceError::MissingInfo.into();
        }

        let tx_fee_inlet_address = tx_fee_inlet_address.unwrap();
        let payload = TransferPayload {
            asset_id: NATIVE_ASSET_ID.clone(),
            to:       tx_fee_inlet_address,
            value:    1,
        };

        let res = self.asset.transfer_(&ctx, payload);
        try_service_response!(res);
        ServiceResponse::from_succeed(String::new())
    }

    #[hook_after]
    fn handle_miner_profit(&mut self, params: &ExecutorParams) {
        let info = self
            .sdk
            .get_value::<_, GovernanceInfo>(&INFO_KEY.to_owned());

        let sender_address = self
            .sdk
            .get_value::<_, Address>(&MINER_PROFIT_OUTLET_KEY.to_owned());

        if info.is_none() || sender_address.is_none() {
            return;
        }

        let info = info.unwrap();
        let sender_address = sender_address.unwrap();

        let ctx_params = ServiceContextParams {
            tx_hash:         None,
            nonce:           None,
            cycles_limit:    params.cycles_limit,
            cycles_price:    1,
            cycles_used:     Rc::new(RefCell::new(0)),
            caller:          sender_address,
            height:          params.height,
            service_name:    String::new(),
            service_method:  String::new(),
            service_payload: String::new(),
            extra:           Some(ADMISSION_TOKEN.clone()),
            timestamp:       params.timestamp,
            events:          Rc::new(RefCell::new(vec![])),
        };

        let recipient_addr = if let Some(addr) = self.miners.get(&params.proposer) {
            addr
        } else {
            params.proposer.clone()
        };

        let payload = TransferPayload {
            asset_id: NATIVE_ASSET_ID.clone(),
            to:       recipient_addr,
            value:    info.miner_benefit,
        };

        let _ = self
            .asset
            .transfer_(&ServiceContext::new(ctx_params), payload);
    }
}

#[derive(Debug, Display, From)]
pub enum ServiceError {
    NonAuthorized,

    #[display(fmt = "Can not get governance info")]
    MissingInfo,

    #[display(fmt = "calc overflow")]
    Overflow,

    #[display(fmt = "query balance failed")]
    QueryBalance,

    #[display(fmt = "Parsing payload to json failed {:?}", _0)]
    JsonParse(serde_json::Error),
}

impl ServiceError {
    fn code(&self) -> u64 {
        match self {
            ServiceError::NonAuthorized => 101,
            ServiceError::JsonParse(_) => 102,
            ServiceError::MissingInfo => 103,
            ServiceError::Overflow => 104,
            ServiceError::QueryBalance => 105,
        }
    }
}

impl<T: Default> From<ServiceError> for ServiceResponse<T> {
    fn from(err: ServiceError) -> ServiceResponse<T> {
        ServiceResponse::from_error(err.code(), err.to_string())
    }
}


================================================
FILE: benchmark/governance/types.rs
================================================
use std::cmp::Ordering;

use muta_codec_derive::RlpFixedCodec;
use serde::{Deserialize, Serialize};

use protocol::fixed_codec::{FixedCodec, FixedCodecError};
use protocol::types::{Address, Bytes};
use protocol::ProtocolResult;

#[derive(RlpFixedCodec, Deserialize, Serialize, Clone, Debug)]
pub struct InitGenesisPayload {
    pub info:                        GovernanceInfo,
    pub tx_fee_inlet_address:        Address,
    pub miner_profit_outlet_address: Address,
    pub miner_charge_map:            Vec<MinerChargeConfig>,
}

#[derive(RlpFixedCodec, Deserialize, Serialize, Clone, Debug)]
pub struct MinerChargeConfig {
    pub address:              Address,
    pub miner_charge_address: Address,
}

#[derive(RlpFixedCodec, Deserialize, Serialize, Clone, Debug, Default)]
pub struct GovernanceInfo {
    pub admin:                          Address,
    pub tx_failure_fee:                 u64,
    pub tx_floor_fee:                   u64,
    pub profit_deduct_rate_per_million: u64,
    pub tx_fee_discount:                Vec<DiscountLevel>,
    pub miner_benefit:                  u64,
}

#[derive(RlpFixedCodec, Deserialize, Serialize, Clone, Debug, Default, PartialEq, Eq)]
pub struct DiscountLevel {
    pub threshold:        u64,
    pub discount_percent: u64,
}

impl PartialOrd for DiscountLevel {
    fn partial_cmp(&self, other: &DiscountLevel) -> Option<Ordering> {
        self.threshold.partial_cmp(&other.threshold)
    }
}

impl Ord for DiscountLevel {
    fn cmp(&self, other: &DiscountLevel) -> Ordering {
        self.threshold.cmp(&other.threshold)
    }
}

#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct RecordProfitEvent {
    pub owner:  Address,
    pub amount: u64,
}

#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct AccumulateProfitPayload {
    pub address:            Address,
    pub accumulated_profit: u64,
}

#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct HookTransferFromPayload {
    pub sender:    Address,
    pub recipient: Address,
    pub value:     u64,
    pub memo:      String,
}


================================================
FILE: benchmark/mod.rs
================================================
#![allow(clippy::needless_collect)]
#![feature(test)]
extern crate test;

use std::str::FromStr;
use std::sync::Arc;

use common_crypto::{Crypto, Secp256k1, Signature};
use core_mempool::DefaultMemPoolAdapter;
use core_network::{NetworkConfig, NetworkService, NetworkServiceHandle};
use core_storage::{adapter::rocks::RocksAdapter, ImplStorage};
use framework::binding::state::RocksTrieDB;
use framework::executor::{ServiceExecutor, ServiceExecutorFactory};
use protocol::fixed_codec::FixedCodec;
use protocol::traits::{
    CommonStorage, Context, Executor, ExecutorParams, SDKFactory, Service, ServiceMapping,
    ServiceSDK, Storage,
};
use protocol::types::{
    Address, Block, BlockHeader, Bytes, Genesis, Hash, Hex, MerkleRoot, Proof, RawTransaction,
    SignedTransaction, TransactionRequest,
};
use protocol::ProtocolResult;
use test::Bencher;

use asset::AssetService;
use governance::GovernanceService;
use multi_signature::MultiSignatureService;

const TRIE_PATH: &str = "./free-space/state";
const STORAGE_PATH: &str = "./free-space/block";

lazy_static::lazy_static! {
    pub static ref FEE_ACCOUNT: Address = Address::from_str("muta14e0lmgck835vm2dfm0w3ckv6svmez8fdgdl705").unwrap();
    pub static ref FEE_INLET_ACCOUNT: Address = Address::from_str("muta15a8a9ksxe3hhjpw3l7wz7ry778qg8h9wz8y35p").unwrap();
    pub static ref PROPOSER_ACCOUNT: Address = Address::from_str("muta1h99h6f54vytatam3ckftrmvcdpn4jlmnwm6hl0").unwrap();
    pub static ref NATIVE_ASSET_ID: Hash = Hash::from_hex("0xf56924db538e77bb5951eb5ff0d02b88983c49c45eea30e8ae3e7234b311436c").unwrap();
    pub static ref PRIV_KEY: Bytes = Hex::from_string("0x5ec982173d54d830b6789cbbbe43eaa2853a5ff752d1ebc1b266cf9790314f8a".to_string()).unwrap().decode();
    pub static ref PUB_KEY: Bytes = Hex::from_string(
        "0x02ef0cb0d7bc6c18b4bea1f5908d9106522b35ab3c399369605d4242525bda7e60".to_string(),
    )
    .unwrap()
    .decode();
}

macro_rules! exec {
    ($adapter: expr, $payloads: expr) => {{
        let stxs = $payloads.into_iter().map(construct_stx).collect::<Vec<_>>();

        let mut executor = $adapter.create_executor();
        let params = $adapter.create_params();

        executor.exec(Context::new(), &params, &stxs).unwrap();
        $adapter.next_height();
    }};
}

macro_rules! perf_exec {
    ($adapter: expr, $payloads: expr, $bencher: expr) => {{
        let stxs = $payloads.into_iter().map(construct_stx).collect::<Vec<_>>();

        let mut executor = $adapter.create_executor();
        let params = $adapter.create_params();

        $bencher.iter(|| {
            let txs = stxs.clone();
            executor.exec(Context::new(), &params, &txs).unwrap();
        });
    }};
}

mod bench_executor;
mod bench_mempool;
// This is a test service that provides transaction hooks.
mod governance;

pub struct BenchmarkAdapter {
    trie_db:    Arc<RocksTrieDB>,
    storage:    Arc<ImplStorage<RocksAdapter>>,
    height:     u64,
    timestamp:  u64,
    state_root: MerkleRoot,
}

impl Default for BenchmarkAdapter {
    fn default() -> Self {
        BenchmarkAdapter::new()
    }
}

impl BenchmarkAdapter {
    pub fn new() -> Self {
        let mut rt = tokio::runtime::Builder::new()
            .core_threads(4)
            .build()
            .unwrap();
        let rocks_adapter = Arc::new(RocksAdapter::new(STORAGE_PATH, 1024).unwrap());
        let toml_str = include_str!("./benchmark_genesis.toml");
        let genesis: Genesis = toml::from_str(toml_str).unwrap();

        let mut ret = BenchmarkAdapter {
            trie_db:    Arc::new(RocksTrieDB::new(TRIE_PATH, false, 1024, 2000).unwrap()),
            storage:    Arc::new(ImplStorage::new(Arc::clone(&rocks_adapter))),
            height:     1,
            timestamp:  1,
            state_root: Hash::default(),
        };

        let root = ServiceExecutor::create_genesis(
            genesis.services,
            Arc::clone(&ret.trie_db),
            Arc::clone(&ret.storage),
            Arc::new(MockServiceMapping {}),
        )
        .unwrap();

        let genesis_block = BenchmarkAdapter::create_genesis_block(root.clone());

        rt.block_on(async {
            ret.storage
                .update_latest_proof(Context::new(), genesis_block.header.proof.clone())
                .await
                .expect("save proof");
            ret.storage
                .insert_block(Context::new(), genesis_block)
                .await
                .expect("save genesis");
        });

        ret.state_root = root;
        ret
    }

    pub fn create_executor(
        &mut self,
    ) -> ServiceExecutor<ImplStorage<RocksAdapter>, RocksTrieDB, MockServiceMapping> {
        ServiceExecutor::with_root(
            self.state_root.clone(),
            Arc::clone(&self.trie_db),
            Arc::clone(&self.storage),
            Arc::new(MockServiceMapping {}),
        )
        .unwrap()
    }

    pub fn create_params(&mut self) -> ExecutorParams {
        ExecutorParams {
            state_root:   self.state_root.clone(),
            height:       self.height,
            timestamp:    self.timestamp,
            cycles_limit: u64::max_value(),
            proposer:     PROPOSER_ACCOUNT.clone(),
        }
    }

    pub fn create_mempool_adapter(
        &mut self,
    ) -> DefaultMemPoolAdapter<
        ServiceExecutorFactory,
        Secp256k1,
        NetworkServiceHandle,
        ImplStorage<RocksAdapter>,
        RocksTrieDB,
        MockServiceMapping,
    > {
        DefaultMemPoolAdapter::new(
            NetworkService::new(NetworkConfig::new()).handle(),
            Arc::clone(&self.storage),
            Arc::clone(&self.trie_db),
            Arc::new(MockServiceMapping {}),
            3000,
            100,
        )
    }

    pub fn next_height(&mut self) {
        self.height += 1;
        self.timestamp += 2;
    }

    fn create_genesis_block(state_root: MerkleRoot) -> Block {
        let genesis_block_header = BlockHeader {
            chain_id: Hash::default(),
            height: 0,
            exec_height: 0,
            prev_hash: Hash::from_empty(),
            timestamp: 0,
            order_root: Hash::from_empty(),
            order_signed_transactions_hash: Hash::from_empty(),
            confirm_root: vec![],
            state_root,
            receipt_root: vec![],
            cycles_used: vec![],
            proposer: PROPOSER_ACCOUNT.clone(),
            proof: Proof {
                height:     0,
                round:      0,
                block_hash: Hash::from_empty(),
                signature:  Bytes::new(),
                bitmap:     Bytes::new(),
            },
            validator_version: 0,
            validators: vec![],
        };

        Block {
            header:            genesis_block_header,
            ordered_tx_hashes: vec![],
        }
    }
}

pub fn construct_stx(req: TransactionRequest) -> SignedTransaction {
    let raw_tx = RawTransaction {
        chain_id:     Hash::default(),
        nonce:        Hash::from_empty(),
        timeout:      300,
        cycles_price: 1,
        cycles_limit: u64::max_value(),
        request:      req,
        sender:       FEE_ACCOUNT.clone(),
    };

    let hash = Hash::digest(raw_tx.encode_fixed().unwrap());
    let sig = Secp256k1::sign_message(&hash.as_bytes(), &PRIV_KEY).unwrap();

    SignedTransaction {
        raw:       raw_tx,
        tx_hash:   hash,
        pubkey:    Bytes::from(rlp::encode_list::<Vec<u8>, _>(&[PUB_KEY.clone().to_vec()])),
        signature: Bytes::from(rlp::encode_list::<Vec<u8>, _>(&[sig.to_bytes().to_vec()])),
    }
}

pub struct MockServiceMapping;

impl ServiceMapping for MockServiceMapping {
    fn get_service<SDK: 'static + ServiceSDK, Factory: SDKFactory<SDK>>(
        &self,
        name: &str,
        factory: &Factory,
    ) -> ProtocolResult<Box<dyn Service>> {
        let asset_sdk = factory.get_sdk("asset")?;
        let governance_sdk = factory.get_sdk("governance")?;
        let multi_sig_sdk = factory.get_sdk("multi_signature")?;

        let service = match name {
            "asset" => Box::new(AssetService::new(asset_sdk)) as Box<dyn Service>,

            "governance" => Box::new(GovernanceService::new(
                governance_sdk,
                AssetService::new(asset_sdk),
            )) as Box<dyn Service>,

            "multi_signature" => {
                Box::new(MultiSignatureService::new(multi_sig_sdk)) as Box<dyn Service>
            }

            _ => panic!("not found service"),
        };

        Ok(service)
    }

    fn list_service_name(&self) -> Vec<String> {
        vec![
            "asset".to_owned(),
            "governance".to_owned(),
            "multi_signature".to_owned(),
        ]
    }
}


================================================
FILE: binding-macro/Cargo.toml
================================================
[package]
name = "binding-macro"
version = "0.2.1"
authors = ["Muta Dev <muta@nervos.org>"]
edition = "2018"
repository = "https://github.com/nervosnetwork/muta"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
proc-macro = true
doctest = false

[dependencies]
protocol = { path = "../protocol", package = "muta-protocol" }

syn = { version = "1.0", features = ["full"] }
proc-macro2 = "1.0"
quote = "1.0"
derive_more = "0.15"
serde_json = "1.0"

[dev-dependencies]
framework = { path = "../framework" }
bytes = "0.5"
serde = { version = "1.0", features = ["derive"] }


================================================
FILE: binding-macro/src/common.rs
================================================
use syn::{FnArg, Pat, Path, Type};

pub fn get_request_context_pat(bound_name: &str, fn_arg: &FnArg) -> Option<Pat> {
    if let FnArg::Typed(pat_type) = &*fn_arg {
        if let Type::Path(type_path) = &*pat_type.ty {
            if path_is_request_context(&type_path.path, &bound_name) {
                return Some(*pat_type.pat.clone());
            }
        }
    }

    None
}

fn path_is_request_context(path: &Path, bound_name: &str) -> bool {
    // ::<a>::<b>
    if path.leading_colon.is_some() {
        return false;
    }

    // RequestContext
    path.segments.len() == 1 && path.segments[0].ident == bound_name
}

pub fn assert_type(ty: &Type, ty_str: &str) {
    match ty {
        Type::Path(ty_path) => {
            let path = &ty_path.path;
            assert_eq!(path.leading_colon.is_none(), true);
            assert_eq!(path.segments.len(), 1);
            assert_eq!(path.segments[0].ident, ty_str)
        }
        _ => panic!("asset type failed"),
    }
}

pub fn assert_reference_type(ty: &Type, ty_str: &str) {
    match ty {
        Type::Reference(ref_ty) => {
            let ty_ref = &ref_ty.elem.as_ref();
            assert_type(ty_ref, ty_str)
        }
        _ => panic!("asset reference type failed"),
    }
}

// expect &mut self
pub fn arg_is_mutable_receiver(fn_arg: &FnArg) -> bool {
    match fn_arg {
        FnArg::Receiver(receiver) => receiver.reference.is_some() && receiver.mutability.is_some(),
        _ => false,
    }
}

// expect &self
pub fn arg_is_immutable_receiver(fn_arg: &FnArg) -> bool {
    match fn_arg {
        FnArg::Receiver(receiver) => receiver.reference.is_some() && receiver.mutability.is_none(),
        _ => false,
    }
}


================================================
FILE: binding-macro/src/cycles.rs
================================================
use proc_macro::TokenStream;
use quote::quote;
use syn::parse::{Parse, ParseStream, Result};
use syn::punctuated::Punctuated;
use syn::{
    parse_macro_input, Block, FnArg, Generics, Ident, ImplItemMethod, ItemFn, LitInt, Pat,
    ReturnType, Token, Visibility,
};

use crate::common::get_request_context_pat;

#[derive(Debug)]
struct Cycles {
    value: u64,
}

impl Parse for Cycles {
    fn parse(input: ParseStream) -> Result<Self> {
        let lit: LitInt = input.parse()?;
        let value = lit.base10_parse::<u64>()?;
        Ok(Self { value })
    }
}

struct CyclesFnItem {
    pub func_name: Ident,
    pub func_vis:  Visibility,
    pub inputs:    Punctuated<FnArg, Token![,]>,
    pub ret:       ReturnType,
    pub body:      Block,
    pub generics:  Generics,
}

impl Parse for CyclesFnItem {
    fn parse(input: ParseStream) -> Result<Self> {
        match input.parse::<ImplItemMethod>() {
            Ok(method_item) => Ok(CyclesFnItem {
                func_name: method_item.sig.ident.clone(),
                func_vis:  method_item.vis.clone(),
                inputs:    method_item.sig.inputs.clone(),
                ret:       method_item.sig.output.clone(),
                body:      method_item.block.clone(),
                generics:  method_item.sig.generics,
            }),
            Err(_) => {
                let item = input.parse::<ItemFn>()?;
                Ok(CyclesFnItem {
                    func_name: item.sig.ident.clone(),
                    func_vis:  item.vis.clone(),
                    inputs:    item.sig.inputs.clone(),
                    ret:       item.sig.output.clone(),
                    body:      *item.block.clone(),
                    generics:  item.sig.generics,
                })
            }
        }
    }
}

pub fn gen_cycles_code(attr: TokenStream, item: TokenStream) -> TokenStream {
    let cycles = parse_macro_input!(attr as Cycles);
    let fn_item = parse_macro_input!(item as CyclesFnItem);

    let func_name = &fn_item.func_name;
    let func_vis = &fn_item.func_vis;
    let inputs = &fn_item.inputs;
    let ret = &fn_item.ret;
    let body = &fn_item.body;
    let generics = &fn_item.generics;

    let request_pat = find_request_ident("ServiceContext", inputs)
        .expect("The first parameter to read/write must be ServiceContext");

    // Extract the variable name of the RequestContext.
    let request_ident = match request_pat {
        Pat::Ident(pat_ident) => pat_ident.ident,
        _ => panic!("Make sure the RequestContext declaration is ctx: ServiceContext."),
    };

    let cycles_value = cycles.value;

    TokenStream::from(quote! {
        #func_vis fn #func_name#generics(#inputs) #ret {
            if !#request_ident.sub_cycles(#cycles_value) {
                return ServiceResponse::<_>::from_error(3, "cycles macro consume cycles fialed: out of cycles".to_owned());
            }
            #body
        }
    })
}

fn find_request_ident(bound_name: &str, inputs: &Punctuated<FnArg, Token![,]>) -> Option<Pat> {
    for fn_arg in inputs {
        let opt_request_pat = get_request_context_pat(bound_name, &fn_arg);
        if opt_request_pat.is_some() {
            return opt_request_pat;
        }
    }

    None
}


================================================
FILE: binding-macro/src/hooks.rs
================================================
use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, FnArg, ImplItemMethod};

use crate::common::{arg_is_mutable_receiver, assert_reference_type};

pub fn verify_hook(item: TokenStream) -> TokenStream {
    let method_item = parse_macro_input!(item as ImplItemMethod);

    let inputs = &method_item.sig.inputs;
    assert_eq!(inputs.len(), 2);

    assert!(arg_is_mutable_receiver(&inputs[0]));

    match &inputs[1] {
        FnArg::Typed(pt) => {
            let ty = pt.ty.as_ref();
            assert_reference_type(ty, "ExecutorParams")
        }
        _ => panic!("The second parameter type should be `&ExecutorParams`."),
    }

    TokenStream::from(quote! {#method_item})
}


================================================
FILE: binding-macro/src/lib.rs
================================================
extern crate proc_macro;

mod common;
mod cycles;
mod hooks;
mod read_write;
mod service;

use proc_macro::TokenStream;

use crate::cycles::gen_cycles_code;
use crate::hooks::verify_hook;
use crate::read_write::verify_read_or_write;
use crate::service::gen_service_code;

#[rustfmt::skip]
/// `#[genesis]` marks a service method to generate genesis states when fire up the chain
///
/// Method input params should be `(&mut self)` or `(&mut self, payload: PayloadType)`
///
/// # Example:
///
/// ```rust
/// struct Service;
/// #[service]
/// impl Service {
///     #[genesis]
///     fn init_genesis(
///         &mut self,
///     ) {
///         do_work();
///     }
/// }
/// ```
///
/// Or
///
/// ```rust
/// struct Service;
/// #[service]
/// impl Service {
///     #[genesis]
///     fn init_genesis(
///         &mut self,
///         payload: PayloadType,
///     ) {
///         do_work(payload);
///     }
/// }
/// ```
#[proc_macro_attribute]
pub fn genesis(_: TokenStream, item: TokenStream) -> TokenStream {
    item
}

#[proc_macro_attribute]
pub fn tx_hook_before(_: TokenStream, item: TokenStream) -> TokenStream {
    item
}

#[proc_macro_attribute]
pub fn tx_hook_after(_: TokenStream, item: TokenStream) -> TokenStream {
    item
}

#[rustfmt::skip]
/// `#[read]` marks a service method as readable.
///
/// Methods marked with this macro will have:
///  Methods with this macro allow access (readable) from outside (RPC or other services).
///
/// - Verification
///  1. Is it a struct method marked with #[service]?
///  2. Is visibility private?
///  3. Parameter signature contains `&self and ctx: ServiceContext`?
///  4. Is the return value `ServiceResponse<T>`?
///
/// # Example:
///
/// ```rust
/// struct Service;
/// #[service]
/// impl Service {
///     #[read]
///     fn test_read_fn(
///         &self,
///         _ctx: ServiceContext,
///     ) -> ServiceResponse<String> {
///         ServiceResponse::<String>::from_succeed("ok".to_owned())
///     }
/// }
/// ```
#[proc_macro_attribute]
pub fn read(_: TokenStream, item: TokenStream) -> TokenStream {
    verify_read_or_write(item, false)
}

#[rustfmt::skip]
/// `#[write]` marks a service method as writable.
///
/// Methods marked with this macro will have:
/// - Accessibility
///  Methods with this macro allow access (writeable) from outside (RPC or other services).
///
/// - Verification
///  1. Is it a struct method marked with #[service]?
///  2. Is visibility private?
///  3. Parameter signature contains `&self and ctx: ServiceContext`?
///  4. Is the return value `ServiceResponse<T>`?
///
/// # Example:
///
/// ```rust
/// struct Service;
/// #[service]
/// impl Service {
///     #[write]
///     fn test_write_fn(
///         &mut self,
///         _ctx: ServiceContext,
///     ) -> ServiceResponse<String> {
///         ServiceResponse::<String>::from_succeed("ok".to_owned())
///     }
/// }
/// ```
#[proc_macro_attribute]
pub fn write(_: TokenStream, item: TokenStream) -> TokenStream {
    verify_read_or_write(item, true)
}

#[rustfmt::skip]
/// `# [cycles]` mark an `ImplFn` or `fn`, it will automatically generate code
/// to complete the cycle deduction,
///
/// ```rust
/// // Source Code
/// impl Tests {
///     #[cycles(100)]
///     fn test_cycles(&self, ctx: ServiceContext) -> ServiceResponse<()> {
///         ServiceResponse::<()>::from_succeed(())
///     }
/// }
///
/// // Generated code.
/// impl Tests {
///     fn test_cycles(&self, ctx: ServiceContext) -> ServiceResponse<()> {
///         ctx.sub_cycles(100);
///         ServiceResponse::<()>::from_succeed(())
///     }
/// }
/// ```
#[proc_macro_attribute]
pub fn cycles(attr: TokenStream, item: TokenStream) -> TokenStream {
    gen_cycles_code(attr, item)
}

/// Marks a method so that it executes after the entire block executes.
// TODO(@yejiayu): Verify the function signature.
#[proc_macro_attribute]
pub fn hook_after(_: TokenStream, item: TokenStream) -> TokenStream {
    verify_hook(item)
}

/// Marks a method so that it executes before the entire block executes.
// TODO(@yejiayu): Verify the function signature.
#[proc_macro_attribute]
pub fn hook_before(_: TokenStream, item: TokenStream) -> TokenStream {
    verify_hook(item)
}

#[rustfmt::skip]
/// Marking a ImplItem for service, it will automatically trait
/// `protocol::traits::Service`.
///
/// # Example
///
/// use serde::{Deserialize, Serialize};
/// use protocol::traits::ServiceSDK;
/// use protocol::types::ServiceContext;
/// use protocol::ProtocolResult;
///
/// ```rust
/// // Source code
///
/// // serde::Deserialize and serde::Serialize are required.
/// #[derive(Serialize, Deserialize)]
/// struct CreateKittyPayload {
///     // fields
/// }
///
/// // serde::Deserialize and serde::Serialize are required.
/// #[derive(Serialize, Deserialize)]
/// struct GetKittyPayload<SDK: ServiceSDK> {
///     // fields
/// }
///
/// #[service]
/// impl<SDK: ServiceSDK> KittyService<SDK> {
///     #[hook_before]
///     fn custom_hook_before(&mut self) {
///         // Do something
///     }
///
///     #[hook_after]
///     fn custom_hook_after(&mut self) {
///         // Do something
///     }
///
///     #[read]
///     fn get_kitty(
///         &self,
///         ctx: ServiceContext,
///         payload: GetKittyPayload,
///     ) -> ServiceResponse<String> {
///         // Do something
///     }
///
///     #[write]
///     fn create_kitty(
///         &mut self,
///         ctx: ServiceContext,
///         payload: CreateKittyPayload,
///     ) -> ServiceResponse<String> {
///         // Do something
///     }
/// }
///
/// // Generated code.
/// impl<SDK: ServiceSDK> Service<SDK> for KittyService<SDK> {
///     fn hook_before_(&mut self) {
///         self.custom_hook_before()
///     }
///
///     fn hook_after(&mut self) {
///         self.custom_hook_after()
///     }
///
///     fn write(&mut self, ctx: ServiceContext) -> ServiceResponse<String> {
///         let method = ctx.get_service_method();
///
///         match ctx.get_service_method() {
///             "create_kitty" => {
///                 let payload_res: Result<CreateKittyPayload, _> = serde_json::from_str(ctx.get_payload());
///                 if payload_res.is_error() {
///                      return ServiceResponse::<String>::from_error(1, "service macro decode payload failed".to_owned());
///                 };
///                 let payload = payload_res.unwrap();
///                 let res = self.#list_read_ident(ctx, payload);
///                 if !res.is_error() {
///                     let mut data_json = serde_json::to_string(&res.succeed_data).unwrap_or_else(|e| panic!("service macro encode payload failed: {:?}", e));
///                     if data_json == "null" {
///                         data_json = "".to_owned();
///                     }
///                     ServiceResponse::<String>::from_succeed(data_json)
///                 } else {
///                     ServiceResponse::<String>::from_error(res.code, res.error_message.clone())
///             }
///             _ => panic!("service macro not found method:{:?} of service:{:?}", method, service),
///         }
///     }
///
///     fn read(&self, ctx: ServiceContext) -> ProtocolResult<&str> {
///         let method = ctx.get_service_method();
///
///         match ctx.get_service_method() {
///             "get_kitty" => {
///                 let payload_res: Result<GetKittyPayload, _> = serde_json::from_str(ctx.get_payload());
///                 if payload_res.is_error() {
///                      return ServiceResponse::<String>::from_error(1, "service macro decode payload failed".to_owned());
///                 };
///                 let payload = payload_res.unwrap();
///                 let res = self.#list_read_ident(ctx, payload);
///                 if !res.is_error() {
///                     let mut data_json = serde_json::to_string(&res.succeed_data).unwrap_or_else(|e| panic!("service macro encode payload failed: {:?}", e));
///                     if data_json == "null" {
///                         data_json = "".to_owned();
///                     }
///                     ServiceResponse::<String>::from_succeed(data_json)
///                 } else {
///                     ServiceResponse::<String>::from_error(res.code, res.error_message.clone())
///             }
///             _ => panic!("service macro not found method:{:?} of service:{:?}", method, service),
///         }
///     }
/// }
/// ```
#[proc_macro_attribute]
pub fn service(attr: TokenStream, item: TokenStream) -> TokenStream {
    gen_service_code(attr, item)
}


================================================
FILE: binding-macro/src/read_write.rs
================================================
use proc_macro::TokenStream;
use quote::quote;
use syn::punctuated::Punctuated;
use syn::{parse_macro_input, FnArg, ImplItemMethod, ReturnType, Token, Visibility};

use crate::common::{arg_is_immutable_receiver, arg_is_mutable_receiver, assert_type};

pub fn verify_read_or_write(item: TokenStream, mutable: bool) -> TokenStream {
    let method_item = parse_macro_input!(item as ImplItemMethod);

    let visibility = &method_item.vis;
    let inputs = &method_item.sig.inputs;
    let ret_type = &method_item.sig.output;

    verify_visibiity(visibility);

    verify_inputs(inputs, mutable);

    verify_ret_type(ret_type);

    TokenStream::from(quote! {#method_item})
}

fn verify_visibiity(visibility: &Visibility) {
    match visibility {
        Visibility::Inherited => {}
        _ => panic!("The visibility of read/write method must be private"),
    };
}

fn verify_inputs(inputs: &Punctuated<FnArg, Token![,]>, mutable: bool) {
    if inputs.len() < 2 || inputs.len() > 3 {
        panic!("The input parameters should be `(&self/&mut self, ctx: ServiceContext)` or `(&self/&mut self, ctx: ServiceContext, payload: PayloadType)`")
    }

    if mutable {
        if !arg_is_mutable_receiver(&inputs[0]) {
            panic!("The receiver must be `&mut self`.")
        }
    } else if !arg_is_immutable_receiver(&inputs[0]) {
        panic!("The receiver must be `&self`.")
    }

    match &inputs[1] {
        FnArg::Typed(pt) => {
            let ty = pt.ty.as_ref();
            assert_type(ty, "ServiceContext")
        }
        _ => panic!("The second parameter type should be `ServiceContext`."),
    }
}

fn verify_ret_type(ret_type: &ReturnType) {
    let real_ret_type = match ret_type {
        ReturnType::Type(_, t) => t.as_ref(),
        _ => panic!("The return type of read/write method must be protocol::ProtocolResult"),
    };

    assert_type(&real_ret_type, "ServiceResponse");
}


================================================
FILE: binding-macro/src/service.rs
================================================
use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, FnArg, Ident, ImplItem, ImplItemMethod, ItemImpl, Type};

const READ_ATTRIBUTE: &str = "read";
const WRITE_ATTRIBUTE: &str = "write";
const GENESIS_ATTRIBUTE: &str = "genesis";
const HOOK_BEFORE_ATTRIBUTE: &str = "hook_before";
const HOOK_AFTER_ATTRIBUTE: &str = "hook_after";
const TX_HOOK_BEFORE_ATTRIBUTE: &str = "tx_hook_before";
const TX_HOOK_AFTER_ATTRIBUTE: &str = "tx_hook_after";

enum ServiceMethod {
    Read(ImplItemMethod),
    Write(ImplItemMethod),
}

struct Hooks {
    before:    Option<Ident>,
    after:     Option<Ident>,
    tx_before: Option<Ident>,
    tx_after:  Option<Ident>,
}

struct MethodMeta {
    method_ident:  Ident,
    payload_ident: Option<Ident>,
    readonly:      bool,
}

pub fn gen_service_code(_: TokenStream, item: TokenStream) -> TokenStream {
    let impl_item = parse_macro_input!(item as ItemImpl);

    let service_ident = get_service_ident(&impl_item);
    let items = &impl_item.items;
    let (impl_generics, ty_generics, where_clause) = impl_item.generics.split_for_impl();

    let mut methods: Vec<ServiceMethod> = vec![];

    for item in items {
        if let ImplItem::Method(method) = item {
            if let Some(service_method) = find_service_method(method) {
                methods.push(service_method)
            }
        }
    }

    let genesis_method = find_genesis(items);
    let genesis_body = match genesis_method {
        Some(genesis_method) => get_genesis_body(&genesis_method),
        None => quote! {()},
    };

    let hooks = extract_hooks(items);
    let hook_before = &hooks.before;
    let hook_before_body = match hook_before {
        Some(hook_before) => quote! { self.#hook_before(_params) },
        None => quote! {()},
    };
    let hook_after = &hooks.after;
    let hook_after_body = match hook_after {
        Some(hook_after) => quote! { self.#hook_after(_params) },
        None => quote! {()},
    };
    let tx_hook_before = &hooks.tx_before;
    let tx_hook_before_body = match tx_hook_before {
        Some(tx_hook_before) => quote! {
            let res = self.#tx_hook_before(_ctx);
            if !res.is_error() {
                let mut data_json = serde_json::to_string(&res.succeed_data).unwrap_or_else(|e| panic!("encode succeed_data of ServiceResponse failed: {:?}", e));
                if data_json == "null" {
                    data_json = "".to_owned();
                }
                ServiceResponse::<String>::from_succeed(data_json)
            } else {
                ServiceResponse::<String>::from_error(res.code, res.error_message.clone())
            }
        },
        None => quote! {ServiceResponse::<String>::from_succeed("".to_owned())},
    };
    let tx_hook_after = &hooks.tx_after;
    let tx_hook_after_body = match tx_hook_after {
        Some(tx_hook_after) => {
            quote! {
                let res = self.#tx_hook_after(_ctx);
                if !res.is_error() {
                    let mut data_json = serde_json::to_string(&res.succeed_data).unwrap_or_else(|e| panic!("encode succeed_data of ServiceResponse failed: {:?}", e));
                    if data_json == "null" {
                        data_json = "".to_owned();
                    }
                    ServiceResponse::<String>::from_succeed(data_json)
                } else {
                    ServiceResponse::<String>::from_error(res.code, res.error_message.clone())
                }
            }
        }
        None => quote! {ServiceResponse::<String>::from_succeed("".to_owned())},
    };

    let list_method_meta: Vec<MethodMeta> = methods.into_iter().map(extract_method_meta).collect();

    let (list_read_name, list_read_ident, list_read_payload) =
        split_list_for_metadata(&list_method_meta, true);
    let (list_write_name, list_write_ident, list_write_payload) =
        split_list_for_metadata(&list_method_meta, false);

    let (list_read_name_nonepayload, list_read_ident_nonepayload) =
        split_list_for_metadata_nonepayload(&list_method_meta, true);
    let (list_write_name_nonepayload, list
Download .txt
gitextract_lg42y7z7/

├── .dockerignore
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug-report.md
│   │   ├── feature.md
│   │   └── help.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── semantic.yml
├── .gitignore
├── .helmignore
├── CHANGELOG/
│   ├── CHANGELOG-0.1.md
│   ├── CHANGELOG-0.2.md
│   └── README.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── Makefile
├── OWNERS
├── OWNERS_ALIASES
├── README.md
├── README_CN.md
├── SECURITY.md
├── benchmark/
│   ├── bench_executor.rs
│   ├── bench_mempool.rs
│   ├── benchmark_genesis.toml
│   ├── governance/
│   │   ├── mod.rs
│   │   └── types.rs
│   └── mod.rs
├── binding-macro/
│   ├── Cargo.toml
│   ├── src/
│   │   ├── common.rs
│   │   ├── cycles.rs
│   │   ├── hooks.rs
│   │   ├── lib.rs
│   │   ├── read_write.rs
│   │   └── service.rs
│   └── tests/
│       └── mod.rs
├── built-in-services/
│   ├── asset/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── tests/
│   │       │   └── mod.rs
│   │       └── types.rs
│   ├── authorization/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── metadata/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       └── tests/
│   │           └── mod.rs
│   ├── multi-signature/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── tests/
│   │       │   ├── curd_test.rs
│   │       │   ├── mod.rs
│   │       │   └── recursion_test.rs
│   │       └── types.rs
│   └── util/
│       ├── Cargo.toml
│       └── src/
│           ├── lib.rs
│           ├── tests/
│           │   └── mod.rs
│           └── types.rs
├── byzantine/
│   ├── Cargo.toml
│   ├── README.md
│   ├── generators.toml
│   ├── src/
│   │   ├── behaviors.rs
│   │   ├── commander.rs
│   │   ├── config.rs
│   │   ├── default_start.rs
│   │   ├── invalid_types.rs
│   │   ├── lib.rs
│   │   ├── message.rs
│   │   ├── strategy.rs
│   │   ├── utils.rs
│   │   └── worker.rs
│   └── tests/
│       ├── byz.test.ts
│       ├── jest.config.js
│       └── package.json
├── charts/
│   ├── deploy-chaos/
│   │   ├── .helmignore
│   │   ├── Chart.yaml
│   │   ├── templates/
│   │   │   ├── _helpers.tpl
│   │   │   ├── muta-benchmark.yaml
│   │   │   └── muta-chaos-crd.yaml
│   │   └── values.yaml
│   ├── muta/
│   │   ├── .helmignore
│   │   ├── Chart.yaml
│   │   ├── Makefile
│   │   ├── README.md
│   │   ├── templates/
│   │   │   ├── NOTES.txt
│   │   │   ├── _helpers.tpl
│   │   │   ├── canary.yaml
│   │   │   ├── deployment.yaml
│   │   │   ├── hpa.yaml
│   │   │   ├── ingress.yaml
│   │   │   ├── ksvc.yaml
│   │   │   └── service.yaml
│   │   └── values.yaml
│   └── preview/
│       ├── Chart.yaml
│       ├── Makefile
│       ├── requirements.yaml
│       └── values.yaml
├── clippy.toml
├── common/
│   ├── apm/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── metrics/
│   │       │   ├── api.rs
│   │       │   ├── consensus.rs
│   │       │   ├── mempool.rs
│   │       │   ├── network.rs
│   │       │   └── storage.rs
│   │       └── metrics.rs
│   ├── channel/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── config-parser/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── lib.rs
│   │       └── types.rs
│   ├── crypto/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── logger/
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   ├── log.yml
│   │   └── src/
│   │       ├── date_fixed_roller.rs
│   │       └── lib.rs
│   ├── merkle/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   └── pubsub/
│       ├── Cargo.toml
│       └── src/
│           └── lib.rs
├── core/
│   ├── api/
│   │   ├── Cargo.toml
│   │   ├── source/
│   │   │   └── graphiql.html
│   │   └── src/
│   │       ├── adapter/
│   │       │   └── mod.rs
│   │       ├── config.rs
│   │       ├── lib.rs
│   │       └── schema/
│   │           ├── block.rs
│   │           ├── mod.rs
│   │           ├── receipt.rs
│   │           └── transaction.rs
│   ├── cli/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── error.rs
│   │       ├── lib.rs
│   │       └── tests/
│   │           ├── config.toml
│   │           ├── genesis.toml
│   │           ├── mod.rs
│   │           └── service_mapping.rs
│   ├── consensus/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── adapter.rs
│   │       ├── consensus.rs
│   │       ├── engine.rs
│   │       ├── fixed_types.rs
│   │       ├── lib.rs
│   │       ├── message.rs
│   │       ├── status.rs
│   │       ├── synchronization.rs
│   │       ├── tests/
│   │       │   ├── engine.rs
│   │       │   ├── mod.rs
│   │       │   ├── status.rs
│   │       │   └── synchronization.rs
│   │       ├── util.rs
│   │       ├── wal.rs
│   │       └── wal_proto.rs
│   ├── mempool/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── adapter/
│   │       │   ├── message.rs
│   │       │   └── mod.rs
│   │       ├── context.rs
│   │       ├── lib.rs
│   │       ├── map.rs
│   │       ├── tests/
│   │       │   ├── mempool.rs
│   │       │   └── mod.rs
│   │       └── tx_cache.rs
│   ├── network/
│   │   ├── Cargo.toml
│   │   ├── examples/
│   │   │   └── buycopy.rs
│   │   ├── src/
│   │   │   ├── common.rs
│   │   │   ├── compression/
│   │   │   │   ├── mod.rs
│   │   │   │   └── snappy.rs
│   │   │   ├── config.rs
│   │   │   ├── connection/
│   │   │   │   ├── control.rs
│   │   │   │   ├── keeper.rs
│   │   │   │   └── mod.rs
│   │   │   ├── endpoint.rs
│   │   │   ├── error.rs
│   │   │   ├── event.rs
│   │   │   ├── lib.rs
│   │   │   ├── message/
│   │   │   │   ├── mod.rs
│   │   │   │   ├── serde.rs
│   │   │   │   └── serde_multi.rs
│   │   │   ├── metrics.rs
│   │   │   ├── outbound/
│   │   │   │   ├── gossip.rs
│   │   │   │   ├── mod.rs
│   │   │   │   └── rpc.rs
│   │   │   ├── peer_manager/
│   │   │   │   ├── addr_set.rs
│   │   │   │   ├── diagnostic.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── peer.rs
│   │   │   │   ├── retry.rs
│   │   │   │   ├── save_restore.rs
│   │   │   │   ├── session_book.rs
│   │   │   │   ├── shared.rs
│   │   │   │   ├── tags.rs
│   │   │   │   ├── test_manager.rs
│   │   │   │   ├── time.rs
│   │   │   │   └── trust_metric.rs
│   │   │   ├── protocols/
│   │   │   │   ├── core.rs
│   │   │   │   ├── discovery/
│   │   │   │   │   ├── addr.rs
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   ├── protocol.rs
│   │   │   │   │   └── substream.rs
│   │   │   │   ├── discovery.rs
│   │   │   │   ├── identify/
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── common.rs
│   │   │   │   │   ├── identification.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   ├── protocol.rs
│   │   │   │   │   └── tests.rs
│   │   │   │   ├── identify.rs
│   │   │   │   ├── macro.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── ping/
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   └── protocol.rs
│   │   │   │   ├── ping.rs
│   │   │   │   ├── transmitter/
│   │   │   │   │   ├── behaviour.rs
│   │   │   │   │   ├── message.rs
│   │   │   │   │   └── protocol.rs
│   │   │   │   └── transmitter.rs
│   │   │   ├── reactor/
│   │   │   │   ├── mod.rs
│   │   │   │   ├── router.rs
│   │   │   │   └── rpc_map.rs
│   │   │   ├── rpc.rs
│   │   │   ├── selfcheck.rs
│   │   │   ├── service.rs
│   │   │   ├── test/
│   │   │   │   └── mock.rs
│   │   │   ├── test.rs
│   │   │   └── traits.rs
│   │   └── tests/
│   │       ├── common.rs
│   │       └── gossip_test.rs
│   ├── run/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   └── storage/
│       ├── Cargo.toml
│       ├── examples/
│       │   └── bench.rs
│       └── src/
│           ├── adapter/
│           │   ├── memory.rs
│           │   ├── mod.rs
│           │   └── rocks.rs
│           ├── lib.rs
│           └── tests/
│               ├── adapter.rs
│               ├── mod.rs
│               └── storage.rs
├── devtools/
│   ├── chain/
│   │   ├── README.md
│   │   ├── config.toml
│   │   └── genesis.toml
│   ├── docker-build/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.build-env
│   │   └── Dockerfile.e2e-env
│   ├── keypair/
│   │   ├── Cargo.toml
│   │   └── src/
│   │       ├── keypair.yml
│   │       └── main.rs
│   └── kube/
│       └── deploy-chaos-crd-template.yml
├── docs/
│   ├── _config.yml
│   ├── build/
│   │   └── gql_api.sh
│   ├── graphql_api.md
│   ├── how_to_deploy_a_core_crate.md
│   ├── layout.md
│   └── resources.md
├── examples/
│   ├── byzantine_node.rs
│   ├── config-1.toml
│   ├── config-2.toml
│   ├── config-3.toml
│   ├── config-4.toml
│   ├── genesis.toml
│   └── muta-chain.rs
├── framework/
│   ├── Cargo.toml
│   └── src/
│       ├── binding/
│       │   ├── mod.rs
│       │   ├── sdk/
│       │   │   ├── chain_querier.rs
│       │   │   └── mod.rs
│       │   ├── state/
│       │   │   ├── mod.rs
│       │   │   ├── trie.rs
│       │   │   └── trie_db.rs
│       │   ├── store/
│       │   │   ├── array.rs
│       │   │   ├── map.rs
│       │   │   ├── mod.rs
│       │   │   └── primitive.rs
│       │   └── tests/
│       │       ├── mod.rs
│       │       ├── sdk.rs
│       │       ├── state.rs
│       │       └── store.rs
│       ├── executor/
│       │   ├── error.rs
│       │   ├── factory.rs
│       │   ├── mod.rs
│       │   └── tests/
│       │       ├── framework.rs
│       │       ├── framework_genesis_services.toml
│       │       ├── genesis_services.toml
│       │       ├── mod.rs
│       │       └── test_service.rs
│       └── lib.rs
├── jenkins-x-chaos.yml
├── jenkins-x-e2e.yml
├── jenkins-x-lint.yml
├── jenkins-x-unit.yml
├── jenkins-x.yml
├── protocol/
│   ├── Cargo.toml
│   └── src/
│       ├── codec/
│       │   ├── block.rs
│       │   ├── macro.rs
│       │   ├── mod.rs
│       │   ├── primitive.rs
│       │   ├── receipt.rs
│       │   ├── tests/
│       │   │   └── mod.rs
│       │   └── transaction.rs
│       ├── fixed_codec/
│       │   ├── mod.rs
│       │   ├── primitive.rs
│       │   ├── receipt.rs
│       │   ├── tests/
│       │   │   ├── fixed_codec.rs
│       │   │   └── mod.rs
│       │   └── transaction.rs
│       ├── lib.rs
│       ├── traits/
│       │   ├── api.rs
│       │   ├── binding.rs
│       │   ├── consensus.rs
│       │   ├── executor.rs
│       │   ├── mempool.rs
│       │   ├── mod.rs
│       │   ├── network.rs
│       │   └── storage.rs
│       └── types/
│           ├── block.rs
│           ├── genesis.rs
│           ├── mod.rs
│           ├── primitive.rs
│           ├── receipt.rs
│           ├── service_context.rs
│           └── transaction.rs
├── rust-toolchain
├── rustfmt.toml
├── src/
│   └── lib.rs
└── tests/
    ├── common/
    │   ├── mod.rs
    │   ├── node/
    │   │   ├── config.rs
    │   │   ├── consts.rs
    │   │   ├── diagnostic.rs
    │   │   ├── full_node/
    │   │   │   ├── builder.rs
    │   │   │   ├── default_start.rs
    │   │   │   ├── error.rs
    │   │   │   └── memory_db.rs
    │   │   ├── full_node.rs
    │   │   └── sync.rs
    │   └── node.rs
    ├── e2e/
    │   ├── jest.config.js
    │   ├── package.json
    │   ├── sdk.test.ts
    │   ├── tsconfig.json
    │   ├── utils.ts
    │   └── wait-for-it.sh
    ├── trust_metric.rs
    ├── trust_metric_all/
    │   ├── client_node.rs
    │   ├── common.rs
    │   ├── consensus.rs
    │   ├── logger.rs
    │   ├── mempool.rs
    │   └── mod.rs
    └── verify_chain_id.rs
Download .txt
Showing preview only (305K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3561 symbols across 216 files)

FILE: benchmark/bench_executor.rs
  function bench_execute (line 12) | fn bench_execute(b: &mut Bencher) {
  function bench_execute_with_assets (line 36) | fn bench_execute_with_assets(b: &mut Bencher) {
  function create_assets (line 55) | fn create_assets(bench_adapter: &mut BenchmarkAdapter, num: u64) {

FILE: benchmark/governance/mod.rs
  constant INFO_KEY (line 19) | const INFO_KEY: &str = "admin";
  constant TX_FEE_INLET_KEY (line 20) | const TX_FEE_INLET_KEY: &str = "fee_address";
  constant MINER_PROFIT_OUTLET_KEY (line 21) | const MINER_PROFIT_OUTLET_KEY: &str = "miner_address";
  type GovernanceService (line 28) | pub struct GovernanceService<A, SDK> {
  function new (line 37) | pub fn new(mut sdk: SDK, asset: A) -> Self {
  function init_genesis (line 49) | fn init_genesis(&mut self, payload: InitGenesisPayload) {
  function pledge_fee (line 69) | fn pledge_fee(&mut self, ctx: ServiceContext) -> ServiceResponse<String> {
  function deduct_fee (line 96) | fn deduct_fee(&mut self, ctx: ServiceContext) -> ServiceResponse<String> {
  function handle_miner_profit (line 117) | fn handle_miner_profit(&mut self, params: &ExecutorParams) {
  type ServiceError (line 168) | pub enum ServiceError {
    method code (line 185) | fn code(&self) -> u64 {
  function from (line 197) | fn from(err: ServiceError) -> ServiceResponse<T> {

FILE: benchmark/governance/types.rs
  type InitGenesisPayload (line 11) | pub struct InitGenesisPayload {
  type MinerChargeConfig (line 19) | pub struct MinerChargeConfig {
  type GovernanceInfo (line 25) | pub struct GovernanceInfo {
  type DiscountLevel (line 35) | pub struct DiscountLevel {
  method partial_cmp (line 41) | fn partial_cmp(&self, other: &DiscountLevel) -> Option<Ordering> {
  method cmp (line 47) | fn cmp(&self, other: &DiscountLevel) -> Ordering {
  type RecordProfitEvent (line 53) | pub struct RecordProfitEvent {
  type AccumulateProfitPayload (line 59) | pub struct AccumulateProfitPayload {
  type HookTransferFromPayload (line 65) | pub struct HookTransferFromPayload {

FILE: benchmark/mod.rs
  constant TRIE_PATH (line 30) | const TRIE_PATH: &str = "./free-space/state";
  constant STORAGE_PATH (line 31) | const STORAGE_PATH: &str = "./free-space/block";
  type BenchmarkAdapter (line 77) | pub struct BenchmarkAdapter {
    method new (line 92) | pub fn new() -> Self {
    method create_executor (line 134) | pub fn create_executor(
    method create_params (line 146) | pub fn create_params(&mut self) -> ExecutorParams {
    method create_mempool_adapter (line 156) | pub fn create_mempool_adapter(
    method next_height (line 176) | pub fn next_height(&mut self) {
    method create_genesis_block (line 181) | fn create_genesis_block(state_root: MerkleRoot) -> Block {
  method default (line 86) | fn default() -> Self {
  function construct_stx (line 213) | pub fn construct_stx(req: TransactionRequest) -> SignedTransaction {
  type MockServiceMapping (line 235) | pub struct MockServiceMapping;
  method get_service (line 238) | fn get_service<SDK: 'static + ServiceSDK, Factory: SDKFactory<SDK>>(
  method list_service_name (line 265) | fn list_service_name(&self) -> Vec<String> {

FILE: binding-macro/src/common.rs
  function get_request_context_pat (line 3) | pub fn get_request_context_pat(bound_name: &str, fn_arg: &FnArg) -> Opti...
  function path_is_request_context (line 15) | fn path_is_request_context(path: &Path, bound_name: &str) -> bool {
  function assert_type (line 25) | pub fn assert_type(ty: &Type, ty_str: &str) {
  function assert_reference_type (line 37) | pub fn assert_reference_type(ty: &Type, ty_str: &str) {
  function arg_is_mutable_receiver (line 48) | pub fn arg_is_mutable_receiver(fn_arg: &FnArg) -> bool {
  function arg_is_immutable_receiver (line 56) | pub fn arg_is_immutable_receiver(fn_arg: &FnArg) -> bool {

FILE: binding-macro/src/cycles.rs
  type Cycles (line 13) | struct Cycles {
  method parse (line 18) | fn parse(input: ParseStream) -> Result<Self> {
  type CyclesFnItem (line 25) | struct CyclesFnItem {
  method parse (line 35) | fn parse(input: ParseStream) -> Result<Self> {
  function gen_cycles_code (line 60) | pub fn gen_cycles_code(attr: TokenStream, item: TokenStream) -> TokenStr...
  function find_request_ident (line 92) | fn find_request_ident(bound_name: &str, inputs: &Punctuated<FnArg, Token...

FILE: binding-macro/src/hooks.rs
  function verify_hook (line 7) | pub fn verify_hook(item: TokenStream) -> TokenStream {

FILE: binding-macro/src/lib.rs
  function genesis (line 52) | pub fn genesis(_: TokenStream, item: TokenStream) -> TokenStream {
  function tx_hook_before (line 57) | pub fn tx_hook_before(_: TokenStream, item: TokenStream) -> TokenStream {
  function tx_hook_after (line 62) | pub fn tx_hook_after(_: TokenStream, item: TokenStream) -> TokenStream {
  function read (line 94) | pub fn read(_: TokenStream, item: TokenStream) -> TokenStream {
  function write (line 127) | pub fn write(_: TokenStream, item: TokenStream) -> TokenStream {
  function cycles (line 153) | pub fn cycles(attr: TokenStream, item: TokenStream) -> TokenStream {
  function hook_after (line 160) | pub fn hook_after(_: TokenStream, item: TokenStream) -> TokenStream {
  function hook_before (line 167) | pub fn hook_before(_: TokenStream, item: TokenStream) -> TokenStream {
  function service (line 288) | pub fn service(attr: TokenStream, item: TokenStream) -> TokenStream {

FILE: binding-macro/src/read_write.rs
  function verify_read_or_write (line 8) | pub fn verify_read_or_write(item: TokenStream, mutable: bool) -> TokenSt...
  function verify_visibiity (line 24) | fn verify_visibiity(visibility: &Visibility) {
  function verify_inputs (line 31) | fn verify_inputs(inputs: &Punctuated<FnArg, Token![,]>, mutable: bool) {
  function verify_ret_type (line 53) | fn verify_ret_type(ret_type: &ReturnType) {

FILE: binding-macro/src/service.rs
  constant READ_ATTRIBUTE (line 5) | const READ_ATTRIBUTE: &str = "read";
  constant WRITE_ATTRIBUTE (line 6) | const WRITE_ATTRIBUTE: &str = "write";
  constant GENESIS_ATTRIBUTE (line 7) | const GENESIS_ATTRIBUTE: &str = "genesis";
  constant HOOK_BEFORE_ATTRIBUTE (line 8) | const HOOK_BEFORE_ATTRIBUTE: &str = "hook_before";
  constant HOOK_AFTER_ATTRIBUTE (line 9) | const HOOK_AFTER_ATTRIBUTE: &str = "hook_after";
  constant TX_HOOK_BEFORE_ATTRIBUTE (line 10) | const TX_HOOK_BEFORE_ATTRIBUTE: &str = "tx_hook_before";
  constant TX_HOOK_AFTER_ATTRIBUTE (line 11) | const TX_HOOK_AFTER_ATTRIBUTE: &str = "tx_hook_after";
  type ServiceMethod (line 13) | enum ServiceMethod {
  type Hooks (line 18) | struct Hooks {
  type MethodMeta (line 25) | struct MethodMeta {
  function gen_service_code (line 31) | pub fn gen_service_code(_: TokenStream, item: TokenStream) -> TokenStream {
  function split_list_for_metadata (line 215) | fn split_list_for_metadata(
  function split_list_for_metadata_nonepayload (line 238) | fn split_list_for_metadata_nonepayload(
  function get_service_ident (line 254) | fn get_service_ident(impl_item: &ItemImpl) -> Ident {
  function find_service_method (line 261) | fn find_service_method(method: &ImplItemMethod) -> Option<ServiceMethod> {
  function find_genesis (line 277) | fn find_genesis(items: &[ImplItem]) -> Option<ImplItemMethod> {
  function get_genesis_body (line 301) | fn get_genesis_body(item: &ImplItemMethod) -> proc_macro2::TokenStream {
  function extract_hooks (line 328) | fn extract_hooks(items: &[ImplItem]) -> Hooks {
  function find_list_for_item_method (line 382) | fn find_list_for_item_method(items: &[ImplItem]) -> Vec<ImplItemMethod> {
  function extract_method_meta (line 396) | fn extract_method_meta(method: ServiceMethod) -> MethodMeta {

FILE: binding-macro/tests/mod.rs
  function test_read_and_write (line 21) | fn test_read_and_write() {
  function test_hooks (line 48) | fn test_hooks() {
  function test_tx_hooks (line 74) | fn test_tx_hooks() {
  function test_read_and_write_with_noneparams (line 104) | fn test_read_and_write_with_noneparams() {
  function test_cycles (line 128) | fn test_cycles() {
  function test_service (line 170) | fn test_service() {
  function test_service_none_payload (line 273) | fn test_service_none_payload() {
  function test_service_none_response (line 355) | fn test_service_none_response() {
  function get_context (line 423) | fn get_context(cycles_limit: u64, service: &str, method: &str, payload: ...
  function mock_executor_params (line 443) | fn mock_executor_params() -> ExecutorParams {
  type MockServiceSDK (line 453) | struct MockServiceSDK;
  method alloc_or_recover_map (line 457) | fn alloc_or_recover_map<Key: 'static + FixedCodec + PartialEq, Val: 'sta...
  method alloc_or_recover_array (line 465) | fn alloc_or_recover_array<Elm: 'static + FixedCodec>(
  method alloc_or_recover_uint64 (line 473) | fn alloc_or_recover_uint64(&mut self, _var_name: &str) -> Box<dyn StoreU...
  method alloc_or_recover_string (line 478) | fn alloc_or_recover_string(&mut self, _var_name: &str) -> Box<dyn StoreS...
  method alloc_or_recover_bool (line 483) | fn alloc_or_recover_bool(&mut self, _var_name: &str) -> Box<dyn StoreBoo...
  method get_value (line 488) | fn get_value<Key: FixedCodec, Ret: FixedCodec>(&self, _key: &Key) -> Opt...
  method set_value (line 493) | fn set_value<Key: FixedCodec, Val: FixedCodec>(&mut self, _key: Key, _va...
  method get_account_value (line 498) | fn get_account_value<Key: FixedCodec, Ret: FixedCodec>(
  method set_account_value (line 507) | fn set_account_value<Key: FixedCodec, Val: FixedCodec>(
  method get_transaction_by_hash (line 518) | fn get_transaction_by_hash(&self, _tx_hash: &Hash) -> Option<SignedTrans...
  method get_block_by_height (line 525) | fn get_block_by_height(&self, _height: Option<u64>) -> Option<Block> {
  method get_receipt_by_hash (line 531) | fn get_receipt_by_hash(&self, _tx_hash: &Hash) -> Option<Receipt> {

FILE: built-in-services/asset/src/lib.rs
  constant ASSET_SERVICE_NAME (line 20) | pub const ASSET_SERVICE_NAME: &str = "asset";
  type Assets (line 22) | pub trait Assets {
    method create_ (line 23) | fn create_(&mut self, ctx: &ServiceContext, payload: CreateAssetPayload)
    method balance_ (line 26) | fn balance_(
    method transfer_ (line 32) | fn transfer_(&mut self, ctx: &ServiceContext, payload: TransferPayload...
    method transfer_from_ (line 34) | fn transfer_from_(
    method allowance_ (line 40) | fn allowance_(
    method create_ (line 53) | fn create_(
    method balance_ (line 63) | fn balance_(
    method transfer_ (line 71) | fn transfer_(&mut self, ctx: &ServiceContext, payload: TransferPayload...
    method transfer_from_ (line 75) | fn transfer_from_(
    method allowance_ (line 83) | fn allowance_(
  type AssetService (line 47) | pub struct AssetService<SDK> {
  function new (line 94) | pub fn new(mut sdk: SDK) -> Self {
  function init_genesis (line 101) | fn init_genesis(&mut self, payload: InitGenesisPayload) {
  function get_asset (line 123) | fn get_asset(&self, ctx: ServiceContext, payload: GetAssetPayload) -> Se...
  function get_balance (line 133) | fn get_balance(
  function get_allowance (line 164) | fn get_allowance(
  function create_asset (line 203) | fn create_asset(
  function transfer (line 255) | pub fn transfer(
  function approve (line 296) | fn approve(&mut self, ctx: ServiceContext, payload: ApprovePayload) -> S...
  function transfer_from (line 349) | pub fn transfer_from(
  function _transfer (line 413) | fn _transfer(

FILE: built-in-services/asset/src/tests/mod.rs
  function test_create_asset (line 25) | fn test_create_asset() {
  function test_transfer (line 60) | fn test_transfer() {
  function test_approve (line 103) | fn test_approve() {
  function test_transfer_from (line 139) | fn test_transfer_from() {
  function new_asset_service (line 199) | fn new_asset_service(
  function mock_context (line 211) | fn mock_context(cycles_limit: u64, caller: Address) -> ServiceContext {
  type MockStorage (line 231) | struct MockStorage;
  method insert_block (line 235) | async fn insert_block(&self, _ctx: Context, _block: Block) -> ProtocolRe...
  method get_block (line 239) | async fn get_block(&self, _ctx: Context, _height: u64) -> ProtocolResult...
  method set_block (line 243) | async fn set_block(&self, _ctx: Context, _block: Block) -> ProtocolResul...
  method remove_block (line 247) | async fn remove_block(&self, _ctx: Context, _height: u64) -> ProtocolRes...
  method get_latest_block (line 251) | async fn get_latest_block(&self, _ctx: Context) -> ProtocolResult<Block> {
  method set_latest_block (line 255) | async fn set_latest_block(&self, _ctx: Context, _block: Block) -> Protoc...
  method get_latest_block_header (line 259) | async fn get_latest_block_header(&self, _ctx: Context) -> ProtocolResult...
  method get_block_header (line 263) | async fn get_block_header(
  method insert_transactions (line 274) | async fn insert_transactions(
  method insert_receipts (line 283) | async fn insert_receipts(&self, _ctx: Context, _: u64, _: Vec<Receipt>) ...
  method update_latest_proof (line 287) | async fn update_latest_proof(&self, _ctx: Context, _: Proof) -> Protocol...
  method get_transaction_by_hash (line 291) | async fn get_transaction_by_hash(
  method get_transactions (line 299) | async fn get_transactions(
  method get_receipt_by_hash (line 308) | async fn get_receipt_by_hash(&self, _ctx: Context, _: Hash) -> ProtocolR...
  method get_receipts (line 312) | async fn get_receipts(
  method get_latest_proof (line 321) | async fn get_latest_proof(&self, _ctx: Context) -> ProtocolResult<Proof> {

FILE: built-in-services/asset/src/types.rs
  type InitGenesisPayload (line 12) | pub struct InitGenesisPayload {
  type CreateAssetPayload (line 21) | pub struct CreateAssetPayload {
  type GetAssetPayload (line 28) | pub struct GetAssetPayload {
  type TransferPayload (line 33) | pub struct TransferPayload {
  type TransferEvent (line 40) | pub struct TransferEvent {
  type ApprovePayload (line 47) | pub type ApprovePayload = TransferPayload;
  type ApproveEvent (line 50) | pub struct ApproveEvent {
  type TransferFromPayload (line 58) | pub struct TransferFromPayload {
  type TransferFromEvent (line 66) | pub struct TransferFromEvent {
  type GetBalancePayload (line 75) | pub struct GetBalancePayload {
  type GetBalanceResponse (line 81) | pub struct GetBalanceResponse {
  type GetAllowancePayload (line 88) | pub struct GetAllowancePayload {
  type GetAllowanceResponse (line 95) | pub struct GetAllowanceResponse {
  type Asset (line 103) | pub struct Asset {
  type AssetBalance (line 111) | pub struct AssetBalance {
    method decode (line 123) | fn decode(rlp: &rlp::Rlp) -> Result<Self, rlp::DecoderError> {
    method rlp_append (line 136) | fn rlp_append(&self, s: &mut rlp::RlpStream) {
  type AllowanceCodec (line 117) | struct AllowanceCodec {
  method encode_fixed (line 156) | fn encode_fixed(&self) -> ProtocolResult<Bytes> {
  method decode_fixed (line 160) | fn decode_fixed(bytes: Bytes) -> ProtocolResult<Self> {

FILE: built-in-services/authorization/src/lib.rs
  constant AUTHORIZATION_SERVICE_NAME (line 8) | pub const AUTHORIZATION_SERVICE_NAME: &str = "authorization";
  type PtrSignedTransaction (line 11) | pub struct PtrSignedTransaction {
  type AuthorizationService (line 15) | pub struct AuthorizationService<SDK> {
  function new (line 22) | pub fn new(_sdk: SDK, multi_sig: MultiSignatureService<SDK>) -> Self {
  function check_authorization_by_ptr (line 28) | fn check_authorization_by_ptr(
  function check_authorization (line 43) | fn check_authorization(

FILE: built-in-services/metadata/src/lib.rs
  constant METADATA_SERVICE_NAME (line 8) | pub const METADATA_SERVICE_NAME: &str = "metadata";
  type MetaData (line 10) | pub trait MetaData {
    method get_ (line 11) | fn get_(&self, ctx: &ServiceContext) -> ServiceResponse<Metadata>;
    method get_ (line 19) | fn get_(&self, ctx: &ServiceContext) -> ServiceResponse<Metadata> {
  type MetadataService (line 14) | pub struct MetadataService<SDK> {
  function new (line 26) | pub fn new(sdk: SDK) -> Self {
  function init_genesis (line 31) | fn init_genesis(&mut self, metadata: Metadata) {
  function get_metadata (line 37) | fn get_metadata(&self, ctx: ServiceContext) -> ServiceResponse<Metadata> {

FILE: built-in-services/metadata/src/tests/mod.rs
  function test_get_metadata (line 21) | fn test_get_metadata() {
  function new_metadata_service_with_metadata (line 34) | fn new_metadata_service_with_metadata(
  function mock_metadata (line 50) | fn mock_metadata() -> Metadata {
  function mock_context (line 76) | fn mock_context(cycles_limit: u64, caller: Address) -> ServiceContext {
  type MockStorage (line 96) | struct MockStorage;
  method insert_block (line 100) | async fn insert_block(&self, _ctx: Context, _block: Block) -> ProtocolRe...
  method get_block (line 104) | async fn get_block(&self, _ctx: Context, _height: u64) -> ProtocolResult...
  method set_block (line 108) | async fn set_block(&self, _ctx: Context, _block: Block) -> ProtocolResul...
  method remove_block (line 112) | async fn remove_block(&self, _ctx: Context, _height: u64) -> ProtocolRes...
  method get_latest_block (line 116) | async fn get_latest_block(&self, _ctx: Context) -> ProtocolResult<Block> {
  method set_latest_block (line 120) | async fn set_latest_block(&self, _ctx: Context, _block: Block) -> Protoc...
  method get_latest_block_header (line 124) | async fn get_latest_block_header(&self, _ctx: Context) -> ProtocolResult...
  method get_block_header (line 128) | async fn get_block_header(
  method insert_transactions (line 139) | async fn insert_transactions(
  method insert_receipts (line 148) | async fn insert_receipts(&self, _ctx: Context, _: u64, _: Vec<Receipt>) ...
  method update_latest_proof (line 152) | async fn update_latest_proof(&self, _ctx: Context, _: Proof) -> Protocol...
  method get_transaction_by_hash (line 156) | async fn get_transaction_by_hash(
  method get_transactions (line 164) | async fn get_transactions(
  method get_receipt_by_hash (line 173) | async fn get_receipt_by_hash(&self, _ctx: Context, _: Hash) -> ProtocolR...
  method get_receipts (line 177) | async fn get_receipts(
  method get_latest_proof (line 186) | async fn get_latest_proof(&self, _ctx: Context) -> ProtocolResult<Proof> {

FILE: built-in-services/multi-signature/src/lib.rs
  constant MULTI_SIG_SERVICE_NAME (line 25) | pub const MULTI_SIG_SERVICE_NAME: &str = "multi_signature";
  constant MAX_MULTI_SIGNATURE_RECURSION_DEPTH (line 26) | const MAX_MULTI_SIGNATURE_RECURSION_DEPTH: u8 = 8;
  constant MAX_PERMISSION_ACCOUNTS (line 27) | const MAX_PERMISSION_ACCOUNTS: u8 = 16;
  type MultiSignature (line 29) | pub trait MultiSignature {
    method verify_signature_ (line 30) | fn verify_signature_(
    method generate_account_ (line 36) | fn generate_account_(
    method verify_signature_ (line 48) | fn verify_signature_(
    method generate_account_ (line 56) | fn generate_account_(
  type MultiSignatureService (line 43) | pub struct MultiSignatureService<SDK> {
  function new (line 67) | pub fn new(sdk: SDK) -> Self {
  function init_genesis (line 72) | fn init_genesis(&mut self, payload: InitGenesisPayload) {
  function generate_account (line 112) | fn generate_account(
  function get_account_from_address (line 187) | fn get_account_from_address(
  function verify_signature (line 203) | pub fn verify_signature(
  function update_account (line 228) | fn update_account(
  function change_owner (line 309) | fn change_owner(
  function change_memo (line 339) | fn change_memo(
  function add_account (line 364) | fn add_account(
  function remove_account (line 400) | fn remove_account(
  function set_account_weight (line 431) | fn set_account_weight(
  function set_threshold (line 462) | fn set_threshold(
  function _inner_verify_signature (line 496) | fn _inner_verify_signature(&self, payload: VerifySignaturePayload) -> Se...
  function _verify_multi_signature (line 523) | fn _verify_multi_signature(
  function _verify_single_signature (line 570) | fn _verify_single_signature(
  function _is_recursion_depth_overflow (line 583) | fn _is_recursion_depth_overflow(&self, address: &Address, recursion_dept...
  type ServiceError (line 606) | pub enum ServiceError {
    method code (line 648) | fn code(&self) -> u64 {
  function from (line 668) | fn from(err: ServiceError) -> ServiceResponse<T> {
  function decode_list (line 673) | fn decode_list<T: Decodable>(bytes: &[u8], ty: &str) -> Result<Vec<T>, S...

FILE: built-in-services/multi-signature/src/tests/curd_test.rs
  function test_generate_multi_signature (line 12) | fn test_generate_multi_signature() {
  function test_set_threshold (line 80) | fn test_set_threshold() {
  function test_adeption_address (line 121) | fn test_adeption_address() {
  function test_add_account (line 150) | fn test_add_account() {
  function test_update_account (line 204) | fn test_update_account() {
  function test_set_weight (line 258) | fn test_set_weight() {
  function test_remove_account (line 313) | fn test_remove_account() {

FILE: built-in-services/multi-signature/src/tests/mod.rs
  type MockStorage (line 28) | struct MockStorage;
  method insert_block (line 32) | async fn insert_block(&self, _ctx: Context, _block: Block) -> ProtocolRe...
  method get_block (line 36) | async fn get_block(&self, _ctx: Context, _height: u64) -> ProtocolResult...
  method set_block (line 40) | async fn set_block(&self, _ctx: Context, _block: Block) -> ProtocolResul...
  method get_block_header (line 44) | async fn get_block_header(
  method remove_block (line 52) | async fn remove_block(&self, _ctx: Context, _height: u64) -> ProtocolRes...
  method get_latest_block (line 56) | async fn get_latest_block(&self, _ctx: Context) -> ProtocolResult<Block> {
  method set_latest_block (line 60) | async fn set_latest_block(&self, _ctx: Context, _block: Block) -> Protoc...
  method get_latest_block_header (line 64) | async fn get_latest_block_header(&self, _ctx: Context) -> ProtocolResult...
  method insert_transactions (line 71) | async fn insert_transactions(
  method insert_receipts (line 80) | async fn insert_receipts(&self, _ctx: Context, _: u64, _: Vec<Receipt>) ...
  method update_latest_proof (line 84) | async fn update_latest_proof(&self, _ctx: Context, _: Proof) -> Protocol...
  method get_transaction_by_hash (line 88) | async fn get_transaction_by_hash(
  method get_transactions (line 96) | async fn get_transactions(
  method get_receipt_by_hash (line 105) | async fn get_receipt_by_hash(&self, _ctx: Context, _: Hash) -> ProtocolR...
  method get_receipts (line 109) | async fn get_receipts(
  method get_latest_proof (line 118) | async fn get_latest_proof(&self, _ctx: Context) -> ProtocolResult<Proof> {
  function new_multi_signature_service (line 123) | fn new_multi_signature_service() -> MultiSignatureService<
  function mock_context (line 135) | fn mock_context(cycles_limit: u64, caller: Address) -> ServiceContext {
  function mock_hash (line 155) | fn mock_hash() -> Hash {
  function get_random_bytes (line 159) | fn get_random_bytes(len: usize) -> Bytes {
  function gen_one_keypair (line 164) | fn gen_one_keypair() -> (Bytes, Bytes) {
  function gen_keypairs (line 170) | fn gen_keypairs(num: usize) -> Vec<(Bytes, Bytes)> {
  function to_multi_sig_account (line 174) | fn to_multi_sig_account(pk: Bytes) -> AddressWithWeight {
  function sign (line 181) | fn sign(privkey: &Bytes, hash: &Hash) -> Bytes {
  function _gen_single_witness (line 188) | fn _gen_single_witness(privkey: &Bytes, hash: &Hash) -> VerifySignatureP...
  function to_accounts_list (line 203) | fn to_accounts_list(input: Vec<AddressWithWeight>) -> Vec<Account> {

FILE: built-in-services/multi-signature/src/tests/recursion_test.rs
  function test_recursion_verify_signature (line 8) | fn test_recursion_verify_signature() {
  function test_recursion_depth (line 83) | fn test_recursion_depth() {

FILE: built-in-services/multi-signature/src/types.rs
  type SetWeightResult (line 11) | pub enum SetWeightResult {
  type RemoveAccountResult (line 18) | pub enum RemoveAccountResult {
  type InitGenesisPayload (line 25) | pub struct InitGenesisPayload {
  type GenerateMultiSigAccountPayload (line 34) | pub struct GenerateMultiSigAccountPayload {
  type GenerateMultiSigAccountResponse (line 43) | pub struct GenerateMultiSigAccountResponse {
  type VerifySignaturePayload (line 48) | pub struct VerifySignaturePayload {
  type GetMultiSigAccountPayload (line 56) | pub struct GetMultiSigAccountPayload {
  type GetMultiSigAccountResponse (line 61) | pub struct GetMultiSigAccountResponse {
  type ChangeOwnerPayload (line 66) | pub struct ChangeOwnerPayload {
  type ChangeMemoPayload (line 72) | pub struct ChangeMemoPayload {
  type AddAccountPayload (line 78) | pub struct AddAccountPayload {
  type RemoveAccountPayload (line 84) | pub struct RemoveAccountPayload {
  type SetAccountWeightPayload (line 90) | pub struct SetAccountWeightPayload {
  type SetThresholdPayload (line 97) | pub struct SetThresholdPayload {
  type UpdateAccountPayload (line 103) | pub struct UpdateAccountPayload {
  type MultiSigPermission (line 112) | pub struct MultiSigPermission {
    method get_account (line 120) | pub fn get_account(&self, addr: &Address) -> Option<Account> {
    method set_owner (line 129) | pub fn set_owner(&mut self, new_owner: Address) {
    method set_memo (line 133) | pub fn set_memo(&mut self, new_memo: String) {
    method add_account (line 137) | pub fn add_account(&mut self, new_account: Account) {
    method remove_account (line 141) | pub fn remove_account(&mut self, address: &Address) -> RemoveAccountRe...
    method set_threshold (line 168) | pub fn set_threshold(&mut self, new_threshold: u32) {
    method set_account_weight (line 172) | pub fn set_account_weight(
  type Account (line 198) | pub struct Account {
  type AddressWithWeight (line 205) | pub struct AddressWithWeight {
    method into_signle_account (line 237) | pub fn into_signle_account(self) -> Account {
  type Witness (line 211) | pub struct Witness {
    method new (line 217) | pub fn new(pubkeys: Vec<Bytes>, signatures: Vec<Bytes>) -> Self {
    method into_addr_map (line 224) | pub fn into_addr_map(self) -> HashMap<Address, (Bytes, Bytes)> {

FILE: built-in-services/util/src/lib.rs
  constant UTIL_SERVICE_NAME (line 15) | pub const UTIL_SERVICE_NAME: &str = "util";
  type UtilService (line 17) | pub struct UtilService<SDK> {
  function new (line 23) | pub fn new(_sdk: SDK) -> Self {
  function keccak256 (line 29) | fn keccak256(
  function verify (line 49) | fn verify(

FILE: built-in-services/util/src/tests/mod.rs
  function test_hash (line 26) | fn test_hash() {
  function test_verify (line 46) | fn test_verify() {
  function new_util_service (line 85) | fn new_util_service(
  function mock_context (line 97) | fn mock_context(cycles_limit: u64, caller: Address) -> ServiceContext {
  type MockStorage (line 117) | struct MockStorage;
  method insert_block (line 121) | async fn insert_block(&self, _ctx: Context, _block: Block) -> ProtocolRe...
  method get_block (line 125) | async fn get_block(&self, _ctx: Context, _height: u64) -> ProtocolResult...
  method get_block_header (line 129) | async fn get_block_header(
  method set_block (line 137) | async fn set_block(&self, _ctx: Context, _block: Block) -> ProtocolResul...
  method remove_block (line 141) | async fn remove_block(&self, _ctx: Context, _height: u64) -> ProtocolRes...
  method get_latest_block (line 145) | async fn get_latest_block(&self, _ctx: Context) -> ProtocolResult<Block> {
  method set_latest_block (line 149) | async fn set_latest_block(&self, _ctx: Context, _block: Block) -> Protoc...
  method get_latest_block_header (line 153) | async fn get_latest_block_header(&self, _ctx: Context) -> ProtocolResult...
  method insert_transactions (line 160) | async fn insert_transactions(
  method get_transactions (line 169) | async fn get_transactions(
  method get_transaction_by_hash (line 178) | async fn get_transaction_by_hash(
  method insert_receipts (line 186) | async fn insert_receipts(
  method get_receipt_by_hash (line 195) | async fn get_receipt_by_hash(&self, _: Context, _: Hash) -> ProtocolResu...
  method get_receipts (line 199) | async fn get_receipts(
  method update_latest_proof (line 208) | async fn update_latest_proof(&self, _: Context, _: Proof) -> ProtocolRes...
  method get_latest_proof (line 212) | async fn get_latest_proof(&self, _: Context) -> ProtocolResult<Proof> {

FILE: built-in-services/util/src/types.rs
  type KeccakPayload (line 5) | pub struct KeccakPayload {
  type KeccakResponse (line 10) | pub struct KeccakResponse {
  type SigVerifyPayload (line 15) | pub struct SigVerifyPayload {
  type SigVerifyResponse (line 22) | pub struct SigVerifyResponse {

FILE: byzantine/src/behaviors.rs
  type Behavior (line 13) | pub struct Behavior {
  type Request (line 23) | pub enum Request {
    method to_end (line 34) | pub fn to_end(&self) -> &str {
  type MessageType (line 49) | pub enum MessageType {
  type NewTx (line 65) | pub enum NewTx {
  type PullTxs (line 81) | pub enum PullTxs {
  type NewProposal (line 90) | pub enum NewProposal {
  type NewVote (line 119) | pub enum NewVote {
  type NewQC (line 129) | pub enum NewQC {
  type NewChoke (line 139) | pub enum NewChoke {
  type SyncPullBlock (line 149) | pub enum SyncPullBlock {

FILE: byzantine/src/commander.rs
  type Commander (line 18) | pub struct Commander {
    method new (line 26) | pub fn new(
    method run (line 40) | pub async fn run(mut self) {
  function add_primitive_generator (line 68) | fn add_primitive_generator(list: &mut Vec<BehaviorGenerator>) {

FILE: byzantine/src/config.rs
  type ConfigGraphQL (line 13) | pub struct ConfigGraphQL {
  type ConfigGraphQLTLS (line 27) | pub struct ConfigGraphQLTLS {
  type ConfigNetwork (line 33) | pub struct ConfigNetwork {
  type ConfigNetworkBootstrap (line 56) | pub struct ConfigNetworkBootstrap {
  type ConfigConsensus (line 62) | pub struct ConfigConsensus {
  method default (line 67) | fn default() -> Self {
  function default_broadcast_txs_size (line 74) | fn default_broadcast_txs_size() -> usize {
  function default_broadcast_txs_interval (line 78) | fn default_broadcast_txs_interval() -> u64 {
  type ConfigMempool (line 83) | pub struct ConfigMempool {
  type ConfigExecutor (line 93) | pub struct ConfigExecutor {
  type ConfigRocksDB (line 99) | pub struct ConfigRocksDB {
  method default (line 104) | fn default() -> Self {
  type ConfigLogger (line 110) | pub struct ConfigLogger {
  method default (line 122) | fn default() -> Self {
  type ConfigAPM (line 136) | pub struct ConfigAPM {
  type Config (line 143) | pub struct Config {
    method data_path_for_state (line 163) | pub fn data_path_for_state(&self) -> PathBuf {
    method data_path_for_block (line 170) | pub fn data_path_for_block(&self) -> PathBuf {
    method data_path_for_txs_wal (line 177) | pub fn data_path_for_txs_wal(&self) -> PathBuf {
  type Generators (line 185) | pub struct Generators {

FILE: byzantine/src/default_start.rs
  function start (line 34) | pub async fn start(config: Config, genesis: Genesis, generators: Generat...

FILE: byzantine/src/invalid_types.rs
  type InvalidStruct (line 29) | pub struct InvalidStruct {
    method gen (line 34) | pub fn gen(len: usize) -> Self {
  method encode (line 42) | fn encode(&mut self) -> ProtocolResult<Bytes> {
  method decode (line 46) | fn decode(bytes: Bytes) -> ProtocolResult<Self> {
  method encode (line 52) | fn encode(&self) -> Result<Bytes, Box<dyn Error + Send>> {
  method decode (line 57) | fn decode(data: Bytes) -> Result<Self, Box<dyn Error + Send>> {
  function gen_invalid_struct_new_choke (line 65) | pub fn gen_invalid_struct_new_choke(
  function gen_invalid_height_new_choke (line 73) | pub fn gen_invalid_height_new_choke(
  function gen_invalid_round_new_choke (line 84) | pub fn gen_invalid_round_new_choke(
  function gen_invalid_from_new_vote (line 95) | pub fn gen_invalid_from_new_vote(
  function gen_invalid_sig_new_choke (line 106) | pub fn gen_invalid_sig_new_choke(
  function gen_invalid_address_new_choke (line 117) | pub fn gen_invalid_address_new_choke(
  function gen_invalid_struct_new_qc (line 131) | pub fn gen_invalid_struct_new_qc(_state: &State, _my_pub_key: &Bytes) ->...
  function gen_invalid_height_new_qc (line 135) | pub fn gen_invalid_height_new_qc(state: &State, my_pub_key: &Bytes) -> V...
  function gen_invalid_round_new_qc (line 141) | pub fn gen_invalid_round_new_qc(state: &State, my_pub_key: &Bytes) -> Ve...
  function gen_invalid_block_hash_new_qc (line 147) | pub fn gen_invalid_block_hash_new_qc(state: &State, my_pub_key: &Bytes) ...
  function gen_invalid_sig_new_qc (line 153) | pub fn gen_invalid_sig_new_qc(state: &State, my_pub_key: &Bytes) -> Vec<...
  function gen_invalid_leader_new_qc (line 159) | pub fn gen_invalid_leader_new_qc(state: &State, my_pub_key: &Bytes) -> V...
  function gen_invalid_struct_new_vote (line 168) | pub fn gen_invalid_struct_new_vote(
  function gen_invalid_height_new_vote (line 176) | pub fn gen_invalid_height_new_vote(
  function gen_invalid_round_new_vote (line 187) | pub fn gen_invalid_round_new_vote(
  function gen_invalid_block_hash_new_vote (line 198) | pub fn gen_invalid_block_hash_new_vote(
  function gen_invalid_sig_new_vote (line 209) | pub fn gen_invalid_sig_new_vote(
  function gen_invalid_voter_new_vote (line 220) | pub fn gen_invalid_voter_new_vote(
  function gen_valid_new_proposal (line 234) | pub fn gen_valid_new_proposal(
  function gen_invalid_prop_proposer_new_proposal (line 258) | pub fn gen_invalid_prop_proposer_new_proposal(
  function gen_invalid_lock_new_proposal (line 274) | pub fn gen_invalid_lock_new_proposal(
  function gen_invalid_block_hash_new_proposal (line 290) | pub fn gen_invalid_block_hash_new_proposal(
  function gen_invalid_content_struct_new_proposal (line 306) | pub fn gen_invalid_content_struct_new_proposal(
  function gen_invalid_round_new_proposal (line 326) | pub fn gen_invalid_round_new_proposal(
  function gen_invalid_prop_height_new_proposal (line 342) | pub fn gen_invalid_prop_height_new_proposal(
  function gen_invalid_sig_new_proposal (line 358) | pub fn gen_invalid_sig_new_proposal(
  function gen_invalid_tx_hash_new_proposal (line 376) | pub fn gen_invalid_tx_hash_new_proposal(
  function gen_invalid_validators_new_proposal (line 404) | pub fn gen_invalid_validators_new_proposal(
  function gen_invalid_version_new_proposal (line 417) | pub fn gen_invalid_version_new_proposal(
  function gen_invalid_proof_new_proposal (line 430) | pub fn gen_invalid_proof_new_proposal(
  function gen_invalid_block_proposer_new_proposal (line 443) | pub fn gen_invalid_block_proposer_new_proposal(
  function gen_invalid_cycle_used_new_proposal (line 456) | pub fn gen_invalid_cycle_used_new_proposal(
  function gen_invalid_receipt_root_new_proposal (line 469) | pub fn gen_invalid_receipt_root_new_proposal(
  function gen_invalid_state_root_new_proposal (line 482) | pub fn gen_invalid_state_root_new_proposal(
  function gen_invalid_confirm_root_new_proposal (line 495) | pub fn gen_invalid_confirm_root_new_proposal(
  function gen_invalid_signed_tx_hash_new_proposal (line 508) | pub fn gen_invalid_signed_tx_hash_new_proposal(
  function gen_invalid_order_root_new_proposal (line 521) | pub fn gen_invalid_order_root_new_proposal(
  function gen_invalid_timestamp_new_proposal (line 534) | pub fn gen_invalid_timestamp_new_proposal(
  function gen_invalid_exec_height_new_proposal (line 547) | pub fn gen_invalid_exec_height_new_proposal(
  function gen_invalid_height_new_proposal (line 560) | pub fn gen_invalid_height_new_proposal(
  function gen_invalid_prev_hash_new_proposal (line 573) | pub fn gen_invalid_prev_hash_new_proposal(
  function gen_invalid_chain_id_new_proposal (line 586) | pub fn gen_invalid_chain_id_new_proposal(
  function gen_invalid_struct_new_proposal (line 599) | pub fn gen_invalid_struct_new_proposal(
  function gen_invalid_height_pull_txs (line 613) | pub fn gen_invalid_height_pull_txs(height: u64) -> MsgPullTxs {
  function gen_invalid_hash_pull_txs (line 622) | pub fn gen_invalid_hash_pull_txs(_height: u64) -> MsgPullTxs {
  function gen_not_exists_txs_pull_txs (line 631) | pub fn gen_not_exists_txs_pull_txs(_height: u64) -> MsgPullTxs {
  function gen_invalid_hash_signed_tx (line 643) | pub fn gen_invalid_hash_signed_tx(
  function gen_invalid_sig_signed_tx (line 652) | pub fn gen_invalid_sig_signed_tx(
  function gen_invalid_chain_id_signed_tx (line 661) | pub fn gen_invalid_chain_id_signed_tx(
  function gen_invalid_cycles_price_signed_tx (line 671) | pub fn gen_invalid_cycles_price_signed_tx(
  function gen_invalid_cycles_limit_signed_tx (line 681) | pub fn gen_invalid_cycles_limit_signed_tx(
  function gen_invalid_nonce_of_rand_len_signed_tx (line 691) | pub fn gen_invalid_nonce_of_rand_len_signed_tx(
  function gen_invalid_nonce_dup_signed_tx (line 701) | pub fn gen_invalid_nonce_dup_signed_tx(
  function gen_invalid_request_signed_tx (line 712) | pub fn gen_invalid_request_signed_tx(
  function gen_invalid_timeout_signed_tx (line 722) | pub fn gen_invalid_timeout_signed_tx(
  function gen_invalid_sender_signed_tx (line 732) | pub fn gen_invalid_sender_signed_tx(
  function gen_valid_tx (line 742) | pub fn gen_valid_tx(

FILE: byzantine/src/message.rs
  type NewTxsHandler (line 12) | pub struct NewTxsHandler {
  type Message (line 18) | type Message = MsgNewTxs;
  method process (line 20) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type PullTxsHandler (line 30) | pub struct PullTxsHandler {
  type Message (line 36) | type Message = MsgPullTxs;
  method process (line 38) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type ProposalMessageHandler (line 48) | pub struct ProposalMessageHandler {
  type Message (line 54) | type Message = Proposal;
  method process (line 57) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type VoteMessageHandler (line 67) | pub struct VoteMessageHandler {
  type Message (line 73) | type Message = Vote;
  method process (line 76) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type QCMessageHandler (line 86) | pub struct QCMessageHandler {
  type Message (line 92) | type Message = QC;
  method process (line 95) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type ChokeMessageHandler (line 105) | pub struct ChokeMessageHandler {
  type Message (line 111) | type Message = Choke;
  method process (line 114) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type RemoteHeightMessageHandler (line 124) | pub struct RemoteHeightMessageHandler {
  type Message (line 130) | type Message = u64;
  method process (line 133) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...

FILE: byzantine/src/strategy.rs
  type Strategy (line 11) | pub trait Strategy {
    method get_behaviors (line 12) | fn get_behaviors(&self, request: Option<Request>) -> Vec<Behavior>;
    method get_behaviors (line 49) | fn get_behaviors(&self, request: Option<Request>) -> Vec<Behavior> {
  type BehaviorGenerator (line 16) | pub struct BehaviorGenerator {
    method gen_behavior (line 25) | fn gen_behavior(
  type DefaultStrategy (line 43) | pub struct DefaultStrategy {
  function gen_rand_pub_key_list (line 67) | pub fn gen_rand_pub_key_list(pub_key_list: &mut Vec<Bytes>) -> Vec<Bytes> {

FILE: byzantine/src/utils.rs
  constant VALIDATOR_VERSION (line 32) | const VALIDATOR_VERSION: u64 = 0;
  constant HASH_LEN (line 33) | const HASH_LEN: u64 = 32;
  constant ADDRESS_LEN (line 34) | const ADDRESS_LEN: u64 = 20;
  constant SIGNATURE_LEN (line 35) | const SIGNATURE_LEN: u64 = 192;
  constant BITMAP_LEN (line 36) | const BITMAP_LEN: u64 = 1;
  function time_now (line 38) | pub fn time_now() -> u64 {
  function gen_random_bytes (line 45) | pub fn gen_random_bytes(len: usize) -> Bytes {
  function gen_random_string (line 50) | pub fn gen_random_string(len: usize) -> String {
  function gen_range (line 57) | pub fn gen_range<T: SampleUniform, B1, B2>(low: B1, high: B2) -> T
  function gen_bool (line 66) | pub fn gen_bool(p: f64) -> bool {
  function gen_valid_raw_tx (line 75) | pub fn gen_valid_raw_tx(
  function gen_invalid_request (line 91) | pub fn gen_invalid_request() -> TransactionRequest {
  function gen_transfer_tx_request (line 99) | pub fn gen_transfer_tx_request() -> TransactionRequest {
  function gen_address_bytes (line 107) | pub fn gen_address_bytes(pri_key: &Secp256k1PrivateKey) -> Address {
  function gen_valid_hash (line 112) | pub fn gen_valid_hash() -> Hash {
  function gen_invalid_hash (line 116) | pub fn gen_invalid_hash() -> Hash {
  function gen_invalid_address (line 121) | pub fn gen_invalid_address() -> Address {
  function gen_valid_signed_tx (line 126) | pub fn gen_valid_signed_tx(
  function gen_signed_tx (line 133) | pub fn gen_signed_tx(
  function gen_valid_block_header (line 155) | pub fn gen_valid_block_header(
  function gen_valid_block (line 182) | pub fn gen_valid_block(header: BlockHeader, ordered_tx_hashes: Vec<Hash>...
  function gen_invalid_content_struct_proposal (line 189) | pub fn gen_invalid_content_struct_proposal(
  function gen_valid_proposal (line 205) | pub fn gen_valid_proposal(
  function gen_valid_signed_proposal (line 235) | pub fn gen_valid_signed_proposal(
  function gen_signed_proposal_from_header (line 249) | pub fn gen_signed_proposal_from_header(
  function gen_invalid_chain_id (line 261) | pub fn gen_invalid_chain_id() -> Hash {
  function gen_positive_range (line 265) | pub fn gen_positive_range(base: u64, range: u64) -> u64 {
  function gen_invalid_sig (line 275) | pub fn gen_invalid_sig() -> Bytes {
  function gen_invalid_proof (line 279) | pub fn gen_invalid_proof() -> Proof {
  function gen_invalid_bitmap (line 289) | pub fn gen_invalid_bitmap() -> Bytes {
  function gen_invalid_validators (line 293) | pub fn gen_invalid_validators() -> Vec<Validator> {
  function gen_invalid_lock (line 303) | pub fn gen_invalid_lock() -> PoLC {
  function gen_invalid_qc (line 310) | pub fn gen_invalid_qc() -> AggregatedVote {
  function gen_invalid_aggregate_sig (line 321) | pub fn gen_invalid_aggregate_sig() -> AggregatedSignature {
  function gen_valid_qc (line 328) | pub fn gen_valid_qc(state: &State, my_pub_key: &Bytes) -> AggregatedVote {
  function gen_valid_aggregate_sig (line 339) | pub fn gen_valid_aggregate_sig() -> AggregatedSignature {
  function gen_valid_signed_vote (line 346) | pub fn gen_valid_signed_vote(
  function gen_valid_vote (line 362) | pub fn gen_valid_vote(state: &State) -> Vote {
  function gen_valid_choke (line 371) | pub fn gen_valid_choke(state: &State, my_pub_key: &Bytes) -> Choke {
  function gen_invalid_from (line 379) | pub fn gen_invalid_from() -> UpdateFrom {
  function gen_valid_signed_choke (line 388) | pub fn gen_valid_signed_choke(
  type HashChoke (line 404) | struct HashChoke {
  method rlp_append (line 410) | fn rlp_append(&self, s: &mut RlpStream) {
  function choke_to_hash (line 415) | fn choke_to_hash(choke: &Choke) -> HashChoke {
  function gen_invalid_aggregated_choke (line 422) | pub fn gen_invalid_aggregated_choke() -> AggregatedChoke {
  function gen_vote_type (line 431) | fn gen_vote_type() -> VoteType {

FILE: byzantine/src/worker.rs
  type State (line 212) | pub struct State {
  method default (line 227) | fn default() -> Self {
  type Worker (line 250) | pub struct Worker<N: Rpc + PeerTrust + Gossip + 'static> {
  function new (line 266) | pub fn new(
  function run (line 287) | pub async fn run(mut self) {
  function process (line 302) | pub async fn process(&mut self, ctx: Context, behavior: &Behavior) {
  function send_invalid_new_height (line 517) | pub async fn send_invalid_new_height(&mut self, ctx: Context, behavior: ...
  function send_invalid_struct_of_pull_txs (line 531) | pub async fn send_invalid_struct_of_pull_txs(&mut self, ctx: Context, be...
  function send_invalid_struct_of_new_tx (line 549) | pub async fn send_invalid_struct_of_new_tx(&self, ctx: Context, behavior...
  function send_invalid_struct_of_push_txs (line 562) | pub async fn send_invalid_struct_of_push_txs(&self, ctx: Context, behavi...
  function send_invalid_nonce_dup_of_new_tx (line 582) | pub async fn send_invalid_nonce_dup_of_new_tx(&self, ctx: Context, behav...
  function set_state (line 599) | async fn set_state(&mut self, req_opt: Option<&Request>) {
  function check_liveness (line 683) | fn check_liveness(&self) {
  function send_prevote (line 695) | async fn send_prevote(&self, proposal: &Proposal<FixedPill>) {
  function send_choke (line 719) | async fn send_choke(&self, choke: Choke, sender: Bytes) {
  function send (line 736) | async fn send<M, N>(network: &Arc<N>, message: M, ctx: Context, end: &st...

FILE: byzantine/tests/byz.test.ts
  function sleep (line 44) | function sleep(ms: number) {
  function get_client (line 48) | function get_client(file_path: string, chain_id: string) {

FILE: common/apm/src/metrics.rs
  type Error (line 23) | enum Error {
    method from (line 29) | fn from(err: prometheus::Error) -> Error {
  method from (line 35) | fn from(err: Error) -> ProtocolError {
  function duration_to_sec (line 42) | pub fn duration_to_sec(d: Duration) -> f64 {
  function all_metrics (line 46) | pub fn all_metrics() -> ProtocolResult<Vec<u8>> {
  function test_duration_to_sec (line 64) | fn test_duration_to_sec() {

FILE: common/apm/src/metrics/network.rs
  function on_network_message (line 147) | fn on_network_message(direction: &str, target: &str, url: &str, inc: i64) {
  function on_network_message_sent_all_target (line 162) | pub fn on_network_message_sent_all_target(url: &str) {
  function on_network_message_sent_multi_target (line 166) | pub fn on_network_message_sent_multi_target(url: &str, target_count: i64) {
  function on_network_message_sent (line 170) | pub fn on_network_message_sent(url: &str) {
  function on_network_message_received (line 174) | pub fn on_network_message_received(url: &str) {

FILE: common/apm/src/metrics/storage.rs
  function on_storage_get_state (line 77) | pub fn on_storage_get_state(duration: Duration, keys: i64) {
  function on_storage_put_state (line 84) | pub fn on_storage_put_state(duration: Duration, size: i64) {
  function on_storage_get_cf (line 91) | pub fn on_storage_get_cf(sc: StorageCategory, duration: Duration, keys: ...
  function on_storage_put_cf (line 122) | pub fn on_storage_put_cf(sc: StorageCategory, duration: Duration, size: ...

FILE: common/channel/src/lib.rs
  function it_works (line 4) | fn it_works() {

FILE: common/config-parser/src/lib.rs
  function parse_reader (line 12) | pub fn parse_reader<R: io::Read, T: de::DeserializeOwned>(r: &mut R) -> ...
  function parse_file (line 21) | pub fn parse_file<T: de::DeserializeOwned>(name: impl AsRef<Path>) -> Re...
  function parse_http (line 30) | pub fn parse_http<T: de::DeserializeOwned>(name: &str) -> Result<T, Pars...
  function parse (line 37) | pub fn parse<T: de::DeserializeOwned>(name: &str) -> Result<T, ParseErro...
  type ParseError (line 46) | pub enum ParseError {
    method fmt (line 55) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method from (line 65) | fn from(error: io::Error) -> ParseError {
    method from (line 71) | fn from(error: toml::de::Error) -> ParseError {
    method from (line 77) | fn from(error: reqwest::Error) -> ParseError {
  type Config (line 89) | struct Config {
  function test_parse_reader (line 95) | fn test_parse_reader() {
  function test_parse_file (line 108) | fn test_parse_file() {
  function test_parse_http (line 116) | fn test_parse_http() {
  function test_parse (line 124) | fn test_parse() {

FILE: common/config-parser/src/types.rs
  type ConfigGraphQL (line 12) | pub struct ConfigGraphQL {
  type ConfigGraphQLTLS (line 27) | pub struct ConfigGraphQLTLS {
  type ConfigNetwork (line 33) | pub struct ConfigNetwork {
  type ConfigNetworkBootstrap (line 56) | pub struct ConfigNetworkBootstrap {
  function default_overlord_gap (line 61) | fn default_overlord_gap() -> usize {
  function default_sync_txs_chunk_size (line 65) | fn default_sync_txs_chunk_size() -> usize {
  type ConfigConsensus (line 70) | pub struct ConfigConsensus {
  function default_broadcast_txs_size (line 77) | fn default_broadcast_txs_size() -> usize {
  function default_broadcast_txs_interval (line 81) | fn default_broadcast_txs_interval() -> u64 {
  type ConfigMempool (line 86) | pub struct ConfigMempool {
  type ConfigExecutor (line 96) | pub struct ConfigExecutor {
  type ConfigRocksDB (line 102) | pub struct ConfigRocksDB {
  method default (line 107) | fn default() -> Self {
  type ConfigLogger (line 113) | pub struct ConfigLogger {
  method default (line 126) | fn default() -> Self {
  type ConfigAPM (line 141) | pub struct ConfigAPM {
  type Config (line 148) | pub struct Config {
    method data_path_for_state (line 167) | pub fn data_path_for_state(&self) -> PathBuf {
    method data_path_for_block (line 174) | pub fn data_path_for_block(&self) -> PathBuf {
    method data_path_for_txs_wal (line 181) | pub fn data_path_for_txs_wal(&self) -> PathBuf {
    method data_path_for_consensus_wal (line 187) | pub fn data_path_for_consensus_wal(&self) -> PathBuf {

FILE: common/crypto/src/lib.rs
  function gen_common_ref (line 42) | fn gen_common_ref() -> String {
  function mock_block_hash (line 49) | fn mock_block_hash() -> Hash {
  function mock_vote (line 54) | fn mock_vote() -> Vote {
  function gen_key_pair_sigs (line 63) | fn gen_key_pair_sigs(
  function bench_4_aggregated_sig (line 88) | fn bench_4_aggregated_sig(b: &mut Bencher) {
  function bench_8_aggregated_sig (line 120) | fn bench_8_aggregated_sig(b: &mut Bencher) {
  function bench_16_aggregated_sig (line 152) | fn bench_16_aggregated_sig(b: &mut Bencher) {
  function bench_32_aggregated_sig (line 184) | fn bench_32_aggregated_sig(b: &mut Bencher) {
  function bench_64_aggregated_sig (line 216) | fn bench_64_aggregated_sig(b: &mut Bencher) {
  function bench_4_aggregated_sig_verify (line 248) | fn bench_4_aggregated_sig_verify(b: &mut Bencher) {
  function bench_8_aggregated_sig_verify (line 289) | fn bench_8_aggregated_sig_verify(b: &mut Bencher) {
  function bench_16_aggregated_sig_verify (line 330) | fn bench_16_aggregated_sig_verify(b: &mut Bencher) {
  function bench_32_aggregated_sig_verify (line 371) | fn bench_32_aggregated_sig_verify(b: &mut Bencher) {
  function bench_64_aggregated_sig_verify (line 412) | fn bench_64_aggregated_sig_verify(b: &mut Bencher) {

FILE: common/logger/src/date_fixed_roller.rs
  type DateFixedWindowRollerConfig (line 11) | pub struct DateFixedWindowRollerConfig {
  type DateFixedWindowRollerBuilder (line 15) | pub struct DateFixedWindowRollerBuilder;
    method build (line 18) | pub fn build(
  type DateFixedWindowRoller (line 42) | pub struct DateFixedWindowRoller {
    method builder (line 47) | pub fn builder() -> DateFixedWindowRollerBuilder {
    method roll_file (line 51) | fn roll_file(
  method roll (line 80) | fn roll(&self, cur_log: &Path) -> Result<(), Box<dyn Error + Sync + Send...
  type DateFixedWindowRollerDeserializer (line 90) | pub struct DateFixedWindowRollerDeserializer;
  type Config (line 93) | type Config = DateFixedWindowRollerConfig;
  type Trait (line 94) | type Trait = dyn Roll;
  method deserialize (line 96) | fn deserialize(
  function test_rotation (line 119) | fn test_rotation() {

FILE: common/logger/src/lib.rs
  function init (line 40) | pub fn init<S: ::std::hash::BuildHasher>(
  function convert_level (line 141) | fn convert_level(level: &str) -> LevelFilter {
  function metrics (line 156) | pub fn metrics(name: &str, mut content: JsonValue) {
  function log (line 166) | pub fn log(level: Level, module: &str, event: &str, ctx: &Context, mut m...
  type TraceContext (line 179) | struct TraceContext {
  function trace_context (line 186) | fn trace_context(ctx: &Context) -> Option<TraceContext> {
  function test_json (line 206) | fn test_json() {

FILE: common/merkle/src/lib.rs
  type ProofNode (line 8) | pub struct ProofNode {
  type Merkle (line 13) | pub struct Merkle {
    method from_hashes (line 18) | pub fn from_hashes(hashes: Vec<Hash>) -> Self {
    method get_root_hash (line 23) | pub fn get_root_hash(&self) -> Option<Hash> {
    method get_proof_by_input_index (line 30) | pub fn get_proof_by_input_index(&self, input_index: usize) -> Option<V...
  function merge (line 46) | fn merge(left: &Hash, right: &Hash) -> Hash {
  function mock_hash (line 73) | fn mock_hash() -> Hash {
  function rand_hashes (line 79) | fn rand_hashes(size: usize) -> Vec<Hash> {
  function bench_merkle_1000_hashes (line 84) | fn bench_merkle_1000_hashes(b: &mut Bencher) {
  function bench_merkle_2000_hashes (line 93) | fn bench_merkle_2000_hashes(b: &mut Bencher) {
  function bench_merkle_4000_hashes (line 102) | fn bench_merkle_4000_hashes(b: &mut Bencher) {
  function bench_merkle_8000_hashes (line 111) | fn bench_merkle_8000_hashes(b: &mut Bencher) {
  function bench_merkle_16000_hashes (line 120) | fn bench_merkle_16000_hashes(b: &mut Bencher) {

FILE: common/pubsub/src/lib.rs
  function it_works (line 4) | fn it_works() {

FILE: core/api/src/adapter/mod.rs
  type APIError (line 17) | pub enum APIError {
  method from (line 32) | fn from(api_err: APIError) -> ProtocolError {
  type DefaultAPIAdapter (line 37) | pub struct DefaultAPIAdapter<EF, M, S, DB, Mapping> {
  function new (line 54) | pub fn new(
  method insert_signed_txs (line 79) | async fn insert_signed_txs(
  method get_block_by_height (line 87) | async fn get_block_by_height(
  method get_block_header_by_height (line 98) | async fn get_block_header_by_height(
  method get_receipt_by_tx_hash (line 109) | async fn get_receipt_by_tx_hash(
  method get_transaction_by_hash (line 134) | async fn get_transaction_by_hash(
  method query_service (line 142) | async fn query_service(

FILE: core/api/src/config.rs
  type GraphQLConfig (line 5) | pub struct GraphQLConfig {
  type GraphQLTLS (line 29) | pub struct GraphQLTLS {
  method default (line 35) | fn default() -> Self {

FILE: core/api/src/lib.rs
  type State (line 36) | struct State {
  type Query (line 45) | struct Query;
    method get_block (line 50) | async fn get_block(state_ctx: &State, height: Option<Uint64>) -> Field...
    method get_transaction (line 100) | async fn get_transaction(
    method get_receipt (line 120) | async fn get_receipt(state_ctx: &State, tx_hash: Hash) -> FieldResult<...
    method query_service (line 134) | async fn query_service(
  type Mutation (line 184) | struct Mutation;
    method send_transaction (line 189) | async fn send_transaction(
    method unsafe_send_transaction (line 227) | async fn unsafe_send_transaction(
  type Schema (line 259) | type Schema = juniper::RootNode<'static, Query, Mutation>;
  function graphiql (line 261) | async fn graphiql() -> HttpResponse {
  function graphql (line 267) | async fn graphql(
  function metrics (line 279) | async fn metrics() -> HttpResponse {
  type ProfileReport (line 300) | pub enum ProfileReport {
  type Err (line 308) | type Err = &'static str;
  method from_str (line 310) | fn from_str(report: &str) -> Result<Self, Self::Err> {
  type ProfileConfig (line 319) | pub struct ProfileConfig {
  method default (line 326) | fn default() -> Self {
  type Config (line 336) | type Config = ();
  type Error (line 337) | type Error = actix_web::Error;
  type Future (line 338) | type Future = future::Ready<Result<Self, Self::Error>>;
  method from_request (line 340) | fn from_request(req: &HttpRequest, _: &mut dev::Payload) -> Self::Future {
  function dump_profile (line 371) | pub async fn dump_profile(maybe_config: actix_web::Result<ProfileConfig>...
  function start_graphql (line 410) | pub async fn start_graphql<Adapter: APIAdapter + 'static>(cfg: GraphQLCo...

FILE: core/api/src/schema/block.rs
  type Block (line 13) | pub struct Block {
    method from (line 114) | fn from(block: protocol::types::Block) -> Self {
  type BlockHeader (line 24) | pub struct BlockHeader {
    method from (line 76) | fn from(block_header: protocol::types::BlockHeader) -> Self {
  type Proof (line 59) | pub struct Proof {
    method from (line 131) | fn from(proof: protocol::types::Proof) -> Self {
  type Validator (line 69) | pub struct Validator {
    method from (line 143) | fn from(validator: protocol::types::Validator) -> Self {

FILE: core/api/src/schema/mod.rs
  type ServiceResponse (line 20) | pub struct ServiceResponse {
    method from (line 27) | fn from(resp: protocol::traits::ServiceResponse<String>) -> Self {
  type Hash (line 38) | pub struct Hash(String);
    method as_hex (line 54) | pub fn as_hex(&self) -> String {
    method from (line 88) | fn from(hash: protocol::types::Hash) -> Self {
  type MerkleRoot (line 39) | pub type MerkleRoot = Hash;
  type Address (line 43) | pub struct Address(String);
    method to_str (line 60) | pub fn to_str(&self) -> &str {
    method from (line 94) | fn from(address: protocol::types::Address) -> Self {
  type Uint64 (line 47) | pub struct Uint64(String);
    method as_hex (line 66) | pub fn as_hex(&self) -> ProtocolResult<String> {
    method try_into_u64 (line 70) | pub fn try_into_u64(self) -> ProtocolResult<u64> {
    method from (line 100) | fn from(n: u64) -> Self {
  type Bytes (line 51) | pub struct Bytes(String);
    method as_hex (line 77) | pub fn as_hex(&self) -> ProtocolResult<String> {
    method to_vec (line 81) | pub fn to_vec(&self) -> ProtocolResult<Vec<u8>> {
    method from (line 106) | fn from(bytes: protocol::Bytes) -> Self {
  function clean_0x (line 111) | fn clean_0x(s: &str) -> ProtocolResult<String> {
  type SchemaError (line 120) | pub enum SchemaError {
  method from (line 134) | fn from(err: SchemaError) -> ProtocolError {

FILE: core/api/src/schema/receipt.rs
  type Receipt (line 4) | pub struct Receipt {
    method from (line 28) | fn from(receipt: protocol::types::Receipt) -> Self {
  type Event (line 14) | pub struct Event {
    method from (line 41) | fn from(event: protocol::types::Event) -> Self {
  type ReceiptResponse (line 21) | pub struct ReceiptResponse {
    method from (line 51) | fn from(response: protocol::types::ReceiptResponse) -> Self {

FILE: core/api/src/schema/transaction.rs
  type SignedTransaction (line 6) | pub struct SignedTransaction {
    method from (line 22) | fn from(stx: protocol::types::SignedTransaction) -> Self {
  type InputRawTransaction (line 49) | pub struct InputRawTransaction {
  type InputTransactionEncryption (line 76) | pub struct InputTransactionEncryption {
  function to_signed_transaction (line 85) | pub fn to_signed_transaction(
  function to_transaction (line 101) | pub fn to_transaction(raw: InputRawTransaction) -> ProtocolResult<protoc...

FILE: core/cli/src/error.rs
  type CliError (line 8) | pub enum CliError {
  method from (line 40) | fn from(err: CliError) -> ProtocolError {

FILE: core/cli/src/lib.rs
  constant PLEASE_CONFIRM (line 24) | const PLEASE_CONFIRM: &str =
  type CliConfig (line 27) | pub struct CliConfig {
  type Cli (line 35) | pub struct Cli<'a, Mapping>
  function run (line 49) | pub fn run(
  function new (line 60) | pub fn new(
  function register_log (line 95) | fn register_log(config: &Config) {
  function start (line 108) | pub fn start(self) -> ProtocolResult<()> {
  function generate_matches (line 155) | pub fn generate_matches(cli_config: CliConfig, cmds: Option<Vec<&str>>) ...
  function generate_maintenance_cli (line 263) | fn generate_maintenance_cli(self) -> MaintenanceCli<'a, Mapping, ImplSto...
  type MaintenanceCli (line 304) | pub struct MaintenanceCli<'a, Mapping, S>
  function new (line 322) | pub fn new(
  function start (line 340) | pub fn start(&self) -> ProtocolResult<()> {
  function latest_block (line 350) | pub fn latest_block(&self, sub_cmd: &ArgMatches) -> ProtocolResult<()> {
  function latest_block_set (line 384) | pub async fn latest_block_set(&self, height: u64) -> ProtocolResult<()> {
  function latest_block_get (line 413) | pub async fn latest_block_get(&self) -> ProtocolResult<Block> {
  function block (line 417) | pub fn block(&self, sub_cmd: &ArgMatches) -> ProtocolResult<()> {
  function block_get (line 457) | pub async fn block_get(&self, height: u64) -> ProtocolResult<Option<Bloc...
  function block_set (line 461) | pub async fn block_set(&self, block_json: &str) -> ProtocolResult<()> {
  function wal (line 480) | pub fn wal(&self, sub_cmd: &ArgMatches) -> ProtocolResult<()> {
  function wal_txs_clear (line 537) | pub fn wal_txs_clear(&self) -> ProtocolResult<()> {
  function wal_txs_list (line 543) | pub fn wal_txs_list(&self) -> ProtocolResult<Vec<u64>> {
  function wal_txs_get (line 549) | pub fn wal_txs_get(&self, height: u64) -> ProtocolResult<Vec<SignedTrans...
  function wal_consensus_clear (line 555) | pub fn wal_consensus_clear(&self) -> ProtocolResult<()> {
  function backup (line 561) | pub fn backup(&self, sub_cmd: &ArgMatches) -> ProtocolResult<()> {
  function backup_save (line 580) | pub fn backup_save<P: AsRef<Path>>(&self, to: P) -> ProtocolResult<()> {
  function backup_restore (line 598) | pub fn backup_restore<P: AsRef<Path>>(&self, from: P) -> ProtocolResult<...

FILE: core/cli/src/tests/mod.rs
  constant SAVE_DIR (line 14) | const SAVE_DIR: &str = "./free-space/save";
  constant DATA_DIR (line 15) | const DATA_DIR: &str = "./free-space/data";
  constant CONFIG_PATH (line 16) | const CONFIG_PATH: &str = "./src/tests/config.toml";
  constant GENESIS_PATH (line 17) | const GENESIS_PATH: &str = "./src/tests/genesis.toml";
  function test_lineally (line 20) | fn test_lineally() {
  function save_restore (line 45) | fn save_restore() {
  function block_get (line 85) | fn block_get() -> Block {
  function block_set (line 131) | fn block_set() {
  function latest_get (line 182) | fn latest_get(expect: u64) -> Block {
  function latest_set (line 226) | fn latest_set() {
  function prepare (line 274) | fn prepare() {
  function clean (line 371) | fn clean() {
  function run (line 378) | fn run(cmd: Vec<&str>) -> ProtocolResult<()> {

FILE: core/cli/src/tests/service_mapping.rs
  type DefaultServiceMapping (line 13) | pub struct DefaultServiceMapping;
  method get_service (line 16) | fn get_service<SDK: 'static + ServiceSDK, Factory: SDKFactory<SDK>>(
  method list_service_name (line 45) | fn list_service_name(&self) -> Vec<String> {
  type MappingError (line 57) | pub enum MappingError {
  method from (line 65) | fn from(err: MappingError) -> ProtocolError {

FILE: core/consensus/src/adapter.rs
  type OverlordConsensusAdapter (line 43) | pub struct OverlordConsensusAdapter<
  method get_txs_from_mempool (line 75) | async fn get_txs_from_mempool(
  method sync_txs (line 86) | async fn sync_txs(&self, ctx: Context, txs: Vec<Hash>) -> ProtocolResult...
  method get_full_txs (line 91) | async fn get_full_txs(
  method transmit (line 100) | async fn transmit(
  method execute (line 125) | async fn execute(
  method get_last_validators (line 160) | async fn get_last_validators(
  method get_current_height (line 175) | async fn get_current_height(&self, ctx: Context) -> ProtocolResult<u64> {
  method pull_block (line 181) | async fn pull_block(&self, ctx: Context, height: u64, end: &str) -> Prot...
  method verify_txs (line 191) | async fn verify_txs(&self, ctx: Context, height: u64, txs: &[Hash]) -> P...
  method update_status (line 217) | fn update_status(
  method sync_exec (line 249) | fn sync_exec(
  method get_block_from_remote (line 271) | async fn get_block_from_remote(&self, ctx: Context, height: u64) -> Prot...
  method get_txs_from_remote (line 305) | async fn get_txs_from_remote(
  method get_proof_from_remote (line 325) | async fn get_proof_from_remote(&self, ctx: Context, height: u64) -> Prot...
  method save_block (line 355) | async fn save_block(&self, ctx: Context, block: Block) -> ProtocolResult...
  method save_proof (line 360) | async fn save_proof(&self, ctx: Context, proof: Proof) -> ProtocolResult...
  method save_signed_txs (line 369) | async fn save_signed_txs(
  method save_receipts (line 384) | async fn save_receipts(
  method flush_mempool (line 398) | async fn flush_mempool(&self, ctx: Context, ordered_tx_hashes: &[Hash]) ...
  method get_block_by_height (line 404) | async fn get_block_by_height(&self, ctx: Context, height: u64) -> Protoc...
  method get_block_header_by_height (line 411) | async fn get_block_header_by_height(
  method get_current_height (line 424) | async fn get_current_height(&self, ctx: Context) -> ProtocolResult<u64> {
  method get_txs_from_storage (line 433) | async fn get_txs_from_storage(
  method broadcast_height (line 450) | async fn broadcast_height(&self, ctx: Context, height: u64) -> ProtocolR...
  method get_metadata (line 458) | fn get_metadata(
  method tag_consensus (line 491) | fn tag_consensus(&self, ctx: Context, pub_keys: Vec<Bytes>) -> ProtocolR...
  method report_bad (line 501) | fn report_bad(&self, ctx: Context, feedback: TrustFeedback) {
  method set_args (line 505) | fn set_args(&self, _context: Context, timeout_gap: u64, cycles_limit: u6...
  method verify_block_header (line 512) | async fn verify_block_header(&self, ctx: Context, block: &Block) -> Prot...
  method verify_proof (line 624) | async fn verify_proof(
  method verify_proof_signature (line 745) | fn verify_proof_signature(
  method verify_proof_weight (line 767) | fn verify_proof_weight(
  function new (line 823) | pub fn new(
  function take_exec_demon (line 857) | pub fn take_exec_demon(&mut self) -> ExecDemons<S, DB, EF, Mapping> {
  function set_overlord_handler (line 862) | pub fn set_overlord_handler(&self, handler: OverlordHandler<FixedPill>) {
  type ExecDemons (line 868) | pub struct ExecDemons<S, DB, EF, Mapping> {
  function new (line 885) | fn new(
  function run (line 902) | pub async fn run(mut self) {
  function process (line 914) | async fn process(&mut self) -> ProtocolResult<()> {
  function exec (line 926) | async fn exec(&self, ctx: Context, info: ExecuteInfo) -> ProtocolResult<...
  function save_receipts (line 978) | async fn save_receipts(
  function gen_executed_info (line 988) | fn gen_executed_info(

FILE: core/consensus/src/consensus.rs
  type OverlordConsensus (line 25) | pub struct OverlordConsensus<Adapter: ConsensusAdapter + 'static> {
  method set_proposal (line 37) | async fn set_proposal(&self, ctx: Context, proposal: Vec<u8>) -> Protoco...
  method set_vote (line 50) | async fn set_vote(&self, ctx: Context, vote: Vec<u8>) -> ProtocolResult<...
  method set_qc (line 76) | async fn set_qc(&self, ctx: Context, qc: Vec<u8>) -> ProtocolResult<()> {
  method set_choke (line 90) | async fn set_choke(&self, ctx: Context, choke: Vec<u8>) -> ProtocolResul...
  function new (line 105) | pub fn new(
  function get_overlord_handler (line 151) | pub fn get_overlord_handler(&self) -> OverlordHandler<FixedPill> {
  function run (line 155) | pub async fn run(
  function gen_overlord_status (line 171) | pub fn gen_overlord_status(
  type OverlordMsgExt (line 204) | trait OverlordMsgExt {
    method get_height (line 205) | fn get_height(&self) -> String;
    method get_round (line 206) | fn get_round(&self) -> String;
    method get_height (line 210) | fn get_height(&self) -> String {
    method get_round (line 221) | fn get_round(&self) -> String {
  function tracing_overlord_message (line 239) | pub fn tracing_overlord_message<T: overlord::Codec>(ctx: Context, msg: &...

FILE: core/consensus/src/engine.rs
  constant RETRY_COMMIT_INTERVAL (line 41) | const RETRY_COMMIT_INTERVAL: u64 = 1000;
  constant RETRY_CHECK_ROOT_LIMIT (line 42) | const RETRY_CHECK_ROOT_LIMIT: u8 = 15;
  constant RETRY_CHECK_ROOT_INTERVAL (line 43) | const RETRY_CHECK_ROOT_INTERVAL: u64 = 100;
  type ConsensusEngine (line 47) | pub struct ConsensusEngine<Adapter> {
  function get_block (line 68) | async fn get_block(
  function check_block (line 160) | async fn check_block(
  function commit (line 233) | async fn commit(
  function broadcast_to_other (line 370) | async fn broadcast_to_other(
  function transmit_to_relayer (line 405) | async fn transmit_to_relayer(
  function get_authority_list (line 445) | async fn get_authority_list(
  function report_error (line 478) | fn report_error(&self, ctx: Context, err: OverlordError) {
  function report_view_change (line 487) | fn report_view_change(&self, cx: Context, height: u64, round: u64, reaso...
  method save (line 508) | async fn save(&self, info: Bytes) -> Result<(), Box<dyn Error + Send>> {
  method load (line 515) | async fn load(&self) -> Result<Option<Bytes>, Box<dyn Error + Send>> {
  function new (line 522) | pub fn new(
  function exec (line 546) | pub async fn exec(
  function inner_check_block (line 574) | async fn inner_check_block(&self, ctx: Context, block: &Block) -> Protoc...
  function check_block_roots (line 654) | fn check_block_roots(&self, ctx: Context, block: &BlockHeader) -> Protoc...
  function check_order_transactions (line 711) | fn check_order_transactions(
  function update_status (line 746) | pub async fn update_status(
  function update_overlord_crypto (line 805) | fn update_overlord_crypto(&self, metadata: Metadata) -> ProtocolResult<(...
  function metric_commit (line 810) | fn metric_commit(&self, current_height: u64, txs_len: usize) {
  function get_current_status (line 823) | pub fn get_current_status(&self) -> crate::status::CurrentConsensusStatus {
  function generate_new_crypto_map (line 828) | pub fn generate_new_crypto_map(metadata: Metadata) -> ProtocolResult<Has...
  function covert_to_overlord_authority (line 842) | fn covert_to_overlord_authority(validators: &[Validator]) -> Vec<Node> {
  function sync_txs (line 855) | async fn sync_txs<CA: ConsensusAdapter>(
  function validate_timestamp (line 863) | fn validate_timestamp(
  function gauge_txs_len (line 879) | fn gauge_txs_len(pill: &Pill) {
  function test_validate_timestamp (line 890) | fn test_validate_timestamp() {

FILE: core/consensus/src/fixed_types.rs
  type ConsensusRpcRequest (line 13) | pub enum ConsensusRpcRequest {
  type ConsensusRpcResponse (line 19) | pub enum ConsensusRpcResponse {
  method encode (line 25) | fn encode(&mut self) -> ProtocolResult<Bytes> {
  method decode (line 46) | fn decode(mut bytes: Bytes) -> ProtocolResult<Self> {
  type FixedPill (line 67) | pub struct FixedPill {
    method get_ordered_hashes (line 84) | pub fn get_ordered_hashes(&self) -> Vec<Hash> {
    method get_propose_hashes (line 88) | pub fn get_propose_hashes(&self) -> Vec<Hash> {
  method encode (line 72) | fn encode(&self) -> Result<Bytes, Box<dyn Error + Send>> {
  method decode (line 77) | fn decode(data: Bytes) -> Result<Self, Box<dyn Error + Send>> {
  type FixedBlock (line 94) | pub struct FixedBlock {
    method new (line 110) | pub fn new(inner: Block) -> Self {
  method encode (line 99) | fn encode(&mut self) -> ProtocolResult<Bytes> {
  method decode (line 103) | fn decode(bytes: Bytes) -> ProtocolResult<Self> {
  type FixedProof (line 116) | pub struct FixedProof {
    method new (line 132) | pub fn new(inner: Proof) -> Self {
  method encode (line 121) | fn encode(&mut self) -> ProtocolResult<Bytes> {
  method decode (line 125) | fn decode(bytes: Bytes) -> ProtocolResult<Self> {
  type FixedHeight (line 138) | pub struct FixedHeight {
    method new (line 143) | pub fn new(inner: u64) -> Self {
  type PullTxsRequest (line 149) | pub struct PullTxsRequest {
    method new (line 156) | pub fn new(height: u64, inner: Vec<Hash>) -> Self {
  type FixedSignedTxs (line 162) | pub struct FixedSignedTxs {
    method new (line 168) | pub fn new(inner: Vec<SignedTransaction>) -> Self {
  constant PUB_KEY_STR (line 189) | const PUB_KEY_STR: &str = "02ee34d1ce8270cd236e9455d4ab9e756c4478779b1a2...
  function gen_block (line 191) | fn gen_block(height: u64, block_hash: Hash) -> Block {
  function mock_proof (line 218) | fn mock_proof(block_hash: Hash) -> Proof {
  function gen_random_bytes (line 228) | fn gen_random_bytes(len: usize) -> Vec<u8> {
  function gen_signed_tx (line 232) | fn gen_signed_tx() -> SignedTransaction {
  function test_txs_codec (line 265) | fn test_txs_codec() {
  function test_block_codec (line 279) | async fn test_block_codec() {

FILE: core/consensus/src/lib.rs
  constant DEFAULT_OVERLORD_GAP (line 36) | pub const DEFAULT_OVERLORD_GAP: usize = 5;
  constant DEFAULT_SYNC_TXS_CHUNK_SIZE (line 37) | pub const DEFAULT_SYNC_TXS_CHUNK_SIZE: usize = 5000;
  type ConsensusType (line 40) | pub enum ConsensusType {
  type ConsensusError (line 68) | pub enum ConsensusError {
  type BlockHeaderField (line 171) | pub enum BlockHeaderField {
  type BlockProofField (line 189) | pub enum BlockProofField {
  method from (line 215) | fn from(err: ConsensusError) -> ProtocolError {

FILE: core/consensus/src/message.rs
  constant END_GOSSIP_SIGNED_PROPOSAL (line 23) | pub const END_GOSSIP_SIGNED_PROPOSAL: &str = "/gossip/consensus/signed_p...
  constant END_GOSSIP_SIGNED_VOTE (line 24) | pub const END_GOSSIP_SIGNED_VOTE: &str = "/gossip/consensus/signed_vote";
  constant END_GOSSIP_AGGREGATED_VOTE (line 25) | pub const END_GOSSIP_AGGREGATED_VOTE: &str = "/gossip/consensus/qc";
  constant END_GOSSIP_SIGNED_CHOKE (line 26) | pub const END_GOSSIP_SIGNED_CHOKE: &str = "/gossip/consensus/signed_choke";
  constant RPC_SYNC_PULL_BLOCK (line 27) | pub const RPC_SYNC_PULL_BLOCK: &str = "/rpc_call/consensus/sync_pull_blo...
  constant RPC_RESP_SYNC_PULL_BLOCK (line 28) | pub const RPC_RESP_SYNC_PULL_BLOCK: &str = "/rpc_resp/consensus/sync_pul...
  constant RPC_SYNC_PULL_TXS (line 29) | pub const RPC_SYNC_PULL_TXS: &str = "/rpc_call/consensus/sync_pull_txs";
  constant RPC_RESP_SYNC_PULL_TXS (line 30) | pub const RPC_RESP_SYNC_PULL_TXS: &str = "/rpc_resp/consensus/sync_pull_...
  constant BROADCAST_HEIGHT (line 31) | pub const BROADCAST_HEIGHT: &str = "/gossip/consensus/broadcast_height";
  constant RPC_SYNC_PULL_PROOF (line 32) | pub const RPC_SYNC_PULL_PROOF: &str = "/rpc_call/consensus/sync_pull_pro...
  constant RPC_RESP_SYNC_PULL_PROOF (line 33) | pub const RPC_RESP_SYNC_PULL_PROOF: &str = "/rpc_resp/consensus/sync_pul...
  type Proposal (line 36) | pub struct Proposal(pub Vec<u8>);
    method from (line 39) | fn from(proposal: SignedProposal<C>) -> Self {
  type Vote (line 45) | pub struct Vote(pub Vec<u8>);
    method from (line 48) | fn from(vote: SignedVote) -> Self {
  type QC (line 54) | pub struct QC(pub Vec<u8>);
    method from (line 57) | fn from(aggregated_vote: AggregatedVote) -> Self {
  type RichHeight (line 63) | pub struct RichHeight(pub Vec<u8>);
    method from (line 66) | fn from(id: FixedHeight) -> Self {
  type Choke (line 72) | pub struct Choke(pub Vec<u8>);
    method from (line 75) | fn from(signed_choke: SignedChoke) -> Self {
  type ProposalMessageHandler (line 80) | pub struct ProposalMessageHandler<C> {
  function new (line 85) | pub fn new(consensus: Arc<C>) -> Self {
  type Message (line 92) | type Message = Proposal;
  method process (line 95) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type VoteMessageHandler (line 105) | pub struct VoteMessageHandler<C> {
  function new (line 110) | pub fn new(consensus: Arc<C>) -> Self {
  type Message (line 117) | type Message = Vote;
  method process (line 120) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type QCMessageHandler (line 130) | pub struct QCMessageHandler<C> {
  function new (line 135) | pub fn new(consensus: Arc<C>) -> Self {
  type Message (line 142) | type Message = QC;
  method process (line 145) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type ChokeMessageHandler (line 155) | pub struct ChokeMessageHandler<C> {
  function new (line 160) | pub fn new(consensus: Arc<C>) -> Self {
  type Message (line 167) | type Message = Choke;
  method process (line 170) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type RemoteHeightMessageHandler (line 180) | pub struct RemoteHeightMessageHandler<Sy> {
  function new (line 185) | pub fn new(synchronization: Arc<Sy>) -> Self {
  type Message (line 192) | type Message = u64;
  method process (line 195) | async fn process(&self, ctx: Context, remote_height: Self::Message) -> T...
  type PullBlockRpcHandler (line 215) | pub struct PullBlockRpcHandler<R, S> {
  function new (line 225) | pub fn new(rpc: Arc<R>, storage: Arc<S>) -> Self {
  type Message (line 232) | type Message = FixedHeight;
  method process (line 235) | async fn process(&self, ctx: Context, msg: FixedHeight) -> TrustFeedback {
  type PullProofRpcHandler (line 252) | pub struct PullProofRpcHandler<R, S> {
  function new (line 262) | pub fn new(rpc: Arc<R>, storage: Arc<S>) -> Self {
  type Message (line 269) | type Message = FixedHeight;
  method process (line 272) | async fn process(&self, ctx: Context, height: FixedHeight) -> TrustFeedb...
  type PullTxsRpcHandler (line 306) | pub struct PullTxsRpcHandler<R, S> {
  function new (line 316) | pub fn new(rpc: Arc<R>, storage: Arc<S>) -> Self {
  type Message (line 323) | type Message = PullTxsRequest;
  method process (line 326) | async fn process(&self, ctx: Context, msg: PullTxsRequest) -> TrustFeedb...

FILE: core/consensus/src/status.rs
  type StatusAgent (line 15) | pub struct StatusAgent {
    method new (line 20) | pub fn new(status: CurrentConsensusStatus) -> Self {
    method update_by_executed (line 26) | pub fn update_by_executed(&self, info: ExecutedInfo) {
    method update_by_committed (line 30) | pub fn update_by_committed(
    method replace (line 43) | pub fn replace(&self, new_status: CurrentConsensusStatus) {
    method to_inner (line 60) | pub fn to_inner(&self) -> CurrentConsensusStatus {
  type CurrentConsensusStatus (line 77) | pub struct CurrentConsensusStatus {
    method get_latest_state_root (line 100) | pub fn get_latest_state_root(&self) -> MerkleRoot {
    method update_by_executed (line 107) | pub(crate) fn update_by_executed(&mut self, info: ExecutedInfo) {
    method update_by_committed (line 125) | pub(crate) fn update_by_committed(
    method set_metadata (line 147) | pub(crate) fn set_metadata(&mut self, metadata: Metadata) {
    method split_off (line 169) | fn split_off(&mut self, block: &Block) {
  type ExecutedInfo (line 210) | pub struct ExecutedInfo {
    method new (line 220) | pub fn new(ctx: Context, height: u64, order_root: MerkleRoot, resp: Ex...

FILE: core/consensus/src/synchronization.rs
  constant POLLING_BROADCAST (line 22) | const POLLING_BROADCAST: u64 = 2000;
  constant WAIT_EXECUTION (line 23) | const WAIT_EXECUTION: u64 = 1000;
  constant ONCE_SYNC_BLOCK_LIMIT (line 24) | const ONCE_SYNC_BLOCK_LIMIT: u64 = 50;
  type RichBlock (line 27) | pub struct RichBlock {
  type OverlordSynchronization (line 32) | pub struct OverlordSynchronization<Adapter: SynchronizationAdapter> {
  method receive_remote_block (line 48) | async fn receive_remote_block(&self, ctx: Context, remote_height: u64) -...
  function new (line 108) | pub fn new(
  function polling_broadcast (line 128) | pub async fn polling_broadcast(&self) -> ProtocolResult<()> {
  function start_sync (line 144) | async fn start_sync(
  function commit_block (line 298) | async fn commit_block(
  function get_rich_block_from_remote (line 362) | async fn get_rich_block_from_remote(
  function get_block_from_remote (line 384) | async fn get_block_from_remote(&self, ctx: Context, height: u64) -> Prot...
  function save_chain_data (line 391) | async fn save_chain_data(
  function exec_block (line 412) | pub async fn exec_block(
  function init_status_agent (line 442) | async fn init_status_agent(&self) -> ProtocolResult<StatusAgent> {
  function need_sync (line 460) | async fn need_sync(&self, ctx: Context, remote_height: u64) -> ProtocolR...
  function update_status (line 497) | fn update_status(&self, ctx: Context, sync_status_agent: StatusAgent) ->...

FILE: core/consensus/src/tests/engine.rs
  function test_repetitive_commit (line 34) | async fn test_repetitive_commit() {
  function mock_commit (line 55) | fn mock_commit(block: Block) -> Commit<FixedPill> {
  function init_engine (line 75) | fn init_engine(init_status: CurrentConsensusStatus) -> ConsensusEngine<M...
  function init_crypto (line 87) | fn init_crypto() -> OverlordCrypto {
  function mock_node_info (line 103) | fn mock_node_info() -> NodeInfo {
  function mock_metadata (line 111) | fn mock_metadata() -> Metadata {
  type MockConsensusAdapter (line 130) | pub struct MockConsensusAdapter;
  method save_block (line 134) | async fn save_block(&self, _ctx: Context, _block: Block) -> ProtocolResu...
  method save_proof (line 138) | async fn save_proof(&self, _ctx: Context, _proof: Proof) -> ProtocolResu...
  method save_signed_txs (line 142) | async fn save_signed_txs(
  method save_receipts (line 151) | async fn save_receipts(
  method flush_mempool (line 160) | async fn flush_mempool(
  method get_block_by_height (line 168) | async fn get_block_by_height(&self, _ctx: Context, _height: u64) -> Prot...
  method get_block_header_by_height (line 172) | async fn get_block_header_by_height(
  method get_current_height (line 180) | async fn get_current_height(&self, _ctx: Context) -> ProtocolResult<u64> {
  method get_txs_from_storage (line 184) | async fn get_txs_from_storage(
  method verify_block_header (line 192) | async fn verify_block_header(&self, _ctx: Context, _block: &Block) -> Pr...
  method verify_proof (line 196) | async fn verify_proof(
  method broadcast_height (line 205) | async fn broadcast_height(&self, _ctx: Context, _height: u64) -> Protoco...
  method get_metadata (line 209) | fn get_metadata(
  method report_bad (line 220) | fn report_bad(&self, _ctx: Context, _feedback: TrustFeedback) {}
  method set_args (line 222) | fn set_args(
  method tag_consensus (line 231) | fn tag_consensus(&self, _ctx: Context, _peer_ids: Vec<Bytes>) -> Protoco...
  method verify_proof_signature (line 235) | fn verify_proof_signature(
  method verify_proof_weight (line 246) | fn verify_proof_weight(
  method get_txs_from_mempool (line 259) | async fn get_txs_from_mempool(
  method sync_txs (line 269) | async fn sync_txs(&self, _ctx: Context, _txs: Vec<Hash>) -> ProtocolResu...
  method get_full_txs (line 273) | async fn get_full_txs(
  method transmit (line 281) | async fn transmit(
  method execute (line 291) | async fn execute(
  method get_last_validators (line 307) | async fn get_last_validators(
  method pull_block (line 315) | async fn pull_block(&self, _ctx: Context, _height: u64, _end: &str) -> P...
  method get_current_height (line 319) | async fn get_current_height(&self, _ctx: Context) -> ProtocolResult<u64> {
  method verify_txs (line 323) | async fn verify_txs(&self, _ctx: Context, _height: u64, _txs: &[Hash]) -...

FILE: core/consensus/src/tests/mod.rs
  constant HEIGHT_TEN (line 12) | const HEIGHT_TEN: u64 = 10;
  function mock_block_from_status (line 14) | fn mock_block_from_status(status: &CurrentConsensusStatus) -> Block {
  function mock_current_status (line 39) | fn mock_current_status(exec_lag: u64) -> CurrentConsensusStatus {
  function mock_proof (line 65) | fn mock_proof(proof_height: u64) -> Proof {
  function mock_roots (line 75) | fn mock_roots(len: u64) -> Vec<MerkleRoot> {
  function mock_hash (line 79) | fn mock_hash() -> Hash {
  function mock_address (line 83) | fn mock_address() -> Address {
  function get_random_bytes (line 88) | fn get_random_bytes(len: usize) -> Bytes {
  function mock_pub_key (line 93) | fn mock_pub_key() -> Hex {
  function mock_validators (line 100) | fn mock_validators(len: usize) -> Vec<Validator> {
  function mock_validator (line 104) | fn mock_validator() -> Validator {

FILE: core/consensus/src/tests/status.rs
  function test_update_by_executed (line 13) | fn test_update_by_executed() {
  function test_update_by_committed (line 38) | fn test_update_by_committed() {
  function check_metadata (line 68) | fn check_metadata(status: &CurrentConsensusStatus, metadata: &Metadata) {
  function check_vec (line 78) | fn check_vec(status_before: &CurrentConsensusStatus, status_after: &Curr...
  function mock_metadata (line 98) | fn mock_metadata() -> Metadata {
  function mock_validators_extend (line 120) | fn mock_validators_extend(len: usize) -> Vec<ValidatorExtend> {
  function mock_executed_info (line 135) | fn mock_executed_info(height: u64) -> ExecutedInfo {

FILE: core/consensus/src/tests/synchronization.rs
  constant PUB_KEY_STR (line 36) | const PUB_KEY_STR: &str = "02ef0cb0d7bc6c18b4bea1f5908d9106522b35ab3c399...
  function sync_gap_test (line 40) | fn sync_gap_test() {
  type SafeHashMap (line 124) | pub type SafeHashMap<K, V> = Arc<RwLock<HashMap<K, V>>>;
  type MockCommonConsensusAdapter (line 126) | pub struct MockCommonConsensusAdapter {
    method new (line 137) | pub fn new(
  method update_status (line 160) | fn update_status(
  method sync_exec (line 174) | fn sync_exec(
  method get_block_from_remote (line 184) | async fn get_block_from_remote(&self, _: Context, height: u64) -> Protoc...
  method get_txs_from_remote (line 190) | async fn get_txs_from_remote(
  method get_proof_from_remote (line 207) | async fn get_proof_from_remote(&self, _: Context, height: u64) -> Protoc...
  method save_block (line 215) | async fn save_block(&self, _: Context, block: Block) -> ProtocolResult<(...
  method save_proof (line 222) | async fn save_proof(&self, _: Context, _: Proof) -> ProtocolResult<()> {
  method save_signed_txs (line 227) | async fn save_signed_txs(
  method save_receipts (line 240) | async fn save_receipts(&self, _: Context, _: u64, _: Vec<Receipt>) -> Pr...
  method flush_mempool (line 245) | async fn flush_mempool(&self, _: Context, _: &[Hash]) -> ProtocolResult<...
  method get_block_by_height (line 250) | async fn get_block_by_height(&self, _: Context, height: u64) -> Protocol...
  method get_block_header_by_height (line 254) | async fn get_block_header_by_height(
  method get_current_height (line 269) | async fn get_current_height(&self, _: Context) -> ProtocolResult<u64> {
  method get_txs_from_storage (line 273) | async fn get_txs_from_storage(
  method broadcast_height (line 289) | async fn broadcast_height(&self, _: Context, _: u64) -> ProtocolResult<(...
  method get_metadata (line 293) | fn get_metadata(
  method tag_consensus (line 319) | fn tag_consensus(&self, _: Context, _: Vec<Bytes>) -> ProtocolResult<()> {
  method report_bad (line 323) | fn report_bad(&self, _ctx: Context, _feedback: TrustFeedback) {}
  method set_args (line 325) | fn set_args(
  method verify_block_header (line 335) | async fn verify_block_header(&self, ctx: Context, block: &Block) -> Prot...
  method verify_proof (line 438) | async fn verify_proof(
  method verify_proof_signature (line 548) | fn verify_proof_signature(
  method verify_proof_weight (line 569) | fn verify_proof_weight(
  function mock_crypto (line 614) | fn mock_crypto() -> OverlordCrypto {
  function gen_remote_tx_hashmap (line 619) | fn gen_remote_tx_hashmap(list: Vec<RichBlock>) -> SafeHashMap<Hash, Sign...
  function gen_remote_block_hashmap (line 631) | fn gen_remote_block_hashmap(list: Vec<RichBlock>) -> SafeHashMap<u64, Bl...
  function gen_remote_proof_hashmap (line 640) | fn gen_remote_proof_hashmap(list: Vec<Proof>) -> SafeHashMap<u64, Proof> {
  function mock_chained_rich_block (line 649) | fn mock_chained_rich_block(len: u64, gap: u64, key_tool: &KeyTool) -> (V...
  function mock_genesis_rich_block (line 760) | fn mock_genesis_rich_block() -> RichBlock {
  function get_receipt (line 805) | fn get_receipt(tx: &SignedTransaction, height: u64) -> Receipt {
  function mock_tx_list (line 825) | fn mock_tx_list(num: usize, height: u64) -> Vec<SignedTransaction> {
  function mock_proof (line 877) | fn mock_proof(block_hash: Hash, height: u64, round: u64, key_tool: &KeyT...
  function exec_txs (line 946) | fn exec_txs(height: u64, txs: &[SignedTransaction]) -> (ExecutorResp, Me...
  type SignerNode (line 975) | struct SignerNode {
    method new (line 981) | pub fn new(secp_private_key: Secp256k1PrivateKey, secp_public_key: Sec...
  type KeyTool (line 989) | struct KeyTool {
    method new (line 996) | pub fn new(
  function get_mock_key_tool (line 1009) | fn get_mock_key_tool() -> KeyTool {
  function get_mock_public_keys_and_common_ref (line 1031) | fn get_mock_public_keys_and_common_ref() -> (HashMap<Bytes, BlsPublicKey...
  function mock_verifier_list (line 1080) | fn mock_verifier_list() -> Vec<ValidatorExtend> {
  function assert_sync (line 1145) | fn assert_sync(status: CurrentConsensusStatus, latest_block: Block) {

FILE: core/consensus/src/util.rs
  function time_now (line 21) | pub fn time_now() -> u64 {
  type OverlordCrypto (line 28) | pub struct OverlordCrypto {
    method new (line 123) | pub fn new(
    method update (line 135) | pub fn update(&self, new_addr_pubkey: HashMap<Bytes, BlsPublicKey>) {
    method inner_verify_aggregated_signature (line 141) | pub fn inner_verify_aggregated_signature(
  method hash (line 35) | fn hash(&self, msg: Bytes) -> Bytes {
  method sign (line 39) | fn sign(&self, hash: Bytes) -> Result<Bytes, Box<dyn Error + Send>> {
  method verify_signature (line 49) | fn verify_signature(
  method aggregate_signatures (line 73) | fn aggregate_signatures(
  method verify_aggregated_signature (line 102) | fn verify_aggregated_signature(
  type ExecuteInfo (line 164) | pub struct ExecuteInfo {
  function check_list_roots (line 177) | pub fn check_list_roots<T: Eq>(cache_roots: &[T], block_roots: &[T]) -> ...
  function digest_signed_transactions (line 185) | pub fn digest_signed_transactions(signed_txs: &[SignedTransaction]) -> P...
  function convert_hex_to_bls_pubkeys (line 200) | pub fn convert_hex_to_bls_pubkeys(hex: Hex) -> ProtocolResult<BlsPublicK...
  function test_bls_amcl (line 213) | fn test_bls_amcl() {
  function test_aggregate_pubkeys_order (line 253) | fn test_aggregate_pubkeys_order() {
  function test_zip_roots (line 271) | fn test_zip_roots() {
  function test_convert_from_hex (line 285) | fn test_convert_from_hex() {

FILE: core/consensus/src/wal.rs
  type SignedTxsWAL (line 18) | pub struct SignedTxsWAL {
    method new (line 23) | pub fn new<P: AsRef<Path>>(path: P) -> Self {
    method save (line 33) | pub fn save(
    method available_height (line 71) | pub fn available_height(&self) -> ProtocolResult<Vec<u64>> {
    method remove_all (line 84) | pub fn remove_all(&self) -> ProtocolResult<()> {
    method load (line 91) | pub fn load(
    method load_by_height (line 104) | pub fn load_by_height(&self, height: u64) -> Vec<SignedTransaction> {
    method remove (line 124) | pub fn remove(&self, committed_height: u64) -> ProtocolResult<()> {
    method recover_stxs (line 146) | fn recover_stxs(&self, file_path: PathBuf) -> ProtocolResult<Vec<Signe...
  type ConsensusWal (line 158) | pub struct ConsensusWal {
    method new (line 163) | pub fn new<P: AsRef<Path>>(path: P) -> Self {
    method update_overlord_wal (line 174) | pub fn update_overlord_wal(&self, ctx: Context, info: Bytes) -> Protoc...
    method load_overlord_wal (line 248) | pub fn load_overlord_wal(&self, ctx: Context) -> ProtocolResult<Bytes> {
    method clear (line 309) | pub fn clear(&self) -> ProtocolResult<()> {
  function mock_hash (line 351) | fn mock_hash() -> Hash {
  function mock_address (line 355) | fn mock_address() -> Address {
  function mock_raw_tx (line 360) | fn mock_raw_tx() -> RawTransaction {
  function mock_transaction_request (line 372) | pub fn mock_transaction_request() -> TransactionRequest {
  function mock_sign_tx (line 380) | pub fn mock_sign_tx() -> SignedTransaction {
  function mock_wal_txs (line 389) | pub fn mock_wal_txs(size: usize) -> Vec<SignedTransaction> {
  function get_random_bytes (line 393) | pub fn get_random_bytes(len: usize) -> Bytes {
  function test_txs_wal (line 399) | fn test_txs_wal() {
  function test_consensus_wal (line 433) | fn test_consensus_wal() {
  function test_wal_txs_codec (line 493) | fn test_wal_txs_codec() {
  function bench_txs_rlp_encode (line 504) | fn bench_txs_rlp_encode(b: &mut Bencher) {
  function bench_txs_prost_encode (line 513) | fn bench_txs_prost_encode(b: &mut Bencher) {
  function bench_save_wal_1000_txs (line 522) | fn bench_save_wal_1000_txs(b: &mut Bencher) {
  function bench_save_wal_2000_txs (line 533) | fn bench_save_wal_2000_txs(b: &mut Bencher) {
  function bench_save_wal_4000_txs (line 544) | fn bench_save_wal_4000_txs(b: &mut Bencher) {
  function bench_save_wal_8000_txs (line 555) | fn bench_save_wal_8000_txs(b: &mut Bencher) {
  function bench_save_wal_16000_txs (line 566) | fn bench_save_wal_16000_txs(b: &mut Bencher) {

FILE: core/consensus/src/wal_proto.rs
  type FixedSignedTxs (line 12) | pub struct FixedSignedTxs {
    method from (line 18) | fn from(txs: fixed_types::FixedSignedTxs) -> FixedSignedTxs {
  type Error (line 29) | type Error = ProtocolError;
  function try_from (line 31) | fn try_from(txs: FixedSignedTxs) -> Result<fixed_types::FixedSignedTxs, ...
  method encode_sync (line 43) | fn encode_sync(&self) -> ProtocolResult<Bytes> {
  method decode_sync (line 53) | fn decode_sync(data: Bytes) -> ProtocolResult<Self> {

FILE: core/mempool/src/adapter/message.rs
  constant END_GOSSIP_NEW_TXS (line 14) | pub const END_GOSSIP_NEW_TXS: &str = "/gossip/mempool/new_txs";
  constant RPC_PULL_TXS (line 15) | pub const RPC_PULL_TXS: &str = "/rpc_call/mempool/pull_txs";
  constant RPC_RESP_PULL_TXS (line 16) | pub const RPC_RESP_PULL_TXS: &str = "/rpc_resp/mempool/pull_txs";
  constant RPC_RESP_PULL_TXS_SYNC (line 17) | pub const RPC_RESP_PULL_TXS_SYNC: &str = "/rpc_resp/mempool/pull_txs_sync";
  type MsgNewTxs (line 20) | pub struct MsgNewTxs {
  type NewTxsHandler (line 25) | pub struct NewTxsHandler<M> {
  function new (line 33) | pub fn new(mem_pool: Arc<M>) -> Self {
  type Message (line 43) | type Message = MsgNewTxs;
  method process (line 45) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type MsgPullTxs (line 92) | pub struct MsgPullTxs {
  type MsgPushTxs (line 99) | pub struct MsgPushTxs {
  type PullTxsHandler (line 104) | pub struct PullTxsHandler<N, M> {
  function new (line 114) | pub fn new(network: Arc<N>, mem_pool: Arc<M>) -> Self {
  type Message (line 125) | type Message = MsgPullTxs;
  method process (line 127) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...

FILE: core/mempool/src/adapter/mod.rs
  constant DEFAULT_BROADCAST_TXS_SIZE (line 42) | pub const DEFAULT_BROADCAST_TXS_SIZE: usize = 200;
  constant DEFAULT_BROADCAST_TXS_INTERVAL (line 43) | pub const DEFAULT_BROADCAST_TXS_INTERVAL: u64 = 200;
  type IntervalTxsBroadcaster (line 45) | struct IntervalTxsBroadcaster;
    method broadcast (line 48) | pub async fn broadcast<G>(
    method timer (line 85) | pub async fn timer(mut signal_tx: Sender<()>, interval: u64) {
    method do_broadcast (line 105) | async fn do_broadcast<G>(
  type DefaultMemPoolAdapter (line 138) | pub struct DefaultMemPoolAdapter<EF, C, N, S, DB, Mapping> {
  function new (line 164) | pub fn new(
  method pull_txs (line 222) | async fn pull_txs(
  method broadcast_tx (line 241) | async fn broadcast_tx(&self, _ctx: Context, stx: SignedTransaction) -> P...
  method check_authorization (line 257) | async fn check_authorization(
  method check_transaction (line 343) | async fn check_transaction(&self, ctx: Context, stx: &SignedTransaction)...
  method check_storage_exist (line 429) | async fn check_storage_exist(&self, ctx: Context, tx_hash: &Hash) -> Pro...
  method get_latest_height (line 440) | async fn get_latest_height(&self, ctx: Context) -> ProtocolResult<u64> {
  method get_transactions_from_storage (line 445) | async fn get_transactions_from_storage(
  method report_good (line 462) | fn report_good(&self, ctx: Context) {
  method set_args (line 468) | fn set_args(&self, timeout_gap: u64, cycles_limit: u64, max_tx_size: u64) {
  type AdapterError (line 476) | pub enum AdapterError {
    method from (line 487) | fn from(_error: TrySendError<T>) -> AdapterError {
  method from (line 493) | fn from(error: AdapterError) -> ProtocolError {
  type MockGossip (line 523) | struct MockGossip {
    method new (line 529) | pub fn new(signal_tx: UnboundedSender<()>) -> Self {
  method broadcast (line 539) | async fn broadcast<M>(
  method multicast (line 559) | async fn multicast<'a, M, P>(
  function test_interval_timer (line 583) | async fn test_interval_timer() {
  function test_interval_broadcast_reach_cache_size (line 595) | async fn test_interval_broadcast_reach_cache_size() {
  function test_interval_broadcast_reach_interval (line 624) | async fn test_interval_broadcast_reach_interval() {
  function test_interval_broadcast (line 654) | async fn test_interval_broadcast() {

FILE: core/mempool/src/context.rs
  constant TXS_ORIGINAL_KEY (line 3) | const TXS_ORIGINAL_KEY: &str = "txs_original";
  constant NETWORK_TXS (line 4) | const NETWORK_TXS: usize = 1;
  type TxContext (line 6) | pub(crate) trait TxContext {
    method mark_network_origin_new_txs (line 7) | fn mark_network_origin_new_txs(&self) -> Self;
    method is_network_origin_txs (line 9) | fn is_network_origin_txs(&self) -> bool;
    method mark_network_origin_new_txs (line 13) | fn mark_network_origin_new_txs(&self) -> Self {
    method is_network_origin_txs (line 17) | fn is_network_origin_txs(&self) -> bool {

FILE: core/mempool/src/lib.rs
  type HashMemPool (line 38) | pub struct HashMemPool<Adapter: MemPoolAdapter> {
  function new (line 58) | pub async fn new(
  function get_tx_cache (line 81) | pub fn get_tx_cache(&self) -> &TxCache {
  function get_callback_cache (line 85) | pub fn get_callback_cache(&self) -> &Map<SignedTransaction> {
  function get_adapter (line 89) | pub fn get_adapter(&self) -> &Adapter {
  function show_unknown_txs (line 93) | async fn show_unknown_txs(&self, tx_hashes: &[Hash]) -> Vec<Hash> {
  function initial_insert (line 106) | async fn initial_insert(&self, ctx: Context, tx: SignedTransaction) -> P...
  function insert_tx (line 116) | async fn insert_tx(
  function verify_tx_in_parallel (line 150) | async fn verify_tx_in_parallel(&self, ctx: Context, tx_ptrs: Vec<usize>)...
  method insert (line 192) | async fn insert(&self, ctx: Context, tx: SignedTransaction) -> ProtocolR...
  method package (line 196) | async fn package(
  method flush (line 238) | async fn flush(&self, ctx: Context, tx_hashes: &[Hash]) -> ProtocolResul...
  method get_full_txs (line 258) | async fn get_full_txs(
  method ensure_order_txs (line 304) | async fn ensure_order_txs(
  method sync_propose_txs (line 351) | async fn sync_propose_txs(
  method set_args (line 372) | fn set_args(&self, timeout_gap: u64, cycles_limit: u64, max_tx_size: u64) {
  function check_dup_order_hashes (line 379) | fn check_dup_order_hashes(order_tx_hashes: &[Hash]) -> ProtocolResult<()> {
  type TxType (line 393) | pub enum TxType {
  type MemPoolError (line 399) | pub enum MemPoolError {
  method from (line 476) | fn from(error: MemPoolError) -> ProtocolError {

FILE: core/mempool/src/map.rs
  type Map (line 13) | pub struct Map<V> {
  function new (line 21) | pub fn new(cache_size: usize) -> Self {
  function insert (line 32) | pub async fn insert(&self, hash: Hash, value: V) -> Option<V> {
  function contains_key (line 37) | pub async fn contains_key(&self, hash: &Hash) -> bool {
  function get (line 42) | pub async fn get(&self, hash: &Hash) -> Option<V> {
  function remove (line 47) | pub async fn remove(&self, hash: &Hash) {
  function remove_batch (line 52) | pub async fn remove_batch(&self, hashes: &[Hash]) {
  function len (line 72) | pub async fn len(&self) -> usize {
  function clear (line 80) | pub async fn clear(&self) {
  function get_bucket (line 95) | fn get_bucket(&self, hash: &Hash) -> &Bucket<V> {
  function get_index (line 100) | fn get_index(hash: &Hash) -> usize {
  type Bucket (line 104) | struct Bucket<V> {
  function insert (line 115) | async fn insert(&self, hash: Hash, value: V) -> Option<V> {
  function contains_key (line 124) | async fn contains_key(&self, hash: &Hash) -> bool {
  function get (line 128) | async fn get(&self, hash: &Hash) -> Option<V> {
  function remove (line 132) | async fn remove(&self, hash: &Hash) {
  function remove_batch (line 137) | async fn remove_batch(&self, hashes: Vec<Hash>) {
  function len (line 144) | async fn len(&self) -> usize {
  function clear (line 148) | async fn clear(&self) {
  constant GEN_TX_SIZE (line 168) | const GEN_TX_SIZE: usize = 1000;
  function bench_map_insert (line 171) | fn bench_map_insert(b: &mut Bencher) {
  function bench_std_map_insert (line 185) | fn bench_std_map_insert(b: &mut Bencher) {
  function bench_chashmap_insert (line 197) | fn bench_chashmap_insert(b: &mut Bencher) {
  function mock_txs (line 208) | fn mock_txs(size: usize) -> Vec<(Hash, Hash)> {

FILE: core/mempool/src/tests/mempool.rs
  function test_dup_order_hashes (line 31) | fn test_dup_order_hashes() {
  function test_insert (line 51) | async fn test_insert() {
  function test_package (line 85) | async fn test_package() {
  function test_package_order_consistent_with_insert_order (line 111) | async fn test_package_order_consistent_with_insert_order() {
  function test_flush (line 130) | async fn test_flush() {
  function test_ensure_order_txs (line 182) | async fn test_ensure_order_txs() {
  function test_sync_propose_txs (line 192) | async fn test_sync_propose_txs() {
  function bench_insert (line 233) | fn bench_insert(b: &mut Bencher) {
  function bench_insert_serial_1 (line 244) | fn bench_insert_serial_1(b: &mut Bencher) {
  function bench_insert_serial_10 (line 258) | fn bench_insert_serial_10(b: &mut Bencher) {
  function bench_insert_serial_100 (line 272) | fn bench_insert_serial_100(b: &mut Bencher) {
  function bench_insert_serial_1000 (line 286) | fn bench_insert_serial_1000(b: &mut Bencher) {
  function bench_package (line 300) | fn bench_package(b: &mut Bencher) {
  function bench_get_10000_full_txs (line 316) | fn bench_get_10000_full_txs(b: &mut Bencher) {
  function bench_get_20000_full_txs (line 329) | fn bench_get_20000_full_txs(b: &mut Bencher) {
  function bench_get_40000_full_txs (line 342) | fn bench_get_40000_full_txs(b: &mut Bencher) {
  function bench_get_80000_full_txs (line 355) | fn bench_get_80000_full_txs(b: &mut Bencher) {
  function bench_flush (line 368) | fn bench_flush(b: &mut Bencher) {
  function bench_sign_with_spawn_list (line 382) | async fn bench_sign_with_spawn_list() {
  function bench_sign (line 410) | async fn bench_sign() {
  function bench_mock_txs (line 429) | fn bench_mock_txs(b: &mut Bencher) {
  function bench_check_sig (line 436) | fn bench_check_sig(b: &mut Bencher) {
  function bench_check_sig_serial_1 (line 447) | fn bench_check_sig_serial_1(b: &mut Bencher) {
  function bench_check_sig_serial_10 (line 458) | fn bench_check_sig_serial_10(b: &mut Bencher) {
  function bench_check_sig_serial_100 (line 469) | fn bench_check_sig_serial_100(b: &mut Bencher) {
  function bench_check_sig_serial_1000 (line 480) | fn bench_check_sig_serial_1000(b: &mut Bencher) {

FILE: core/mempool/src/tests/mod.rs
  constant CYCLE_LIMIT (line 25) | const CYCLE_LIMIT: u64 = 1_000_000;
  constant TX_NUM_LIMIT (line 26) | const TX_NUM_LIMIT: u64 = 10_000;
  constant CURRENT_HEIGHT (line 27) | const CURRENT_HEIGHT: u64 = 999;
  constant POOL_SIZE (line 28) | const POOL_SIZE: usize = 100_000;
  constant MAX_TX_SIZE (line 29) | const MAX_TX_SIZE: u64 = 1024;
  constant TIMEOUT (line 30) | const TIMEOUT: u64 = 1000;
  constant TIMEOUT_GAP (line 31) | const TIMEOUT_GAP: u64 = 100;
  constant TX_CYCLE (line 32) | const TX_CYCLE: u64 = 1;
  type HashMemPoolAdapter (line 34) | pub struct HashMemPoolAdapter {
    method new (line 39) | fn new() -> HashMemPoolAdapter {
  method pull_txs (line 48) | async fn pull_txs(
  method broadcast_tx (line 63) | async fn broadcast_tx(&self, _ctx: Context, tx: SignedTransaction) -> Pr...
  method check_authorization (line 68) | async fn check_authorization(
  method check_transaction (line 77) | async fn check_transaction(
  method check_storage_exist (line 85) | async fn check_storage_exist(&self, _ctx: Context, _tx_hash: &Hash) -> P...
  method get_latest_height (line 89) | async fn get_latest_height(&self, _ctx: Context) -> ProtocolResult<u64> {
  method get_transactions_from_storage (line 93) | async fn get_transactions_from_storage(
  method report_good (line 102) | fn report_good(&self, _ctx: Context) {}
  method set_args (line 104) | fn set_args(&self, _timeout_gap: u64, _cycles_limit: u64, _max_tx_size: ...
  function default_mock_txs (line 107) | pub fn default_mock_txs(size: usize) -> Vec<SignedTransaction> {
  function mock_txs (line 111) | fn mock_txs(valid_size: usize, invalid_size: usize, timeout: u64) -> Vec...
  function default_mempool_sync (line 121) | fn default_mempool_sync() -> HashMemPool<HashMemPoolAdapter> {
  function default_mempool (line 126) | async fn default_mempool() -> HashMemPool<HashMemPoolAdapter> {
  function new_mempool (line 130) | async fn new_mempool(
  function check_hash (line 142) | async fn check_hash(tx: &SignedTransaction) -> ProtocolResult<()> {
  function check_sig (line 156) | fn check_sig(tx: &SignedTransaction) -> ProtocolResult<()> {
  function concurrent_check_sig (line 167) | async fn concurrent_check_sig(txs: Vec<SignedTransaction>) {
  function concurrent_insert (line 176) | async fn concurrent_insert(
  function concurrent_broadcast (line 191) | async fn concurrent_broadcast(
  function exec_insert (line 212) | async fn exec_insert(signed_tx: SignedTransaction, mempool: Arc<HashMemP...
  function exec_flush (line 216) | async fn exec_flush(remove_hashes: Vec<Hash>, mempool: Arc<HashMemPool<H...
  function exec_package (line 220) | async fn exec_package(
  function exec_ensure_order_txs (line 231) | async fn exec_ensure_order_txs(
  function exec_sync_propose_txs (line 241) | async fn exec_sync_propose_txs(
  function exec_get_full_txs (line 251) | async fn exec_get_full_txs(
  function mock_signed_tx (line 261) | fn mock_signed_tx(
  function get_random_bytes (line 301) | fn get_random_bytes(len: usize) -> Vec<u8> {
  function check_order_consistant (line 305) | fn check_order_consistant(mixed_tx_hashes: &MixedTxHashes, txs: &[Signed...

FILE: core/mempool/src/tx_cache.rs
  type TxWrapper (line 21) | pub struct TxWrapper {
    method new (line 37) | pub(crate) fn new(tx: SignedTransaction) -> Self {
    method propose (line 45) | pub(crate) fn propose(tx: SignedTransaction) -> Self {
    method set_removed (line 53) | pub(crate) fn set_removed(&self) {
    method is_removed (line 58) | pub(crate) fn is_removed(&self) -> bool {
    method is_proposed (line 63) | fn is_proposed(&self) -> bool {
    method is_timeout (line 68) | fn is_timeout(&self, current_height: u64, timeout: u64) -> bool {
  type SharedTx (line 75) | pub type SharedTx = Arc<TxWrapper>;
  type Stage (line 79) | enum Stage {
    method next (line 89) | fn next(&self) -> Self {
  type QueueRole (line 99) | struct QueueRole {
  type TxCache (line 115) | pub struct TxCache {
    method new (line 133) | pub fn new(pool_size: usize) -> Self {
    method len (line 143) | pub async fn len(&self) -> usize {
    method insert_new_tx (line 147) | pub async fn insert_new_tx(&self, signed_tx: SignedTransaction) -> Pro...
    method insert_propose_tx (line 154) | pub async fn insert_propose_tx(&self, signed_tx: SignedTransaction) ->...
    method show_unknown (line 161) | pub async fn show_unknown(&self, tx_hashes: &[Hash]) -> Vec<Hash> {
    method flush (line 173) | pub async fn flush(&self, tx_hashes: &[Hash], current_height: u64, tim...
    method package (line 185) | pub async fn package(
    method check_exist (line 258) | pub async fn check_exist(&self, tx_hash: &Hash) -> ProtocolResult<()> {
    method check_reach_limit (line 268) | pub async fn check_reach_limit(&self, pool_size: usize) -> ProtocolRes...
    method contain (line 275) | pub async fn contain(&self, tx_hash: &Hash) -> bool {
    method get (line 279) | pub async fn get(&self, tx_hash: &Hash) -> Option<SignedTransaction> {
    method queue_len (line 286) | pub fn queue_len(&self) -> usize {
    method insert (line 294) | async fn insert(&self, tx_hash: Hash, shared_tx: SharedTx) -> Protocol...
    method process_omission_txs (line 324) | async fn process_omission_txs(&self, queue_role: QueueRole) {
    method flush_incumbent_queue (line 347) | async fn flush_incumbent_queue(&self, current_height: u64, timeout: u6...
    method switch_queue_role (line 386) | fn switch_queue_role(&self) -> QueueRole {
    method get_queue_role (line 391) | fn get_queue_role(&self) -> QueueRole {
  constant POOL_SIZE (line 420) | const POOL_SIZE: usize = 1000;
  constant BYTES_LEN (line 421) | const BYTES_LEN: usize = 10;
  constant TX_NUM (line 422) | const TX_NUM: usize = 1000;
  constant TX_CYCLE (line 423) | const TX_CYCLE: u64 = 1;
  constant TX_NUM_LIMIT (line 424) | const TX_NUM_LIMIT: u64 = 20000;
  constant CYCLE_LIMIT (line 425) | const CYCLE_LIMIT: u64 = 500;
  constant CURRENT_H (line 426) | const CURRENT_H: u64 = 100;
  constant TIMEOUT (line 427) | const TIMEOUT: u64 = 150;
  function gen_bytes (line 429) | fn gen_bytes() -> Vec<u8> {
  function gen_signed_txs (line 433) | fn gen_signed_txs(n: usize) -> Vec<SignedTransaction> {
  function mock_signed_tx (line 441) | fn mock_signed_tx(bytes: Vec<u8>) -> SignedTransaction {
  function concurrent_insert (line 475) | async fn concurrent_insert(txs: Vec<SignedTransaction>, tx_cache: Arc<Tx...
  function concurrent_flush (line 487) | async fn concurrent_flush(tx_cache: Arc<TxCache>, tx_hashes: Vec<Hash>, ...
  function concurrent_package (line 495) | async fn concurrent_package(tx_cache: Arc<TxCache>) {
  function test_concurrent_insert (line 507) | async fn test_concurrent_insert() {
  function test_insert_overlap (line 523) | async fn test_insert_overlap() {
  function bench_gen_txs (line 541) | fn bench_gen_txs(b: &mut Bencher) {
  function bench_insert (line 548) | fn bench_insert(b: &mut Bencher) {
  function bench_flush (line 561) | fn bench_flush(b: &mut Bencher) {
  function bench_flush_insert (line 581) | fn bench_flush_insert(b: &mut Bencher) {
  function bench_package (line 605) | fn bench_package(b: &mut Bencher) {
  function bench_package_insert (line 623) | fn bench_package_insert(b: &mut Bencher) {

FILE: core/network/examples/buycopy.rs
  constant IP_ADDR (line 20) | const IP_ADDR: IpAddr = IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0));
  constant RELEASE_CHANNEL (line 22) | const RELEASE_CHANNEL: &str = "/gossip/cprd/cyperpunk7702_released";
  constant SHOP_CASH_CHANNEL (line 23) | const SHOP_CASH_CHANNEL: &str = "/rpc_call/v3/steam";
  constant SHOP_CHANNEL (line 24) | const SHOP_CHANNEL: &str = "/rpc_resp/v3/steam";
  type Cyber7702Released (line 28) | struct Cyber7702Released {
  type TakeMyMoney (line 35) | struct TakeMyMoney<N: Rpc> {
  type Message (line 41) | type Message = Cyber7702Released;
  method process (line 43) | async fn process(&self, ctx: Context, msg: Self::Message) -> TrustFeedba...
  type BuyACopy (line 68) | struct BuyACopy;
  type ACopy (line 71) | struct ACopy {
  type Checkout (line 80) | struct Checkout<N: Rpc> {
  type Message (line 86) | type Message = BuyACopy;
  method process (line 88) | async fn process(&self, ctx: Context, _msg: Self::Message) -> TrustFeedb...
  function main (line 110) | pub async fn main() {

FILE: core/network/src/common.rs
  function socket_to_multi_addr (line 47) | pub fn socket_to_multi_addr(socket_addr: SocketAddr) -> Multiaddr {
  function multiaddr_to_socket (line 54) | pub fn multiaddr_to_socket(multiaddr: &Multiaddr) -> Option<SocketAddr> {
  function resolve_if_unspecified (line 74) | pub fn resolve_if_unspecified(multiaddr: &Multiaddr) -> Result<Multiaddr...
  method id_bytes (line 112) | fn id_bytes(&self) -> Option<Cow<'_, [u8]>> {
  method has_id (line 122) | fn has_id(&self) -> bool {
  method push_id (line 126) | fn push_id(&mut self, peer_id: PeerId) {
  type HeartBeat (line 131) | pub struct HeartBeat {
    method new (line 138) | pub fn new(waker: Arc<AtomicWaker>, interval: Duration) -> Self {
  type Output (line 153) | type Output = <Delay as Future>::Output;
  method poll (line 155) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...
  type ConnectedAddr (line 176) | pub struct ConnectedAddr {
    method from (line 182) | fn from(multiaddr: &Multiaddr) -> Self {

FILE: core/network/src/compression/snappy.rs
  type Snappy (line 8) | pub struct Snappy;
  method compress (line 11) | fn compress(&self, bytes: Bytes) -> Result<Bytes, NetworkError> {
  method decompress (line 28) | fn decompress(&self, bytes: Bytes) -> Result<Bytes, NetworkError> {

FILE: core/network/src/config.rs
  constant DEFAULT_LISTEN_IP_ADDR (line 29) | pub const DEFAULT_LISTEN_IP_ADDR: IpAddr = IpAddr::V4(Ipv4Addr::new(0, 0...
  constant DEFAULT_LISTEN_PORT (line 30) | pub const DEFAULT_LISTEN_PORT: u16 = 2337;
  constant DEFAULT_MAX_CONNECTIONS (line 32) | pub const DEFAULT_MAX_CONNECTIONS: usize = 40;
  constant DEFAULT_MAX_FRAME_LENGTH (line 34) | pub const DEFAULT_MAX_FRAME_LENGTH: usize = 4 * 1024 * 1024;
  constant DEFAULT_BUFFER_SIZE (line 35) | pub const DEFAULT_BUFFER_SIZE: usize = 24 * 1024 * 1024;
  constant DEFAULT_MAX_WAIT_STREAMS (line 38) | pub const DEFAULT_MAX_WAIT_STREAMS: usize = 256;
  constant DEFAULT_WRITE_TIMEOUT (line 40) | pub const DEFAULT_WRITE_TIMEOUT: u64 = 10;
  constant DEFAULT_SAME_IP_CONN_LIMIT (line 42) | pub const DEFAULT_SAME_IP_CONN_LIMIT: usize = 1;
  constant DEFAULT_INBOUND_CONN_LIMIT (line 43) | pub const DEFAULT_INBOUND_CONN_LIMIT: usize = 20;
  constant DEFAULT_PEER_TRUST_INTERVAL_DURATION (line 46) | pub const DEFAULT_PEER_TRUST_INTERVAL_DURATION: Duration = Duration::fro...
  constant DEFAULT_PEER_TRUST_MAX_HISTORY_DURATION (line 47) | pub const DEFAULT_PEER_TRUST_MAX_HISTORY_DURATION: Duration =
  constant DEFAULT_PEER_FATAL_BAN_DURATION (line 49) | const DEFAULT_PEER_FATAL_BAN_DURATION: Duration = Duration::from_secs(60...
  constant DEFAULT_PEER_SOFT_BAN_DURATION (line 50) | const DEFAULT_PEER_SOFT_BAN_DURATION: Duration = Duration::from_secs(60 ...
  constant DEFAULT_PEER_FILE_NAME (line 53) | pub const DEFAULT_PEER_FILE_NAME: &str = "peers";
  constant DEFAULT_PEER_FILE_EXT (line 54) | pub const DEFAULT_PEER_FILE_EXT: &str = "dat";
  constant DEFAULT_PEER_DAT_FILE (line 55) | pub const DEFAULT_PEER_DAT_FILE: &str = "./peers.dat";
  constant DEFAULT_PING_INTERVAL (line 57) | pub const DEFAULT_PING_INTERVAL: u64 = 15;
  constant DEFAULT_PING_TIMEOUT (line 58) | pub const DEFAULT_PING_TIMEOUT: u64 = 30;
  constant DEFAULT_DISCOVERY_SYNC_INTERVAL (line 59) | pub const DEFAULT_DISCOVERY_SYNC_INTERVAL: u64 = 60 * 60;
  constant DEFAULT_PEER_MANAGER_HEART_BEAT_INTERVAL (line 61) | pub const DEFAULT_PEER_MANAGER_HEART_BEAT_INTERVAL: u64 = 30;
  constant DEFAULT_SELF_HEART_BEAT_INTERVAL (line 62) | pub const DEFAULT_SELF_HEART_BEAT_INTERVAL: u64 = 35;
  constant DEFAULT_RPC_TIMEOUT (line 64) | pub const DEFAULT_RPC_TIMEOUT: u64 = 10;
  constant DEFAULT_SELF_CHECK_INTERVAL (line 67) | pub const DEFAULT_SELF_CHECK_INTERVAL: u64 = 30;
  type PrivateKeyHexStr (line 69) | pub type PrivateKeyHexStr = String;
  type PeerAddrStr (line 70) | pub type PeerAddrStr = String;
  type PeerIdBase58Str (line 71) | pub type PeerIdBase58Str = String;
  type DnsAddr (line 75) | struct DnsAddr {
  type Err (line 81) | type Err = NetworkError;
  method from_str (line 83) | fn from_str(s: &str) -> Result<Self, Self::Err> {
  method from (line 104) | fn from(addr: DnsAddr) -> Self {
  type NetworkConfig (line 110) | pub struct NetworkConfig {
    method new (line 153) | pub fn new() -> Self {
    method max_connections (line 196) | pub fn max_connections(mut self, max: Option<usize>) -> ProtocolResult...
    method same_ip_conn_limit (line 208) | pub fn same_ip_conn_limit(mut self, limit: Option<usize>) -> Self {
    method inbound_conn_limit (line 216) | pub fn inbound_conn_limit(mut self, limit: Option<usize>) -> ProtocolR...
    method max_frame_length (line 228) | pub fn max_frame_length(mut self, max: Option<usize>) -> Self {
    method send_buffer_size (line 236) | pub fn send_buffer_size(mut self, size: Option<usize>) -> Self {
    method recv_buffer_size (line 244) | pub fn recv_buffer_size(mut self, size: Option<usize>) -> Self {
    method max_wait_streams (line 252) | pub fn max_wait_streams(mut self, max: Option<usize>) -> Self {
    method write_timeout (line 260) | pub fn write_timeout(mut self, timeout: Option<u64>) -> Self {
    method bootstraps (line 268) | pub fn bootstraps(
    method allowlist (line 301) | pub fn allowlist<S: AsRef<[String]>>(mut self, peer_id_strs: S) -> Pro...
    method allowlist_only (line 312) | pub fn allowlist_only(mut self, flag: Option<bool>) -> Self {
    method peer_dat_file (line 319) | pub fn peer_dat_file<P: AsRef<Path>>(mut self, path: P) -> Self {
    method peer_trust_metric (line 329) | pub fn peer_trust_metric(
    method peer_fatal_ban (line 349) | pub fn peer_fatal_ban(mut self, duration: Option<u64>) -> Self {
    method peer_soft_ban (line 357) | pub fn peer_soft_ban(mut self, duration: Option<u64>) -> Self {
    method secio_keypair (line 365) | pub fn secio_keypair(mut self, sk_hex: PrivateKeyHexStr) -> ProtocolRe...
    method ping_interval (line 377) | pub fn ping_interval(mut self, interval: Option<u64>) -> Self {
    method ping_timeout (line 385) | pub fn ping_timeout(mut self, timeout: u64) -> Self {
    method discovery_sync_interval (line 391) | pub fn discovery_sync_interval(mut self, interval: u64) -> Self {
    method peer_manager_heart_beat_interval (line 397) | pub fn peer_manager_heart_beat_interval(mut self, interval: u64) -> Se...
    method heart_beat_interval (line 403) | pub fn heart_beat_interval(mut self, interval: u64) -> Self {
    method rpc_timeout (line 409) | pub fn rpc_timeout(mut self, timeout: Option<u64>) -> Self {
    method selfcheck_interval (line 417) | pub fn selfcheck_interval(mut self, interval: Option<u64>) -> Self {
    method parse_peer_addr (line 425) | fn parse_peer_addr(addr: PeerAddrStr) -> ProtocolResult<Multiaddr> {
  method default (line 437) | fn default() -> Self {
  method from (line 443) | fn from(config: &NetworkConfig) -> ConnectionConfig {
  method from (line 456) | fn from(config: &NetworkConfig) -> PeerManagerConfig {
  type TimeoutConfig (line 480) | pub struct TimeoutConfig {
    method from (line 485) | fn from(config: &NetworkConfig) -> TimeoutConfig {
  method from (line 493) | fn from(config: &NetworkConfig) -> SelfCheckConfig {

FILE: core/network/src/connection/control.rs
  type ProtocolMessage (line 8) | pub struct ProtocolMessage {
  type ConnectionServiceControl (line 16) | pub struct ConnectionServiceControl {
    method new (line 21) | pub fn new(control: ServiceControl) -> Self {
    method send (line 25) | pub fn send(&self, message: ProtocolMessage) -> Result<(), SendErrorKi...

FILE: core/network/src/connection/keeper.rs
  type ConnectionServiceKeeper (line 40) | pub struct ConnectionServiceKeeper {
    method new (line 48) | pub fn new(
    method is_sys_shutdown (line 60) | fn is_sys_shutdown(&self) -> bool {
    method sys_shutdown (line 64) | fn sys_shutdown(&self) {
    method report_error (line 68) | fn report_error(&self, kind: ErrorKind) {
    method report_peer (line 82) | fn report_peer(&self, event: PeerManagerEvent) {
    method process_dailer_error (line 88) | fn process_dailer_error(&self, addr: Multiaddr, error: DialerErrorKind) {
    method process_listen_error (line 115) | fn process_listen_error(&self, addr: Multiaddr, error: ListenErrorKind) {
  method handle_error (line 135) | fn handle_error(&mut self, _ctx: &mut ServiceContext, err: ServiceError) {
  method handle_event (line 214) | fn handle_event(&mut self, ctx: &mut ServiceContext, evt: ServiceEvent) {

FILE: core/network/src/connection/mod.rs
  type ConnectionConfig (line 27) | pub struct ConnectionConfig {
  type ConnectionService (line 47) | pub struct ConnectionService<P: NetworkProtocol> {
  function new (line 59) | pub fn new(
  function listen (line 108) | pub async fn listen(&mut self, address: Multiaddr) -> Result<(), Network...
  function control (line 114) | pub fn control(&self) -> ConnectionServiceControl {
  function process_event (line 122) | pub fn process_event(&mut self, event: ConnectionEvent) {
  type Output (line 180) | type Output = ();
  method poll (line 182) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...

FILE: core/network/src/endpoint.rs
  constant GOSSIP_SCHEME (line 12) | pub const GOSSIP_SCHEME: &str = "/gossip";
  constant RPC_CALL_SCHEME (line 13) | pub const RPC_CALL_SCHEME: &str = "/rpc_call";
  constant RPC_RESPONSE_SCHEME (line 14) | pub const RPC_RESPONSE_SCHEME: &str = "/rpc_resp";
  constant MAX_ENDPOINT_LENGTH (line 16) | pub const MAX_ENDPOINT_LENGTH: usize = 120;
  type EndpointScheme (line 19) | pub enum EndpointScheme {
  type Endpoint (line 39) | pub struct Endpoint(String);
    method starts_with (line 42) | pub fn starts_with(&self, pat: &str) -> bool {
    method scheme (line 46) | pub fn scheme(&self) -> EndpointScheme {
    method root (line 59) | pub fn root(&self) -> String {
    method full_url (line 70) | pub fn full_url(&self) -> &str {
    method extend (line 74) | pub fn extend(&self, comp: &str) -> Result<Self, NetworkError> {
  method eq (line 82) | fn eq(&self, other: &Self) -> bool {
  method hash (line 90) | fn hash<H: Hasher>(&self, state: &mut H) {
  type Err (line 96) | type Err = NetworkError;
  method from_str (line 98) | fn from_str(end: &str) -> Result<Self, Self::Err> {
  type RpcId (line 128) | pub struct RpcId(u64);
    method value (line 131) | pub fn value(self) -> u64 {
  type RpcEndpoint (line 138) | pub struct RpcEndpoint {
    method endpoint (line 144) | pub fn endpoint(&self) -> &Endpoint {
    method rpc_id (line 148) | pub fn rpc_id(&self) -> RpcId {
    method extract_rpc_id_from (line 152) | fn extract_rpc_id_from(end: &Endpoint) -> Result<RpcId, NetworkError> {
    type Error (line 173) | type Error = NetworkError;
    method try_from (line 175) | fn try_from(end: Endpoint) -> Result<Self, Self::Error> {
  type Err (line 183) | type Err = NetworkError;
  method from_str (line 185) | fn from_str(end: &str) -> Result<Self, Self::Err> {
  function should_able_parse_valid_endpoint_url (line 203) | fn should_able_parse_valid_endpoint_url() {

FILE: core/network/src/error.rs
  type ErrorKind (line 15) | pub enum ErrorKind {
  type PeerIdNotFound (line 85) | pub struct PeerIdNotFound(pub(crate) Multiaddr);
  type NetworkError (line 90) | pub enum NetworkError {
    method from (line 162) | fn from(err: PeerIdNotFound) -> NetworkError {
    method from (line 168) | fn from(kind: ErrorKind) -> NetworkError {
    method from (line 174) | fn from(kind: Box<bincode::ErrorKind>) -> NetworkError {
    method from (line 186) | fn from(err: std::io::Error) -> NetworkError {
    method from (line 192) | fn from(err: tentacle::error::TransportErrorKind) -> NetworkError {
    method boxed (line 204) | pub fn boxed(self) -> Box<dyn Error + Send> {
  method from (line 180) | fn from(err: NetworkError) -> ProtocolError {
  function from (line 198) | fn from(err: NetworkError) -> Box<dyn Error + Send> {

FILE: core/network/src/event.rs
  type ConnectionEvent (line 19) | pub enum ConnectionEvent {
  type ProtocolIdentity (line 31) | pub enum ProtocolIdentity {
  type ConnectionErrorKind (line 39) | pub enum ConnectionErrorKind {
    method from (line 63) | fn from(err: TransportErrorKind) -> ConnectionErrorKind {
  type SessionErrorKind (line 77) | pub enum SessionErrorKind {
  type MisbehaviorKind (line 95) | pub enum MisbehaviorKind {
  type ConnectionType (line 108) | pub enum ConnectionType {
  type PeerManagerEvent (line 117) | pub enum PeerManagerEvent {

FILE: core/network/src/lib.rs
  type PeerIdExt (line 34) | pub trait PeerIdExt {
    method from_pubkey_bytes (line 35) | fn from_pubkey_bytes<'a, B: AsRef<[u8]> + 'a>(bytes: B) -> Result<Peer...
    method from_bytes (line 42) | fn from_bytes<'a, B: AsRef<[u8]> + 'a>(bytes: B) -> Result<PeerId, Net...
    method to_string (line 46) | fn to_string(&self) -> String;
    method into_bytes_ext (line 48) | fn into_bytes_ext(self) -> Bytes;
    method from_str_ext (line 50) | fn from_str_ext<'a, S: AsRef<str> + 'a>(s: S) -> Result<PeerId, Networ...
    method into_bytes_ext (line 56) | fn into_bytes_ext(self) -> Bytes {
    method to_string (line 60) | fn to_string(&self) -> String {

FILE: core/network/src/message/mod.rs
  type Headers (line 13) | pub struct Headers(HashMap<String, Vec<u8>>);
    method set_trace_id (line 22) | pub fn set_trace_id(&mut self, id: TraceId) {
    method set_span_id (line 27) | pub fn set_span_id(&mut self, id: u64) {
  method default (line 16) | fn default() -> Self {
  type NetworkMessage (line 34) | pub struct NetworkMessage {
    method new (line 46) | pub fn new(endpoint: Endpoint, content: Bytes, headers: Headers) -> Se...
    method trace_id (line 54) | pub fn trace_id(&self) -> Option<TraceId> {
    method span_id (line 66) | pub fn span_id(&self) -> Option<u64> {
    method encode (line 74) | pub fn encode(self) -> Result<Bytes, NetworkError> {
    method decode (line 83) | pub fn decode(bytes: Bytes) -> Result<Self, NetworkError> {
  type Hashes (line 95) | struct Hashes {
    method from (line 116) | fn from(q_hashes: Vec<QHash>) -> Hashes {
  type QHash (line 101) | struct QHash {
    method arbitrary (line 107) | fn arbitrary<G: quickcheck::Gen>(g: &mut G) -> QHash {
  function prop_protocol_type_serialization (line 127) | fn prop_protocol_type_serialization(hash: QHash) -> bool {
  function prop_vec_protocol_type_serialization (line 132) | fn prop_vec_protocol_type_serialization(hashes: Vec<QHash>) -> bool {

FILE: core/network/src/message/serde.rs
  function serialize (line 7) | pub fn serialize<T, S>(val: &T, s: S) -> Result<S::Ok, S::Error>
  type BytesVisit (line 17) | struct BytesVisit;
    type Value (line 30) | type Value = Bytes;
    method expecting (line 32) | fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
    method visit_byte_buf (line 37) | fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
  function deserialize (line 19) | pub fn deserialize<'de, T, D>(deserializer: D) -> Result<T, D::Error>

FILE: core/network/src/message/serde_multi.rs
  type TWrapper (line 9) | struct TWrapper<T: ProtocolCodecSync> {
  type VecT (line 15) | struct VecT<T: ProtocolCodecSync> {
  function serialize (line 19) | pub fn serialize<'se, V, T, S>(val: &'se V, s: S) -> Result<S::Ok, S::Er...
  function deserialize (line 37) | pub fn deserialize<'de, T, V, D>(deserializer: D) -> Result<V, D::Error>

FILE: core/network/src/metrics.rs
  constant METRICS_INTERVAL (line 16) | const METRICS_INTERVAL: Duration = Duration::from_secs(1);
  type Metrics (line 18) | pub(crate) struct Metrics<S> {
  function new (line 28) | pub fn new(sessions: S) -> Self {
  function report_pending_data (line 39) | fn report_pending_data(&self) {
  type Output (line 65) | type Output = ();
  method poll (line 67) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...

FILE: core/network/src/outbound/gossip.rs
  type NetworkGossip (line 15) | pub struct NetworkGossip {
    method new (line 20) | pub fn new(transmitter: Transmitter) -> Self {
    method package_message (line 24) | async fn package_message<M>(
    method send_to_sessions (line 47) | async fn send_to_sessions(
    method send_to_peers (line 64) | async fn send_to_peers<'a, P: AsRef<[Bytes]> + 'a>(
  method broadcast (line 91) | async fn broadcast<M>(
  method multicast (line 109) | async fn multicast<'a, M, P>(

FILE: core/network/src/outbound/rpc.rs
  type NetworkRpc (line 20) | pub struct NetworkRpc {
    method new (line 26) | pub fn new(transmitter: Transmitter, timeout: TimeoutConfig) -> Self {
    method send (line 33) | async fn send(
  method call (line 55) | async fn call<M, R>(
  method response (line 137) | async fn response<M>(

FILE: core/network/src/peer_manager/addr_set.rs
  constant MAX_ADDR_FAILURE (line 16) | const MAX_ADDR_FAILURE: u8 = MAX_RETRY_COUNT;
  type AddrInfo (line 19) | struct AddrInfo {
    method owned_addr (line 25) | pub fn owned_addr(&self) -> PeerMultiaddr {
    method owned_raw_addr (line 29) | pub fn owned_raw_addr(&self) -> Multiaddr {
    method failure (line 34) | pub fn failure(&self) -> usize {
    method inc_failure (line 38) | pub fn inc_failure(&self) {
    method give_up (line 42) | pub fn give_up(&self) {
    method reset_failure (line 47) | pub fn reset_failure(&self) {
    method connectable (line 51) | pub fn connectable(&self) -> bool {
    method from (line 65) | fn from(pma: PeerMultiaddr) -> AddrInfo {
    method borrow (line 74) | fn borrow(&self) -> &PeerMultiaddr {
  type Target (line 57) | type Target = PeerMultiaddr;
  method deref (line 59) | fn deref(&self) -> &Self::Target {
  method eq (line 80) | fn eq(&self, other: &Self) -> bool {
  method hash (line 88) | fn hash<H: Hasher>(&self, state: &mut H) {
  type PeerAddrSet (line 94) | pub struct PeerAddrSet {
    method new (line 100) | pub fn new(peer_id: PeerId) -> Self {
    method insert (line 107) | pub fn insert(&self, multiaddrs: Vec<PeerMultiaddr>) {
    method set (line 122) | pub fn set(&self, multiaddrs: Vec<PeerMultiaddr>) {
    method insert_raw (line 132) | pub(crate) fn insert_raw(&self, multiaddr: Multiaddr) {
    method remove (line 142) | pub fn remove(&self, multiaddr: &PeerMultiaddr) {
    method contains (line 146) | pub fn contains(&self, multiaddr: &PeerMultiaddr) -> bool {
    method all (line 150) | pub fn all(&self) -> Vec<PeerMultiaddr> {
    method all_raw (line 154) | pub fn all_raw(&self) -> Vec<Multiaddr> {
    method connectable (line 162) | pub fn connectable(&self) -> Vec<PeerMultiaddr> {
    method len (line 174) | pub fn len(&self) -> usize {
    method connectable_len (line 178) | pub fn connectable_len(&self) -> usize {
    method failure (line 183) | pub fn failure(&self, pma: &PeerMultiaddr) -> Option<usize> {
    method inc_failure (line 187) | pub fn inc_failure(&self, pma: &PeerMultiaddr) {
    method give_up (line 193) | pub fn give_up(&self, pma: &PeerMultiaddr) {
    method reset_failure (line 199) | pub fn reset_failure(&self, pma: &PeerMultiaddr) {
    method match_peer_id (line 205) | fn match_peer_id(&self, pma: &PeerMultiaddr) -> bool {

FILE: core/network/src/peer_manager/diagnostic.rs
  type NotFound (line 12) | pub struct NotFound {}
  type DiagnosticEvent (line 16) | pub enum DiagnosticEvent {
  function from (line 34) | fn from(event: &PeerManagerEvent) -> Self {
  type DiagnosticHookFn (line 48) | pub type DiagnosticHookFn = Box<dyn Fn(DiagnosticEvent) + Send + 'static>;
  type TrustReport (line 58) | pub struct TrustReport {
  type Diagnostic (line 66) | pub struct Diagnostic(Arc<Inner>);
    method new (line 69) | pub(super) fn new(inner: Arc<Inner>) -> Self {
    method session (line 73) | pub fn session(&self, peer_id: &PeerId) -> Option<SessionId> {
    method new_trust_interval (line 80) | pub fn new_trust_interval(&self, sid: SessionId) -> Result<TrustReport...

FILE: core/network/src/peer_manager/mod.rs
  constant SAME_IP_LIMIT_BAN (line 69) | const SAME_IP_LIMIT_BAN: Duration = Duration::from_secs(5 * 60);
  constant REPEATED_CONNECTION_TIMEOUT (line 70) | const REPEATED_CONNECTION_TIMEOUT: u64 = 30;
  constant BACKOFF_BASE (line 71) | const BACKOFF_BASE: u64 = 2;
  constant MAX_RETRY_INTERVAL (line 72) | const MAX_RETRY_INTERVAL: u64 = 512;
  constant MAX_RETRY_COUNT (line 73) | const MAX_RETRY_COUNT: u8 = 30;
  constant SHORT_ALIVE_SESSION (line 74) | const SHORT_ALIVE_SESSION: u64 = 3;
  constant MAX_CONNECTING_MARGIN (line 75) | const MAX_CONNECTING_MARGIN: usize = 10;
  constant MAX_RANDOM_NEXT_RETRY (line 76) | const MAX_RANDOM_NEXT_RETRY: u64 = 10;
  constant MAX_CONNECTING_TIMEOUT (line 77) | const MAX_CONNECTING_TIMEOUT: Duration = Duration::from_secs(30);
  constant GOOD_TRUST_SCORE (line 79) | const GOOD_TRUST_SCORE: u8 = 80u8;
  constant WORSE_TRUST_SCALAR_RATIO (line 80) | const WORSE_TRUST_SCALAR_RATIO: usize = 10;
  type NewSessionPreCheckError (line 83) | pub enum NewSessionPreCheckError {
  type PeerMultiaddr (line 102) | pub struct PeerMultiaddr(Multiaddr);
    method new (line 105) | pub fn new(mut ma: Multiaddr, peer_id: &PeerId) -> Self {
    method peer_id (line 113) | pub fn peer_id(&self) -> PeerId {
    method extract_id (line 117) | fn extract_id(ma: &Multiaddr) -> Option<PeerId> {
    method borrow (line 130) | fn borrow(&self) -> &Multiaddr {
    type Error (line 158) | type Error = PeerIdNotFound;
    method try_from (line 160) | fn try_from(ma: Multiaddr) -> Result<PeerMultiaddr, Self::Error> {
    method into (line 170) | fn into(self) -> Multiaddr {
  method eq (line 136) | fn eq(&self, other: &PeerMultiaddr) -> bool {
  method hash (line 144) | fn hash<H: Hasher>(&self, state: &mut H) {
  type Target (line 150) | type Target = Multiaddr;
  method deref (line 152) | fn deref(&self) -> &Self::Target {
  type ConnectingAttempt (line 176) | struct ConnectingAttempt {
    method new (line 183) | fn new(peer: ArcPeer) -> Self {
    method multiaddrs (line 194) | fn multiaddrs(&self) -> usize {
    method complete_one_multiaddr (line 198) | fn complete_one_multiaddr(&mut self, multiaddr: &PeerMultiaddr) {
    method is_timeout (line 202) | fn is_timeout(&self) -> bool {
    method set_at (line 207) | fn set_at(&mut self, duration: Duration) {
    method borrow (line 213) | fn borrow(&self) -> &PeerId {
  method eq (line 219) | fn eq(&self, other: &ConnectingAttempt) -> bool {
  method hash (line 227) | fn hash<H: Hasher>(&self, state: &mut H) {
  type Inner (line 232) | struct Inner {
    method new (line 244) | pub fn new(our_id: PeerId, sessions: SessionBook) -> Self {
    method add_listen (line 257) | pub fn add_listen(&self, multiaddr: PeerMultiaddr) {
    method listen (line 261) | pub fn listen(&self) -> HashSet<PeerMultiaddr> {
    method remove_listen (line 265) | pub fn remove_listen(&self, multiaddr: &PeerMultiaddr) {
    method set_chain_id (line 269) | pub fn set_chain_id(&self, chain_id: protocol::types::Hash) {
    method chain_id (line 273) | pub fn chain_id(&self) -> Arc<protocol::types::Hash> {
    method connected (line 277) | pub fn connected(&self) -> usize {
    method add_peer (line 282) | pub fn add_peer(&self, peer: ArcPeer) -> bool {
    method peer_count (line 287) | pub fn peer_count(&self) -> usize {
    method peer (line 291) | pub fn peer(&self, peer_id: &PeerId) -> Option<ArcPeer> {
    method contains (line 295) | pub fn contains(&self, peer_id: &PeerId) -> bool {
    method connectable_peers (line 299) | pub fn connectable_peers<F>(&self, max: usize, addition_filter: F) -> ...
    method session (line 319) | pub fn session(&self, sid: SessionId) -> Option<ArcSession> {
    method share_sessions (line 323) | pub fn share_sessions(&self) -> Vec<ArcSession> {
    method remove_session (line 327) | pub fn remove_session(&self, sid: SessionId) -> Option<ArcSession> {
    method package_peers (line 331) | pub fn package_peers(&self) -> Vec<ArcPeer> {
    method restore (line 335) | fn restore(&self, peers: Vec<ArcPeer>) {
    method outbound_count (line 339) | fn outbound_count(&self) -> usize {
  type UnidentifiedSessionEvent (line 344) | struct UnidentifiedSessionEvent {
  type UnidentifiedSession (line 349) | struct UnidentifiedSession {
    method new (line 356) | fn new(event: UnidentifiedSessionEvent, ident_fut: WaitIdentification)...
    method peer_id (line 364) | fn peer_id(&self) -> PeerId {
    method borrow (line 370) | fn borrow(&self) -> &SessionId {
  method eq (line 376) | fn eq(&self, other: &UnidentifiedSession) -> bool {
  method hash (line 384) | fn hash<H: Hasher>(&self, state: &mut H) {
  type PeerManagerConfig (line 390) | pub struct PeerManagerConfig {
  type PeerManagerHandle (line 430) | pub struct PeerManagerHandle {
    method peer_id (line 435) | pub fn peer_id(&self, sid: SessionId) -> Option<PeerId> {
    method set_chain_id (line 439) | pub fn set_chain_id(&self, chain_id: protocol::types::Hash) {
    method chain_id (line 443) | pub fn chain_id(&self) -> Arc<protocol::types::Hash> {
    method contains_session (line 447) | pub fn contains_session(&self, session_id: SessionId) -> bool {
    method random_addrs (line 451) | pub fn random_addrs(&self, max: usize, sid: SessionId) -> Vec<Multiadd...
    method listen_addrs (line 488) | pub fn listen_addrs(&self) -> Vec<Multiaddr> {
    method tag (line 503) | pub fn tag(&self, peer_id: &PeerId, tag: PeerTag) -> Result<(), Networ...
    method untag (line 521) | pub fn untag(&self, peer_id: &PeerId, tag: &PeerTag) {
    method tag_consensus (line 531) | pub fn tag_consensus(&self, peer_ids: Vec<PeerId>) {
  type PeerManager (line 553) | pub struct PeerManager {
    method new (line 582) | pub fn new(
    method handle (line 628) | pub fn handle(&self) -> PeerManagerHandle {
    method share_session_book (line 634) | pub fn share_session_book(&self, config: shared::Config) -> SharedSess...
    method register_diagnostic_hook (line 639) | pub fn register_diagnostic_hook(&mut self, f: diagnostic::DiagnosticHo...
    method diagnostic (line 644) | pub fn diagnostic(&self) -> diagnostic::Diagnostic {
    method enable_save_restore (line 648) | pub fn enable_save_restore(&mut self) {
    method restore_peers (line 654) | pub fn restore_peers(&self) -> Result<(), NetworkError> {
    method bootstrap (line 660) | pub fn bootstrap(&mut self) {
    method disconnect_session (line 676) | pub fn disconnect_session(&self, sid: SessionId) {
    method inner (line 684) | fn inner(&self) -> Arc<Inner> {
    method config (line 689) | fn config(&self) -> PeerManagerConfig {
    method set_connecting (line 694) | fn set_connecting(&mut self, peers: Vec<ArcPeer>) {
    method new_session_pre_check (line 700) | fn new_session_pre_check(
    method new_unidentified_session (line 835) | fn new_unidentified_session(&mut self, pubkey: PublicKey, ctx: Arc<Ses...
    method new_session (line 852) | fn new_session(&mut self, pubkey: PublicKey, ctx: Arc<SessionContext>) {
    method session_closed (line 894) | fn session_closed(&mut self, pid: PeerId, sid: SessionId) {
    method connect_failed (line 976) | fn connect_failed(&mut self, addr: Multiaddr, error_kind: ConnectionEr...
    method session_failed (line 1053) | fn session_failed(&self, sid: SessionId, error_kind: SessionErrorKind) {
    method update_peer_alive (line 1093) | fn update_peer_alive(&self, pid: &PeerId) {
    method peer_misbehave (line 1107) | fn peer_misbehave(&self, pid: PeerId, kind: MisbehaviorKind) {
    method trust_metric_feedback (line 1153) | fn trust_metric_feedback(&self, pid: PeerId, feedback: TrustFeedback) {
    method session_blocked (line 1236) | fn session_blocked(&self, ctx: Arc<SessionContext>) {
    method connect_peers_now (line 1261) | fn connect_peers_now(&mut self, peers: Vec<ArcPeer>) {
    method connect_peers (line 1284) | fn connect_peers(&mut self, peers: Vec<ArcPeer>) {
    method connect_peers_by_id (line 1325) | fn connect_peers_by_id(&mut self, pids: Vec<PeerId>) {
    method discover_multiaddr (line 1337) | fn discover_multiaddr(&mut self, addr: Multiaddr) {
    method dicover_multi_multiaddrs (line 1359) | fn dicover_multi_multiaddrs(&mut self, addrs: Vec<Multiaddr>) {
    method identified_addrs (line 1365) | fn identified_addrs(&self, pid: &PeerId, addrs: Vec<Multiaddr>) {
    method repeated_connection (line 1379) | fn repeated_connection(&mut self, ty: ConnectionType, sid: SessionId, ...
    method process_event (line 1413) | fn process_event(&mut self, event: PeerManagerEvent) {
  method drop (line 1452) | fn drop(&mut self) {
  type Output (line 1462) | type Output = ();
  method poll (line 1464) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...

FILE: core/network/src/peer_manager/peer.rs
  type Connectedness (line 27) | pub enum Connectedness {
    method from (line 45) | fn from(src: usize) -> Connectedness {
  function from (line 60) | fn from(src: Connectedness) -> usize {
  type Peer (line 66) | pub struct Peer {
    method new (line 81) | pub fn new(peer_id: PeerId) -> Self {
    method from_pubkey (line 97) | pub fn from_pubkey(pubkey: PublicKey) -> Result<Self, ErrorKind> {
    method owned_id (line 104) | pub fn owned_id(&self) -> PeerId {
    method has_pubkey (line 108) | pub fn has_pubkey(&self) -> bool {
    method owned_pubkey (line 112) | pub fn owned_pubkey(&self) -> Option<PublicKey> {
    method set_pubkey (line 116) | pub fn set_pubkey(&self, pubkey: PublicKey) -> Result<(), ErrorKind> {
    method trust_metric (line 128) | pub fn trust_metric(&self) -> Option<TrustMetric> {
    method set_trust_metric (line 132) | pub fn set_trust_metric(&self, metric: TrustMetric) {
    method remove_trust_metric (line 137) | pub fn remove_trust_metric(&self) {
    method connectedness (line 141) | pub fn connectedness(&self) -> Connectedness {
    method set_connectedness (line 145) | pub fn set_connectedness(&self, flag: Connectedness) {
    method set_session_id (line 150) | pub fn set_session_id(&self, sid: SessionId) {
    method session_id (line 154) | pub fn session_id(&self) -> SessionId {
    method connected_at (line 158) | pub fn connected_at(&self) -> u64 {
    method set_connected_at (line 162) | pub(super) fn set_connected_at(&self, at: u64) {
    method disconnected_at (line 166) | pub fn disconnected_at(&self) -> u64 {
    method set_disconnected_at (line 170) | pub(super) fn set_disconnected_at(&self, at: u64) {
    method alive (line 174) | pub fn alive(&self) -> u64 {
    method update_alive (line 178) | pub fn update_alive(&self) {
    method set_alive (line 186) | pub(super) fn set_alive(&self, live: u64) {
    method mark_connected (line 190) | pub fn mark_connected(&self, sid: SessionId) {
    method mark_disconnected (line 197) | pub fn mark_disconnected(&self) {
    method banned (line 204) | pub fn banned(&self) -> bool {
    method update_connected (line 221) | fn update_connected(&self) {
    method update_disconnected (line 225) | fn update_disconnected(&self) {
    method fmt (line 231) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type ArcPeer (line 248) | pub struct ArcPeer(Arc<Peer>);
    method new (line 251) | pub fn new(peer_id: PeerId) -> Self {
    method from_pubkey (line 255) | pub fn from_pubkey(pubkey: PublicKey) -> Result<Self, ErrorKind> {
    method borrow (line 269) | fn borrow(&self) -> &PeerId {
  type Target (line 261) | type Target = Peer;
  method deref (line 263) | fn deref(&self) -> &Self::Target {
  method eq (line 275) | fn eq(&self, other: &ArcPeer) -> bool {
  method hash (line 283) | fn hash<H: Hasher>(&self, state: &mut H) {
  function should_reset_trust_metric_history_after_unban (line 298) | fn should_reset_trust_metric_history_after_unban() {
  function should_be_able_to_convert_between_connectedness_and_usize (line 323) | fn should_be_able_to_convert_between_connectedness_and_usize() {

FILE: core/network/src/peer_manager/retry.rs
  type Retry (line 10) | pub struct Retry {
    method new (line 17) | pub fn new(max: u8) -> Self {
    method inc (line 25) | pub fn inc(&self) {
    method eta (line 37) | pub fn eta(&self) -> u64 {
    method reset (line 42) | pub fn reset(&self) {
    method ready (line 46) | pub fn ready(&self) -> bool {
    method count (line 52) | pub fn count(&self) -> u8 {
    method next_attempt_at (line 56) | pub fn next_attempt_at(&self) -> u64 {
    method run_out (line 60) | pub fn run_out(&self) -> bool {
    method set_next_attempt_at (line 65) | pub(crate) fn set_next_attempt_at(&self, at: u64) {
    method set (line 70) | pub(crate) fn set(&self, n: u8) {

FILE: core/network/src/peer_manager/save_restore.rs
  type SerdePeer (line 23) | struct SerdePeer {
    method from (line 38) | fn from(peer: ArcPeer) -> SerdePeer {
  type Error (line 59) | type Error = NetworkError;
  method try_from (line 61) | fn try_from(serde_peer: SerdePeer) -> Result<Self, Self::Error> {
  type SaveRestore (line 92) | pub(super) trait SaveRestore: Send + Sync {
    method save (line 93) | fn save(&self, peers: Vec<ArcPeer>) -> Result<(), NetworkError>;
    method restore (line 94) | fn restore(&self) -> Result<Vec<ArcPeer>, NetworkError>;
    method save (line 111) | fn save(&self, peers: Vec<ArcPeer>) -> Result<(), NetworkError> {
    method restore (line 121) | fn restore(&self) -> Result<Vec<ArcPeer>, NetworkError> {
    method save (line 144) | fn save(&self, _peers: Vec<ArcPeer>) -> Result<(), NetworkError> {
    method restore (line 148) | fn restore(&self) -> Result<Vec<ArcPeer>, NetworkError> {
  type PeerDatFile (line 98) | pub(super) struct PeerDatFile {
    method new (line 103) | pub fn new<P: AsRef<Path>>(path: P) -> Self {
  type NoPeerDatFile (line 141) | pub(super) struct NoPeerDatFile;
  type SerdePubKey (line 154) | pub struct SerdePubKey(PublicKey);
    method serialize (line 157) | fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    method deserialize (line 166) | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
  type SerdePeerId (line 205) | pub struct SerdePeerId(PeerId);
    method serialize (line 208) | fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    method deserialize (line 217) | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>

FILE: core/network/src/peer_manager/session_book.rs
  type Host (line 24) | type Host = String;
  type Count (line 25) | type Count = usize;
  type Error (line 28) | pub enum Error {
  type Config (line 40) | pub struct Config {
    method from (line 57) | fn from(config: &PeerManagerConfig) -> Config {
  method default (line 47) | fn default() -> Self {
  type Session (line 67) | pub struct Session {
  type ArcSession (line 76) | pub struct ArcSession(Arc<Session>);
    method new (line 79) | pub fn new(peer: ArcPeer, ctx: Arc<SessionContext>) -> Self {
    method ty (line 92) | pub fn ty(&self) -> SessionType {
    method block (line 96) | pub fn block(&self) {
    method is_blocked (line 100) | pub fn is_blocked(&self) -> bool {
    method unblock (line 104) | pub fn unblock(&self) {
    method borrow (line 110) | fn borrow(&self) -> &SessionId {
  method eq (line 116) | fn eq(&self, other: &ArcSession) -> bool {
  method hash (line 124) | fn hash<H: Hasher>(&self, state: &mut H) {
  type Target (line 130) | type Target = Session;
  method deref (line 132) | fn deref(&self) -> &Self::Target {
  type AcceptableSession (line 137) | pub struct AcceptableSession(pub ArcSession);
  type SessionBook (line 139) | pub struct SessionBook {
    method new (line 158) | pub fn new(config: Config) -> Self {
    method len (line 168) | pub fn len(&self) -> usize {
    method get (line 172) | pub fn get(&self, sid: &SessionId) -> Option<ArcSession> {
    method all (line 176) | pub fn all(&self) -> Vec<ArcSession> {
    method iter_fn (line 180) | pub fn iter_fn<R, F>(&self, f: F) -> R
    method inbound_count (line 188) | pub fn inbound_count(&self) -> usize {
    method outbound_count (line 192) | pub fn outbound_count(&self) -> usize {
    method acceptable (line 196) | pub fn acceptable(&self, session: &ArcSession) -> Result<(), self::Err...
    method insert (line 218) | pub fn insert(&self, AcceptableSession(session): AcceptableSession) {
    method remove (line 235) | pub fn remove(&self, sid: &SessionId) -> Option<ArcSession> {
  method default (line 150) | fn default() -> SessionBook {
  function make_multiaddr (line 275) | fn make_multiaddr(port: u16, id: Option<PeerId>) -> Multiaddr {
  function make_peer_multiaddr (line 287) | fn make_peer_multiaddr(port: u16, id: PeerId) -> PeerMultiaddr {
  function make_peer (line 293) | fn make_peer(port: u16) -> ArcPeer {
  function make_session (line 304) | fn make_session(port: u16, sid: SessionId, ty: SessionType) -> ArcSession {
  function should_reject_session_when_reach_same_ip_conn_limit (line 313) | fn should_reject_session_when_reach_same_ip_conn_limit() {
  function should_reduce_host_count (line 338) | fn should_reduce_host_count() {
  function should_reject_inbound_session_when_reach_inbound_limit (line 360) | fn should_reject_inbound_session_when_reach_inbound_limit() {
  function should_reject_outbound_session_when_reach_outbound_limit (line 386) | fn should_reject_outbound_session_when_reach_outbound_limit() {

FILE: core/network/src/peer_manager/shared.rs
  type Config (line 14) | pub struct Config {
    method from (line 21) | fn from(config: &NetworkConfig) -> Self {
  type SharedSessions (line 30) | pub struct SharedSessions {
    method new (line 36) | pub(super) fn new(inner: Arc<Inner>, config: Config) -> Self {
    method sessions (line 43) | fn sessions(&self) -> &SessionBook {
  method all_sendable (line 49) | fn all_sendable(&self) -> Vec<SessionId> {
  method all_blocked (line 56) | fn all_blocked(&self) -> Vec<SessionId> {
  method refresh_blocked (line 63) | fn refresh_blocked(&self) {
  method peers (line 80) | fn peers(&self, pids: Vec<PeerId>) -> (Vec<SessionId>, Vec<PeerId>) {
  method all (line 96) | fn all(&self) -> Vec<SessionId> {
  method connected_addr (line 100) | fn connected_addr(&self, sid: SessionId) -> Option<ConnectedAddr> {
  method pending_data_size (line 106) | fn pending_data_size(&self, sid: SessionId) -> usize {
  method allowlist (line 113) | fn allowlist(&self) -> Vec<PeerId> {
  method len (line 126) | fn len(&self) -> usize {
  function should_return_unconnected_peer_ids (line 141) | fn should_return_unconnected_peer_ids() {

FILE: core/network/src/peer_manager/tags.rs
  type TagError (line 11) | pub enum TagError {
  method from (line 19) | fn from(err: TagError) -> NetworkError {
  type Tags (line 25) | pub struct Tags(RwLock<HashSet<PeerTag>>);
    method get_banned_until (line 34) | pub fn get_banned_until(&self) -> Option<u64> {
    method insert_ban (line 44) | pub fn insert_ban(&self, timeout: Duration) -> Result<(), TagError> {
    method set_ban_until (line 50) | pub fn set_ban_until(&self, until: u64) {
    method insert (line 54) | pub fn insert(&self, tag: PeerTag) -> Result<(), TagError> {
    method remove (line 65) | pub fn remove(&self, tag: &PeerTag) {
    method contains (line 69) | pub fn contains(&self, tag: &PeerTag) -> bool {
  method default (line 28) | fn default() -> Self {

FILE: core/network/src/peer_manager/test_manager.rs
  function make_multiaddr (line 41) | fn make_multiaddr(port: u16, id: Option<PeerId>) -> Multiaddr {
  function make_peer_multiaddr (line 53) | fn make_peer_multiaddr(port: u16, id: PeerId) -> PeerMultiaddr {
  function make_peer (line 59) | fn make_peer(port: u16) -> ArcPeer {
  function make_bootstraps (line 70) | fn make_bootstraps(num: usize) -> Vec<ArcPeer> {
  type MockManager (line 82) | struct MockManager {
    method new (line 88) | pub fn new(inner: PeerManager, event_tx: UnboundedSender<PeerManagerEv...
    method poll_event (line 92) | pub async fn poll_event(&mut self, event: PeerManagerEvent) {
    method poll (line 97) | pub async fn poll(&mut self) {
    method config (line 101) | pub fn config(&self) -> PeerManagerConfig {
    method connecting (line 105) | pub fn connecting(&self) -> &HashSet<ConnectingAttempt> {
    method connecting_mut (line 109) | pub fn connecting_mut(&mut self) -> &mut HashSet<ConnectingAttempt> {
    method core_inner (line 113) | pub fn core_inner(&self) -> Arc<Inner> {
  type Output (line 119) | type Output = ();
  method poll (line 121) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...
  function make_manager (line 127) | fn make_manager(
  function make_pubkey (line 165) | fn make_pubkey() -> PublicKey {
  function make_sessions (line 170) | async fn make_sessions(
  function should_accept_new_peer_inbound_connection_on_new_session (line 217) | async fn should_accept_new_peer_inbound_connection_on_new_session() {
  function should_accept_outbound_connection_and_remove_mached_connecting_on_new_session (line 259) | async fn should_accept_outbound_connection_and_remove_mached_connecting_...
  function should_set_matched_peer_pubkey_on_new_session (line 299) | async fn should_set_matched_peer_pubkey_on_new_session() {
  function should_reset_outbound_peer_multiaddr_failure_count_on_new_session (line 330) | async fn should_reset_outbound_peer_multiaddr_failure_count_on_new_sessi...
  function should_ignore_inbound_address_on_new_session (line 368) | async fn should_ignore_inbound_address_on_new_session() {
  function should_enforce_id_in_multiaddr_on_new_session (line 400) | async fn should_enforce_id_in_multiaddr_on_new_session() {
  function should_add_new_outbound_multiaddr_to_peer_on_new_session (line 437) | async fn should_add_new_outbound_multiaddr_to_peer_on_new_session() {
  function should_always_remove_inbound_multiaddr_even_if_we_reach_max_connections_on_new_session (line 475) | async fn should_always_remove_inbound_multiaddr_even_if_we_reach_max_con...
  function should_remove_matched_peer_inbound_address_from_ctx_even_if_it_doesnt_have_id_on_new_session (line 512) | async fn should_remove_matched_peer_inbound_address_from_ctx_even_if_it_...
  function should_reject_new_connection_for_same_peer_on_new_session (line 548) | async fn should_reject_new_connection_for_same_peer_on_new_session() {
  function should_keep_new_connection_for_error_outdated_peer_session_on_new_session (line 584) | async fn should_keep_new_connection_for_error_outdated_peer_session_on_n...
  function should_reject_new_connections_when_we_reach_max_connections_on_new_session (line 619) | async fn should_reject_new_connections_when_we_reach_max_connections_on_...
  function should_remove_connecting_even_if_session_is_reject_due_to_reach_max_connections_on_new_session (line 650) | async fn should_remove_connecting_even_if_session_is_reject_due_to_reach...
  function should_reject_banned_peer_on_new_session (line 690) | async fn should_reject_banned_peer_on_new_session() {
  function should_start_trust_metric_on_connected_peer_on_new_session (line 725) | async fn should_start_trust_metric_on_connected_peer_on_new_session() {
  function should_replace_low_quality_peer_with_better_one_due_to_max_connections_on_new_session (line 750) | async fn should_replace_low_quality_peer_with_better_one_due_to_max_conn...
  function should_not_replace_any_peer_if_incoming_hasnt_trust_score_due_to_max_connections_on_new_session (line 806) | async fn should_not_replace_any_peer_if_incoming_hasnt_trust_score_due_t...
  function should_not_replace_any_higher_score_peer_due_to_max_connections_on_new_session (line 855) | async fn should_not_replace_any_higher_score_peer_due_to_max_connections...
  function should_not_replace_peer_in_allowlist_with_better_score_peer_due_to_max_connections_on_new_session (line 910) | async fn should_not_replace_peer_in_allowlist_with_better_score_peer_due...
  function should_not_replace_peer_not_old_enough_due_to_max_connections_on_new_session (line 968) | async fn should_not_replace_peer_not_old_enough_due_to_max_connections_o...
  function should_remove_session_on_session_closed (line 1020) | async fn should_remove_session_on_session_closed() {
  function should_not_reconnect_to_closed_session_immediately_after_session_closed (line 1051) | async fn should_not_reconnect_to_closed_session_immediately_after_sessio...
  function should_pause_trust_metric_on_session_closed (line 1095) | async fn should_pause_trust_metric_on_session_closed() {
  function should_increase_retry_for_short_alive_session_on_session_closed (line 1111) | async fn should_increase_retry_for_short_alive_session_on_session_closed...
  function should_properly_update_peer_state_even_if_session_not_found_on_session_closed (line 1142) | async fn should_properly_update_peer_state_even_if_session_not_found_on_...
  function should_inc_peer_multiaddr_failure_count_for_io_error_on_connect_failed (line 1163) | async fn should_inc_peer_multiaddr_failure_count_for_io_error_on_connect...
  function should_inc_peer_multiaddr_failure_count_for_dns_error_on_connect_failed (line 1188) | async fn should_inc_peer_multiaddr_failure_count_for_dns_error_on_connec...
  function should_give_up_peer_multiaddr_if_peer_id_not_match_on_connect_failed (line 1215) | async fn should_give_up_peer_multiaddr_if_peer_id_not_match_on_connect_f...
  function should_give_up_peer_itself_if_secio_handshake_error_on_connect_failed (line 1245) | async fn should_give_up_peer_itself_if_secio_handshake_error_on_connect_...
  function should_give_up_peer_itself_if_protocol_handle_error_on_connect_failed (line 1268) | async fn should_give_up_peer_itself_if_protocol_handle_error_on_connect_...
  function should_increase_peer_retry_if_all_multiaddrs_failed_on_conect_failed (line 1289) | async fn should_increase_peer_retry_if_all_multiaddrs_failed_on_conect_f...
  function should_give_up_peer_if_run_out_retry_on_connect_failed (line 1312) | async fn should_give_up_peer_if_run_out_retry_on_connect_failed() {
  function should_return_early_if_we_already_give_up_peer_on_connect_failed (line 1340) | async fn should_return_early_if_we_already_give_up_peer_on_connect_faile...
  function should_wait_for_other_connecting_multiaddrs_if_we_dont_give_up_peer_on_connect_failed (line 1363) | async fn should_wait_for_other_connecting_multiaddrs_if_we_dont_give_up_...
  function should_ensure_disconnect_session_on_session_failed (line 1406) | async fn should_ensure_disconnect_session_on_session_failed() {
  function should_increase_retry_for_io_error_on_session_failed (line 1437) | async fn should_increase_retry_for_io_error_on_session_failed() {
  function should_give_up_peer_for_protocol_error_on_session_failed (line 1455) | async fn should_give_up_peer_for_protocol_error_on_session_failed() {
  function should_give_up_peer_for_unexpected_error_on_session_failed (line 1480) | async fn should_give_up_peer_for_unexpected_error_on_session_failed() {
  function should_reduce_trust_score_on_session_failed (line 1505) | async fn should_reduce_trust_score_on_session_failed() {
  function should_update_peer_alive_on_peer_alive (line 1532) | async fn should_update_peer_alive_on_peer_alive() {
  function should_reset_peer_retry_on_peer_alive (line 1555) | async fn should_reset_peer_retry_on_peer_alive() {
  function should_disconnect_peer_on_misbehave (line 1574) | async fn should_disconnect_peer_on_misbehave() {
  function should_reduce_trust_score_on_misbehave (line 1600) | async fn should_reduce_trust_score_on_misbehave() {
  function should_increase_retry_for_ping_timeout_on_misbehave (line 1626) | async fn should_increase_retry_for_ping_timeout_on_misbehave() {
  function should_give_up_peer_for_ping_unexpect_on_misbehave (line 1643) | async fn should_give_up_peer_for_ping_unexpect_on_misbehave() {
  function should_give_up_peer_for_discovery_on_misbehave (line 1664) | async fn should_give_up_peer_for_discovery_on_misbehave() {
  function should_mark_session_blocked_on_session_blocked (line 1685) | async fn should_mark_session_blocked_on_session_blocked() {
  function should_add_one_bad_event_on_session_blocked (line 1709) | async fn should_add_one_bad_event_on_session_blocked() {
  function should_try_all_peer_multiaddrs_on_connect_peers_now (line 1735) | async fn should_try_all_peer_multiaddrs_on_connect_peers_now() {
  function should_skip_peers_not_in_can_connect_or_not_connected_connectedness_on_connect_peers_now (line 1796) | async fn should_skip_peers_not_in_can_connect_or_not_connected_connected...
  function should_connect_peers_even_if_they_are_not_retry_ready_on_connect_peers_now (line 1824) | async fn should_connect_peers_even_if_they_are_not_retry_ready_on_connec...
  function should_insert_peers_on_discover_multi_addrs (line 1858) | async fn should_insert_peers_on_discover_multi_addrs() {
  function should_not_reset_exist_multiaddr_failure_count_on_discover_multi_addrs (line 1887) | async fn should_not_reset_exist_multiaddr_failure_count_on_discover_mult...
  function should_skip_our_listen_multiaddrs_on_discover_multi_addrs (line 1912) | async fn should_skip_our_listen_multiaddrs_on_discover_multi_addrs() {
  function should_add_multiaddrs_to_peer_on_identified_addrs (line 1934) | async fn should_add_multiaddrs_to_peer_on_identified_addrs() {
  function should_push_id_to_multiaddrs_if_not_included_on_identified_addrs (line 1964) | async fn should_push_id_to_multiaddrs_if_not_included_on_identified_addr...
  function should_not_reset_exist_multiaddr_failure_count_on_identified_addrs (line 1989) | async fn should_not_reset_exist_multiaddr_failure_count_on_identified_ad...
  function should_reset_peer_failure_for_outbound_multiaddr_on_repeated_connection (line 2016) | async fn should_reset_peer_failure_for_outbound_multiaddr_on_repeated_co...
  function should_remove_inbound_multiaddr_on_repeated_connection (line 2044) | async fn should_remove_inbound_multiaddr_on_repeated_connection() {
  function should_enforce_id_if_not_included_on_repeated_connection (line 2066) | async fn should_enforce_id_if_not_included_on_repeated_connection() {
  function should_add_new_listen_on_add_new_listen_addr (line 2094) | async fn should_add_new_listen_on_add_new_listen_addr() {
  function should_push_id_to_listen_multiaddr_if_not_included_on_add_new_listen_addr (line 2119) | async fn should_push_id_to_listen_multiaddr_if_not_included_on_add_new_l...
  function should_remove_listen_on_remove_listen_addr (line 2141) | async fn should_remove_listen_on_remove_listen_addr() {
  function should_remove_listen_even_if_no_peer_id_included_on_remove_listen_addr (line 2163) | async fn should_remove_listen_even_if_no_peer_id_included_on_remove_list...
  function should_always_include_our_listen_addrs_in_return_from_manager_handle_random_addrs (line 2185) | async fn should_always_include_our_listen_addrs_in_return_from_manager_h...
  function should_accept_always_allow_peer_even_if_we_reach_max_connections_on_new_session (line 2208) | async fn should_accept_always_allow_peer_even_if_we_reach_max_connection...
  function should_only_connect_peers_in_allowlist_if_enable_allowlist_only (line 2267) | async fn should_only_connect_peers_in_allowlist_if_enable_allowlist_only...
  function should_only_accept_incoming_from_peer_in_allowlist_if_enable_allowlist_only (line 2333) | async fn should_only_accept_incoming_from_peer_in_allowlist_if_enable_al...
  function should_disconnect_and_ban_peer_for_fatal_feedback_on_trust_metric (line 2423) | async fn should_disconnect_and_ban_peer_for_fatal_feedback_on_trust_metr...
  function should_exclude_always_allow_peer_from_fatal_feedback_ban_on_trust_metric (line 2455) | async fn should_exclude_always_allow_peer_from_fatal_feedback_ban_on_tru...
  function should_add_one_bad_event_for_bad_feedback_on_trust_metric (line 2477) | async fn should_add_one_bad_event_for_bad_feedback_on_trust_metric() {
  function should_add_ten_bad_events_for_worse_feedback_on_trust_metric (line 2497) | async fn should_add_ten_bad_events_for_worse_feedback_on_trust_metric() {
  function should_disconnect_and_soft_ban_peer_if_below_fourty_score_on_worse_feedback_on_trust_metric (line 2517) | async fn should_disconnect_and_soft_ban_peer_if_below_fourty_score_on_wo...
  function should_not_knock_out_peer_just_set_up_trust_metric_on_worse_feedback_on_trust_metric (line 2560) | async fn should_not_knock_out_peer_just_set_up_trust_metric_on_worse_fee...
  function should_not_punish_always_allow_peer_when_its_score_below_fourty_on_worse_feedback_on_trust_metric (line 2592) | async fn should_not_punish_always_allow_peer_when_its_score_below_fourty...
  function should_do_nothing_for_neutral_feedback_on_trust_metric (line 2625) | async fn should_do_nothing_for_neutral_feedback_on_trust_metric() {
  function should_add_one_bad_event_for_good_feedback_on_trust_metric (line 2650) | async fn should_add_one_bad_event_for_good_feedback_on_trust_metric() {
  function should_pick_good_peer_first_on_finding_connectable_peers (line 2670) | async fn should_pick_good_peer_first_on_finding_connectable_peers() {
  function should_setup_trust_metric_if_none_on_session_closed (line 2733) | async fn should_setup_trust_metric_if_none_on_session_closed() {
  function should_setup_trust_metric_if_none_on_session_failed (line 2753) | async fn should_setup_trust_metric_if_none_on_session_failed() {
  function should_setup_trust_metric_if_none_on_peer_misbehave (line 2782) | async fn should_setup_trust_metric_if_none_on_peer_misbehave() {
  function should_setup_trust_metric_if_none_on_session_blocked (line 2810) | async fn should_setup_trust_metric_if_none_on_session_blocked() {
  function should_able_to_tag_peer (line 2843) | async fn should_able_to_tag_peer() {
  function should_able_to_untag_peer (line 2855) | async fn should_able_to_untag_peer() {
  function should_remove_old_consensus_peer_tag_when_tag_consensus (line 2870) | async fn should_remove_old_consensus_peer_tag_when_tag_consensus() {
  function should_reject_same_ip_connection_when_reach_limit_on_new_session (line 2889) | async fn should_reject_same_ip_connection_when_reach_limit_on_new_sessio...
  function should_not_dail_new_peer_after_reach_outbound_conn_limit (line 2963) | async fn should_not_dail_new_peer_after_reach_outbound_conn_limit() {
  function should_reject_inbound_conn_when_reach_inbound_conn_limit (line 2989) | async fn should_reject_inbound_conn_when_reach_inbound_conn_limit() {
  function should_accept_peer_in_allowlist_even_reach_inbound_conn_limit (line 3038) | async fn should_accept_peer_in_allowlist_even_reach_inbound_conn_limit() {
  function should_reject_new_connection_for_same_peer_on_unidentified_session (line 3117) | async fn should_reject_new_connection_for_same_peer_on_unidentified_sess...
  function should_reject_same_ip_connection_when_reach_limit_on_unidentified_session (line 3143) | async fn should_reject_same_ip_connection_when_reach_limit_on_unidentifi...
  function should_accept_always_allow_peer_even_if_we_reach_max_connections_on_unidentified_session (line 3209) | async fn should_accept_always_allow_peer_even_if_we_reach_max_connection...
  function should_remove_connecting_attempt_when_reach_timeout (line 3271) | async fn should_remove_connecting_attempt_when_reach_timeout() {

FILE: core/network/src/peer_manager/time.rs
  function now (line 3) | pub fn now() -> u64 {
  function duration_since (line 7) | pub fn duration_since(now: SystemTime, early: SystemTime) -> Duration {

FILE: core/network/src/peer_manager/trust_metric.rs
  constant PROPORTIONAL_WEIGHT (line 18) | pub const PROPORTIONAL_WEIGHT: f64 = 0.4;
  constant INTERGRAL_WEIGHT (line 19) | pub const INTERGRAL_WEIGHT: f64 = 0.6;
  constant OPTIMISTIC_HISTORY_WEIGHT (line 20) | pub const OPTIMISTIC_HISTORY_WEIGHT: f64 = 0.8;
  constant DERIVATIVE_POSITIVE_WEIGHT (line 21) | pub const DERIVATIVE_POSITIVE_WEIGHT: f64 = 0.0;
  constant DERIVATIVE_NEGATIVE_WEIGHT (line 22) | pub const DERIVATIVE_NEGATIVE_WEIGHT: f64 = 0.1;
  constant INITIAL_HISTORY_VALUE (line 24) | pub const INITIAL_HISTORY_VALUE: f64 = 0.8f64;
  constant KNOCK_OUT_SCORE (line 25) | pub const KNOCK_OUT_SCORE: u8 = 40;
  constant GOOD_INTERVAL_CAP (line 26) | pub const GOOD_INTERVAL_CAP: usize = 30;
  constant DEFAULT_INTERVAL_DURATION (line 28) | pub const DEFAULT_INTERVAL_DURATION: Duration = Duration::from_secs(60);
  constant DEFAULT_MAX_HISTORY_DURATION (line 29) | pub const DEFAULT_MAX_HISTORY_DURATION: Duration = Duration::from_secs(2...
  type TrustMetricConfig (line 39) | pub struct TrustMetricConfig {
    method new (line 47) | pub fn new(interval: Duration, max_history: Duration) -> Self {
    method interval (line 58) | pub fn interval(&self) -> Duration {
    method finish (line 62) | fn finish(mut self) -> Self {
  method default (line 79) | fn default() -> Self {
  type FadedMemory (line 92) | struct FadedMemory(f64);
    method new (line 103) | fn new(history_value: f64) -> Self {
  type Target (line 95) | type Target = f64;
  method deref (line 97) | fn deref(&self) -> &Self::Target {
  type History (line 109) | struct History {
    method new (line 119) | fn new(max_intervals: u64, max_memorys: u64) -> History {
    method intervals (line 131) | fn intervals(&self) -> u64 {
    method latest_trust_value (line 135) | fn latest_trust_value(&self) -> f64 {
    method remember_interval (line 139) | fn remember_interval(&mut self, trust_value: f64) {
    method update_aggregate_trust (line 170) | fn update_aggregate_trust(&mut self) {
  type Inner (line 202) | pub struct Inner {
    method new (line 210) | pub fn new(config: Arc<TrustMetricConfig>) -> Self {
    method trust_score (line 222) | pub fn trust_score(&self) -> u8 {
    method good_events (line 226) | pub fn good_events(&self, num: usize) {
    method bad_events (line 236) | pub fn bad_events(&self, num: usize) {
    method knock_out (line 240) | pub fn knock_out(&self) -> bool {
    method events (line 244) | pub fn events(&self) -> (usize, usize) {
    method enter_new_interval (line 251) | pub fn enter_new_interval(&self) {
    method reset_history (line 265) | pub fn reset_history(&self) {
    method trust_value (line 275) | fn trust_value(&self) -> f64 {
    method proportional_value (line 293) | fn proportional_value(&self) -> Option<f64> {
    method intergral_value (line 304) | fn intergral_value(&self) -> f64 {
  type HeartBeat (line 309) | struct HeartBeat {
    method new (line 318) | pub fn new(
  method drop (line 341) | fn drop(&mut self) {
  type Output (line 348) | type Output = <Delay as Future>::Output;
  method poll (line 350) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...
  type TrustMetric (line 371) | pub struct TrustMetric {
    method new (line 378) | pub fn new(config: Arc<TrustMetricConfig>) -> Self {
    method start (line 386) | pub fn start(&self) {
    method is_started (line 407) | pub fn is_started(&self) -> bool {
    method pause (line 411) | pub fn pause(&self) {
    method bad_events_count (line 418) | pub fn bad_events_count(&self) -> usize {
    method good_events_count (line 423) | pub fn good_events_count(&self) -> usize {
    method intervals (line 428) | pub fn intervals(&self) -> u64 {
  type Target (line 434) | type Target = Arc<Inner>;
  method deref (line 436) | fn deref(&self) -> &Self::Target {
  function basic_metric_test (line 448) | fn basic_metric_test() {
  function good_interval_cap_test (line 502) | fn good_interval_cap_test() {

FILE: core/network/src/protocols/core.rs
  constant PING_PROTOCOL_ID (line 22) | pub const PING_PROTOCOL_ID: usize = 1;
  constant IDENTIFY_PROTOCOL_ID (line 23) | pub const IDENTIFY_PROTOCOL_ID: usize = 2;
  constant DISCOVERY_PROTOCOL_ID (line 24) | pub const DISCOVERY_PROTOCOL_ID: usize = 3;
  constant TRANSMITTER_PROTOCOL_ID (line 25) | pub const TRANSMITTER_PROTOCOL_ID: usize = 4;
  type OpenedProtocols (line 32) | pub struct OpenedProtocols {}
    method register (line 35) | pub fn register(peer_id: PeerId, proto_id: ProtocolId) {
    method unregister (line 46) | pub fn unregister(peer_id: &PeerId, proto_id: ProtocolId) {
    method remove (line 52) | pub fn remove(peer_id: &PeerId) {
    method is_open (line 57) | pub fn is_open(peer_id: &PeerId, proto_id: &ProtocolId) -> bool {
    method is_all_opened (line 65) | pub fn is_all_opened(peer_id: &PeerId) -> bool {
  type CoreProtocolBuilder (line 75) | pub struct CoreProtocolBuilder {
    method new (line 108) | pub fn new() -> Self {
    method ping (line 117) | pub fn ping(
    method identify (line 129) | pub fn identify(
    method discovery (line 140) | pub fn discovery(
    method transmitter (line 152) | pub fn transmitter(
    method build (line 163) | pub fn build(self) -> CoreProtocol {
  type CoreProtocol (line 82) | pub struct CoreProtocol {
    method build (line 88) | pub fn build() -> CoreProtocolBuilder {
    method transmitter (line 92) | pub fn transmitter(&self) -> Transmitter {
  method target (line 98) | fn target() -> TargetProtocol {
  method metas (line 102) | fn metas(self) -> Vec<ProtocolMeta> {

FILE: core/network/src/protocols/discovery.rs
  constant NAME (line 22) | pub const NAME: &str = "chain_discovery";
  constant SUPPORT_VERSIONS (line 23) | pub const SUPPORT_VERSIONS: [&str; 1] = ["0.1"];
  type Discovery (line 25) | pub struct Discovery(DiscoveryProtocol);
    method new (line 28) | pub fn new(
    method build_meta (line 44) | pub fn build_meta(self, protocol_id: ProtocolId) -> ProtocolMeta {

FILE: core/network/src/protocols/discovery/addr.rs
  constant DEFAULT_MAX_KNOWN (line 21) | pub(crate) const DEFAULT_MAX_KNOWN: usize = 5000;
  type Misbehavior (line 23) | pub enum Misbehavior {
  type MisbehaveResult (line 35) | pub enum MisbehaveResult {
    method is_disconnect (line 44) | pub fn is_disconnect(&self) -> bool {
  type AddrReporter (line 49) | struct AddrReporter {
    method new (line 55) | pub fn new(reporter: UnboundedSender<PeerManagerEvent>) -> Self {
    method report (line 63) | pub fn report(&mut self, event: PeerManagerEvent) {
  type AddressManager (line 76) | pub struct AddressManager {
    method new (line 83) | pub fn new(peer_mgr: PeerManagerHandle, event_tx: UnboundedSender<Peer...
    method add_new_addr (line 89) | pub fn add_new_addr(&mut self, _sid: SessionId, addr: Multiaddr) {
    method add_new_addrs (line 95) | pub fn add_new_addrs(&mut self, _sid: SessionId, addrs: Vec<Multiaddr>) {
    method misbehave (line 102) | pub fn misbehave(&mut self, sid: SessionId, _kind: Misbehavior) -> Mis...
    method get_random (line 121) | pub fn get_random(&mut self, n: usize, sid: SessionId) -> Vec<Multiadd...
  type AddrKnown (line 127) | pub struct AddrKnown {
    method new (line 135) | pub(crate) fn new(max_known: usize) -> AddrKnown {
    method insert (line 144) | pub(crate) fn insert(&mut self, key: ConnectableAddr) {
    method contains (line 161) | pub(crate) fn contains(&self, addr: &ConnectableAddr) -> bool {
    method remove (line 165) | pub(crate) fn remove<'a>(&mut self, addrs: impl Iterator<Item = &'a Co...
  method default (line 176) | fn default() -> AddrKnown {
  type ConnectableAddr (line 182) | pub struct ConnectableAddr {
    method from (line 188) | fn from(addr: &Multiaddr) -> ConnectableAddr {
    method from (line 213) | fn from(addr: Multiaddr) -> ConnectableAddr {
    method from (line 219) | fn from(addr: SocketAddr) -> ConnectableAddr {
    method port (line 237) | pub fn port(&self) -> u16 {
    method is_reachable (line 241) | pub fn is_reachable(&self) -> bool {

FILE: core/network/src/protocols/discovery/behaviour.rs
  constant CHECK_INTERVAL (line 22) | const CHECK_INTERVAL: Duration = Duration::from_secs(3);
  type DiscoveryBehaviour (line 24) | pub struct DiscoveryBehaviour {
    method new (line 68) | pub fn new(
    method handle (line 89) | pub fn handle(&self) -> DiscoveryBehaviourHandle {
    method recv_substreams (line 96) | fn recv_substreams(&mut self, cx: &mut Context) {
    method check_interval (line 126) | fn check_interval(&mut self, cx: &mut Context) {
    method poll_substreams (line 144) | fn poll_substreams(&mut self, cx: &mut Context, announce_multiaddrs: &...
    method remove_dead_stream (line 199) | fn remove_dead_stream(&mut self) {
    method send_messages (line 214) | fn send_messages(&mut self, cx: &mut Context) {
  type DiscoveryBehaviourHandle (line 54) | pub struct DiscoveryBehaviourHandle {
    method contains_session (line 60) | pub fn contains_session(&self, session_id: SessionId) -> bool {
  type Item (line 242) | type Item = ();
  method poll_next (line 244) | fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Opt...

FILE: core/network/src/protocols/discovery/message.rs
  type ListenPort (line 7) | pub enum ListenPort {
  type GetNodes (line 13) | pub struct GetNodes {
    method listen_port (line 23) | pub fn listen_port(&self) -> Option<u16> {
  type Node (line 32) | pub struct Node {
    method addrs (line 38) | pub fn addrs(self) -> Vec<Multiaddr> {
    method with_addrs (line 44) | pub fn with_addrs(addrs: Vec<Multiaddr>) -> Self {
  type Nodes (line 52) | pub struct Nodes {
  type Payload (line 60) | pub enum Payload {
  type DiscoveryMessage (line 68) | pub struct DiscoveryMessage {
    method new_get_nodes (line 74) | pub fn new_get_nodes(version: u32, count: u32, listen_port: Option<u16...
    method new_nodes (line 86) | pub fn new_nodes(announce: bool, nodes: Vec<Vec<Multiaddr>>) -> Self {
    method fmt (line 97) | fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Err...
  function discovery_message_serialize_deserialize (line 128) | fn discovery_message_serialize_deserialize() {

FILE: core/network/src/protocols/discovery/protocol.rs
  type DiscoveryProtocol (line 14) | pub struct DiscoveryProtocol {
    method new (line 21) | pub fn new(behaviour: DiscoveryBehaviour) -> DiscoveryProtocol {
  method init (line 32) | fn init(&mut self, context: &mut ProtocolContext) {
  method connected (line 56) | fn connected(&mut self, context: ProtocolContextMutRef, _: &str) {
  method disconnected (line 92) | fn disconnected(&mut self, context: ProtocolContextMutRef) {
  method received (line 100) | fn received(&mut self, context: ProtocolContextMutRef, data: bytes::Byte...

FILE: core/network/src/protocols/discovery/substream.rs
  constant VERSION (line 30) | const VERSION: u32 = 0;
  constant MAX_ADDR_TO_SEND (line 32) | const MAX_ADDR_TO_SEND: u32 = 1000;
  constant ANNOUNCE_INTERVAL (line 34) | const ANNOUNCE_INTERVAL: u64 = 3600 * 24;
  constant ANNOUNCE_THRESHOLD (line 35) | const ANNOUNCE_THRESHOLD: usize = 10;
  constant MAX_ADDRS (line 38) | const MAX_ADDRS: usize = 3;
  type DiscoveryCodec (line 40) | pub(crate) struct DiscoveryCodec {
  method default (line 45) | fn default() -> DiscoveryCodec {
  type Error (line 53) | type Error = io::Error;
  type Item (line 54) | type Item = DiscoveryMessage;
  method decode (line 56) | fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, S...
  type Error (line 75) | type Error = io::Error;
  type Item (line 76) | type Item = DiscoveryMessage;
  method encode (line 78) | fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(),...
  type SubstreamKey (line 90) | pub struct SubstreamKey {
  type StreamHandle (line 96) | pub struct StreamHandle {
  method poll_read (line 105) | fn poll_read(
  method poll_write (line 135) | fn poll_write(self: Pin<&mut Self>, _cx: &mut Context, buf: &[u8]) -> Po...
  method poll_flush (line 146) | fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context) -> Poll<io::Resul...
  method poll_shutdown (line 150) | fn poll_shutdown(self: Pin<&mut Self>, _cx: &mut Context) -> Poll<io::Re...
  type SubstreamValue (line 155) | pub struct SubstreamValue {
    method new (line 173) | pub(crate) fn new(
    method remote_connectable_addr (line 213) | fn remote_connectable_addr(&self) -> ConnectableAddr {
    method check_timer (line 217) | pub(crate) fn check_timer(&mut self) {
    method send_messages (line 228) | pub(crate) fn send_messages(&mut self, cx: &mut Context) -> Result<(),...
    method handle_message (line 248) | pub(crate) fn handle_message(
    method receive_messages (line 376) | pub(crate) fn receive_messages(
  type Substream (line 416) | pub struct Substream {
    method new (line 424) | pub fn new(context: ProtocolContextMutRef, receiver: Receiver<Vec<u8>>...
    method key (line 449) | pub fn key(&self) -> SubstreamKey {
  type RemoteAddress (line 459) | pub(crate) enum RemoteAddress {
    method to_inner (line 467) | fn to_inner(&self) -> &Multiaddr {
    method into_inner (line 473) | pub(crate) fn into_inner(self) -> Multiaddr {
    method update_port (line 479) | fn update_port(&mut self, port: u16) {

FILE: core/network/src/protocols/identify.rs
  constant NAME (line 27) | pub const NAME: &str = "chain_identify";
  constant SUPPORT_VERSIONS (line 28) | pub const SUPPORT_VERSIONS: [&str; 1] = ["0.2"];
  type Identify (line 30) | pub struct Identify {
    method new (line 35) | pub fn new(peer_mgr: PeerManagerHandle, event_tx: UnboundedSender<Peer...
    method build_meta (line 46) | pub fn build_meta(self, protocol_id: ProtocolId) -> ProtocolMeta {
    method build_meta (line 60) | pub fn build_meta(self, protocol_id: ProtocolId) -> ProtocolMeta {
    method wait_identified (line 71) | pub fn wait_identified(peer_id: PeerId) -> WaitIdentification {
    method wait_failed (line 75) | pub fn wait_failed(peer_id: &PeerId, error: String) {

FILE: core/network/src/protocols/identify/behaviour.rs
  type AddrReporter (line 17) | struct AddrReporter {
    method new (line 23) | pub fn new(reporter: UnboundedSender<PeerManagerEvent>) -> Self {
    method report (line 31) | pub fn report(&self, event: PeerManagerEvent) {
  type IdentifyBehaviour (line 45) | pub struct IdentifyBehaviour {
    method new (line 53) | pub fn new(peer_mgr: PeerManagerHandle, event_tx: UnboundedSender<Peer...
    method chain_id (line 62) | pub fn chain_id(&self) -> String {
    method local_listen_addrs (line 66) | pub fn local_listen_addrs(&self) -> Vec<Multiaddr> {
    method send_identity (line 73) | pub fn send_identity(&self, context: &StateContext) {
    method send_ack (line 95) | pub fn send_ack(&self, context: &StateContext) {
    method verify_remote_identity (line 117) | pub fn verify_remote_identity(
    method process_listens (line 128) | pub fn process_listens(&self, context: &StateContext, listens: Vec<Mul...
    method process_observed (line 140) | pub fn process_observed(&self, context: &StateContext, observed: Multi...
    method add_observed_addr (line 156) | pub fn add_observed_addr(

FILE: core/network/src/protocols/identify/common.rs
  function reachable (line 6) | pub fn reachable(addr: &Multiaddr) -> bool {

FILE: core/network/src/protocols/identify/identification.rs
  type Index (line 11) | type Index = usize;
  type WaitIdentification (line 13) | pub struct WaitIdentification {
    method new (line 19) | fn new(ident_status: Arc<Mutex<IdentificationStatus>>) -> Self {
  type Output (line 28) | type Output = Result<(), super::protocol::Error>;
  method poll (line 30) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...
  method drop (line 46) | fn drop(&mut self) {
  type Identification (line 53) | pub struct Identification {
    method new (line 58) | pub(crate) fn new() -> Self {
    method wait (line 64) | pub fn wait(&self) -> WaitIdentification {
    method pass (line 68) | pub fn pass(&self) {
    method failed (line 72) | pub fn failed(&self, error: super::protocol::Error) {
    method fail_if_not_done (line 76) | fn fail_if_not_done(&self) {
    method done (line 87) | fn done(&self, ret: Result<(), super::protocol::Error>) {
  method drop (line 105) | fn drop(&mut self) {
  type IndexedWaker (line 110) | struct IndexedWaker {
    method wake (line 116) | fn wake(self) {
    method borrow (line 122) | fn borrow(&self) -> &Index {
  method eq (line 128) | fn eq(&self, other: &IndexedWaker) -> bool {
  method hash (line 136) | fn hash<H: Hasher>(&self, state: &mut H) {
  type WakerSet (line 141) | struct WakerSet {
    method new (line 147) | fn new() -> WakerSet {
    method insert (line 154) | fn insert(&mut self, waker: Waker) -> Index {
    method remove (line 167) | fn remove(&mut self, idx: Index) {
    method wake (line 171) | fn wake(self) {
  type IdentificationStatus (line 178) | enum IdentificationStatus {
  method default (line 184) | fn default() -> Self {

FILE: core/network/src/protocols/identify/message.rs
  constant MAX_LISTEN_ADDRS (line 8) | pub const MAX_LISTEN_ADDRS: usize = 10;
  type Error (line 11) | pub enum Error {
  type AddressInfoMessage (line 22) | pub trait AddressInfoMessage {
    method validate (line 23) | fn validate(&self) -> Result<(), self::Error>;
    method listen_addrs (line 24) | fn listen_addrs(&self) -> Vec<Multiaddr>;
    method observed_addr (line 25) | fn observed_addr(&self) -> Option<Multiaddr>;
    method listen_addrs (line 29) | fn listen_addrs(&self) -> Vec<Multiaddr> {
    method observed_addr (line 35) | fn observed_addr(&self) -> Option<Multiaddr> {
    method validate (line 39) | fn validate(&self) -> Result<(), self::Error> {
  type AddressInfo (line 48) | pub struct AddressInfo {
    method new (line 56) | pub fn new(listen_addrs: Vec<Multiaddr>, observed_addr: Multiaddr) -> ...
    method listen_addrs (line 63) | pub fn listen_addrs(&self) -> Vec<Multiaddr> {
    method observed_addr (line 69) | pub fn observed_addr(&self) -> Option<Multiaddr> {
    method validate (line 73) | pub fn validate(&self) -> Result<(), self::Error> {
    method mock_valid (line 86) | pub fn mock_valid() -> Self {
    method mock_invalid (line 97) | pub fn mock_invalid() -> Self {
  type Identity (line 106) | pub struct Identity {
    method new (line 114) | pub fn new(chain_id: String, addr_info: AddressInfo) -> Self {
    method validate (line 121) | pub fn validate(&self) -> Result<(), self::Error> {
    method into_bytes (line 125) | pub fn into_bytes(self) -> Result<Bytes, EncodeError> {
    method mock_valid (line 133) | pub fn mock_valid() -> Self {
    method mock_invalid (line 143) | pub fn mock_invalid() -> Self {
  type Acknowledge (line 157) | pub struct Acknowledge {
    method new (line 163) | pub fn new(addr_info: AddressInfo) -> Self {
    method validate (line 169) | pub fn validate(&self) -> Result<(), self::Error> {
    method into_bytes (line 173) | pub fn into_bytes(self) -> Result<Bytes, EncodeError> {
    method mock_valid (line 181) | pub fn mock_valid() -> Self {
    method mock_invalid (line 188) | pub fn mock_invalid() -> Self {

FILE: core/network/src/protocols/identify/protocol.rs
  constant DEFAULT_TIMEOUT (line 33) | pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(8);
  constant MAX_MESSAGE_SIZE (line 34) | pub const MAX_MESSAGE_SIZE: usize = 5 * 1000;
  type Error (line 43) | pub enum Error {
  type IdentifyProtocolContext (line 74) | pub struct IdentifyProtocolContext<'a>(ProtocolContextMutRef<'a>);
  type IdentifyProtocolContext (line 76) | pub struct IdentifyProtocolContext<'a>(pub &'a crate::test::mock::Protoc...
  type RemotePeer (line 80) | pub struct RemotePeer {
    method from_proto_context (line 89) | pub fn from_proto_context(
  type NoEncryption (line 86) | pub struct NoEncryption;
  type StateContext (line 107) | pub struct StateContext {
    method from_proto_context (line 116) | pub fn from_proto_context(
    method observed_addr (line 131) | pub fn observed_addr(&self) -> Multiaddr {
    method send_message (line 139) | pub fn send_message(&self, msg: Bytes) {
    method disconnect (line 152) | pub fn disconnect(&self) {
    method open_protocols (line 156) | pub fn open_protocols(&self) {
    method set_open_protocols_timeout (line 166) | pub fn set_open_protocols_timeout(&mut self, timeout: Duration) {
    method set_timeout (line 183) | pub fn set_timeout(&mut self, description: &'static str, timeout: Dura...
    method cancel_timeout (line 204) | pub fn cancel_timeout(&self) {
  method drop (line 212) | fn drop(&mut self) {
  type ClientProcedure (line 223) | pub enum ClientProcedure {
  type ServerProcedure (line 235) | pub enum ServerProcedure {
  type State (line 246) | pub enum State {
  type IdentifyProtocol (line 260) | pub struct IdentifyProtocol {
    method new (line 270) | pub fn new(behaviour: Arc<IdentifyBehaviour>) -> Self {
    method new (line 278) | pub fn new() -> Self {
    method wait (line 285) | pub fn wait(peer_id: PeerId) -> WaitIdentification {
    method wait_failed (line 292) | pub fn wait_failed(peer_id: &PeerId, error: String) {
    method on_connected (line 298) | pub fn on_connected(&mut self, protocol_context: &IdentifyProtocolCont...
    method on_disconnected (line 352) | pub fn on_disconnected(&mut self, protocol_context: &IdentifyProtocolC...
    method on_received (line 368) | pub fn on_received(&mut self, protocol_context: &IdentifyProtocolConte...
  method connected (line 512) | fn connected(&mut self, protocol_context: ProtocolContextMutRef, _versio...
  method disconnected (line 516) | fn disconnected(&mut self, protocol_context: ProtocolContextMutRef) {
  method received (line 520) | fn received(&mut self, protocol_context: ProtocolContextMutRef, data: by...
  function finish_identify (line 525) | fn finish_identify(peer: &RemotePeer, result: Result<(), self::Error>) {

FILE: core/network/src/protocols/identify/tests.rs
  constant PROTOCOL_ID (line 16) | const PROTOCOL_ID: usize = 2;
  constant SESSION_ID (line 17) | const SESSION_ID: usize = 2;
  type BehaviourEvent (line 20) | pub enum BehaviourEvent {
  type MockIdentifyBehaviour (line 28) | pub struct MockIdentifyBehaviour {
    method new (line 34) | pub fn new() -> Self {
    method event (line 41) | pub fn event(&self) -> Option<BehaviourEvent> {
    method send_identity (line 45) | pub fn send_identity(&self, _: &StateContext) {
    method send_ack (line 49) | pub fn send_ack(&self, _: &StateContext) {
    method process_listens (line 53) | pub fn process_listens(&self, _: &StateContext, _listen_addrs: Vec<Mul...
    method process_observed (line 57) | pub fn process_observed(&self, _: &StateContext, _observed_addr: Multi...
    method verify_remote_identity (line 61) | pub fn verify_remote_identity(&self, _identity: &message::Identity) ->...
    method skip_chain_id_verify (line 73) | pub fn skip_chain_id_verify(&self, result: bool) {
  function should_reject_unencrypted_connection (line 79) | fn should_reject_unencrypted_connection() {
  function should_wait_client_identity_for_inbound_connection (line 99) | async fn should_wait_client_identity_for_inbound_connection() {
  function should_disconnect_if_wait_client_identity_timeout (line 118) | async fn should_disconnect_if_wait_client_identity_timeout() {
  function should_register_opened_protocol (line 148) | async fn should_register_opened_protocol() {
  function should_send_identity_to_server_for_outbound_connection (line 168) | async fn should_send_identity_to_server_for_outbound_connection() {
  function should_disconnect_if_wait_server_ack_timeout (line 193) | async fn should_disconnect_if_wait_server_ack_timeout() {
  function should_disconnect_if_exceed_max_message_size (line 229) | async fn should_disconnect_if_exceed_max_message_size() {
  function should_send_ack_if_identity_is_valid_on_server_side (line 244) | async fn should_send_ack_if_identity_is_valid_on_server_side() {
  function should_disconnect_if_client_open_protocols_timeout (line 273) | async fn should_disconnect_if_client_open_protocols_timeout() {
  function should_disconnect_if_client_send_undecodeable_identity (line 313) | async fn should_disconnect_if_client_send_undecodeable_identity() {
  function should_disconnect_if_client_send_invalid_identity (line 338) | async fn should_disconnect_if_client_send_invalid_identity() {
  function should_disconnect_if_client_send_different_chain_id (line 363) | async fn should_disconnect_if_client_send_different_chain_id() {
  function should_disconnect_if_client_send_data_during_open_protocols (line 389) | async fn should_disconnect_if_client_send_data_during_open_protocols() {
  function should_open_protocols_after_receive_valid_ack_from_server (line 428) | async fn should_open_protocols_after_receive_valid_ack_from_server() {
  function should_disconnect_if_server_send_undecodeable_ack (line 456) | async fn should_disconnect_if_server_send_undecodeable_ack() {
  function should_disconnect_if_server_send_invalid_ack (line 483) | async fn should_disconnect_if_server_send_invalid_ack() {
  function should_disconnect_if_server_send_data_during_open_protocols (line 508) | async fn should_disconnect_if_server_send_data_during_open_protocols() {
  function should_disconnect_if_either_send_data_no_in_negotiate_procedure (line 546) | async fn should_disconnect_if_either_send_data_no_in_negotiate_procedure...
  function should_wake_wait_identification_after_call_finish_identify (line 563) | async fn should_wake_wait_identification_after_call_finish_identify() {
  function should_pass_error_to_wait_identification_result_if_failed_identify (line 605) | async fn should_pass_error_to_wait_identification_result_if_failed_ident...
  function should_pass_disconnected_to_wait_identification_result_if_still_wait_identify_but_disconnected (line 648) | async fn should_pass_disconnected_to_wait_identification_result_if_still...
  function should_remove_from_opened_protocols_after_disconnect (line 675) | async fn should_remove_from_opened_protocols_after_disconnect() {

FILE: core/network/src/protocols/ping.rs
  constant NAME (line 18) | pub const NAME: &str = "chain_ping";
  constant SUPPORT_VERSIONS (line 19) | pub const SUPPORT_VERSIONS: [&str; 1] = ["0.1"];
  type Ping (line 21) | pub struct Ping(PingProtocol);
    method new (line 24) | pub fn new(
    method build_meta (line 37) | pub fn build_meta(self, protocol_id: ProtocolId) -> ProtocolMeta {

FILE: core/network/src/protocols/ping/behaviour.rs
  type PingEventReporter (line 16) | pub struct PingEventReporter {
    method new (line 22) | pub fn new(inner: UnboundedSender<PeerManagerEvent>) -> Self {
    method is_mgr_shutdown (line 29) | fn is_mgr_shutdown(&self) -> bool {
    method mgr_shutdown (line 33) | fn mgr_shutdown(&self) {
  type EventTranslator (line 41) | pub struct EventTranslator {
  type Output (line 47) | type Output = ();
  method poll (line 49) | fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Ou...

FILE: core/network/src/protocols/ping/message.rs
  type PingPayload (line 5) | pub enum PingPayload {
  type PingMessage (line 13) | pub struct PingMessage {
    method new_pong (line 19) | pub fn new_pong(nonce: u32) -> Self {
    method new_ping (line 25) | pub fn new_ping(nonce: u32) -> Self {
    method into_bytes (line 31) | pub fn into_bytes(self) -> Result<Bytes, EncodeError> {

FILE: core/network/src/protocols/ping/protocol.rs
  constant SEND_PING_TOKEN (line 22) | const SEND_PING_TOKEN: u64 = 0;
  constant CHECK_TIMEOUT_TOKEN (line 23) | const CHECK_TIMEOUT_TOKEN: u64 = 1;
  type PingEvent (line 27) | pub enum PingEvent {
  type PingStatus (line 40) | struct PingStatus {
    method nonce (line 51) | fn nonce(&self) -> u32 {
    method elapsed (line 59) | fn elapsed(&self) -> Duration {
  type PingProtocol (line 71) | pub struct PingProtocol {
    method new (line 79) | pub fn new(
    method send_event (line 92) | pub fn send_event(&mut self, event: PingEvent) {
  method init (line 100) | fn init(&mut self, context: &mut ProtocolContext) {
  method connected (line 117) | fn connected(&mut self, context: ProtocolContextMutRef, version: &str) {
  method disconnected (line 145) | fn disconnected(&mut self, context: ProtocolContextMutRef) {
  method received (line 154) | fn received(&mut self, context: ProtocolContextMutRef, data: bytes::Byte...
  method notify (line 212) | fn notify(&mut self, context: &mut ProtocolContext, token: u64) {

FILE: core/network/src/protocols/transmitter.rs
  constant NAME (line 20) | pub const NAME: &str = "chain_transmitter";
  constant SUPPORT_VERSIONS (line 21) | pub const SUPPORT_VERSIONS: [&str; 1] = ["0.3"];
  constant DATA_SEQ_TIMEOUT (line 22) | pub const DATA_SEQ_TIMEOUT: Duration = Duration::from_secs(60);
  constant MAX_CHUNK_SIZE (line 23) | pub const MAX_CHUNK_SIZE: usize = 4 * 1000 * 1000;
  type Transmitter (line 26) | pub struct Transmitter {
    method new (line 33) | pub fn new(router: MessageRouter<Snappy>, peer_mgr: PeerManagerHandle)...
    method build_meta (line 42) | pub fn build_meta(self, protocol_id: ProtocolId) -> ProtocolMeta {
    method compressor (line 54) | pub fn compressor(&self) -> impl Compression {

FILE: core/network/src/protocols/transmitter/behaviour.rs
  type TransmitterBehaviour (line 31) | pub struct TransmitterBehaviour {
    method new (line 36) | pub fn new() -> Self {
    method init (line 42) | pub fn init(
    method send (line 58) | pub fn send(&self, msg: TransmitterMessage) -> impl Future<Output = Re...
  type PendingSending (line 89) | struct PendingSending {
  type BackgroundSending (line 94) | struct BackgroundSending {
    method new (line 104) | pub fn new(
    method context (line 120) | pub fn context(&self) -> SendingContext<'_> {
  type Output (line 131) | type Output = ();
  method poll (line 133) | fn poll(mut self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::O...
  type MessageContext (line 153) | type MessageContext = protocol::traits::Context;
  type SendingContext (line 155) | struct SendingContext<'a> {
  function send (line 163) | fn send(&self, msg: TransmitterMessage) -> Result<(), NetworkError> {
  function send_to_sessions (line 172) | fn send_to_sessions(
  function send_to_peers (line 296) | fn send_to_peers(
  function filter_blocked (line 331) | fn filter_blocked(

FILE: core/network/src/protocols/transmitter/message.rs
  type Recipient (line 8) | pub enum Recipient {
  type TransmitterMessage (line 13) | pub struct TransmitterMessage {
  type ReceivedMessage (line 20) | pub struct ReceivedMessage {
  type SeqChunkMessage (line 26) | pub(crate) struct SeqChunkMessage {
    method encode (line 33) | pub fn encode(self) -> Bytes {
    method decode (line 45) | pub fn decode(mut bytes: Bytes) -> Self {
  function test_internal_message_codec (line 61) | fn test_internal_message_codec() {

FILE: core/network/src/protocols/transmitter/protocol.rs
  type TransmitterProtocol (line 14) | pub struct TransmitterProtocol {
    method new (line 23) | pub fn new(router: MessageRouter<Snappy>, peer_mgr: PeerManagerHandle)...
  method connected (line 35) | fn connected(&mut self, context: ProtocolContextMutRef, _version: &str) {
  method received (line 52) | fn received(&mut self, ctx: ProtocolContextMutRef, data: Bytes) {

FILE: core/network/src/reactor/mod.rs
  type Reactor (line 19) | pub trait Reactor: Send + Sync {
    method react (line 20) | async fn react(
    method react (line 44) | async fn react(
  type MessageReactor (line 28) | pub struct MessageReactor<M: MessageCodec, H: MessageHandler<Message = M...
  function generate (line 32) | pub fn generate<M: MessageCodec, H: MessageHandler<Message = M>>(h: H) -...
  function rpc_resp (line 36) | pub fn rpc_resp<M: MessageCodec>() -> MessageReactor<M, NoopHandler<M>> {
  type NoopHandler (line 110) | pub struct NoopHandler<M> {
  function new (line 118) | pub fn new() -> Self {
  type Message (line 128) | type Message = M;
  method process (line 130) | async fn process(&self, _: Context, _: Self::Message) -> TrustFeedback {

FILE: core/network/src/reactor/router.rs
  type NoEncryption (line 27) | pub struct NoEncryption {}
  type RemotePeer (line 3
Condensed preview — 348 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,002K chars).
[
  {
    "path": ".dockerignore",
    "chars": 69,
    "preview": "devtools/chain/data\ndevtools/dex\n.github\ndocs\ntests/e2e/node_modules\n"
  },
  {
    "path": ".github/CODEOWNERS",
    "chars": 30,
    "preview": "/ @nervosnetwork/muta-dev-team"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.md",
    "chars": 541,
    "preview": "---\nname: Bug Report\nabout: Report a bug\nlabels: t:bug\n---\n\n<!-- Please use this template while reporting a bug and prov"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature.md",
    "chars": 238,
    "preview": "---\nname: Feature Request\nabout: Suggest a feature to the Muta-Chain project\nlabels: t:feature\n---\n\n<!-- Please only use"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/help.md",
    "chars": 75,
    "preview": "---\nname: Help me\nabout: What kind of help do you want?\nlabels: t:help\n---\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 432,
    "preview": "<!--  Thanks for sending a pull request! -->\n<!--  Have I run `make ci`? -->\n\n**What this PR does / why we need it**:\n\n\n"
  },
  {
    "path": ".github/semantic.yml",
    "chars": 847,
    "preview": "# By default types specified in commitizen/conventional-commit-types is used.\n# See: https://github.com/commitizen/conve"
  },
  {
    "path": ".gitignore",
    "chars": 480,
    "preview": "# Generated by Cargo\n# will have compiled files and executables\n/target/\n\n# These are backup files generated by rustfmt\n"
  },
  {
    "path": ".helmignore",
    "chars": 398,
    "preview": "# Patterns to ignore when building packages.\n# This supports shell glob matching, relative path matching, and\n# negation"
  },
  {
    "path": "CHANGELOG/CHANGELOG-0.1.md",
    "chars": 55299,
    "preview": "\n\n## [0.1.2-beta](https://github.com/nervosnetwork/muta/compare/v0.1.2-beta2...v0.1.2-beta) (2020-06-04)\n\n\n\n## [0.1.2-be"
  },
  {
    "path": "CHANGELOG/CHANGELOG-0.2.md",
    "chars": 73352,
    "preview": "# [](https://github.com/nervosnetwork/muta/compare/v0.2.0-rc.2.1...v) (2020-09-15)\n\n\n### Bug Fixes\n\n* **cli:** expose ve"
  },
  {
    "path": "CHANGELOG/README.md",
    "chars": 211,
    "preview": "# CHANGELOGs\n> use: conventional-changelog\n>\n> example command: conventional-changelog -p angular -i CHANGELOG-0.2.md -s"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 4691,
    "preview": "# Contributing\n\nOur goal is to make contributing to the `muta` project easy and transparent.\n\nWhen contributing to this "
  },
  {
    "path": "Cargo.toml",
    "chars": 2664,
    "preview": "[package]\nname = \"muta\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository = \"https:"
  },
  {
    "path": "LICENSE",
    "chars": 1074,
    "preview": "MIT License\n\nCopyright (c) 2019 Nervos Foundation\n\nPermission is hereby granted, free of charge, to any person obtaining"
  },
  {
    "path": "Makefile",
    "chars": 2667,
    "preview": "ERBOSE := $(if ${CI},--verbose,)\n\nCOMMIT := $(shell git rev-parse --short HEAD)\n\nifneq (\"$(wildcard /usr/lib/librocksdb."
  },
  {
    "path": "OWNERS",
    "chars": 243,
    "preview": "# See the OWNERS docs at https://go.k8s.io/owners\n\napprovers:\n- yejiayu\n- zeroqn\n- KaoImin \n- LycrusHamster \n- rev-chaos"
  },
  {
    "path": "OWNERS_ALIASES",
    "chars": 251,
    "preview": "aliases:\n- yejiayu\n- zeroqn\n- KaoImin \n- LycrusHamster \n- rev-chaos \n- homura \nbest-approvers:\n- yejiayu\n- zeroqn\n- KaoI"
  },
  {
    "path": "README.md",
    "chars": 4784,
    "preview": "<p align=\"center\">\n  <a href=\"https://github.com/nervosnetwork/muta\">\n    <img src=\"https://github.com/nervosnetwork/mut"
  },
  {
    "path": "README_CN.md",
    "chars": 3117,
    "preview": "<p align=\"center\">\n  <a href=\"https://github.com/nervosnetwork/muta\">\n    <img src=\"https://github.com/nervosnetwork/mut"
  },
  {
    "path": "SECURITY.md",
    "chars": 2350,
    "preview": "# Security Policy\n\nThis project is still under development, the primary goal at this stage is to implement features but "
  },
  {
    "path": "benchmark/bench_executor.rs",
    "chars": 2487,
    "preview": "#![allow(clippy::needless_collect)]\n\nuse asset::types::TransferPayload;\n\nuse super::*;\n\n#[rustfmt::skip]\n/// Bench in In"
  },
  {
    "path": "benchmark/bench_mempool.rs",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "benchmark/benchmark_genesis.toml",
    "chars": 1243,
    "preview": "timestamp = 0\nprevhash = \"0x44915be5b6c20b0678cf05fcddbbaa832e25d7e6ac538784cd5c24de00d47472\"\n\n[[services]]\nname = \"asse"
  },
  {
    "path": "benchmark/governance/mod.rs",
    "chars": 6301,
    "preview": "mod types;\n\nuse std::cell::RefCell;\nuse std::convert::From;\nuse std::rc::Rc;\n\nuse bytes::Bytes;\nuse derive_more::{Displa"
  },
  {
    "path": "benchmark/governance/types.rs",
    "chars": 2066,
    "preview": "use std::cmp::Ordering;\n\nuse muta_codec_derive::RlpFixedCodec;\nuse serde::{Deserialize, Serialize};\n\nuse protocol::fixed"
  },
  {
    "path": "benchmark/mod.rs",
    "chars": 8772,
    "preview": "#![allow(clippy::needless_collect)]\n#![feature(test)]\nextern crate test;\n\nuse std::str::FromStr;\nuse std::sync::Arc;\n\nus"
  },
  {
    "path": "binding-macro/Cargo.toml",
    "chars": 625,
    "preview": "[package]\nname = \"binding-macro\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository "
  },
  {
    "path": "binding-macro/src/common.rs",
    "chars": 1703,
    "preview": "use syn::{FnArg, Pat, Path, Type};\n\npub fn get_request_context_pat(bound_name: &str, fn_arg: &FnArg) -> Option<Pat> {\n  "
  },
  {
    "path": "binding-macro/src/cycles.rs",
    "chars": 3248,
    "preview": "use proc_macro::TokenStream;\nuse quote::quote;\nuse syn::parse::{Parse, ParseStream, Result};\nuse syn::punctuated::Punctu"
  },
  {
    "path": "binding-macro/src/hooks.rs",
    "chars": 709,
    "preview": "use proc_macro::TokenStream;\nuse quote::quote;\nuse syn::{parse_macro_input, FnArg, ImplItemMethod};\n\nuse crate::common::"
  },
  {
    "path": "binding-macro/src/lib.rs",
    "chars": 8641,
    "preview": "extern crate proc_macro;\n\nmod common;\nmod cycles;\nmod hooks;\nmod read_write;\nmod service;\n\nuse proc_macro::TokenStream;\n"
  },
  {
    "path": "binding-macro/src/read_write.rs",
    "chars": 1913,
    "preview": "use proc_macro::TokenStream;\nuse quote::quote;\nuse syn::punctuated::Punctuated;\nuse syn::{parse_macro_input, FnArg, Impl"
  },
  {
    "path": "binding-macro/src/service.rs",
    "chars": 17013,
    "preview": "use proc_macro::TokenStream;\nuse quote::quote;\nuse syn::{parse_macro_input, FnArg, Ident, ImplItem, ImplItemMethod, Item"
  },
  {
    "path": "binding-macro/tests/mod.rs",
    "chars": 15556,
    "preview": "#![allow(clippy::unit_cmp)]\n#[macro_use]\nextern crate binding_macro;\n\nuse std::cell::RefCell;\nuse std::panic::{self, Ass"
  },
  {
    "path": "built-in-services/asset/Cargo.toml",
    "chars": 644,
    "preview": "[package]\nname = \"asset\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository = \"https"
  },
  {
    "path": "built-in-services/asset/src/lib.rs",
    "chars": 14092,
    "preview": "#![allow(clippy::mutable_key_type)]\n\n#[cfg(test)]\nmod tests;\npub mod types;\n\nuse std::collections::BTreeMap;\n\nuse bindin"
  },
  {
    "path": "built-in-services/asset/src/tests/mod.rs",
    "chars": 9521,
    "preview": "use std::cell::RefCell;\nuse std::rc::Rc;\nuse std::str::FromStr;\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\nuse c"
  },
  {
    "path": "built-in-services/asset/src/types.rs",
    "chars": 4127,
    "preview": "use std::collections::BTreeMap;\n\nuse muta_codec_derive::RlpFixedCodec;\nuse serde::{Deserialize, Serialize};\n\nuse protoco"
  },
  {
    "path": "built-in-services/authorization/Cargo.toml",
    "chars": 723,
    "preview": "[package]\nname = \"authorization\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository "
  },
  {
    "path": "built-in-services/authorization/src/lib.rs",
    "chars": 1612,
    "preview": "use binding_macro::{cycles, service};\nuse protocol::traits::{ExecutorParams, ServiceResponse, ServiceSDK};\nuse protocol:"
  },
  {
    "path": "built-in-services/metadata/Cargo.toml",
    "chars": 633,
    "preview": "[package]\nname = \"metadata\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository = \"ht"
  },
  {
    "path": "built-in-services/metadata/src/lib.rs",
    "chars": 1176,
    "preview": "#[cfg(test)]\nmod tests;\n\nuse binding_macro::{cycles, genesis, service};\nuse protocol::traits::{ExecutorParams, ServiceRe"
  },
  {
    "path": "built-in-services/metadata/src/tests/mod.rs",
    "chars": 5739,
    "preview": "use std::cell::RefCell;\nuse std::rc::Rc;\nuse std::str::FromStr;\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\nuse c"
  },
  {
    "path": "built-in-services/multi-signature/Cargo.toml",
    "chars": 789,
    "preview": "[package]\nname = \"multi-signature\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepositor"
  },
  {
    "path": "built-in-services/multi-signature/src/lib.rs",
    "chars": 22058,
    "preview": "#![allow(clippy::suspicious_else_formatting, clippy::mutable_key_type)]\n\n#[cfg(test)]\nmod tests;\npub mod types;\n\nuse std"
  },
  {
    "path": "built-in-services/multi-signature/src/tests/curd_test.rs",
    "chars": 13489,
    "preview": "use std::str::FromStr;\n\nuse crate::types::{\n    AddAccountPayload, GenerateMultiSigAccountPayload, GetMultiSigAccountPay"
  },
  {
    "path": "built-in-services/multi-signature/src/tests/mod.rs",
    "chars": 5805,
    "preview": "mod curd_test;\nmod recursion_test;\n\nuse std::cell::RefCell;\nuse std::convert::TryFrom;\nuse std::rc::Rc;\nuse std::sync::A"
  },
  {
    "path": "built-in-services/multi-signature/src/tests/recursion_test.rs",
    "chars": 4860,
    "preview": "use std::str::FromStr;\n\nuse crate::types::{GenerateMultiSigAccountPayload, VerifySignaturePayload};\n\nuse super::*;\n\n#[te"
  },
  {
    "path": "built-in-services/multi-signature/src/types.rs",
    "chars": 6808,
    "preview": "use std::collections::HashMap;\n\nuse muta_codec_derive::RlpFixedCodec;\nuse serde::{Deserialize, Serialize};\n\nuse protocol"
  },
  {
    "path": "built-in-services/util/Cargo.toml",
    "chars": 745,
    "preview": "[package]\nname = \"util\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository = \"https:"
  },
  {
    "path": "built-in-services/util/src/lib.rs",
    "chars": 2366,
    "preview": "use bytes::Bytes;\nuse hasher::{Hasher, HasherKeccak};\n\nuse binding_macro::{cycles, service};\nuse common_crypto::{Crypto,"
  },
  {
    "path": "built-in-services/util/src/tests/mod.rs",
    "chars": 5964,
    "preview": "use std::cell::RefCell;\nuse std::rc::Rc;\nuse std::str::FromStr;\nuse std::sync::Arc;\n\nuse cita_trie::MemoryDB;\nuse rand::"
  },
  {
    "path": "built-in-services/util/src/types.rs",
    "chars": 541,
    "preview": "use protocol::types::{Hash, Hex};\nuse serde::{Deserialize, Serialize};\n\n#[derive(Deserialize, Serialize, Clone, Debug)]\n"
  },
  {
    "path": "byzantine/Cargo.toml",
    "chars": 1289,
    "preview": "[package]\nname = \"byzantine\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository = \"h"
  },
  {
    "path": "byzantine/README.md",
    "chars": 2622,
    "preview": "# 1. 概述\n\n拜占庭测试是通过模拟恶意攻击行为对系统进行安全性和稳定性测试。\n对于区块链这样的分布式系统,节点是通过对外发送/不发送消息来对系统施加影响的。\n因此通过控制消息的发送时间、内容、数量和接收方,我们就可以模拟出任意的恶意行为"
  },
  {
    "path": "byzantine/generators.toml",
    "chars": 8832,
    "preview": "interval = 500\n\n#################\n##### NewTx #####\n#################\n[[list]]\nmsg_type = { NewTxs = \"Valid\" }\nprobabili"
  },
  {
    "path": "byzantine/src/behaviors.rs",
    "chars": 3253,
    "preview": "use bytes::Bytes;\nuse derive_more::Constructor;\nuse serde_derive::Deserialize;\n\nuse core_consensus::message::{\n    Choke"
  },
  {
    "path": "byzantine/src/commander.rs",
    "chars": 3905,
    "preview": "use bytes::Bytes;\nuse futures::{\n    channel::mpsc::{UnboundedReceiver, UnboundedSender},\n    stream::StreamExt,\n};\nuse "
  },
  {
    "path": "byzantine/src/config.rs",
    "chars": 5170,
    "preview": "use std::collections::HashMap;\nuse std::net::SocketAddr;\nuse std::path::PathBuf;\n\nuse serde_derive::Deserialize;\n\nuse co"
  },
  {
    "path": "byzantine/src/default_start.rs",
    "chars": 8193,
    "preview": "use std::collections::HashMap;\nuse std::convert::TryFrom;\nuse std::sync::Arc;\n\nuse bytes::Bytes;\nuse common_crypto::{\n  "
  },
  {
    "path": "byzantine/src/invalid_types.rs",
    "chars": 23817,
    "preview": "use std::error::Error;\nuse std::sync::Arc;\n\nuse bytes::Bytes;\nuse derive_more::Constructor;\nuse overlord::types::SignedP"
  },
  {
    "path": "byzantine/src/lib.rs",
    "chars": 176,
    "preview": "#![allow(clippy::mutable_key_type)]\n\npub mod config;\npub mod default_start;\n\nmod behaviors;\nmod commander;\nmod invalid_t"
  },
  {
    "path": "byzantine/src/message.rs",
    "chars": 3753,
    "preview": "use async_trait::async_trait;\nuse derive_more::Constructor;\nuse futures::channel::mpsc::UnboundedSender;\n\nuse core_conse"
  },
  {
    "path": "byzantine/src/strategy.rs",
    "chars": 2193,
    "preview": "use bytes::Bytes;\nuse derive_more::Constructor;\nuse rand::seq::SliceRandom;\nuse serde_derive::Deserialize;\n\nuse protocol"
  },
  {
    "path": "byzantine/src/utils.rs",
    "chars": 12451,
    "preview": "use std::convert::TryFrom;\nuse std::sync::Arc;\nuse std::time::{SystemTime, UNIX_EPOCH};\n\nuse bytes::Bytes;\nuse overlord:"
  },
  {
    "path": "byzantine/src/worker.rs",
    "chars": 32224,
    "preview": "use std::convert::TryFrom;\nuse std::sync::Arc;\n\nuse bytes::Bytes;\nuse futures::{channel::mpsc::UnboundedReceiver, stream"
  },
  {
    "path": "byzantine/tests/byz.test.ts",
    "chars": 1969,
    "preview": "import { parse } from 'toml';\nimport { find } from 'lodash';\nimport { AssetService, MultiSignatureService } from '@mutad"
  },
  {
    "path": "byzantine/tests/jest.config.js",
    "chars": 216,
    "preview": "module.exports = {\n  displayName: \"Unit Tests\",\n  testRegex: \"(/.*.(test|spec))\\\\.(ts?|js?)$\",\n  transform: {\n    \"^.+\\\\"
  },
  {
    "path": "byzantine/tests/package.json",
    "chars": 669,
    "preview": "{\n  \"name\": \"muta-e2e-tests\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"author\": \"wancencen\",\n  \"license\": \"MIT\",\n  "
  },
  {
    "path": "charts/deploy-chaos/.helmignore",
    "chars": 342,
    "preview": "# Patterns to ignore when building packages.\n# This supports shell glob matching, relative path matching, and\n# negation"
  },
  {
    "path": "charts/deploy-chaos/Chart.yaml",
    "chars": 910,
    "preview": "apiVersion: v2\nname: deploy-chaos\ndescription: A Helm chart for Kubernetes\n\n# A chart can be either an 'application' or "
  },
  {
    "path": "charts/deploy-chaos/templates/_helpers.tpl",
    "chars": 1897,
    "preview": "{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"deploy-chaos.name\" -}}\n{{- def"
  },
  {
    "path": "charts/deploy-chaos/templates/muta-benchmark.yaml",
    "chars": 918,
    "preview": "{{- $chainName  := (printf \"chaos-%s-%s\" .Values.repo_name .Values.version) -}}\napiVersion: batch/v1beta1\nkind: CronJob\n"
  },
  {
    "path": "charts/deploy-chaos/templates/muta-chaos-crd.yaml",
    "chars": 3134,
    "preview": "apiVersion: nervos.org/v1alpha1\nkind: Muta\nmetadata:\n  name: chaos-{{ .Values.repo_name }}-{{ .Values.version }}\n  names"
  },
  {
    "path": "charts/deploy-chaos/values.yaml",
    "chars": 1258,
    "preview": "# Default values for deploy-chaos.\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates"
  },
  {
    "path": "charts/muta/.helmignore",
    "chars": 333,
    "preview": "# Patterns to ignore when building packages.\n# This supports shell glob matching, relative path matching, and\n# negation"
  },
  {
    "path": "charts/muta/Chart.yaml",
    "chars": 184,
    "preview": "apiVersion: v1\ndescription: A Helm chart for Kubernetes\nicon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-plat"
  },
  {
    "path": "charts/muta/Makefile",
    "chars": 1386,
    "preview": "CHART_REPO := http://jenkins-x-chartmuseum:8080\nCURRENT=$(pwd)\nNAME := muta\nOS := $(shell uname)\nRELEASE_VERSION := $(sh"
  },
  {
    "path": "charts/muta/README.md",
    "chars": 18,
    "preview": "# Rust application"
  },
  {
    "path": "charts/muta/templates/NOTES.txt",
    "chars": 101,
    "preview": "\nGet the application URL by running these commands:\n\nkubectl get ingress {{ template \"fullname\" . }}\n"
  },
  {
    "path": "charts/muta/templates/_helpers.tpl",
    "chars": 516,
    "preview": "{{/* vim: set filetype=mustache: */}}\n{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"name\" -}}\n{{- default .Chart.N"
  },
  {
    "path": "charts/muta/templates/canary.yaml",
    "chars": 2463,
    "preview": "{{- if .Values.canary.enabled }}\napiVersion: flagger.app/v1beta1\nkind: Canary\nmetadata:\n  name: {{ template \"fullname\" ."
  },
  {
    "path": "charts/muta/templates/deployment.yaml",
    "chars": 2048,
    "preview": "{{- if .Values.knativeDeploy }}\n{{- else }}\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: {{ template \"fullname"
  },
  {
    "path": "charts/muta/templates/hpa.yaml",
    "chars": 747,
    "preview": "{{- if .Values.hpa.enabled }}\napiVersion: autoscaling/v2beta1\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: {{ templat"
  },
  {
    "path": "charts/muta/templates/ingress.yaml",
    "chars": 1228,
    "preview": "{{- if and (.Values.jxRequirements.ingress.domain) (not .Values.knativeDeploy) }}\napiVersion: {{ .Values.jxRequirements."
  },
  {
    "path": "charts/muta/templates/ksvc.yaml",
    "chars": 1551,
    "preview": "{{- if .Values.knativeDeploy }}\napiVersion: serving.knative.dev/v1alpha1\nkind: Service\nmetadata:\n{{- if .Values.service."
  },
  {
    "path": "charts/muta/templates/service.yaml",
    "chars": 669,
    "preview": "{{- if or .Values.knativeDeploy .Values.canary.enabled }}\n{{- else }}\napiVersion: v1\nkind: Service\nmetadata:\n{{- if .Val"
  },
  {
    "path": "charts/muta/values.yaml",
    "chars": 2316,
    "preview": "# Default values for Rust projects.\n# This is a YAML-formatted file.\n# Declare variables to be passed into your template"
  },
  {
    "path": "charts/preview/Chart.yaml",
    "chars": 187,
    "preview": "apiVersion: v1\ndescription: A Helm chart for Kubernetes\nicon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-plat"
  },
  {
    "path": "charts/preview/Makefile",
    "chars": 723,
    "preview": "OS := $(shell uname)\n\npreview: \nifeq ($(OS),Darwin)\n\tsed -i \"\" -e \"s/version:.*/version: $(PREVIEW_VERSION)/\" Chart.yaml"
  },
  {
    "path": "charts/preview/requirements.yaml",
    "chars": 433,
    "preview": "# !! File must end with empty line !!\ndependencies:\n- alias: expose\n  name: exposecontroller\n  repository: http://chartm"
  },
  {
    "path": "charts/preview/values.yaml",
    "chars": 408,
    "preview": "cleanup:\n  Annotations:\n    helm.sh/hook: pre-delete\n    helm.sh/hook-delete-policy: hook-succeeded\n  Args:\n  - --cleanu"
  },
  {
    "path": "clippy.toml",
    "chars": 33,
    "preview": "too-many-arguments-threshold = 12"
  },
  {
    "path": "common/apm/Cargo.toml",
    "chars": 462,
    "preview": "[package]\nname = \"common-apm\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository = \""
  },
  {
    "path": "common/apm/README.md",
    "chars": 4824,
    "preview": "# Metrics documentation for promethues\nAll current metrics and usage\n## API\n\n| Metric name | Metric types | Related Graf"
  },
  {
    "path": "common/apm/src/lib.rs",
    "chars": 213,
    "preview": "// https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp\n#![allow(clippy::float_cmp)]\n\npub mod metrics;\n\np"
  },
  {
    "path": "common/apm/src/metrics/api.rs",
    "chars": 2019,
    "preview": "use crate::metrics::{\n    auto_flush_from, exponential_buckets, make_auto_flush_static_metric, register_histogram_vec,\n "
  },
  {
    "path": "common/apm/src/metrics/consensus.rs",
    "chars": 3539,
    "preview": "use crate::metrics::{\n    auto_flush_from, exponential_buckets, make_auto_flush_static_metric, register_histogram,\n    r"
  },
  {
    "path": "common/apm/src/metrics/mempool.rs",
    "chars": 3187,
    "preview": "use crate::metrics::{\n    auto_flush_from, exponential_buckets, make_auto_flush_static_metric, register_histogram_vec,\n "
  },
  {
    "path": "common/apm/src/metrics/network.rs",
    "chars": 6354,
    "preview": "use lazy_static::lazy_static;\n\nuse crate::metrics::{\n    auto_flush_from, exponential_buckets, linear_buckets, make_auto"
  },
  {
    "path": "common/apm/src/metrics/storage.rs",
    "chars": 5080,
    "preview": "use std::time::Duration;\n\nuse lazy_static::lazy_static;\nuse protocol::traits::StorageCategory;\n\nuse crate::metrics::{\n  "
  },
  {
    "path": "common/apm/src/metrics.rs",
    "chars": 1729,
    "preview": "pub mod api;\npub mod consensus;\npub mod mempool;\npub mod network;\npub mod storage;\n\npub use prometheus::{\n    CounterVec"
  },
  {
    "path": "common/channel/Cargo.toml",
    "chars": 277,
    "preview": "[package]\nname = \"common-channel\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository"
  },
  {
    "path": "common/channel/src/lib.rs",
    "chars": 95,
    "preview": "#[cfg(test)]\nmod tests {\n    #[test]\n    fn it_works() {\n        assert_eq!(2 + 2, 4);\n    }\n}\n"
  },
  {
    "path": "common/config-parser/Cargo.toml",
    "chars": 533,
    "preview": "[package]\nname = \"common-config-parser\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepo"
  },
  {
    "path": "common/config-parser/src/lib.rs",
    "chars": 3709,
    "preview": "pub mod types;\n\nuse serde::de;\n\nuse std::error;\nuse std::fmt;\nuse std::fs;\nuse std::io;\nuse std::path::Path;\n\n/// Parse "
  },
  {
    "path": "common/config-parser/src/types.rs",
    "chars": 5543,
    "preview": "use std::collections::HashMap;\nuse std::net::SocketAddr;\nuse std::path::PathBuf;\n\nuse serde_derive::Deserialize;\n\nuse co"
  },
  {
    "path": "common/crypto/Cargo.toml",
    "chars": 481,
    "preview": "[package]\nname = \"common-crypto\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository "
  },
  {
    "path": "common/crypto/src/lib.rs",
    "chars": 13866,
    "preview": "#![feature(test)]\n\npub use ophelia::HashValue;\npub use ophelia::{\n    BlsSignatureVerify, Crypto, Error, PrivateKey, Pub"
  },
  {
    "path": "common/logger/Cargo.toml",
    "chars": 592,
    "preview": "[package]\nname = \"common-logger\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository "
  },
  {
    "path": "common/logger/README.md",
    "chars": 3615,
    "preview": "# Logger Module Instruction\n\n## Logger Config\n\nThe logger config in `config.toml` is listed below with default values.\n\n"
  },
  {
    "path": "common/logger/log.yml",
    "chars": 810,
    "preview": "# This file is yaml style config, can make testing the logger more easily.\n# When you need to do some test, Add the code"
  },
  {
    "path": "common/logger/src/date_fixed_roller.rs",
    "chars": 4235,
    "preview": "use std::error::Error;\nuse std::fs;\nuse std::path::Path;\n\nuse chrono::prelude::Utc;\nuse log4rs::append::rolling_file::po"
  },
  {
    "path": "common/logger/src/lib.rs",
    "chars": 6620,
    "preview": "mod date_fixed_roller;\n\nuse std::collections::HashMap;\nuse std::path::PathBuf;\n\nuse creep::Context;\nuse json::JsonValue;"
  },
  {
    "path": "common/merkle/Cargo.toml",
    "chars": 418,
    "preview": "[package]\nname = \"common-merkle\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository "
  },
  {
    "path": "common/merkle/src/lib.rs",
    "chars": 3224,
    "preview": "#![feature(test)]\n\nuse static_merkle_tree::Tree;\n\nuse protocol::{types::Hash, Bytes};\n\n#[derive(Debug, Clone)]\npub struc"
  },
  {
    "path": "common/pubsub/Cargo.toml",
    "chars": 276,
    "preview": "[package]\nname = \"common-pubsub\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository "
  },
  {
    "path": "common/pubsub/src/lib.rs",
    "chars": 95,
    "preview": "#[cfg(test)]\nmod tests {\n    #[test]\n    fn it_works() {\n        assert_eq!(2 + 2, 4);\n    }\n}\n"
  },
  {
    "path": "core/api/Cargo.toml",
    "chars": 945,
    "preview": "[package]\nname = \"core-api\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository = \"ht"
  },
  {
    "path": "core/api/source/graphiql.html",
    "chars": 19494,
    "preview": "<!DOCTYPE html>\n<html>\n\n<head>\n  <meta charset=utf-8 />\n  <meta name=\"viewport\" content=\"user-scalable=no, initial-scale"
  },
  {
    "path": "core/api/src/adapter/mod.rs",
    "chars": 4667,
    "preview": "use std::marker::PhantomData;\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\nuse derive_more::Display;\n\nuse protocol"
  },
  {
    "path": "core/api/src/config.rs",
    "chars": 1428,
    "preview": "use std::net::SocketAddr;\nuse std::path::PathBuf;\n\n#[derive(Debug, Clone)]\npub struct GraphQLConfig {\n    pub listening_"
  },
  {
    "path": "core/api/src/lib.rs",
    "chars": 15267,
    "preview": "pub mod adapter;\npub mod config;\nmod schema;\n\nuse std::cmp;\nuse std::convert::TryFrom;\nuse std::sync::Arc;\nuse std::time"
  },
  {
    "path": "core/api/src/schema/block.rs",
    "chars": 6209,
    "preview": "use protocol::fixed_codec::FixedCodec;\nuse protocol::types::Hash as PHash;\n\nuse crate::schema::{Address, Bytes, Hash, Me"
  },
  {
    "path": "core/api/src/schema/mod.rs",
    "chars": 3430,
    "preview": "mod block;\nmod receipt;\nmod transaction;\n\nuse std::convert::From;\n\nuse derive_more::{Display, From};\nuse std::num::Parse"
  },
  {
    "path": "core/api/src/schema/receipt.rs",
    "chars": 1708,
    "preview": "use crate::schema::{Hash, MerkleRoot, ServiceResponse, Uint64};\n\n#[derive(juniper::GraphQLObject, Clone)]\npub struct Rec"
  },
  {
    "path": "core/api/src/schema/transaction.rs",
    "chars": 4643,
    "preview": "use protocol::ProtocolResult;\n\nuse crate::schema::{Address, Bytes, Hash, SchemaError, Uint64};\n\n#[derive(juniper::GraphQ"
  },
  {
    "path": "core/cli/Cargo.toml",
    "chars": 1823,
    "preview": "[package]\nname = \"cli\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\n\n# See more keys and "
  },
  {
    "path": "core/cli/src/error.rs",
    "chars": 1031,
    "preview": "use std::error::Error;\n\nuse derive_more::{Display, From};\n\nuse protocol::{ProtocolError, ProtocolErrorKind};\n\n#[derive(D"
  },
  {
    "path": "core/cli/src/lib.rs",
    "chars": 21883,
    "preview": "mod error;\n\n#[cfg(test)]\nmod tests;\n\nuse std::fs;\nuse std::ops::RangeInclusive;\nuse std::path::{Path, PathBuf};\nuse std:"
  },
  {
    "path": "core/cli/src/tests/config.toml",
    "chars": 1264,
    "preview": "# crypto\nprivkey = \"0x5ec982173d54d830b6789cbbbe43eaa2853a5ff752d1ebc1b266cf9790314f8a\"\n\n# db config\ndata_path = \"./free"
  },
  {
    "path": "core/cli/src/tests/genesis.toml",
    "chars": 1315,
    "preview": "timestamp = 0\nprevhash = \"0x44915be5b6c20b0678cf05fcddbbaa832e25d7e6ac538784cd5c24de00d47472\"\n\n[[services]]\nname = \"asse"
  },
  {
    "path": "core/cli/src/tests/mod.rs",
    "chars": 12554,
    "preview": "mod service_mapping;\n\nuse std::path::PathBuf;\nuse std::str::FromStr;\n\nuse protocol::traits::{CommonStorage, Context};\nus"
  },
  {
    "path": "core/cli/src/tests/service_mapping.rs",
    "chars": 2446,
    "preview": "// This file is copied directly from example/muta-chain\n\nuse derive_more::{Display, From};\nuse protocol::traits::{SDKFac"
  },
  {
    "path": "core/consensus/Cargo.toml",
    "chars": 1307,
    "preview": "[package]\nname = \"core-consensus\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository"
  },
  {
    "path": "core/consensus/src/adapter.rs",
    "chars": 33525,
    "preview": "use std::boxed::Box;\nuse std::collections::HashMap;\nuse std::marker::PhantomData;\nuse std::sync::Arc;\nuse std::time::Ins"
  },
  {
    "path": "core/consensus/src/consensus.rs",
    "chars": 7694,
    "preview": "use std::sync::Arc;\n\nuse async_trait::async_trait;\nuse creep::Context;\nuse futures::lock::Mutex;\nuse overlord::types::{\n"
  },
  {
    "path": "core/consensus/src/engine.rs",
    "chars": 30849,
    "preview": "use std::collections::{HashMap, HashSet};\nuse std::convert::TryFrom;\nuse std::error::Error;\nuse std::sync::Arc;\nuse std:"
  },
  {
    "path": "core/consensus/src/fixed_types.rs",
    "chars": 7926,
    "preview": "use std::error::Error;\n\nuse overlord::Codec;\n\nuse protocol::codec::{Deserialize, ProtocolCodecSync, Serialize};\nuse prot"
  },
  {
    "path": "core/consensus/src/lib.rs",
    "chars": 5822,
    "preview": "#![feature(test)]\n#![allow(\n    clippy::type_complexity,\n    clippy::suspicious_else_formatting,\n    clippy::mutable_key"
  },
  {
    "path": "core/consensus/src/message.rs",
    "chars": 10546,
    "preview": "use std::sync::Arc;\n\nuse async_trait::async_trait;\nuse bincode::serialize;\nuse futures::TryFutureExt;\nuse log::warn;\nuse"
  },
  {
    "path": "core/consensus/src/status.rs",
    "chars": 8854,
    "preview": "use std::sync::Arc;\n\nuse derive_more::Display;\nuse parking_lot::RwLock;\nuse serde::{Deserialize, Serialize};\n\nuse common"
  },
  {
    "path": "core/consensus/src/synchronization.rs",
    "chars": 16891,
    "preview": "use std::sync::Arc;\nuse std::time::{Duration, Instant};\n\nuse async_trait::async_trait;\nuse futures::lock::Mutex;\nuse fut"
  },
  {
    "path": "core/consensus/src/tests/engine.rs",
    "chars": 8340,
    "preview": "use std::collections::HashMap;\nuse std::convert::TryFrom;\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\nuse futures"
  },
  {
    "path": "core/consensus/src/tests/mod.rs",
    "chars": 3910,
    "preview": "mod engine;\nmod status;\nmod synchronization;\n\nuse rand::random;\n\nuse protocol::types::{Address, Block, BlockHeader, Hash"
  },
  {
    "path": "core/consensus/src/tests/status.rs",
    "chars": 4814,
    "preview": "use creep::Context;\nuse rand::random;\n\nuse protocol::fixed_codec::FixedCodec;\nuse protocol::types::{Hash, Hex, Metadata,"
  },
  {
    "path": "core/consensus/src/tests/synchronization.rs",
    "chars": 42001,
    "preview": "use std::collections::{HashMap, HashSet};\nuse std::convert::TryFrom;\nuse std::str::FromStr;\nuse std::sync::Arc;\n\nuse asy"
  },
  {
    "path": "core/consensus/src/util.rs",
    "chars": 11398,
    "preview": "use std::collections::HashMap;\nuse std::convert::TryFrom;\nuse std::error::Error;\nuse std::time::{SystemTime, UNIX_EPOCH}"
  },
  {
    "path": "core/consensus/src/wal.rs",
    "chars": 18347,
    "preview": "use std::fs;\nuse std::io::{ErrorKind, Read, Write};\nuse std::path::{Path, PathBuf};\n\nuse common_apm::muta_apm;\nuse proto"
  },
  {
    "path": "core/consensus/src/wal_proto.rs",
    "chars": 1814,
    "preview": "use std::convert::TryFrom;\n\nuse prost::Message;\n\nuse protocol::codec::{transaction, ProtocolCodecSync};\nuse protocol::ty"
  },
  {
    "path": "core/mempool/Cargo.toml",
    "chars": 929,
    "preview": "[package]\nname = \"core-mempool\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository ="
  },
  {
    "path": "core/mempool/src/adapter/message.rs",
    "chars": 4013,
    "preview": "use std::sync::Arc;\nuse std::time::Instant;\n\nuse async_trait::async_trait;\nuse futures::future::{try_join_all, TryFuture"
  },
  {
    "path": "core/mempool/src/adapter/mod.rs",
    "chars": 21211,
    "preview": "use super::TxContext;\n\npub mod message;\n\nuse std::{\n    error::Error,\n    marker::PhantomData,\n    sync::atomic::{Atomic"
  },
  {
    "path": "core/mempool/src/context.rs",
    "chars": 511,
    "preview": "use protocol::traits::Context;\n\nconst TXS_ORIGINAL_KEY: &str = \"txs_original\";\nconst NETWORK_TXS: usize = 1;\n\npub(crate)"
  },
  {
    "path": "core/mempool/src/lib.rs",
    "chars": 14733,
    "preview": "#![feature(async_closure, test)]\n#![allow(clippy::suspicious_else_formatting, clippy::mutable_key_type)]\n\nmod adapter;\nm"
  },
  {
    "path": "core/mempool/src/map.rs",
    "chars": 5770,
    "preview": "use std::collections::HashMap;\nuse std::sync::Arc;\n\nuse futures::future::try_join_all;\nuse tokio::sync::RwLock;\n\nuse pro"
  },
  {
    "path": "core/mempool/src/tests/mempool.rs",
    "chars": 16794,
    "preview": "use std::sync::Arc;\n\nuse test::Bencher;\n\nuse protocol::types::Hash;\n\nuse super::*;\n\nmacro_rules! insert {\n    (normal($p"
  },
  {
    "path": "core/mempool/src/tests/mod.rs",
    "chars": 8507,
    "preview": "extern crate test;\n\nmod mempool;\n\nuse std::convert::{From, TryFrom};\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\n"
  },
  {
    "path": "core/mempool/src/tx_cache.rs",
    "chars": 21787,
    "preview": "use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};\nuse std::sync::Arc;\n\nuse crossbeam_queue::ArrayQueue;\n\nuse p"
  },
  {
    "path": "core/network/Cargo.toml",
    "chars": 1229,
    "preview": "[package]\nname = \"core-network\"\nversion = \"0.2.1\"\nauthors = [\"Muta Dev <muta@nervos.org>\"]\nedition = \"2018\"\nrepository ="
  },
  {
    "path": "core/network/examples/buycopy.rs",
    "chars": 4869,
    "preview": "use std::{\n    net::{IpAddr, Ipv4Addr, SocketAddr},\n    thread,\n    time::Duration,\n};\n\nuse async_trait::async_trait;\nus"
  },
  {
    "path": "core/network/src/common.rs",
    "chars": 5237,
    "preview": "use crate::traits::MultiaddrExt;\n\nuse derive_more::Display;\nuse futures::{pin_mut, task::AtomicWaker};\nuse futures_timer"
  },
  {
    "path": "core/network/src/compression/mod.rs",
    "chars": 36,
    "preview": "mod snappy;\npub use snappy::Snappy;\n"
  },
  {
    "path": "core/network/src/compression/snappy.rs",
    "chars": 954,
    "preview": "use std::io;\n\nuse protocol::Bytes;\n\nuse crate::{error::NetworkError, traits::Compression};\n\n#[derive(Clone)]\npub struct "
  },
  {
    "path": "core/network/src/config.rs",
    "chars": 15378,
    "preview": "use std::{\n    default::Default,\n    net::{IpAddr, Ipv4Addr, SocketAddr},\n    path::{Path, PathBuf},\n    str::FromStr,\n "
  },
  {
    "path": "core/network/src/connection/control.rs",
    "chars": 1000,
    "preview": "use tentacle::error::SendErrorKind;\nuse tentacle::service::{ServiceControl, TargetSession};\nuse tentacle::ProtocolId;\n\nu"
  },
  {
    "path": "core/network/src/connection/keeper.rs",
    "chars": 9349,
    "preview": "use std::sync::atomic::{AtomicBool, Ordering};\n\nuse futures::channel::mpsc::UnboundedSender;\nuse log::{debug, error};\nus"
  },
  {
    "path": "core/network/src/connection/mod.rs",
    "chars": 6565,
    "preview": "mod control;\nmod keeper;\n\npub use control::{ConnectionServiceControl, ProtocolMessage};\npub use keeper::ConnectionServic"
  },
  {
    "path": "core/network/src/endpoint.rs",
    "chars": 5137,
    "preview": "use std::{\n    cmp::PartialEq,\n    convert::TryFrom,\n    hash::{Hash, Hasher},\n    str::FromStr,\n};\n\nuse derive_more::{D"
  },
  {
    "path": "core/network/src/error.rs",
    "chars": 5625,
    "preview": "use std::{error::Error, num::ParseIntError};\n\nuse derive_more::Display;\nuse tentacle::{\n    multiaddr::Multiaddr,\n    se"
  },
  {
    "path": "core/network/src/event.rs",
    "chars": 5286,
    "preview": "use std::{error::Error, sync::Arc};\n\nuse derive_more::Display;\nuse protocol::traits::TrustFeedback;\n#[cfg(not(test))]\nus"
  },
  {
    "path": "core/network/src/lib.rs",
    "chars": 1494,
    "preview": "mod common;\nmod compression;\nmod config;\nmod connection;\nmod endpoint;\nmod error;\nmod event;\nmod message;\nmod metrics;\nm"
  },
  {
    "path": "core/network/src/message/mod.rs",
    "chars": 3601,
    "preview": "pub mod serde;\npub mod serde_multi;\n\nuse std::{collections::HashMap, str::FromStr};\n\nuse common_apm::muta_apm::rustracin"
  },
  {
    "path": "core/network/src/message/serde.rs",
    "chars": 995,
    "preview": "use std::fmt;\n\nuse protocol::codec::ProtocolCodecSync;\nuse protocol::Bytes;\nuse serde::{de, ser, Deserializer, Serialize"
  },
  {
    "path": "core/network/src/message/serde_multi.rs",
    "chars": 2896,
    "preview": "use std::{fmt, iter::FromIterator, marker::PhantomData};\n\nuse derive_more::Constructor;\nuse protocol::codec::ProtocolCod"
  },
  {
    "path": "core/network/src/metrics.rs",
    "chars": 2025,
    "preview": "use std::{\n    future::Future,\n    pin::Pin,\n    sync::Arc,\n    task::{Context, Poll},\n    time::Duration,\n};\n\nuse futur"
  },
  {
    "path": "core/network/src/outbound/gossip.rs",
    "chars": 3725,
    "preview": "use async_trait::async_trait;\nuse protocol::traits::{Context, Gossip, MessageCodec, Priority};\nuse protocol::{Bytes, Pro"
  },
  {
    "path": "core/network/src/outbound/mod.rs",
    "chars": 77,
    "preview": "mod gossip;\nmod rpc;\npub use gossip::NetworkGossip;\npub use rpc::NetworkRpc;\n"
  },
  {
    "path": "core/network/src/outbound/rpc.rs",
    "chars": 5755,
    "preview": "use std::time::Instant;\n\nuse async_trait::async_trait;\nuse futures::future::{self, Either};\nuse futures_timer::Delay;\nus"
  },
  {
    "path": "core/network/src/peer_manager/addr_set.rs",
    "chars": 4986,
    "preview": "use super::{PeerMultiaddr, MAX_RETRY_COUNT};\n\nuse std::{\n    borrow::{Borrow, Cow},\n    collections::HashSet,\n    hash::"
  },
  {
    "path": "core/network/src/peer_manager/diagnostic.rs",
    "chars": 2713,
    "preview": "use super::{Inner, WORSE_TRUST_SCALAR_RATIO};\nuse crate::event::PeerManagerEvent;\n\nuse derive_more::Display;\nuse protoco"
  },
  {
    "path": "core/network/src/peer_manager/mod.rs",
    "chars": 54250,
    "preview": "#![allow(clippy::mutable_key_type)]\n\nmod addr_set;\nmod peer;\nmod retry;\nmod save_restore;\nmod session_book;\nmod shared;\n"
  },
  {
    "path": "core/network/src/peer_manager/peer.rs",
    "chars": 9378,
    "preview": "use super::{time, PeerAddrSet, Retry, Tags, TrustMetric, MAX_RETRY_COUNT};\n\nuse std::{\n    borrow::Borrow,\n    fmt,\n    "
  },
  {
    "path": "core/network/src/peer_manager/retry.rs",
    "chars": 1835,
    "preview": "use super::{time, BACKOFF_BASE, MAX_RETRY_INTERVAL};\n\nuse std::sync::{\n    atomic::{AtomicU64, AtomicU8, Ordering},\n    "
  },
  {
    "path": "core/network/src/peer_manager/save_restore.rs",
    "chars": 7519,
    "preview": "use super::{ArcPeer, Connectedness, PeerMultiaddr};\n\nuse std::{\n    convert::TryFrom,\n    fmt,\n    fs::File,\n    io::{Bu"
  },
  {
    "path": "core/network/src/peer_manager/session_book.rs",
    "chars": 11664,
    "preview": "use std::borrow::Borrow;\nuse std::collections::{HashMap, HashSet};\nuse std::hash::{Hash, Hasher};\nuse std::ops::Deref;\nu"
  },
  {
    "path": "core/network/src/peer_manager/shared.rs",
    "chars": 4549,
    "preview": "use std::sync::Arc;\n\nuse log::debug;\nuse protocol::traits::PeerTag;\nuse tentacle::secio::PeerId;\nuse tentacle::SessionId"
  },
  {
    "path": "core/network/src/peer_manager/tags.rs",
    "chars": 1776,
    "preview": "use super::time;\nuse crate::error::NetworkError;\n\nuse derive_more::Display;\nuse parking_lot::RwLock;\nuse protocol::trait"
  },
  {
    "path": "core/network/src/peer_manager/test_manager.rs",
    "chars": 109323,
    "preview": "#![allow(clippy::needless_collect)]\n\nuse super::{\n    time, ArcPeer, Connectedness, ConnectingAttempt, Inner, Misbehavio"
  },
  {
    "path": "core/network/src/peer_manager/time.rs",
    "chars": 321,
    "preview": "use std::time::{Duration, SystemTime, UNIX_EPOCH};\n\npub fn now() -> u64 {\n    duration_since(SystemTime::now(), UNIX_EPO"
  },
  {
    "path": "core/network/src/peer_manager/trust_metric.rs",
    "chars": 14527,
    "preview": "use futures::{\n    future::{self, AbortHandle},\n    pin_mut,\n};\nuse futures_timer::Delay;\nuse parking_lot::RwLock;\n\nuse "
  },
  {
    "path": "core/network/src/protocols/core.rs",
    "chars": 5210,
    "preview": "use std::collections::{HashMap, HashSet};\nuse std::iter::FromIterator;\nuse std::time::Duration;\n\nuse futures::channel::m"
  },
  {
    "path": "core/network/src/protocols/discovery/addr.rs",
    "chars": 6828,
    "preview": "use crate::{\n    event::{MisbehaviorKind, PeerManagerEvent},\n    peer_manager::PeerManagerHandle,\n};\n\nuse futures::chann"
  },
  {
    "path": "core/network/src/protocols/discovery/behaviour.rs",
    "chars": 10072,
    "preview": "use std::collections::{HashMap, HashSet, VecDeque};\nuse std::pin::Pin;\nuse std::task::{Context, Poll};\nuse std::time::{D"
  },
  {
    "path": "core/network/src/protocols/discovery/message.rs",
    "chars": 3706,
    "preview": "use std::convert::TryFrom;\n\nuse prost::{Message, Oneof};\nuse tentacle::multiaddr::Multiaddr;\n\n#[derive(Clone, Copy, Part"
  },
  {
    "path": "core/network/src/protocols/discovery/protocol.rs",
    "chars": 3991,
    "preview": "use std::collections::HashMap;\n\nuse futures::channel::mpsc::{channel, Sender};\nuse futures::stream::StreamExt;\nuse futur"
  },
  {
    "path": "core/network/src/protocols/discovery/substream.rs",
    "chars": 17062,
    "preview": "use super::{\n    addr::{AddrKnown, AddressManager, ConnectableAddr, Misbehavior},\n    message::{DiscoveryMessage, Nodes,"
  },
  {
    "path": "core/network/src/protocols/discovery.rs",
    "chars": 1481,
    "preview": "mod addr;\nmod behaviour;\nmod message;\nmod protocol;\nmod substream;\n\nuse self::protocol::DiscoveryProtocol;\nuse addr::Add"
  },
  {
    "path": "core/network/src/protocols/identify/behaviour.rs",
    "chars": 4990,
    "preview": "use std::sync::atomic::{AtomicBool, Ordering};\nuse std::sync::Arc;\n\nuse futures::channel::mpsc::UnboundedSender;\nuse ten"
  }
]

// ... and 148 more files (download for full content)

About this extraction

This page contains the full source code of the nervosnetwork/muta GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 348 files (1.8 MB), approximately 486.9k tokens, and a symbol index with 3561 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!