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

Retry mechanism for block creation #4407

Merged
merged 8 commits into from
Sep 20, 2022

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Sep 16, 2022

Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net

PR description

Retry block creation if there is a transient error and we still have time, to mitigate empty block issue, as describe here
#4401 (comment)

Fixed Issue(s)

mitigates #4401 when there is a org.rocksdb.RocksDBException: TimedOut(LockTimeout)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 marked this pull request as ready for review September 16, 2022 17:55
retryBlockCreation(payloadIdentifier, blockCreator, remainingTime)
.thenAccept(
bestBlock -> {
final var resultBest = validateBlock(bestBlock);
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a lot could go wrong in here, should this be included in the retry code as well?
Maybe it's not an issue if it doesn't persist to the database though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, I need to review if the lock timeout exception could be triggered here as well

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Copy link
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

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

Couple more questions but no blockers

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 added the mainnet label Sep 19, 2022
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 merged commit 5e15625 into hyperledger:main Sep 20, 2022
@fab-10 fab-10 deleted the retry-block-creation branch May 24, 2023 11:51
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* Retry mechanism for block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Always keep 1 thread active in the computation executors

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Surface StorageException when building a block for finer filtering

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Log successful block created at info

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Reformat block proposal logs

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove test code

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants