|
1 | 1 | # 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. |
3 | 3 |
|
4 | 4 | We begin with a brief section on the [procedure and intended outcomes](#procedure-and-intended-outcomes) of destroying the Aptos Coin mint capability.
|
5 | 5 |
|
@@ -89,34 +89,34 @@ We identified the following methods, all of which are used faucet or test branch
|
89 | 89 |
|
90 | 90 | ## Usages and side effects
|
91 | 91 |
|
92 |
| -### Transaction `prologue` and `epilogue` |
| 92 | +### Prologue and epilogue |
93 | 93 |
|
94 |
| -### `prologue` |
| 94 | +#### Prologue |
95 | 95 | There are distinct prologues for executing blocks and transactions within blocks in the Aptos Framework.
|
96 | 96 |
|
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) |
98 | 98 |
|
99 | 99 | 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).
|
100 | 100 |
|
101 | 101 | We did not identify any usages of `.mint_cap` on any of the `block_prologue_common` branches.
|
102 | 102 |
|
103 |
| -#### Transaction [`prologue`] |
| 103 | +##### Transaction `prologue` |
104 | 104 | 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).
|
105 | 105 |
|
106 | 106 | We did not identify any usages of `.mint_cap` on any of the `prologue_common` branches.
|
107 | 107 |
|
108 |
| -### `epilogue` |
| 108 | +#### Epilogue |
109 | 109 | There are distinct epilogues for executing blocks and transactions within blocks in the Aptos Framework.
|
110 | 110 |
|
111 |
| -#### Block epilogue |
| 111 | +##### Block epilogue |
112 | 112 | 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:
|
113 | 113 |
|
114 | 114 | - `transaction_fee::process_collected_fees` which does not invoke any minting capabilities.
|
115 | 115 | - `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].
|
116 | 116 |
|
117 | 117 | 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.
|
118 | 118 |
|
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) |
120 | 120 |
|
121 | 121 | 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.
|
122 | 122 |
|
|
0 commit comments