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

fix(chain): use correct gas price during state sync finalization #3278

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

bowenwang1996
Copy link
Collaborator

@bowenwang1996 bowenwang1996 commented Sep 3, 2020

As mentioned in #3277, there is an inconsistency in gas price usage during state sync finalization, which can cause the state to diverge if gas price changes between sync block and its prev block.
Fixes #3277.

Test plan

test_catchup_gas_price_change.

@gitpod-io
Copy link

gitpod-io bot commented Sep 3, 2020

@codecov
Copy link

codecov bot commented Sep 3, 2020

Codecov Report

Merging #3278 into master will decrease coverage by 0.01%.
The diff coverage is 98.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3278      +/-   ##
==========================================
- Coverage   87.06%   87.04%   -0.02%     
==========================================
  Files         217      217              
  Lines       42325    42393      +68     
==========================================
+ Hits        36851    36903      +52     
- Misses       5474     5490      +16     
Impacted Files Coverage Δ
chain/chain/src/chain.rs 88.61% <50.00%> (+0.16%) ⬆️
chain/client/tests/process_blocks.rs 91.19% <100.00%> (+1.09%) ⬆️
neard/tests/stake_nodes.rs 85.66% <0.00%> (-12.11%) ⬇️
chain/client/src/test_utils.rs 81.32% <0.00%> (-3.71%) ⬇️
chain/network/tests/routing.rs 98.75% <0.00%> (-1.25%) ⬇️
chain/chain/src/test_utils.rs 91.29% <0.00%> (-0.93%) ⬇️
chain/client/src/client_actor.rs 84.86% <0.00%> (-0.30%) ⬇️
chain/chain/src/validate.rs 90.32% <0.00%> (ø)
chain/client/src/sync.rs 88.80% <0.00%> (+0.12%) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 540ca10...1f64b42. Read the comment docs.

@bowenwang1996 bowenwang1996 merged commit c48bb28 into master Sep 3, 2020
@bowenwang1996 bowenwang1996 deleted the fix-catchup-gas-price branch September 3, 2020 05:02
bowenwang1996 added a commit that referenced this pull request Sep 3, 2020
As mentioned in #3277, there is an inconsistency in gas price usage during state sync finalization, which can cause the state to diverge if gas price changes between sync block and its prev block.
Fixes #3277.

Test plan
---------
`test_catchup_gas_price_change`.
mhalambek pushed a commit that referenced this pull request Sep 7, 2020
As mentioned in #3277, there is an inconsistency in gas price usage during state sync finalization, which can cause the state to diverge if gas price changes between sync block and its prev block.
Fixes #3277.

Test plan
---------
`test_catchup_gas_price_change`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gas price inconsistency during state sync
2 participants