Skip to content

fix(rlp): pass ValueDecoderContext by ref in DecodeStorageRootOnly#10842

Merged
LukaszRozmej merged 3 commits into
NethermindEth:masterfrom
reject-i:fix/account-decoder-ref-param
Mar 16, 2026
Merged

fix(rlp): pass ValueDecoderContext by ref in DecodeStorageRootOnly#10842
LukaszRozmej merged 3 commits into
NethermindEth:masterfrom
reject-i:fix/account-decoder-ref-param

Conversation

@reject-i
Copy link
Copy Markdown
Contributor

DecodeStorageRootOnly called DecodeStorageRoot without ref, so position changes were lost (ValueDecoderContext is a ref struct). Bug introduced in #6722 during RlpStream to ValueDecoderContext migration. Removed the duplicate non-ref DecodeStorageRoot overload and added a regression test.

Copy link
Copy Markdown
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

fortunately this is one-off throw away ValueDecoderContext, so it doesn't really affect anything in current usages. But should be by ref

@LukaszRozmej LukaszRozmej merged commit cdad249 into NethermindEth:master Mar 16, 2026
633 of 634 checks passed
stdevMac pushed a commit that referenced this pull request Mar 19, 2026
…10842)

* fix(rlp): pass ValueDecoderContext by ref in DecodeStorageRootOnly

* Update AccountDecoderTests.cs

---------

Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants