Skip to content

fix: use number of storage slots from native account in delta commitment#2770

Open
PhilippGackstatter wants to merge 6 commits intonextfrom
pgackst-audit-fixes
Open

fix: use number of storage slots from native account in delta commitment#2770
PhilippGackstatter wants to merge 6 commits intonextfrom
pgackst-audit-fixes

Conversation

@PhilippGackstatter
Copy link
Copy Markdown
Contributor

This PR contains a couple of batched fixes from the audit reports, addressing:

  • L-02 Misleading Documentation (Report 1)
  • L-03 Transaction Script Program Does Not Load the Corresponding Arguments (Report 2)
  • L-04 Delta Commitment Computation May Use Foreign Account Context (Report 2)
  • L-06 Misleading Documentation (Report 2)
  • L-07 Incomplete Procedure Documentation (Report 2)

Summary

  • Introduce memory::get_native_num_storage_slots for use in account_delta::compute_commitment to make sure the delta commitment is always computed against native account state.
  • Fix misleading documentation, incorrect stack comments, and incomplete procedure documentation across the MASM transaction kernel, as identified by the transaction kernel audits
  • Remove unused MAX_NUM_FOREIGN_ACCOUNTS Rust constant that incorrectly stated 64 foreign accounts (the actual limit is 63 foreign + 1 native = 64 total, enforced by MASM's MAX_FOREIGN_ACCOUNT_PTR)

@PhilippGackstatter PhilippGackstatter added the pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority label Apr 14, 2026
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