-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0xmovses/goverened gas pool spec #118
base: l-monninger/governed-gas-pool
Are you sure you want to change the base?
0xmovses/goverened gas pool spec #118
Conversation
spec aptos_framework::governed_gas_pool { | ||
/// <high-level-req> | ||
/// No.: 1 | ||
/// Requirement: The GovernedGasPool resource must exist at the aptos_framework address after initialization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
/// Enforcement: Formally verified via [high-level-req-1](initialize). | ||
/// | ||
/// No.: 2 | ||
/// Requirement: Only the aptos_framework address is allowed to initialize the GovernedGasPool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
/// Enforcement: Formally verified via [high-level-req-2](initialize). | ||
/// | ||
/// No.: 3 | ||
/// Requirement: Deposits into the GovernedGasPool must be reflected in the pool's balance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say you want to prove above that initialization creates a resource account distinct from the aptos_framework
address. Then deposits into the GovernedGasPool
are reflected in that account's balance.
/// Enforcement: Formally verified via [high-level-req-3](deposit), [high-level-req-3.1](deposit_from). | ||
/// | ||
/// No.: 4 | ||
/// Requirement: Only the aptos_framework address can fund accounts from the GovernedGasPool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
/// Enforcement: Formally verified via [high-level-req-4](fund). | ||
/// | ||
/// No.: 5 | ||
/// Requirement: Gas fees must be deposited into the GovernedGasPool whenever specified by the configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a requirement on transaction_validation.spec.move
or transaction_fee.spec.move
.
spec module { | ||
/// [high-level-req-1] | ||
/// The GovernedGasPool resource must exist at aptos_framework after initialization. | ||
invariant exists<GovernedGasPool>(@aptos_framework); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GovernGasPool
exists for the aptos_framework
cannot be an invariant. You would need an exists implies, i.e., ==>
. One thing the GovernedGasPool
existing could imply is that the resource account for the GovernedGasPool
exists.
Description
Type of Change
Which Components or Systems Does This Change Impact?
How Has This Been Tested?
Key Areas to Review
Checklist