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

eip6110: Queue deposit requests and apply them during epoch processing #3818

Merged
merged 72 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
fd75470
Add pending_deposits queue and queue deposit requests
mkalinin Jun 20, 2024
2a202c8
Refactor pending deposit processing
mkalinin Jun 20, 2024
0b7fef3
Limit number of pending deposits to be processed per epoch
mkalinin Jun 20, 2024
5c3a51a
Process deposit requests after Eth1 bridge deposits are applied
mkalinin Jun 25, 2024
179ee8e
Finalize deposit requests before processing
mkalinin Jun 25, 2024
43e7344
Refactor process_pending_deposits
mkalinin Jun 26, 2024
8f6b1e0
Merge remote-tracking branch 'origin/dev' into deposit-queue
mkalinin Jun 28, 2024
e1a4d8b
added some simple tests
james-prysm Jul 1, 2024
5c0a8d3
Fix off-by-one found by @james-prysm
mkalinin Jul 2, 2024
2af84d8
Update tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_…
james-prysm Jul 2, 2024
8099f39
merging upstream
james-prysm Jul 2, 2024
750f7a1
adding new test
james-prysm Jul 2, 2024
077edf8
Merge branch 'deposit-queue' of github.com:james-prysm/eth2.0-specs-m…
james-prysm Jul 2, 2024
b31fa63
apply pending deposit tests
james-prysm Jul 2, 2024
b2cd3ce
fixing comment
james-prysm Jul 2, 2024
03071df
preston's feedback
james-prysm Jul 3, 2024
5a2f887
Merge remote-tracking branch 'origin/dev' into deposit-queue
mkalinin Jul 3, 2024
ee4da7b
Refactor postponed deposit processing
mkalinin Jul 5, 2024
6ed15b2
Fix electra fork tests
mkalinin Jul 5, 2024
093590e
Merge remote-tracking branch 'upstream/deposit-queue' into deposit-queue
james-prysm Jul 8, 2024
1a19d82
updating tests based on mikhail changes
james-prysm Jul 9, 2024
85b752b
Fix by @pawanjay176
mkalinin Jul 9, 2024
1e9337e
Update tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_…
james-prysm Jul 10, 2024
577b028
Update tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_…
james-prysm Jul 10, 2024
8b191e6
fixing linting
james-prysm Jul 10, 2024
2c8dd39
updating tests
james-prysm Jul 11, 2024
320a692
adding test for chrun
james-prysm Jul 12, 2024
48b9928
adding out of validator range test
james-prysm Jul 12, 2024
bf03d78
fixing linting
james-prysm Jul 12, 2024
ea33eac
Update tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_…
james-prysm Jul 26, 2024
1feb1fb
Update tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_…
james-prysm Jul 26, 2024
d62559f
Update tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_…
james-prysm Jul 26, 2024
6903bab
Update tests/core/pyspec/eth2spec/test/electra/epoch_processing/test_…
james-prysm Jul 26, 2024
4a4cdfc
revert beacon-chain.md changes
james-prysm Jul 26, 2024
077fd44
Merge branch 'deposit-queue' of github.com:james-prysm/eth2.0-specs-m…
james-prysm Jul 26, 2024
e80c39b
mikhail's feedback
james-prysm Jul 29, 2024
6a7bfe9
removed wrong balance
james-prysm Jul 29, 2024
824e374
applying feedback fir add validator test
james-prysm Jul 30, 2024
0a51fe0
updating tests
james-prysm Aug 2, 2024
1afa514
adding test_process_pending_deposits_limit_is_reached
james-prysm Aug 2, 2024
336c6f1
adding some more tests based on test plan
james-prysm Aug 5, 2024
3593a0c
adding 3 more tests
james-prysm Aug 5, 2024
2cf7de9
updating bridge tests
james-prysm Aug 6, 2024
337726c
adding no compounding test
james-prysm Aug 6, 2024
56fe310
adding run_process_pending_deposits to deposit request tests to prope…
james-prysm Aug 6, 2024
c5db6df
adding fork version tests
james-prysm Aug 6, 2024
698367e
Merge pull request #18 from james-prysm/deposit-queue
mkalinin Aug 7, 2024
ada5524
Use the right MaxEB to create validator from deposit
mkalinin Aug 23, 2024
a6864d4
Merge branch 'dev' into deposit-queue
mkalinin Aug 23, 2024
97e6166
Move switch to compounding to process_deposit_request
mkalinin Aug 26, 2024
990de16
Add more deposit tests
mkalinin Aug 26, 2024
c183be4
Update consolidation tests with pending deposit
mkalinin Aug 26, 2024
7afe8e0
Update eip7732 with pending_deposits
mkalinin Aug 26, 2024
ad8f54f
Update pending deposits tests
mkalinin Aug 27, 2024
22bb1de
Fix code spell
mkalinin Aug 27, 2024
0526592
Do state.pending_deposits update in a single line
mkalinin Aug 27, 2024
3ebddad
Merge branch 'dev' into deposit-queue
mkalinin Sep 4, 2024
8c726ff
Fix get_max_effective_balance call
mkalinin Sep 4, 2024
67cc3a5
Rename MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING to MAX_PENDING_DEPOS…
mkalinin Sep 5, 2024
1513492
Merge branch 'dev' into deposit-queue
mkalinin Sep 18, 2024
083402f
Remove switch_to_compounding from deposit flow
mkalinin Sep 18, 2024
5913960
Add notes on add_validator_to_registry, process_deposit modifications
mkalinin Sep 25, 2024
3330265
Apply suggestions from @jtraglia
mkalinin Sep 27, 2024
4ee4105
Merge branch 'dev' into deposit-queue
mkalinin Oct 2, 2024
a04e4c3
Fix fork logic
mkalinin Oct 2, 2024
beb2718
Apply suggestions by @ppopth
mkalinin Oct 3, 2024
358378d
Merge branch 'dev' into deposit-queue
jtraglia Oct 3, 2024
82d2bc0
Fix two tests by replacing old PendingBalanceDeposit
jtraglia Oct 3, 2024
7705984
Fix consolidation test
mkalinin Oct 4, 2024
77d2865
Rename test_apply_pending_deposit to test_process_pending_deposit
jtraglia Oct 4, 2024
3befc42
Rename test_apply_pending_deposit* to test_process_pending_deposit*
jtraglia Oct 4, 2024
ad42273
Use pending_deposits format for both test files
jtraglia Oct 4, 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
Prev Previous commit
Next Next commit
adding test_process_pending_deposits_limit_is_reached
  • Loading branch information
james-prysm committed Aug 2, 2024
commit 1afa51420edcbb6698ab59b12a208bb988f9a228
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,27 @@ def test_pending_deposit_not_finalized(spec, state):
assert len(state.pending_deposits) == 1


@with_electra_and_later
@spec_state_test
def test_process_pending_deposits_limit_is_reached(spec, state):
amount = 5000
cumulative_amount = 0
# set pending deposits to the maximum
for i in range(spec.MAX_PENDING_DEPOSITS_PER_EPOCH_PROCESSING+1):
wc = state.validators[i].withdrawal_credentials
pd = build_pending_deposit(spec, i,
amount=amount,
withdrawal_credentials=wc,
signed=True)
state.pending_deposits.append(pd)
cumulative_amount += amount
# churn limit was not reached
assert cumulative_amount < spec.get_activation_exit_churn_limit(state)
yield from run_process_pending_deposits(spec, state)
# no deposits above limit were processed
assert len(state.pending_deposits) == 1


@with_electra_and_later
@spec_state_test
def test_pending_deposit_validator_withdrawn(spec, state):
Expand Down