You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section outlines the review process, divided into several stages from development to deployment.
114
+
This section outlines the review process and provides concrete action items for both the crafter and reviewers of the spell. The document is divided into separate stages ("Development", "Deployment", "Handover"). Both reviewers must complete all checks in the relevant stage and publish them as the PR comment at the end of each stage.
115
115
116
116
### Development Stage
117
117
118
118
#### Preparation
119
-
-[ ] Check all commits made after the previous spell was merged to ensure no security-related changes are present.
119
+
- LIST every commit since the last externally reviewed spell:
120
+
-`COMMIT_TITLE`, URL_TO_THE_PR_OR_THE_COMMIT
121
+
-[ ] Content matches description: no unrelated changes.
122
+
-[ ] No security-related changes are present in this commit.
120
123
-[ ] Verify solc version matches the Star protocol standard based on prior Star contracts.
121
-
-[ ] Verify spell instructions match the executive document.
122
-
-[ ] Core Spell office hours is `true` IF the Star Spell introduces a major change that can affect external parties, OTHERWISE explicitly set to `false`.
123
124
124
125
#### Spell Description & Comments
125
-
-[ ] Spell has a clear description.
126
-
-[ ] All significant actions and parameter changes are clearly commented.
127
-
-[ ] Every _Instruction text_ from the executive document is copied to the spell code as a comment.
128
-
-[ ] IF an instruction cannot be taken, it should have an explanation under the instruction prefixed with `// Note:`.
129
-
-[ ] IF an action in the spell doesn't have a relevant instruction, its necessity is explained in a comment prefixed with `// Note:`.
130
-
-[ ] All parameter changes are clearly commented with before/after values.
126
+
-[ ] Spell PR has clear description.
127
+
-[ ] Spell contract has a clear description.
128
+
-[ ] Every significant action and parameter change are clearly commented in the code.
129
+
-[ ] Every significant action has valid source url (forum post, poll, atlas).
130
+
-[ ] Every parameter change is clearly commented with before/after values.
131
+
132
+
#### Proposed changes
133
+
- LIST every forum post proposing changes for this particular Star, particular target date:
134
+
- FORUM_POST_TITLE, FORUM_POST_URL
135
+
-[ ] Forum post follows the [known template](https://docs.google.com/document/d/1vLqeP-zXmxKo2OpoxnL2z0ZczPe4nWN49-3URx-iKVA/edit?tab=t.nkz4n7by2dnh).
136
+
-[ ] Verify spell content matches the combined scope of the forum posts listed above.
137
+
-[ ] Verify forum posts contain all new addresses directly or indirectly used in the spell, their constructor arguments and rate limits.
138
+
-[ ] IF the Star Spell introduces a major change that can affect external parties, suggest Governance Facilitators to set Core Spell office hours to `true`.
131
139
132
140
#### Contract Structure & Code Quality
133
141
-[ ] The only external non-view function in the spell contract is `execute()`.
134
142
-[ ] There are no methods that can modify contract state after deployment.
135
143
-[ ] No unused imports, interfaces, methods, or variables.
136
144
-[ ] All function visibility modifiers are explicitly declared.
137
145
-[ ] No redundant code or commented-out functionality.
138
-
-[ ] Addresses must be fetched from the relevant protocol's address registry (e.g., `spark-address-registry`, `bloom-address-registry`) IF they are present, OTHERWISE defined as `constant` when sourced from a trusted source (i.e., new contracts onboarding).
139
-
146
+
-[ ] Addresses must be fetched from the relevant protocol's address registry (e.g., `spark-address-registry`, `bloom-address-registry`) IF they are present there, OTHERWISE defined as `constant` and have trusted source (e.g., when onboarding new contracts).
147
+
- LIST every address used in the spell (defined as `constant` or fetched from the registry repo):
148
+
-[CHAIN_NAME]`0xADDRESS`, EXTERNAL_SOURCE_URL
149
+
-[ ] Matches valid external source (previously approved forum post, external docs, etc).
-[ ] IF source code is not audited, there is a clear explanation that was agreed upon by governance beforehand (i.e.: reusing unaudited contracts with lots of Lindy effect).
157
+
-[ ] Compilation optimizations match deployment settings defined in the source code repo.
158
+
-[ ] Consistent license.
159
+
- LIST every constructor argument:
160
+
-`CONSTRUCTOR_ARGUMENT_NAME` being `CONSTRUCTOR_ARGUMENT_VALUE` from EXTERNAL_SOURCE_URL
161
+
-[ ] The value has valid external source.
162
+
-[ ] IF the contract have a concept of access control or `wards`:
163
+
-[ ] Expected admin address for this chain has full access (`SubProxy` on mainnet, `Executor` on other chains).
164
+
-[ ] Contract deployer address has no access (e.g. `wards(deployer)` is `0`).
165
+
-[ ] No other addresses has access to this contract.
166
+
167
+
#### Dependency checks
168
+
- LIST every submodule or any other imported code used in this spell:
169
+
-`DEPENDENCY_NAME` imported at commit `COMMIT_HASH` COMMIT_URL
170
+
-[ ] The dependency commit matches audited commit.
171
+
-[ ] The dependency commit matches the version of the deployed contracts. (if ALM contracts are updated, then dependency also needs to be updated and vice-versa: dependency shouldn't be updated unless the ALM contracts are updated).
-[ ] IF source code is not audited, there is a clear explanation that was agreed upon by governance beforehand (i.e.: reusing unaudited contracts with lots of Lindy effect.)
146
-
-[ ] Consistent compilation optimizations match deployment settings defined in the source code repo
147
-
-[ ] Consistent license
148
-
-[ ] Every constructor argument is validated
149
-
- FOREACH new contract that have the concept of `wards` or access control:
150
-
-[ ] Ensure the Star `SubProxy` address was `relied` (`wards(STAR_PROXY)` is `1`)
151
-
-[ ] Ensure that contract deployer address was `denied` (`wards(deployer)` is `0`)
152
-
-[ ] Ensure that there are no other `Rely` events except for `STAR_PROXY` (using a block explorer like [etherscan](https://etherscan.io))
153
-
154
173
#### Interfaces
155
174
-[ ] No unused static interfaces.
156
175
-[ ] Declared static interface is not present in standard libraries, OTHERWISE should be imported from there.
157
176
-[ ] Interface matches the deployed contract.
158
177
-[ ] Each static interface declares only functions actually used in the spell code.
159
178
160
179
#### Variable Declarations
161
-
-[ ] All state variables are either `constant` or `immutable`.
162
-
-[ ] Precision units (`WAD`, `RAY`, `RAD`) match their standard defined values.
163
-
-[ ] Rates are calculated correctly and match their source (e.g., governance poll).
180
+
-[ ] Every contract variable is declared as either `constant` or `immutable`.
181
+
-[ ] Every precision variable (`WAD`, `RAY`, `RAD`, etc) match their expected value.
182
+
- LIST every variable using precision (`e18`, `e6`, `e...`, `WAD`, `RAY`, `RAD`, etc):
183
+
-`VARIABLE_NAME` with precision `VALUE_WITH_PRECISION`, PREVIOUS_OCCASION_OR_PRECISION_SOURCE_URL
184
+
-[ ] The precision matches provided source url.
185
+
-[ ] Rates are expressed correctly (e.g. per `/ 1 days`).
186
+
-[ ] Rates match their source (e.g., governance poll).
164
187
-[ ] Timestamps are commented with the full UTC date and convert correctly.
188
+
-[ ] Timestamps match their source (e.g., governance poll).
165
189
166
190
#### Deployment & Execution Security
167
-
-[ ] Spell is deployed using standard `CREATE` (not `CREATE2`).
168
191
-[ ] No `selfdestruct()` operations in the spell.
169
192
-[ ] No `delegatecall()` to untrusted contracts.
170
193
-[ ] No use of `tx.origin` for authorization.
@@ -177,42 +200,72 @@ This section outlines the review process, divided into several stages from devel
177
200
#### Access Control
178
201
-[ ] Spell execution cannot be front-run by malicious actors.
179
202
-[ ] No privileged functions accessible by unauthorized users.
180
-
-[ ] For new contracts with access control (`wards`), ensure `PAUSE_PROXY` is `relied` and the deployer is `denied`.
181
203
182
204
#### Parameter Changes & Protocol Integration
183
205
-[ ] Star Protocol invariants are maintained after spell execution.
184
206
-[ ] All parameter changes use the appropriate helper functions IF available.
185
-
-[ ] Parameter changes match the executive document exactly.
207
+
-[ ] Parameter changes match the Executive Sheet exactly.
186
208
-[ ] Spell interacts correctly with existing protocol components.
187
209
-[ ] Proper error handling for all external interactions.
188
210
189
211
#### Testing
212
+
- LIST each spell action (each line of code which changes a storage):
213
+
- INTENDED_SPELL_ACTION tested via TEST_NAME_1, TEST_NAME_2
214
+
-[ ] The unit test ensures the new value was changed in the spell.
215
+
-[ ] The end-to-end test is sufficient to ensure correctness the high-level goal behind this spell action.
190
216
-[ ] All actions are covered by tests.
191
217
-[ ] Integration tests verify the end-to-end execution flow.
192
218
-[ ] Gas tests ensure execution is possible within the existing block gas limit.
193
-
-[ ] Fork tests are used to simulate execution on a mainnet state.
194
-
-[ ] All tests are passing in CI.
195
-
-[ ] All tests are passing locally.
196
-
197
-
### Pre-Deployment Stage
198
-
-[ ] Final review of the executive document to ensure it matches the spell code.
199
-
-[ ] All actions present in the spell code are present in the final executive document.
200
-
-[ ] All actions in the final executive document are present in the spell code.
201
-
-[ ] If new commits were added after the initial review, the relevant checklist items have been re-verified.
202
-
-[ ] An explicit "Good to deploy" comment has been added to the PR by the required reviewers.
203
-
204
-
### Deployed Stage
205
-
-[ ] Deployed spell is verified on Etherscan.
206
-
-[ ] Deployed spell code matches the source on GitHub.
207
-
-[ ] Etherscan settings (optimizer, EVM version, license) are correct.
208
-
-[ ] A Tenderly simulation has been run and reviewed.
209
-
-[ ] The simulation shows all actions are executed successfully.
210
-
-[ ] The simulation shows no reverts or out-of-gas errors.
211
-
212
-
### Handover and Merge Stage
213
-
-[ ] All review comments have been addressed.
214
-
*[ ] Check that the spell address posted by the crafter in the appropriate channel is correct
215
-
*[ ] Confirm the address (via a separate "reply to" message, restating the address to avoid edits)
216
-
*[ ] Wait until responsible governance facilitator confirms handover in `new-spells`
217
-
*[ ] Ensure that no changes were made to the code since the spell was deployed and archived
218
-
*[ ] Approve spell PR for merge via 'Approve' review option
219
+
-[ ] All tests are passing in CI at COMMIT_HASH.
220
+
-[ ] All tests listed above are not `skipped`.
221
+
-[ ] All tests are passing locally at COMMIT_HASH:
222
+
223
+
```
224
+
EXECUTED_TESTS_LOGS
225
+
```
226
+
227
+
#### Pre-Deployment checks
228
+
-[ ] Actions listed in the [Executive Sheet](https://docs.google.com/spreadsheets/d/1w_z5WpqxzwreCcaveB2Ye1PP5B8QAHDglzyxKHG3CHw/edit) for this Star match the spell scope.
229
+
-[ ] Every _Instruction text_ from the Executive Sheet is copied to the spell code as a comment.
230
+
-[ ] IF an instruction cannot be taken, it should have an explanation under the instruction prefixed with `// Note:`.
231
+
-[ ] IF an action in the spell doesn't have a relevant instruction, its necessity is explained in a comment prefixed with `// Note:`.
232
+
-[ ] All actions present in the spell code are present in the final Executive Sheet.
233
+
-[ ] All actions in the final Executive Sheet are present in the spell code.
234
+
-[ ] IF new commits were added after the initial review, the relevant checklist items have been re-verified.
235
+
-[ ] IF no blockers were found, post the completed "Development Stage" checklist stage with the explicit "Good to deploy" note on top.
236
+
237
+
238
+
### Deployment Stage
239
+
240
+
#### Deployed Contract
241
+
-[ ] Both reviewers gave explicit "Good to deploy".
242
+
-[ ] A new comment in the PR contains link to the deployed spell(s) and Tenderly vnet(s).
243
+
-[ ] Every spell is verified on Etherscan or other primary block explorer for this chain.
244
+
-[ ] Every spell code matches local source code at the "good to deploy" commit.
245
+
-[ ] Etherscan settings (optimizer, EVM version, license) match local ones.
246
+
-[ ] Every spell is deployed using standard `CREATE` (not `CREATE2`).
247
+
-[ ] Tests are updated to execute against the deployed spell(s).
248
+
-[ ] All tests are passing in CI at COMMIT_HASH.
249
+
-[ ] All tests listed above are not `skipped`.
250
+
-[ ] All tests are passing locally at COMMIT_HASH:
251
+
252
+
```
253
+
EXECUTED_TESTS_LOGS
254
+
```
255
+
256
+
#### Simulation Checks
257
+
-[ ] The Tenderly simulation shows all actions are executed successfully.
258
+
-[ ] The Tenderly simulation shows no extra actions not present in the spell are executed.
259
+
-[ ] The Tenderly simulation shows no reverts or out-of-gas errors.
260
+
-[ ] IF no blockers were found, post the completed "Deployment Stage" checklist stage with the explicit "Good to handover" note on top.
261
+
262
+
### Handover Stage
263
+
264
+
#### Confirmed Handover
265
+
-[ ] Both reviewers gave explicit "Good to handover".
266
+
-[ ] All review comments have been addressed or resolved.
267
+
-[ ] The spell address posted by the crafter in the `#govops` thread matches the spell evaluated above.
268
+
-[ ] Confirm the address (via a separate "reply to" message, restating the address to avoid edits).
269
+
-[ ] Ensure that no changes were made to the code since the spell was deployed and archived.
270
+
-[ ] Approve spell PR for merge via 'Approve' review option.
271
+
-[ ] IF no blockers were found, post the completed "Handover Stage" checklist stage with the explicit pull request approval.
0 commit comments