Skip to content
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

Staking Router 1.5 #78

Draft
wants to merge 204 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
4831966
feat: multi-transaction third phase for Accounting oracle
mkurayan May 23, 2024
32cbe0e
feat: add addition tests for multi transactions
mkurayan May 24, 2024
1cee804
feat: remove redundant code
mkurayan May 24, 2024
a6d21e4
feat: fix sanity check
mkurayan May 28, 2024
0033f10
feat: add additional test
mkurayan May 28, 2024
0f89eb4
test: updates extra data state after previous day report
mkurayan May 28, 2024
344651d
feat: decouple reward distribution from the Accounting Oracle report
mkurayan May 29, 2024
c03af31
fix: data length check
krogla May 30, 2024
1319d97
fix: redundant vars
krogla May 30, 2024
4c308be
fix: check NO ids order in lastSortingKey
krogla May 30, 2024
ae2110f
fix: bitwise op refactor
krogla May 30, 2024
1345c44
Merge pull request #99 from lidofinance/feat/multi-transaction-oracle…
mkurayan May 31, 2024
55ba2b3
test: enforces extra data sorting order
mkurayan May 31, 2024
53ceb24
feat: change variable name
mkurayan May 31, 2024
a5b5571
feat: node operator registry contract initialisation
mkurayan Jun 3, 2024
0609069
feat: update deployment scripts for accounting sanity checker
mkurayan Jun 3, 2024
334ba92
Update contracts/0.8.9/oracle/AccountingOracle.sol
mkurayan Jun 3, 2024
093722d
feat: update contract and consensus version in accounting oracle
mkurayan Jun 3, 2024
21fb9be
test: submit extra data adjust node operators ids
mkurayan Jun 4, 2024
c8f9a52
feat: update the function description
mkurayan Jun 4, 2024
85a70fb
feat: accounting oracle contract improve formating
mkurayan Jun 4, 2024
ef9ddf5
feat: use unstructured storage pattern for reward distribution state
mkurayan Jun 4, 2024
0200458
feat: reshape limit list structure
mkurayan Jun 4, 2024
5f9c9c0
feat: update comment on get reward distribution state method in nor c…
mkurayan Jun 4, 2024
616e3ec
test: fix sanity checker tests
mkurayan Jun 4, 2024
7779be8
fix: make lib as external contract (reduce bytecode)
krogla Apr 8, 2024
9c5f9cf
fix: add priorityExitShareThreshold param
krogla Apr 8, 2024
6387680
test: fix lib deploy in SR test
krogla Apr 8, 2024
d090d4a
feat: targetLimitMode
krogla Apr 15, 2024
97b5cbe
fix: allocation strategy
krogla Apr 15, 2024
31ed3fd
test: fix contracts mocks
krogla Apr 15, 2024
e1b98a2
test: fix SR tests
krogla Apr 15, 2024
b8a35de
test: update SR version test
krogla Apr 15, 2024
3211f0d
test: nor target limit mode
krogla Apr 15, 2024
7045b11
fix: target limit update event
krogla Apr 15, 2024
047fe3a
test: partial NOR tests migrate from old repo
krogla Apr 15, 2024
27f1182
feat: dsm 1.5 initial commit
avsetsin Apr 16, 2024
58a967f
fix: add decreaseVettedSigningKeysCount to the staking module mock co…
avsetsin Apr 18, 2024
3761f33
docs: add natspec to dsm contract
avsetsin Apr 18, 2024
6d803c8
refactor: dsm test types
avsetsin Apr 18, 2024
1c3a091
test: dsm contract version
avsetsin Apr 18, 2024
6009f71
fix: move priorityExitShareThreshold to the end of struct for backwar…
avsetsin Apr 18, 2024
df47bd1
test: add module deposit params to staking router tests
avsetsin Apr 18, 2024
b5b0b40
refactor: format dsm contract
avsetsin Apr 18, 2024
8147c70
docs: add module deposit params note
avsetsin Apr 18, 2024
b56788f
feat: remove pause and resume methods for staking module from SR
avsetsin Apr 18, 2024
d22aac4
docs: fix lastDepositAt comment
avsetsin Apr 18, 2024
07e52b3
feat: support new addStakingModule interface in scratch deploy
avsetsin Apr 19, 2024
ed3ef93
fix: rename target limit to stake share limit in tests
avsetsin Apr 19, 2024
d820f9a
feat: finalizeUpgrade_v2 for staking router
avsetsin Apr 22, 2024
cebbb54
fix: forge-lib
krogla May 8, 2024
afff5e3
feat: optimize errors to reduce staking router bytecode size
avsetsin May 22, 2024
f3fff9b
fix: add missed module params to stakingRouter:finalizeUpgrade_v2
avsetsin May 22, 2024
ea1c2b0
docs: targetLimitMode description in IStakingModule
avsetsin May 22, 2024
2dd4c1d
docs: target limit mode description in NOR
avsetsin May 22, 2024
62dd758
fix: remove unvet intent period
avsetsin May 22, 2024
524a63d
fix: add deposit pause check
avsetsin May 22, 2024
28540da
docs: disable slither for encoding in unvetSigningKeys
avsetsin May 22, 2024
bc00b38
fix: merge conflicts
avsetsin May 22, 2024
a4a6921
chore: try to use latest foundry build
tamtamchik May 22, 2024
593740d
chore: add comments about unstable foundry nightly builds
tamtamchik May 22, 2024
20751a7
test: sr distance and max deposits
avsetsin May 30, 2024
1ab7272
feat: added events to the staking module
eddort Jun 4, 2024
de14988
test: fix nor test after contract version update
mkurayan Jun 4, 2024
4106101
test: nor finalizeUpgrade_v3
mkurayan Jun 6, 2024
77013cb
test: nor reward distribution status
mkurayan Jun 6, 2024
bd5b847
feat: update dsm contract scratch deploy
mkurayan Jun 12, 2024
9978dc6
feat: update stakingRouter and nor contract scratch deploy
mkurayan Jun 12, 2024
aa51127
feat: update scratch deploy for sanity checker
mkurayan Jun 13, 2024
2ef7140
feat: accounting oracle scratch deploy update consensus version
mkurayan Jun 13, 2024
69621e2
feat: update comment
mkurayan Jun 17, 2024
5b848ea
fix: script for deploy sr v2
Amuhar Jun 11, 2024
548cedc
fix: removed empty func
Amuhar Jun 19, 2024
79711fe
fix: deploy on holesky
Amuhar Jun 19, 2024
2538d79
fix: deploy NOR impl only once
Amuhar Jun 19, 2024
60f0372
fix: gas cost optim
krogla Jun 19, 2024
23e2c07
docs: add explainer for _isMinDepositDistancePassed
avsetsin Jun 19, 2024
3dabb5a
chore: unification of iterators in dsm
avsetsin Jun 19, 2024
806715b
fix: targetLimitMode type in comments
avsetsin Jun 20, 2024
ab0fff9
fix: reading contract addresses from json
Amuhar Jun 20, 2024
09fe5ae
fix: add guardians
Amuhar Jun 20, 2024
37fa449
fix: moved APPEARED_VALIDATORS_PER_DAY_LIMIT in env
Amuhar Jun 21, 2024
e312c0b
docs: fix depositBufferedEther natspec
avsetsin Jun 21, 2024
da25340
docs: staking router natspec fixes
avsetsin Jun 21, 2024
1a2326a
chore: sr iterators unification
avsetsin Jun 21, 2024
5b71ed3
docs: natspec harmonization for SR contract
avsetsin Jun 24, 2024
4565e72
fix: owner agent
Amuhar Jun 25, 2024
8fa0b58
fix: get rid of env for contracts parameters
Amuhar Jun 25, 2024
a368e1c
fix: deploy script for holesky with verification
Amuhar Jun 25, 2024
9009332
fix: lint
Amuhar Jun 26, 2024
a4d3330
fix: verification with concrete contracts impl
Amuhar Jun 26, 2024
4293a8e
feat: update staking limits
mkurayan Jun 27, 2024
df3c660
feat: update PAUSE_INTENT_VALIDITY_PERIOD_BLOCKS
mkurayan Jun 27, 2024
d1e7cd9
fix: deploy params
eddort Jun 27, 2024
9e78b26
Merge pull request #112 from lidofinance/feat/sr-1.5-deploy-scripts-d…
Amuhar Jun 28, 2024
30bd6ca
fix: refactoring
Amuhar Jun 30, 2024
0062457
fix: addresses
Amuhar Jun 30, 2024
d642257
fix: sdvt updtae in config
Amuhar Jul 1, 2024
b2e20fa
fix: typo
krogla Jul 1, 2024
3816e90
fix: typo
krogla Jul 1, 2024
5be9976
fix: env sample
Amuhar Jul 1, 2024
66dd925
feat: support old method to set soft limit
avsetsin Jul 1, 2024
ca60d6b
test: unset soft limit via deprecated updateTargetValidatorsLimits
avsetsin Jul 1, 2024
771bd9e
refactor: updateTargetValidatorsLimits notation
avsetsin Jul 1, 2024
20aad57
Merge pull request #113 from lidofinance/feat/sr-1.5-deprecated-targe…
avsetsin Jul 1, 2024
1f30fb6
fix: logs
Amuhar Jul 1, 2024
bf5158f
fix: script
Amuhar Jul 2, 2024
14aa14e
fix: reset mainnet config
Amuhar Jul 2, 2024
10a7540
Merge branch 'feat/sr-1.5' into feat/sr-1.5-deploy-scripts-1
mkurayan Jul 3, 2024
dca2f5f
fix: remove unused total keys count
krogla Jul 3, 2024
3930b81
refactor: simplify method descriptionj
mkurayan Jul 3, 2024
1fc28bb
test: refactor naming
krogla Jul 3, 2024
da28d37
refactor: sr codesize
krogla Jun 19, 2024
e6091ec
style: fixes
krogla Jul 3, 2024
4e86e99
test: sr coverage
krogla Jul 4, 2024
98b1fb9
Merge commit 'efeff81c18f85451ebf98e8fd8bb78b8eb0095f6' into feat/sr-1.5
mkurayan Jul 4, 2024
434d60b
feat: fix errors after negative rebase merge
mkurayan Jul 4, 2024
32749f2
Merge branch 'develop' of github.com:lidofinance/core into feat/sr-1.…
eddort Jul 5, 2024
8ec7dc9
fix: nor tests
eddort Jul 5, 2024
cdcb3d3
fix: remove reward distribution tests and handle NOR v3
eddort Jul 5, 2024
7ce2811
feat: reduce requestTimestampMargin size in order to fit all limits i…
mkurayan Jul 5, 2024
ea0d2e2
feat: fix scratch deploy
mkurayan Jul 5, 2024
068d823
fix: lint
Amuhar Jul 5, 2024
3c61076
fix: nor distributeReward test
eddort Jul 5, 2024
4f0be1a
fix: use updateTargetLimits and updateTargetLimitsDeprecated in aux t…
eddort Jul 5, 2024
cfa60ed
feat: refactor and decreaseVettedSigningKeysCount tests
eddort Jul 8, 2024
db572a3
refactor: move staking limit tests
eddort Jul 8, 2024
583da54
Update contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol
mkurayan Jul 9, 2024
55ed777
feat: remove unused SafeCastExt
mkurayan Jul 9, 2024
55b8099
Merge commit '8edf723223e97950c3a5657b7b2b34a9c9f27acd' into feat/sr-…
mkurayan Jul 9, 2024
3ede3de
test: fix requestTimestampMargin test
mkurayan Jul 9, 2024
5077858
test: fix post negative rebase merge errors
mkurayan Jul 9, 2024
29a94e0
feat: move appearedValidatorsPerDayLimit to deprecatedOneOffCLBalance…
mkurayan Jul 9, 2024
68536ae
Merge pull request #123 from lidofinance/feat/sr-1.5-plus-negative-re…
mkurayan Jul 10, 2024
ddfeed5
feat: rename limits
mkurayan Jul 10, 2024
d2f1c01
Merge branch 'feat/sr-1.5' into feat/sr-1.5-deploy-scripts
mkurayan Jul 10, 2024
5fdce69
feat: fix deploy script after merging negative rebase
mkurayan Jul 10, 2024
c258f4b
refactor: tests code review
eddort Jul 15, 2024
d386234
fix: code review nor aux
eddort Jul 16, 2024
878dcb7
fix: move getRewardsDistribution to penalties flow file
eddort Jul 16, 2024
5028f77
refactor: move the limit tests to a separate file
eddort Jul 16, 2024
9d04d5f
fix: check targetValidatorsCount in limits tests
eddort Jul 16, 2024
ee7d64b
refactor: added todos for test cases
eddort Jul 16, 2024
a33c0ca
Update test/0.4.24/nor/nor.management.flow.test.ts
eddort Jul 16, 2024
480d791
Merge commit '605c5e4df7b5bd745e27fd400452447be62878e1' into feat/sr-…
mkurayan Jul 17, 2024
afc1908
Merge pull request #129 from lidofinance/feat/sr-1.5-merge-negative-r…
mkurayan Jul 17, 2024
9753ca3
feat: rename setter for maxItemsPerExtraDataTransaction
mkurayan Jul 17, 2024
6bca576
feat: rename role for maxItemsPerExtraDataTransaction parameter
mkurayan Jul 17, 2024
b222cb8
feat: rename setter for maxNodeOperatorsPerExtraDataItem limit
mkurayan Jul 17, 2024
dfffad4
feat: rename role for maxNodeOperatorsPerExtraDataItem limit
mkurayan Jul 17, 2024
bb8cdf6
Merge pull request #125 from lidofinance/feat/sr-1.5-sanity-cheker-re…
mkurayan Jul 17, 2024
0e2c21e
refactor: nor tests code review
eddort Jul 17, 2024
aec7e66
Merge branch 'feat/sr-1.5-sync-develop' of github.com:lidofinance/cor…
eddort Jul 17, 2024
0761fee
feat: finalizeUpgrade_v3 test cases
eddort Jul 17, 2024
a87fbe1
feat: v2 to v3 upgrade test
eddort Jul 17, 2024
7802598
feat: updateTargetValidatorsLimits nonce and targetValidatorsCount ch…
eddort Jul 17, 2024
6a01c8e
refactor: move unsafeUpdateValidatorsCount to aux test
eddort Jul 17, 2024
9e30c4a
feat: use both abi versions in limit tests
eddort Jul 17, 2024
bcdf4c6
feat: nor limits no summary invariants
eddort Jul 17, 2024
5ec7172
Merge pull request #119 from lidofinance/feat/sr-1.5-fix-nor
avsetsin Jul 18, 2024
7578a9b
feat: distributeReward tests
eddort Jul 18, 2024
23a691f
Merge branch 'feat/sr-1.5' of github.com:lidofinance/core into feat/s…
eddort Jul 18, 2024
adab914
fix: remove unused test case
eddort Jul 18, 2024
6f05f34
Update test/0.4.24/nor/nor.initialize.upgrade.test.ts
eddort Jul 19, 2024
85665da
Update test/0.4.24/nor/nor.initialize.upgrade.test.ts
eddort Jul 19, 2024
4f07949
Update test/0.4.24/nor/nor.initialize.upgrade.test.ts
eddort Jul 19, 2024
02e29f4
Update test/0.4.24/nor/nor.initialize.upgrade.test.ts
eddort Jul 19, 2024
acd4b8a
Update test/0.4.24/nor/nor.limits.test.ts
eddort Jul 19, 2024
974001a
refactor: code review
eddort Jul 19, 2024
e8c1d32
refactor: code review
eddort Jul 19, 2024
6c6d5ae
Merge pull request #122 from lidofinance/feat/sr-1.5-sync-develop
eddort Jul 19, 2024
1d62958
Merge branch 'develop' of github.com:lidofinance/core into feat/sr-1.…
eddort Jul 19, 2024
fafa232
Merge pull request #134 from lidofinance/feat/sr-1.5-resolve-conflicts
eddort Jul 19, 2024
4856ea5
Merge branch 'feat/sr-1.5' into feat/sr-1.5-deploy-scripts
mkurayan Jul 22, 2024
17fb46e
Merge branch 'develop' of github.com:lidofinance/core into sr-1.5-sync
eddort Jul 30, 2024
b8d5e0e
fix: hash consensus version test
eddort Jul 30, 2024
4be7ff5
docs: fix description
krogla Aug 28, 2024
f535754
refactor: unify array length validation to reduce duplication and con…
mkurayan Aug 29, 2024
c5db72e
feat: update maxNodeOperatorsPerExtraDataItemCount
mkurayan Sep 5, 2024
2f0811c
feat: update sanity checker scratch deploy parameters
mkurayan Sep 5, 2024
da704b8
fix: prevent overflow in minDepositBlockDistance and maxDepositsPerBl…
mkurayan Aug 30, 2024
6002003
fix: prevent potential revert due to underflow
mkurayan Aug 30, 2024
cf7e9fa
fix: return the boolean value from clearNodeOperatorPenalty function
mkurayan Aug 30, 2024
f317759
fix: add event on clearNodeOperatorPenalty
mkurayan Aug 30, 2024
bf68809
fix: typo in nor function name
mkurayan Aug 30, 2024
c341371
fix: move limits values in constants
Amuhar Sep 24, 2024
beb6ceb
fix: remove redundant check
krogla Sep 24, 2024
d437268
Merge pull request #141 from lidofinance/sr-1.5-sync
avsetsin Sep 25, 2024
769bdfc
fix: add nonce update on refund count changes
krogla Sep 25, 2024
e21a591
test: nonce on refund count upd
krogla Sep 25, 2024
1ffbb7e
fix: clear the penalized state test
avsetsin Sep 25, 2024
aea6504
docs: description for sr deploy params
avsetsin Sep 26, 2024
514e6e7
fix: read contract addresses from locator
Amuhar Sep 26, 2024
06f2644
fix: loging
Amuhar Sep 26, 2024
f44c9fe
Merge pull request #221 from lidofinance/feat/sr-1.5-deploy-scripts-desc
Amuhar Sep 26, 2024
c53008c
Merge commit '1ffbb7e49e112fcac678f59bf63ba57a7e522874' into feat/sr-…
mkurayan Oct 2, 2024
e5733bd
feat: use steth on optimism locator impl in sr2 deploy script
avsetsin Oct 7, 2024
9bd43f6
Merge pull request #226 from lidofinance/feat/sr-1.5-deploy-scripts-l…
avsetsin Oct 7, 2024
57a5167
Merge pull request #110 from lidofinance/feat/sr-1.5-deploy-scripts
avsetsin Oct 7, 2024
9e64ca0
feat: update cl balances oracle error upper limit
avsetsin Oct 8, 2024
643d46d
docs: update forum post link to sr v2 upgrade announcement
avsetsin Oct 8, 2024
14904a6
Merge pull request #227 from lidofinance/feat/sr-1.5-sc-oracle-upper-…
avsetsin Oct 8, 2024
430e3db
New deploy params
hweawer Oct 8, 2024
737b675
Merge pull request #228 from lidofinance/deployed-mainnet-SR-1.5
avsetsin Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 146 additions & 23 deletions contracts/0.4.24/nos/NodeOperatorsRegistry.sol

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ contract MinFirstAllocationStrategyConsumerMockLegacyVersion {
uint256[] memory capacities,
uint256 maxAllocationSize
) public pure returns (uint256 allocated, uint256[] memory newAllocations) {
allocated = MinFirstAllocationStrategy.allocate(allocations, capacities, maxAllocationSize);
newAllocations = allocations;
(allocated, newAllocations) = MinFirstAllocationStrategy.allocate(allocations, capacities, maxAllocationSize);
}

function allocateToBestCandidate(
Expand Down
4 changes: 4 additions & 0 deletions contracts/0.4.24/test_helpers/NodeOperatorsRegistryMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ contract NodeOperatorsRegistryMock is NodeOperatorsRegistry {
_setContractVersion(_newBaseVersion);
}

function testing_setRewardDistributionStatus(RewardDistributionState _state) external {
krogla marked this conversation as resolved.
Show resolved Hide resolved
_updateRewardDistributionState(_state);
}

function testing_resetRegistry() external {
uint256 totalOperatorsCount = TOTAL_OPERATORS_COUNT_POSITION.getStorageUint256();
TOTAL_OPERATORS_COUNT_POSITION.setStorageUint256(0);
Expand Down
Loading
Loading