-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2456: docs: document errors r=doitian,yangby-cryptape a=keroro520 2469: docs: add missing documents for test-chain-utils r=doitian,yangby-cryptape,keroro520 a=chuijiaolianying 2478: test: fix test "test_prepare_uncles"; it could failed with a very small chance r=zhangsoledad,keroro520 a=yangby-cryptape #### Issue - `ChainController::process_block(..)` is synchronized, it will wait for the response. https://github.com/nervosnetwork/ckb/blob/6e34d89a44aaeba3ffbfbf62c173e6a0a6547273/chain/src/chain.rs#L200-L208 - But when `ChainService::process_block(..)`, it will send `NewUncle(..)` to `TxPoolController` without waiting for the response. https://github.com/nervosnetwork/ckb/blob/6e34d89a44aaeba3ffbfbf62c173e6a0a6547273/chain/src/chain.rs#L491-L497 - So, with a very small probability, the uncle block may not have been processed by `TxPoolService`. So the follow line will throw the error: `panicked at 'index out of bounds: the len is 0 but the index is 0`. https://github.com/nervosnetwork/ckb/blob/6e34d89a44aaeba3ffbfbf62c173e6a0a6547273/chain/src/tests/block_assembler.rs#L210 #### Reproduce Append `::std::thread::sleep(::std::time::Duration::from_millis(500));` to line 629 in the follow code section to delay `TxPool` update `NewUncle` can reproduce this issue. https://github.com/nervosnetwork/ckb/blob/6e34d89a44aaeba3ffbfbf62c173e6a0a6547273/tx-pool/src/service.rs#L629-L637 Co-authored-by: keroro <[email protected]> Co-authored-by: chuijiaolianying <[email protected]> Co-authored-by: Boyu Yang <[email protected]>
- Loading branch information
Showing
18 changed files
with
447 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ version = "0.39.0-pre" | |
license = "MIT" | ||
authors = ["Nervos Core Dev <[email protected]>"] | ||
edition = "2018" | ||
description = "TODO(doc): @keroro520 crate description" | ||
description = "Underlying error types used over ckb crates" | ||
homepage = "https://github.com/nervosnetwork/ckb" | ||
repository = "https://github.com/nervosnetwork/ckb" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ version = "0.39.0-pre" | |
license = "MIT" | ||
authors = ["Nervos Core Dev <[email protected]>"] | ||
edition = "2018" | ||
description = "TODO(doc): @keroro520 crate description" | ||
description = "This crate provides implementation to calculate dao field" | ||
homepage = "https://github.com/nervosnetwork/ckb" | ||
repository = "https://github.com/nervosnetwork/ckb" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ version = "0.39.0-pre" | |
license = "MIT" | ||
authors = ["Nervos Core Dev <[email protected]>"] | ||
edition = "2018" | ||
description = "TODO(doc): @keroro520 crate description" | ||
description = "This crate provides several util functions to operate the dao field and NervosDAO related errors" | ||
homepage = "https://github.com/nervosnetwork/ckb" | ||
repository = "https://github.com/nervosnetwork/ckb" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.