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
[ckb_chain]: Calculate tx fees when switch is Switch::DISABLE_ALL #3905
base: develop
Are you sure you want to change the base?
[ckb_chain]: Calculate tx fees when switch is Switch::DISABLE_ALL #3905
Conversation
470c0d8
to
be872f7
Compare
be872f7
to
9334819
Compare
64314d3
to
2e15de8
Compare
ckb/util/reward-calculator/src/lib.rs Lines 150 to 254 in 3aa3051
In there: ckb/util/reward-calculator/src/lib.rs Lines 225 to 227 in 3aa3051
I think when parent.number() <= 11, competing_proposal_start will be always be 1 , then proposed will always contains the tx0 which proposed in block 1 and committed in block 3.
Then A workaround way to avoid this case is "generate many blocks (blocks count >=13)" before Confirmed: For the miners who mined blocks |
2e15de8
to
9f26534
Compare
9f26534
to
8c71f61
Compare
It's weired, all of the CI jobs are success on this PR, but failed on merge queue: Investigating why... Update: rebased my branch on Figured out, unit tests and integration tests are skipped on "push" action CI, they only are triggred on "merge queue" action CI, after this PR: #3837 I need to fix all unit tests. |
… is Switch::DISABLE_ALL Signed-off-by: Eval EXEC <execvy@gmail.com>
…cile_main_chain Signed-off-by: Eval EXEC <execvy@gmail.com>
Signed-off-by: Eval EXEC <execvy@gmail.com>
…expect when switch is Switch::DISABLE_ALL Signed-off-by: Eval EXEC <execvy@gmail.com>
8c71f61
to
d445c4b
Compare
These unit tests are failed on merge queue CI jobs. |
What problem does this PR solve?
Problem Summary:
ckb/chain/src/chain.rs
Lines 804 to 810 in b78864d
In
fn reconcile_main_chain
, ifswitch
isSwitch::DISABLE_ALL
, tx fees won't be calculated and saved intoBlockExt
, this will causeRewardCalculator::block_reward_internal
failed to calculate rightblock_reward
:ckb/util/reward-calculator/src/lib.rs
Lines 95 to 102 in 3aa3051
What is changed and how it works?
What's Changed:
FeeCalculator
and it'snew
andtransaction_fee
methods public.BlockExt
whenswitch
isSwitch::DISABLE_ALL
TODO
Switch::DISABLE_ALL
mode, then continue to process_block inSwitch::NONE
mode.Check List
Tests
Side effects
Release note