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

test: Adjust difficulty if below minimum 0x20000 #803

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

rodiazet
Copy link
Collaborator

@rodiazet rodiazet commented Jan 31, 2024

Applies the minimum difficulty cap also to pre-Byzantium difficulty
calculations.

Fixes #752.

@rodiazet rodiazet requested a review from chfast January 31, 2024 17:11
@rodiazet rodiazet linked an issue Jan 31, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (606b735) 97.94% compared to head (8856dde) 62.18%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #803       +/-   ##
===========================================
- Coverage   97.94%   62.18%   -35.77%     
===========================================
  Files         110       44       -66     
  Lines       10823     3192     -7631     
===========================================
- Hits        10601     1985     -8616     
- Misses        222     1207      +985     
Flag Coverage Δ
blockchaintests ?
statetests 62.18% <36.84%> (-0.04%) ⬇️
statetests-silkpre ?
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
test/statetest/statetest.hpp 69.23% <ø> (-30.77%) ⬇️
test/statetest/statetest_runner.cpp 69.23% <100.00%> (-27.20%) ⬇️
test/statetest/statetest_loader.cpp 78.63% <66.66%> (-17.86%) ⬇️
test/state/ethash_difficulty.cpp 0.00% <0.00%> (-83.34%) ⬇️

... and 97 files with indirect coverage changes

Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A unit test is needed.

test/state/ethash_difficulty.cpp Outdated Show resolved Hide resolved
@rodiazet rodiazet force-pushed the test/difficulty-fix branch 2 times, most recently from f0525b0 to 43c8ee9 Compare February 1, 2024 15:09
Applies the minimum difficulty cap also to pre-Byzantium difficulty
calculations.

Fixes #752.

Co-authored-by: Paweł Bylica <pawel@ethereum.org>
@chfast chfast changed the title test: Adjust difficulty value if below minimal difficulty (0x20000) test: Adjust difficulty if below minimum 0x20000 Feb 5, 2024
@chfast chfast merged commit e4bcf7c into master Feb 5, 2024
23 of 25 checks passed
@chfast chfast deleted the test/difficulty-fix branch February 5, 2024 14:19
chfast added a commit that referenced this pull request Feb 9, 2024
Applies the minimum difficulty cap also to pre-Byzantium difficulty
calculations.

Fixes #752.

Co-authored-by: Paweł Bylica <pawel@ethereum.org>
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.

evmone t8n report difficulty 1
2 participants