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.
Summary
protocol-units
The Acceptor serves in terms. Provides functionality to pick an attester and make it dependent on L1Blocks.
There are no rewards at this point and a volunteer acceptor can postconfirm/rollover at any point. This should be fixed in a later iteration.
testStakeActivationAndPostconfirmation
tests a more complex scenario of rolling over and postconfirmation. This failed before making some modifications to the postconfirmation and staking code.setupGenesisWithThreeAttesters
Changelog
getAcceptorStartL1Block
getCurrentAcceptor
setupGenesisWithThreeAttesters
testStakeActivationAndPostconfirmation
testAcceptorRewards
(incomplete)testGetAcceptor
Testing
forge test
okOutstanding issues
Turns out it is expensive to find the closest block that has the closest time to a given timestamp. So we will have to transition to considering Acceptor per block height. Its not yet clear if this is problematic for the incentives of the acceptor that is active at the border of epochs.