Skip to content

feat: implement AccountPatch::merge#3082

Open
PhilippGackstatter wants to merge 3 commits into
pgackst-patch-serializationfrom
pgackst-patch-merge
Open

feat: implement AccountPatch::merge#3082
PhilippGackstatter wants to merge 3 commits into
pgackst-patch-serializationfrom
pgackst-patch-merge

Conversation

@PhilippGackstatter

@PhilippGackstatter PhilippGackstatter commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Implements AccountPatch::merge, which combines a follow-up patch into an existing one with patch semantics: storage and vault entries in other overwrite their counterparts in self, and the merged final nonce becomes other's. The merge is rejected if the two patches apply to different accounts, if both carry a final nonce and other's is not exactly one greater than self's, if both are full-state patches, or if a storage slot is used as two different slot types.
  • Tightens AccountPatch::new to reject patches that carry account code but no final_nonce via the new AccountPatchError::CodeRequiresNonceUpdate: a patch with code represents account creation, which is a state-changing transaction and per tx kernel rules must increment the nonce.

part of #2630

@PhilippGackstatter PhilippGackstatter added the pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority label Jun 11, 2026
@PhilippGackstatter PhilippGackstatter changed the title feat: added AccountPatch::merge feat: implement AccountPatch::merge Jun 11, 2026
@PhilippGackstatter PhilippGackstatter marked this pull request as ready for review June 11, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant