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

add Xchain-pruning-blocks-retained must be >= epochlength (#7963) #8140

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

philosup
Copy link

PR description

Fixed Issue(s)

fixes #7963

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@philosup philosup force-pushed the fix-7963 branch 2 times, most recently from e4a731f to 86764b9 Compare January 20, 2025 09:05
Copy link
Contributor

@jframe jframe left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

Just one small suggestion to check other consensus mechanism that also have an epoch.

this.commandLine,
"--Xchain-pruning-blocks-retained must be >= "
+ unstableChainPruningOptions.getChainDataPruningBlocksRetainedLimit());
} else if (genesisConfigOptions.isQbft()
Copy link
Contributor

Choose a reason for hiding this comment

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

Ibft and Clique also have epochs and will have the same issue. Suggest using isPoa() here instead.

+ unstableChainPruningOptions.getChainDataPruningBlocksRetainedLimit());
} else if (genesisConfigOptions.isPoa()
&& unstableChainPruningOptions.getChainDataPruningBlocksRetained()
< genesisConfigOptions.getQbftConfigOptions().getEpochLength()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

also need to check the epoch length for clique and ibft2 not just qbft.

Doing something this should work
`< (genesisConfigOptions.getBftConfigOptions().getEpochLength() || genesisConfigOptions.getCliqueConfigOptions.getEpochLength())

Copy link
Author

Choose a reason for hiding this comment

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

Modified to handle epochLength per consensus mechanism, as genesisConfigOptions.getCliqueConfigOptions().getEpochLength() returns a default value of 30000 even when Clique is not configured.

Signed-off-by: philosup <[email protected]>
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.

Experimental --Xchain-pruning-enabled=true doesn't work with documented QBFT defaults
3 participants