Skip to content

chore: enforce minimum number of account procedures in tx kernel#2171

Merged
bobbinth merged 2 commits intonextfrom
pgackst-enforce-min-num-procedures
Dec 12, 2025
Merged

chore: enforce minimum number of account procedures in tx kernel#2171
bobbinth merged 2 commits intonextfrom
pgackst-enforce-min-num-procedures

Conversation

@PhilippGackstatter
Copy link
Contributor

There is a mismatch between AccountCode in Rust and the tx kernel in MASM where AccountCode enforces that it contains at least AccountCode::MIN_NUM_PROCEDURES, but the kernel does not. This is a case where Rust rules are stricter than Masm, which shouldn't be the case. We should either be more lenient in AccountCode or make the tx kernel validate that at least two procedures are present.

Since the validation in AccountCode does make sense (an auth procedure is required and a non-auth procedure should be present for the account to be useful), I think the right move is to add a check in the kernel.

addresses #2162 (comment)

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@bobbinth bobbinth merged commit 1c62da3 into next Dec 12, 2025
17 checks passed
@bobbinth bobbinth deleted the pgackst-enforce-min-num-procedures branch December 12, 2025 08:11
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