-
Notifications
You must be signed in to change notification settings - Fork 228
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
feat: apply tx_pool limit #841
feat: apply tx_pool limit #841
Conversation
358fd28
to
7c475f8
Compare
7c475f8
to
c821626
Compare
c821626
to
bfdeca3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase this PR to develop.
bfdeca3
to
7d807d9
Compare
7d807d9
to
b90d92c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it is too easy to miss size calculation in the current implementation, better to move size calculation inside the tx_pool basic interfaces.
It's not quite easy, It's associated with error handle on different levels. |
pub fn new(transaction: &'a Transaction, block_bytes_limit: u64) -> Self { | ||
SizeVerifier { | ||
transaction, | ||
block_bytes_limit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use consensus max_block_bytes
here, the transaction which size approaching bytes limit will be accepted and broadcasted to peers, but cannot be assembled in BlockTemplate
because of the extra cellbase size.
How about adding cellbase size limit to consensus and minus this value here as gap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's address this in #885
Features
BREAKING CHANGES
config ckb.toml
rpc tx_pool_info