Skip to content

test(validator): cover ALT fee-payer roles - #648

Merged
dev-jodee merged 1 commit into
solana-foundation:mainfrom
RlxChap2:test/alt-fee-payer-policy-props
Aug 26, 2026
Merged

dev-jodee merged 1 commit into
solana-foundation:mainfrom
RlxChap2:test/alt-fee-payer-policy-props

Conversation

@RlxChap2

Copy link
Copy Markdown
Contributor

Summary

  • Add DrainRole coverage for all five Address Lookup Table fee-payer policy flags.
  • Cover separate authority and payer slots for CreateLookupTable and ExtendLookupTable.
  • Run the shared property with 512 generated cases.

Test plan

  • cargo test -p kora-lib --lib fee_payer_policy_props
  • just check
  • cargo test --lib --workspace --exclude tests --quiet

Mutation proof

As an artificial mutation, I temporarily mapped FreezeAuthority::flag() to policy.alt.allow_deactivate. The property failed with:

FreezeAuthority by fee payer must pass when its flag is on

I restored the mapping to policy.alt.allow_freeze; the property passed.

Notes

Test-only change. Production validator behavior is unchanged.

Closes #641

@RlxChap2
RlxChap2 requested a review from dev-jodee as a code owner August 22, 2026 05:18
@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds property-based coverage for all Address Lookup Table fee-payer policy controls and registers the new test module.

  • Covers separate authority and payer roles for lookup-table creation and extension.
  • Covers authority roles for freeze, deactivate, and close operations.
  • Runs the shared fee-payer gating property with 512 generated cases.

Confidence Score: 5/5

The test-only PR appears safe to merge, with no concrete correctness or security issues identified.

The added role mappings align with the ALT validator’s create, extend, freeze, deactivate, and close policy checks, and module registration introduces no production behavior change.

Important Files Changed

Filename Overview
crates/lib/src/validator/transaction_validator/fee_payer_policy_props/alt.rs Adds consistent ALT role-to-policy mappings and instruction builders for the shared fee-payer drain-safety property.
crates/lib/src/validator/transaction_validator/fee_payer_policy_props/mod.rs Registers the new ALT property-test module without changing the shared harness or production behavior.

Reviews (1): Last reviewed commit: "test(validator): cover ALT fee-payer pol..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown

βœ… Fork external live tests passed.

fork-external-live-pass:cfe344be5c456790bc5030c4453300206f8aed0c
run: https://github.com/solana-foundation/kora/actions/runs/32972297746

@dev-jodee
dev-jodee merged commit 266b4e4 into solana-foundation:main Aug 26, 2026
24 of 25 checks passed
@dev-jodee

Copy link
Copy Markdown
Collaborator

thanks @RlxChap2

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.

Tests: Address Lookup Table fee-payer drain property coverage

2 participants