Skip to content

Conversation

@JuanCoRo
Copy link
Member

This PR consolidates the code blocks in p-token/src/entrypoint-runtime-verification.rs checking the validity of owner signatures as checked by mod.rs::validate_owner. In particular:

  • Defines inner_test_validate_owner which contains the logic that was being checked in several tests.
  • Replace the pertinent code blocs across the test suite with pertinent calls to inner_test_validate_owner.
  • Change the multisig_is_initialised : Result<bool, ProgramError> to maybe_multisig_is_initialised : Option<Result<bool, ProgramError>> so that inner_test_validate_owner doesn't depend on the multisig config flag.

Observation: inner_test_validate_owner has the #[inline(always)] attribute. It is unclear to me if that should be the case.

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.

I thoroughly tested this (p-token and spl-token concrete suites) and it all works as expected.

Awesome work

@JuanCoRo JuanCoRo merged commit 037268b into proofs Oct 28, 2025
@JuanCoRo JuanCoRo deleted the encapsulate-validate-owner-checks branch October 28, 2025 09:15
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.

3 participants