Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small tx-pool refactoring #2169

Merged
merged 3 commits into from
Aug 3, 2020

Conversation

zhangsoledad
Copy link
Member

@zhangsoledad zhangsoledad commented Jul 16, 2020

proposal changes:

  • rename ContextualTransactionVerifier -> TimeRelativeTransactionVerifier
  • split NonContextualTransactionVerifier from TransactionVerifier
  • check syntactic correctness first before
  • refactory tx-pool rejection error
  • re-broadcast when duplicated tx submit

@zhangsoledad zhangsoledad changed the title Zhangsoledad/tx pool fix re-broadcast when duplicated transaction submit Jul 16, 2020
@zhangsoledad zhangsoledad changed the title re-broadcast when duplicated transaction submit small tx-pool refactory Jul 16, 2020
@zhangsoledad zhangsoledad changed the title small tx-pool refactory small tx-pool refactoring Jul 16, 2020
@doitian doitian added this to 🚧 In progress in CKB - Pull Requests Jul 20, 2020
@zhangsoledad zhangsoledad marked this pull request as ready for review July 20, 2020 08:04
@zhangsoledad zhangsoledad requested a review from a team July 20, 2020 08:04
@doitian doitian added the p:must-have Priority: critical to the current delivery timebox in order for it to be a success label Jul 22, 2020
rpc/src/module/pool.rs Outdated Show resolved Hide resolved
CKB - Pull Requests automation moved this from 🚧 In progress to 👀 Awaiting review Jul 22, 2020
@zhangsoledad zhangsoledad force-pushed the zhangsoledad/tx-pool-fix branch 2 times, most recently from ebcef84 to e9d186a Compare July 27, 2020 05:22
quake
quake previously approved these changes Jul 27, 2020
@quake quake requested a review from doitian July 28, 2020 05:54
doitian
doitian previously approved these changes Jul 30, 2020
CKB - Pull Requests automation moved this from 👀 Awaiting review to ✅ Reviewer approved Jul 30, 2020
@doitian
Copy link
Member

doitian commented Jul 30, 2020

bors r=quake,doitian

1 similar comment
@doitian
Copy link
Member

doitian commented Jul 30, 2020

bors r=quake,doitian

bors bot added a commit that referenced this pull request Jul 30, 2020
2144: feat: add `set_network_active` rpc r=TheWaWaR,keroro520 a=quake

allows user to pause and restart p2p network message processing through rpc

2169: small tx-pool refactoring  r=quake,doitian a=zhangsoledad

proposal changes:
* rename ContextualTransactionVerifier -> TimeRelativeTransactionVerifier
* split NonContextualTransactionVerifier from TransactionVerifier
* check syntactic correctness first before 
* refactory tx-pool rejection error
* re-broadcast when duplicated tx submit

2184: feat: tx_pool_info include tip hash r=quake,doitian a=keroro520

The state of the transaction pool is related to the chain tip. So attaching `tip_hash` and `tip_number` into `TxPoolInfo` which returns by RPC `tx_pool_info` makes it more rigorous.

Co-authored-by: quake <quake.wang@gmail.com>
Co-authored-by: zhangsoledad <787953403@qq.com>
Co-authored-by: keroro <keroroxx520@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jul 30, 2020

Build failed (retrying...):

  • continuous-integration/travis-ci/push

bors bot added a commit that referenced this pull request Jul 30, 2020
2169: small tx-pool refactoring  r=quake,doitian a=zhangsoledad

proposal changes:
* rename ContextualTransactionVerifier -> TimeRelativeTransactionVerifier
* split NonContextualTransactionVerifier from TransactionVerifier
* check syntactic correctness first before 
* refactory tx-pool rejection error
* re-broadcast when duplicated tx submit

2184: feat: tx_pool_info include tip hash r=quake,doitian a=keroro520

The state of the transaction pool is related to the chain tip. So attaching `tip_hash` and `tip_number` into `TxPoolInfo` which returns by RPC `tx_pool_info` makes it more rigorous.

Co-authored-by: zhangsoledad <787953403@qq.com>
Co-authored-by: keroro <keroroxx520@gmail.com>
@doitian
Copy link
Member

doitian commented Jul 30, 2020

bors retry

bors bot added a commit that referenced this pull request Jul 30, 2020
2169: small tx-pool refactoring  r=quake,doitian a=zhangsoledad

proposal changes:
* rename ContextualTransactionVerifier -> TimeRelativeTransactionVerifier
* split NonContextualTransactionVerifier from TransactionVerifier
* check syntactic correctness first before 
* refactory tx-pool rejection error
* re-broadcast when duplicated tx submit

Co-authored-by: zhangsoledad <787953403@qq.com>
@bors
Copy link
Contributor

bors bot commented Jul 30, 2020

Build failed:

  • continuous-integration/travis-ci/push

@doitian
Copy link
Member

doitian commented Jul 31, 2020

bors retry

bors bot added a commit that referenced this pull request Jul 31, 2020
2169: small tx-pool refactoring  r=quake,doitian a=zhangsoledad

proposal changes:
* rename ContextualTransactionVerifier -> TimeRelativeTransactionVerifier
* split NonContextualTransactionVerifier from TransactionVerifier
* check syntactic correctness first before 
* refactory tx-pool rejection error
* re-broadcast when duplicated tx submit

2197: fix: should exit with error code when setup failed r=quake,doitian a=yangby-cryptape

Issue: if the config was malformed and an error was thrown in `setup_app`, the process wouldn't exit.

2198: chore: several minor changes about thread and runtime r=quake,driftluo a=yangby-cryptape

- Simplify dependencies of `ckb-async-runtime`.
  - Use `::std::sync::Barrier` instead of `crossbeam-channel`.
- Let method `ckb-async-runtime::new_runtime` more general.
  - Accept name prefix for threads.
  - Accept `tokio::runtime::Builder` as an optional parameter, so we can set options for the runtime.
- After we upgrade `tokio` from 0.1 to 0.2, the thread name of `tokio` runtime threads has a redundant suffix "-".
  - [`tokio-0.1.x::runtime::Builder::name_prefix(...)`](https://docs.rs/tokio/0.1.22/tokio/runtime/struct.Builder.html#method.name_prefix)
  - [`tokio-0.2.x::runtime::Builder::thread_name(...)`](https://docs.rs/tokio/0.2.22/tokio/runtime/struct.Builder.html#method.thread_name)
- Use a default thread name in logs instead of an empty string.
  Without color, a log record with empty thread name is a bit hard to parse.
- Give name to rayon threads to improve the debuggability slightly.

Co-authored-by: zhangsoledad <787953403@qq.com>
Co-authored-by: Boyu Yang <yangby@cryptape.com>
@bors
Copy link
Contributor

bors bot commented Jul 31, 2020

Build failed (retrying...):

  • continuous-integration/travis-ci/push

bors bot added a commit that referenced this pull request Jul 31, 2020
2169: small tx-pool refactoring  r=quake,doitian a=zhangsoledad

proposal changes:
* rename ContextualTransactionVerifier -> TimeRelativeTransactionVerifier
* split NonContextualTransactionVerifier from TransactionVerifier
* check syntactic correctness first before 
* refactory tx-pool rejection error
* re-broadcast when duplicated tx submit

Co-authored-by: zhangsoledad <787953403@qq.com>
@bors
Copy link
Contributor

bors bot commented Jul 31, 2020

Build failed:

  • continuous-integration/travis-ci/push

@zhangsoledad zhangsoledad dismissed stale reviews from doitian and quake via 2701205 August 1, 2020 06:58
CKB - Pull Requests automation moved this from ✅ Reviewer approved to 👀 Awaiting review Aug 1, 2020
@zhangsoledad
Copy link
Member Author

benchmark

@nervos-bot-user
Copy link
Collaborator

Benchmark Result

  • TPS: 344.98
  • Samples Count: 51
  • CKB Version: 2701205
  • Instance Type: c5.xlarge
  • Instances Count: 3
  • Bench Type: 2in2out
  • CKB Logger Filter: info,ckb=debug

CKB - Pull Requests automation moved this from 👀 Awaiting review to ✅ Reviewer approved Aug 3, 2020
@zhangsoledad
Copy link
Member Author

bors r=quake,doitian

bors bot added a commit that referenced this pull request Aug 3, 2020
2169: small tx-pool refactoring  r=quake,doitian a=zhangsoledad

proposal changes:
* rename ContextualTransactionVerifier -> TimeRelativeTransactionVerifier
* split NonContextualTransactionVerifier from TransactionVerifier
* check syntactic correctness first before 
* refactory tx-pool rejection error
* re-broadcast when duplicated tx submit

Co-authored-by: zhangsoledad <787953403@qq.com>
@bors
Copy link
Contributor

bors bot commented Aug 3, 2020

Build failed:

  • continuous-integration/travis-ci/push

@zhangsoledad
Copy link
Member Author

bors retry

@bors
Copy link
Contributor

bors bot commented Aug 3, 2020

Build succeeded:

@bors bors bot merged commit 5d93fbd into nervosnetwork:develop Aug 3, 2020
CKB - Pull Requests automation moved this from ✅ Reviewer approved to Done Aug 3, 2020
@zhangsoledad zhangsoledad deleted the zhangsoledad/tx-pool-fix branch August 3, 2020 14:04
bors bot added a commit that referenced this pull request Nov 20, 2020
2370: chore: upgrade futures and console r=yangby-cryptape,zhangsoledad a=driftluo

`futures` changelog:
```
    Switch proc-macros to use native #[proc_macro] at Rust 1.45+ (#2243)
    Add WeakShared (#2169)
    Add TryStreamExt::try_buffered (#2245)
    Add StreamExt::cycle (#2252)
    Implemented Clone for stream::{Empty, Pending, Repeat, Iter} (#2248, #2252)
    Fix panic in some TryStreamExt combinators (#2250)
```

Unified console to 0.12

Fix warning on `fixed-hash-core`

Co-authored-by: driftluo <driftluo@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p:must-have Priority: critical to the current delivery timebox in order for it to be a success
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants