Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

fix(consensus): empty block receipts root #61

Merged
merged 5 commits into from Dec 24, 2019
Merged

Conversation

KaoImin
Copy link
Contributor

@KaoImin KaoImin commented Dec 23, 2019

What type of PR is this?
bugfix

What this PR does / why we need it:

  • fix a bug cause panic when generating receipts root of an empty block
  • fix a bug of update epoch info after commit

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

yejiayu
yejiayu previously approved these changes Dec 23, 2019
Copy link
Contributor

@cryptowen cryptowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KaoImin KaoImin merged commit 89ed4d2 into nervosnetwork:master Dec 24, 2019
@KaoImin KaoImin deleted the fix branch December 24, 2019 05:10
yejiayu added a commit that referenced this pull request Dec 26, 2019
* feat: metrics logger (#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (#54)

* feat: support consensus tracing (#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (#62)

* chore(ci): use sccache and limit its cache size to 2G (#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (#66)

* fix(consensus): empty block receipts root (#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (#67)

* fix(ci): fail to install sccache after new rust-toolchain (#68)

* feat(consensus): develop aggregate crypto with overlord (#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
yejiayu added a commit to yejiayu/muta that referenced this pull request Dec 29, 2019
* feat: metrics logger (nervosnetwork#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (nervosnetwork#54)

* feat: support consensus tracing (nervosnetwork#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (nervosnetwork#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (nervosnetwork#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (nervosnetwork#62)

* chore(ci): use sccache and limit its cache size to 2G (nervosnetwork#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (nervosnetwork#66)

* fix(consensus): empty block receipts root (nervosnetwork#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (nervosnetwork#67)

* fix(ci): fail to install sccache after new rust-toolchain (nervosnetwork#68)

* feat(consensus): develop aggregate crypto with overlord (nervosnetwork#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (nervosnetwork#46)

* feat(protocol/traits): Add traits of binding. (nervosnetwork#47)

* feat(core/binding): Implementation of service state. (nervosnetwork#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (nervosnetwork#49)

* feat(core/binding-macro): Add cycles proc-marco. (nervosnetwork#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (nervosnetwork#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (nervosnetwork#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (nervosnetwork#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (nervosnetwork#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (nervosnetwork#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (nervosnetwork#65)

* feat(core/binding-macro): Support for returning a struct. (nervosnetwork#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (nervosnetwork#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
yejiayu added a commit that referenced this pull request Dec 30, 2019
* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* [ᚬframework] feat(framework): Service executor. (#71)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* Update protocol/Cargo.toml

Co-Authored-By: Eason Gao <kaoimin@qq.com>

Co-authored-by: Eason Gao <kaoimin@qq.com>

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

* feat(framework/binding): 1. add iterator for StoreMap and StoreArray \n 2. impl FixedCodec for u8,u32,u64,bool,String

* fix FixedCodecError

* rebase

* fix u64 for overflowing_add

* [ᚬframework] Rebase master (#73)

* feat: metrics logger (#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (#54)

* feat: support consensus tracing (#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (#62)

* chore(ci): use sccache and limit its cache size to 2G (#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (#66)

* fix(consensus): empty block receipts root (#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (#67)

* fix(ci): fail to install sccache after new rust-toolchain (#68)

* feat(consensus): develop aggregate crypto with overlord (#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>

* feat(graphql): Modify the API to fit the framework data structure. (#74)

* feat: Extract muta as crate.

* rebase master

Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
yejiayu added a commit that referenced this pull request Dec 30, 2019
* feat: metrics logger (#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (#54)

* feat: support consensus tracing (#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (#62)

* chore(ci): use sccache and limit its cache size to 2G (#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (#66)

* fix(consensus): empty block receipts root (#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (#67)

* fix(ci): fail to install sccache after new rust-toolchain (#68)

* feat(consensus): develop aggregate crypto with overlord (#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants