Skip to content

Conversation

@jberthold
Copy link
Member

#mapOffset adjusts the offset parameter of references and pointers in argument lists when values containing them are read from or written to outer stack frames. This happens to the bytes of PubKey data in P-token, which is known to be all Integer(_, 8, false) but abstracted in a list-sorted variable.
Without this simplification, a path condition KEYBYTES ==K <some key> will not imply #mapOffset(KEYBYTES) ==K <some key>. This was causing vacuous branches which end up in assert_failed calls.
Some proofs were failing before and are passing with this simplification.

@jberthold jberthold marked this pull request as ready for review November 11, 2025 22:22
Copy link
Collaborator

@sskeirik sskeirik left a comment

Choose a reason for hiding this comment

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

This looks good base on the semantics of #mapOffset and #adjustRef where #adjustRef is a no-op on values that do not contain references or pointers.

@jberthold jberthold merged commit c59beb2 into feature/p-token Nov 12, 2025
7 checks passed
@jberthold jberthold deleted the simplify-map-offset-for-keys branch November 12, 2025 00:28
Copy link
Collaborator

@dkcumming dkcumming left a comment

Choose a reason for hiding this comment

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

Nice!

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.

4 participants