Commit 99e70e6
authored
chore!: depositAmount and minimumStake naming (#16148)
Addressing feedback from @benesjan. Also using his prompt idea to see
how well it works.
---
## Summary
This PR refactors validator staking terminology throughout the Aztec
codebase to improve clarity and better reflect the purpose of key
staking parameters. The main changes involve renaming `depositAmount` to
`activationThreshold` and `minimumStake` to `ejectionThreshold`, along
with related library and method renames.
## Key Changes
### Parameter Renames
- **`depositAmount` → `activationThreshold`**: The amount of tokens
required to activate a validator and join the validator set
- **`minimumStake` → `ejectionThreshold`**: The minimum token balance
below which a validator is ejected from the active set
### Contract & Library Updates
- **Solidity Contracts**: Updated all references in `Rollup.sol`,
`IStaking.sol`, `GSE.sol`, and related contracts
- **Libraries**:
- `UserLib` → `CheckpointedUintLib` (more descriptive name for
checkpoint management)
- `DelegationLib` → `StakeDelegationLib` (clearer purpose indication)
- **Methods**: `finaliseHelper()` → `finaliseWithdraw()` in GSE contract
for better clarity
### Configuration & Environment Variables
- Updated environment variables:
- `AZTEC_DEPOSIT_AMOUNT` → `AZTEC_ACTIVATION_THRESHOLD`
- `AZTEC_MINIMUM_STAKE` → `AZTEC_EJECTION_THRESHOLD`
- Updated all configuration files, test constants, and deployment
scripts
### Documentation
- Updated CLI reference documentation to reflect new parameter names
- Updated all code comments to use the new terminology
## Benefits
1. **Improved Clarity**: The new names clearly indicate the purpose of
each parameter - one for entering the validator set, one for being
removed from it
2. **Better Developer Experience**: Developers can immediately
understand what these thresholds represent without needing additional
context
3. **Consistency**: Uniform terminology across the entire codebase
reduces confusion
4. **Future-Proof**: The new names are more generic and adaptable to
potential future staking mechanism changes
## Breaking Changes
1 parent 5d75421 commit 99e70e6
78 files changed
Lines changed: 862 additions & 735 deletions
File tree
- docs/docs/the_aztec_network/guides/run_nodes
- l1-contracts
- script
- src
- core
- interfaces
- libraries/rollup
- governance
- libraries
- mock
- test
- builder
- delegation
- governance
- governance
- checkpointedUintLib
- gse
- gse
- stakedelegationlib
- scenario
- harnesses
- staking_asset_handler
- staking
- validator-selection
- yarn-project
- aztec/src/cli
- cli/src/cmds/infrastructure
- end-to-end/src
- e2e_p2p
- ethereum/src
- contracts
- foundation/src/config
- slasher/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
| 387 | + | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
228 | | - | |
| 227 | + | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
| 231 | + | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
0 commit comments