Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix for BLOCKHASH conversion error #1025

Conversation

DavePearce
Copy link
Collaborator

@DavePearce DavePearce commented Aug 28, 2024

This puts in place a simple fix for ensuring captured block hashes are for valid blocks relative to the current block. This is based on the implementation in BlockHashOperation.java

This puts in place a simple fix for ensuring captured block hashes are
for valid blocks relative to the current block.
@DavePearce DavePearce force-pushed the fix/issue-1024/prevent-conversion-error-for-blockhash-in-blockcapturer branch from 4358d11 to c0260e2 Compare August 28, 2024 16:20
Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -39,6 +38,10 @@
import org.hyperledger.besu.plugin.data.BlockHeader;

public class BlockCapturer implements ConflationAwareOperationTracer {
public static final int MAX_RELATIVE_BLOCK = 256;
Copy link
Collaborator

Choose a reason for hiding this comment

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

you could use BLOCKHASH_MAX_HISTORY in GlobalConstants.java

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well maybe at some point I'll put that in

@DavePearce DavePearce merged commit 81ca6d2 into arith-dev Aug 28, 2024
5 of 6 checks passed
@DavePearce DavePearce deleted the fix/issue-1024/prevent-conversion-error-for-blockhash-in-blockcapturer branch August 28, 2024 19:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent Conversion Error for BLOCKHASH in BlockCapturer
2 participants