Feat/registry integration - #33
Open
funkyenough wants to merge 25 commits into
Open
Conversation
* Add `validatorTotalWeight` and test * Add and rename test
* Add validator registration and mock registry * Add `setRegistry` * Add `IConsensusRegistry.sol` * Run Scopelint fmt * Add event and registry mock * Remove `era-contracts` for now * Add events, make adding to registry a public fn, and tests * Reduce optimizer runs and add test assumes * Install era-contracts and extend interface * Revert if mismatched keys used to add validator on registry, remove unused file, and add natspec to interface * Fix nits and organizations of tests * Test revert if either empty public or pop key * Rename and remove convenience function * Fix nits * Fix nits
* Add `_updateValidatorWeightOnRegistry` and tests * Add tests * Reduce optimizer runs * Remove unused event and rename fn * Move test * Fix nits and test validator does not get added to registry when below threshold * Add back `_isValidatorRegistered` fn
* Add validator registration and mock registry Add `setRegistry` Add `IConsensusRegistry.sol` Run Scopelint fmt Add event and registry mock Remove `era-contracts` for now Add events, make adding to registry a public fn, and tests Reduce optimizer runs and add test assumes Install era-contracts and extend interface Revert if mismatched keys used to add validator on registry, remove unused file, and add natspec to interface Fix nits and organizations of tests Test revert if either empty public or pop key Rename and remove convenience function Fix nits Fix nits Add `_updateValidatorWeightOnRegistry` and tests Add tests Reduce optimizer runs Remove unused event and rename fn Move test Fix nits and test validator does not get added to registry when below threshold Add back `_isValidatorRegistered` fn * Add `validatorTotalWeight` and test * Move test * Add withdraw fn and test * Add `ValidatorTotalWeightUpdated` event and tests * Add deposit validator check before deducting from stake weight * Assume validator is not address(0) when testing withdrawals * Fix nit * Remove duplicates * Uncomment and reduce max bound
* Remove duplicates * Uncomment and reduce max bound * Add atomic earning power calculation * Add `MockFullEarningPowerCalculatorExtended.sol` * empty commit test --------- Co-authored-by: wildmolasses <changes@gmail.com>
* Add `validatorTotalWeight` and test Add validator registration and mock registry Add `setRegistry` Add `IConsensusRegistry.sol` Run Scopelint fmt Add event and registry mock Remove `era-contracts` for now Add events, make adding to registry a public fn, and tests Reduce optimizer runs and add test assumes Install era-contracts and extend interface Revert if mismatched keys used to add validator on registry, remove unused file, and add natspec to interface Fix nits and organizations of tests Test revert if either empty public or pop key Rename and remove convenience function Add `_updateValidatorWeightOnRegistry` and tests Add tests Reduce optimizer runs Remove unused event and rename fn Move test Add withdraw fn and test Add `ValidatorTotalWeightUpdated` event and tests Add deposit validator check before deducting from stake weight Assume validator is not address(0) when testing withdrawals Add atomic earning power calculation Add `MockFullEarningPowerCalculatorExtended.sol` * Add passthrough methods and tests * Reduce optimizer runs * Add additional test * Fix mismatching test
Co-authored-by: Ed Mazurek <wildmolasses@users.noreply.github.com>
Add `setRegistry` Add `IConsensusRegistry.sol` Run Scopelint fmt Add event and registry mock Remove `era-contracts` for now Add events, make adding to registry a public fn, and tests Reduce optimizer runs and add test assumes Install era-contracts and extend interface Revert if mismatched keys used to add validator on registry, remove unused file, and add natspec to interface Fix nits and organizations of tests Test revert if either empty public or pop key Rename and remove convenience function Fix nits Fix nits Add `_updateValidatorWeightOnRegistry` and tests Add tests Reduce optimizer runs Remove unused event and rename fn Move test Fix nits and test validator does not get added to registry when below threshold Add back `_isValidatorRegistered` fn Add `validatorTotalWeight` and test Move test Add withdraw fn and test Add `ValidatorTotalWeightUpdated` event and tests Add deposit validator check before deducting from stake weight Assume validator is not address(0) when testing withdrawals Fix nit Remove duplicates Uncomment and reduce max bound Add atomic earning power calculation Add `MockFullEarningPowerCalculatorExtended.sol` Add `validatorTotalWeight` and test Add validator registration and mock registry Add `setRegistry` Add `IConsensusRegistry.sol` Run Scopelint fmt Add event and registry mock Remove `era-contracts` for now Add events, make adding to registry a public fn, and tests Reduce optimizer runs and add test assumes Install era-contracts and extend interface Revert if mismatched keys used to add validator on registry, remove unused file, and add natspec to interface Fix nits and organizations of tests Test revert if either empty public or pop key Rename and remove convenience function Add `_updateValidatorWeightOnRegistry` and tests Add tests Reduce optimizer runs Remove unused event and rename fn Move test Add withdraw fn and test Add `ValidatorTotalWeightUpdated` event and tests Add deposit validator check before deducting from stake weight Assume validator is not address(0) when testing withdrawals Add atomic earning power calculation Add `MockFullEarningPowerCalculatorExtended.sol` Add passthrough methods and tests Reduce optimizer runs Add additional test Fix mismatching test Add `validatorTotalWeight` and test Add validator registration and mock registry Add `setRegistry` Add `IConsensusRegistry.sol` Run Scopelint fmt Add event and registry mock Remove `era-contracts` for now Add events, make adding to registry a public fn, and tests Reduce optimizer runs and add test assumes Install era-contracts and extend interface Revert if mismatched keys used to add validator on registry, remove unused file, and add natspec to interface Fix nits and organizations of tests Test revert if either empty public or pop key Rename and remove convenience function Add `_updateValidatorWeightOnRegistry` and tests Add tests Reduce optimizer runs Remove unused event and rename fn Move test Add withdraw fn and test Add `ValidatorTotalWeightUpdated` event and tests Add deposit validator check before deducting from stake weight Assume validator is not address(0) when testing withdrawals Add atomic earning power calculation Add `MockFullEarningPowerCalculatorExtended.sol` Add passthrough methods and tests Reduce optimizer runs
Co-authored-by: Ed Mazurek <wildmolasses@users.noreply.github.com>
funkyenough
commented
Aug 1, 2025
| uint256 newBalance = IERC20(address(zkStaker.REWARD_TOKEN())).balanceOf(_depositor); | ||
| // TODO: this will revert with ZeroValidatorWeight. Given our current design, a depositor cannot | ||
| // alter validator if the validator have no bonus weight or other depositors. | ||
| function testFuzz_ChangesValidatorWeightOnRegistryWhenValidatorIsAlreadyRegistered( |
Author
There was a problem hiding this comment.
As explained in the comment, there is some issue with the alterValidator function under certain conditions
funkyenough
commented
Aug 1, 2025
|
|
||
| // TODO: This test is being skipped right now | ||
| function testForkFuzz_CorrectlyUnstakeAndClaimRewardsAfterDuration( | ||
| // TODO: Likewise, there may be cases where a single depositor is the sole contributor to a |
wildmolasses
force-pushed
the
feat/registry-integration
branch
from
August 3, 2025 18:44
3f90de9 to
d2f6abe
Compare
Co-authored-by: Ed Mazurek <wildmolasses@users.noreply.github.com>
Co-authored-by: Ed Mazurek <wildmolasses@users.noreply.github.com>
….t.sol, add dependencies, and update test suites
wildmolasses
force-pushed
the
feat/registry-integration
branch
from
August 3, 2025 18:48
d2f6abe to
4012ca2
Compare
wildmolasses
force-pushed
the
feat/registry-integration
branch
from
August 4, 2025 20:05
8ac3a76 to
a7dfc8c
Compare
funkyenough
force-pushed
the
feat/registry-integration
branch
from
August 5, 2025 09:10
93fc194 to
c65d0c1
Compare
…37) * feat: add sepolia deployment script for ZkStaker and ConsensusRegistry * test deploy --------- Co-authored-by: wildmolasses <changes@gmail.com>
|
Coverage after merging feat/registry-integration into feat/on-behalf-fns will be
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #30