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

New Difficulty Tests for ArrowGlacier #972

Merged
merged 5 commits into from
Nov 3, 2021
Merged

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Oct 27, 2021

This PR contains updated tests from BasicTests to the new DifficultyTests category format.

Updated tests include: difficultyByzantium, difficultyConstantinople, difficultyFrontier, difficultyHomestead, difficultyEIP2384, difficultyEIP2384_random, difficultyEIP2384_random_to20M.

Currently, difficultyEIP2384_random and difficultyEIP2384_random_to20M fail due to ethereum/go-ethereum#23818.

Update: This PR now only contains ArrowGlacier tests.

New ArrowGlacier tests include:

  • difficultyArrowGlacier: Combination checks with block numbers [10700000-15000000], timestamp deltas [1-90], uncles [0, 1]
  • difficultyArrowGlacierFromLondon: London->ArrowGlacier gradual difficulty increase test: Test cases start at block 13460000 and difficulty=0x223a2d17232652 (taken from Mainnet), and gradually increase difficulty considering an average of 13s block time, and an average uncle frequency of 5%.
  • difficultyArrowGlacierFromLondonAggressive: Same as previous test, but average uncle frequency is more aggressive at 15%.

All ArrowGlacier test cases are completing without issues.

@winsvega
Copy link
Collaborator

please. lets do one at a time.
1 pr - remove old tests
2 pr - restore old test in new format
3 pr - introduce new tests

Copy link
Collaborator

@winsvega winsvega left a comment

Choose a reason for hiding this comment

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

plese lets divide and conquer

@marioevz
Copy link
Member Author

I have added #976 and #977 to remove the BasicTests folder and update existing difficulty tests respectively.
I can rebase this branch to develop once those two PRs are merged.
Let me know if that is ok.

@marioevz marioevz changed the title New Difficulty Tests for ArrowGlacier + Updated Difficulty Tests for Previous Forks New Difficulty Tests for ArrowGlacier Nov 1, 2021
@marioevz
Copy link
Member Author

marioevz commented Nov 1, 2021

This PR now only contains ArrowGlacier difficulty tests.
All other changes regarding old difficulty tests and removal of BasicTests files has been moved into different PRs.
@winsvega let me know if this addresses the requested changes.

{
"difficultyArrowGlacierFromLondon": {
"_info": {
"comment": "London->ArrowGlacier gradual difficulty increase test: blocks 13460000 - 15000000, step 5000 blocks, uncle rate 5% "
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is this test originate from?

Copy link
Member Author

Choose a reason for hiding this comment

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

I filled these test cases externally with a python script, I did not want the filler to make an exhaustive combination so I took a mainnet block as input and start point, and the script filled the steps of the test case where the difficulty gradually increases, to try to simulate the difficulty increase feedback loop in normal block production.

If this is not ok, I think another approach could be to add a filler with combinations on the block where block is supposed to happen.

{
"difficultyArrowGlacierFromLondonAggressive": {
"_info": {
"comment": "London->ArrowGlacier aggressive difficulty increase test: blocks 13460000 - 15000000, step 5000 blocks, uncle rate 15%"
Copy link
Collaborator

Choose a reason for hiding this comment

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

source of the test?

@winsvega winsvega merged commit c5b750b into develop Nov 3, 2021
@winsvega winsvega deleted the newDifficultyTests branch November 3, 2021 21:57
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.

2 participants