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

truncate large balances #521

Merged
merged 3 commits into from
Oct 31, 2024
Merged

Conversation

gballet
Copy link
Owner

@gballet gballet commented Oct 31, 2024

Large balances (>16 bytes) will overwrite the nonce in the basic data leaf. While this can not happen on mainnet, owing to the amount issued, it happens in devmode. This means the nonce will be overwritten with the balance, which is incorrect.

This PR truncates the balance if it's above that threshold.

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
@gballet gballet requested a review from jsign October 31, 2024 11:43
trie/verkle.go Outdated Show resolved Hide resolved
@gballet
Copy link
Owner Author

gballet commented Oct 31, 2024

As noted in dms, panicking would break devmode. So I'm merging this, and taking a note to modify the devmode in master so that it doesn't break.

trie/verkle.go Show resolved Hide resolved
@gballet gballet merged commit 054f953 into kaustinen-with-shapella Oct 31, 2024
10 checks passed
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