Skip to content

Conversation

@jberthold
Copy link
Member

@jberthold jberthold commented Nov 3, 2025

  • assume burn_percent <= 100 (true percentage) to avoid underflow
  • constrain lamports_per_byteyear to < 2^32 to avoid overflow for small concrete data sizes
  • set exempt_threshold to default of 2.0
  • add a special rule to implement how the default exempt_threshold is recognised: 2.0f64 as u64 == 4611686018427387904u64

Closes runtimeverification/solana-token#33

* assume `burn_percent <= 100` (true percentage) to avoid underflow
* constrain lamports_per_byteyear to `< 2^32` to avoid overflow for small concrete data sizes
* set `exempt_threshold` to default of 2.0
* add a special rule to implement how the default exempt_threshold is recognised: `2.0f64 as u64 == 4611686018427387904u64`
@jberthold jberthold marked this pull request as ready for review November 3, 2025 22:37
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. I wonder if something we should do is add a section that is ## Assumptions somewhere where we catalog what we are assuming in one place maybe with Ids too. E.g.

Assumptions

  • A. a pinocchio Account has a P-Token Account, Mint, Multisig following
  • B. Exemption threshold is assumed to be 2.0
  • C. ... and so on

@jberthold jberthold merged commit 9008307 into feature/p-token Nov 4, 2025
7 checks passed
@jberthold jberthold deleted the constrain-rent-parameters branch November 4, 2025 03:13
@jberthold
Copy link
Member Author

Nice. I wonder if something we should do is add a section that is ## Assumptions somewhere where we catalog what we are assuming in one place maybe with Ids too. E.g.

Assumptions

  • A. a pinocchio Account has a P-Token Account, Mint, Multisig following
  • B. Exemption threshold is assumed to be 2.0
  • C. ... and so on

Good idea!
We can put this into a file in the feature branch, maybe at the top level, or else we just use the p-token.md file and add a summary at the top.

@jberthold
Copy link
Member Author

jberthold commented Nov 5, 2025

Nice. I wonder if something we should do is add a section that is ## Assumptions somewhere where we catalog what we are assuming in one place maybe with Ids too. E.g.

Assumptions

  • A. a pinocchio Account has a P-Token Account, Mint, Multisig following
  • B. Exemption threshold is assumed to be 2.0
  • C. ... and so on

Good idea! We can put this into a file in the feature branch, maybe at the top level, or else we just use the p-token.md file and add a summary at the top.

I have added some information in VERIFICATION_GUIDE.md in runtimeverification/solana-token#90 . Not sure what would be the best place for an overview otherwise.

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