Skip to content

Commit d8306f3

Browse files
committed
Merge branch 'l-monninger/mint-cap-evaluation' of https://github.com/movementlabsxyz/aptos-core into l-monninger/mint-cap-evaluation
2 parents 0f11122 + 1bf628d commit d8306f3

File tree

1 file changed

+8
-8
lines changed
  • aptos-move/framework/evaluations/aptos-coin-mint-capability/destroying

1 file changed

+8
-8
lines changed

aptos-move/framework/evaluations/aptos-coin-mint-capability/destroying/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Destroying the Aptos Coin Mint Capability
2-
We assert that destroying the Aptos Coin mint capability would not cause failures of necessary operations of chain which has the Governed Gas Pool feature flags enabled.
2+
We assert that destroying the Aptos Coin mint capability would not cause failures of necessary operations of a chain which has the Governed Gas Pool feature flags enabled and has removed staking rewards.
33

44
We begin with a brief section on the [procedure and intended outcomes](#procedure-and-intended-outcomes) of destroying the Aptos Coin mint capability.
55

@@ -89,34 +89,34 @@ We identified the following methods, all of which are used faucet or test branch
8989

9090
## Usages and side effects
9191

92-
### Transaction `prologue` and `epilogue`
92+
### Prologue and epilogue
9393

94-
### `prologue`
94+
#### Prologue
9595
There are distinct prologues for executing blocks and transactions within blocks in the Aptos Framework.
9696

97-
#### [`block_prologue`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/block.move#L224)
97+
##### [`block_prologue`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/block.move#L224)
9898

9999
The [`block_prologue`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/block.move#L224) and its DKG variant `block_prologue_ext` both primarily call to [`block_prologue_common`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/block.move#L155).
100100

101101
We did not identify any usages of `.mint_cap` on any of the `block_prologue_common` branches.
102102

103-
#### Transaction [`prologue`]
103+
##### Transaction `prologue`
104104
All transactions now call one of the [`*_script_prologue`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/aptos-vm/src/aptos_vm.rs#L2244) functions, which in turn call [`prologue_common`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/transaction_validation.move#L74).
105105

106106
We did not identify any usages of `.mint_cap` on any of the `prologue_common` branches.
107107

108-
### `epilogue`
108+
#### Epilogue
109109
There are distinct epilogues for executing blocks and transactions within blocks in the Aptos Framework.
110110

111-
#### Block epilogue
111+
##### Block epilogue
112112
The Block Epilogue does not map neatly to a single function. Importantly, it can trigger `reconfiguration::reconfigure`(https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/reconfiguration.move#L107) which calls the following coin invoking methods:
113113

114114
- `transaction_fee::process_collected_fees` which does not invoke any minting capabilities.
115115
- `stake::on_new_epoch` which mints rewards for validators in `distribute_rewards`[https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/stake.move#L1648].
116116

117117
To ensure the block epilogue does not `abort` on the `mint` branch, we would need to either set the reward rate to zero or add logic to skip the minting of rewards under a given feature flag.
118118

119-
#### Transaction [`epilogue`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/transaction_validation.move#L262)
119+
##### Transaction [`epilogue`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/transaction_validation.move#L262)
120120

121121
The transaction [`epilogue`](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/transaction_validation.move#L330) does make a call to `mint_and_refund` in the `mint` branch. However, this is [disabled](https://github.com/movementlabsxyz/aptos-core/blob/aa45303216be96ea30d361ab7eb2e95fb08c2dcb/aptos-move/framework/aptos-framework/sources/transaction_validation.move#L330) when the `ggp` feature flag is set.
122122

0 commit comments

Comments
 (0)