Skip to content

Treat timestamp as unsigned long in engine api fork validation#8221

Merged
siladu merged 1 commit intobesu-eth:mainfrom
siladu:unsignedlong-timestamp-comparison
Feb 3, 2025
Merged

Treat timestamp as unsigned long in engine api fork validation#8221
siladu merged 1 commit intobesu-eth:mainfrom
siladu:unsignedlong-timestamp-comparison

Conversation

@siladu
Copy link
Copy Markdown
Contributor

@siladu siladu commented Feb 3, 2025

PR description

If the timestamp is set to > 2^63 - 1 and <= 2^64 - 1 (UnsignedLong.MAX_VALUE = 18446744073709551615), then since we use a (signed) primitive long by default this can overflow and e.g. we interpret 18446744073709551615 as timestamp = -1

This fixes some hive tests as part of #8177

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu enabled auto-merge (squash) February 3, 2025 05:54
@siladu siladu merged commit a94f376 into besu-eth:main Feb 3, 2025
@siladu siladu deleted the unsignedlong-timestamp-comparison branch February 3, 2025 06:12
pullurib pushed a commit to pullurib/besu that referenced this pull request Feb 6, 2025
…eth#8221)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
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