add Xchain-pruning-blocks-retained must be >= epochlength (#7963)#8140
add Xchain-pruning-blocks-retained must be >= epochlength (#7963)#8140jframe merged 12 commits intobesu-eth:mainfrom
Conversation
e4a731f to
86764b9
Compare
…dation if it does(besu-eth#7963) Signed-off-by: philosup <philosup@gmail.com>
Signed-off-by: philosup <philosup@gmail.com>
jframe
left a comment
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
Ibft and Clique also have epochs and will have the same issue. Suggest using isPoa() here instead.
Signed-off-by: philosup <philosup@gmail.com>
Signed-off-by: philosup <philosup@gmail.com>
| + unstableChainPruningOptions.getChainDataPruningBlocksRetainedLimit()); | ||
| } else if (genesisConfigOptions.isPoa() | ||
| && unstableChainPruningOptions.getChainDataPruningBlocksRetained() | ||
| < genesisConfigOptions.getQbftConfigOptions().getEpochLength()) { |
There was a problem hiding this comment.
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())
There was a problem hiding this comment.
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 <philosup@gmail.com>
Signed-off-by: philosup <philosup@gmail.com>
) (besu-eth#8140) Signed-off-by: philosup <philosup@gmail.com> Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
PR description
Fixed Issue(s)
fixes #7963
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests