-
Notifications
You must be signed in to change notification settings - Fork 1k
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
EIP-6110: Supply validator deposits on chain #13944
Merged
Merged
Changes from 88 commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
5ad0a86
wip changes
james-prysm 3572a53
wip changes refactoring deposit functions
james-prysm be6e19c
Merge branch 'develop' into eip6110
james-prysm bd3a92e
wip on deposit functions
james-prysm 7666f65
wip changes to fix deposit processing
james-prysm 51a2282
more wip function logic
james-prysm db031bd
gaz
james-prysm 393e1a8
Merge branch 'develop' into eip6110
james-prysm 9ccbaca
Merge branch 'develop' into eip6110
james-prysm ee0ad99
Merge branch 'develop' into eip6110
james-prysm 550d366
Merge branch 'develop' into eip6110
james-prysm 7f2bdf5
Merge branch 'develop' into eip6110
james-prysm c24e80c
wip refactoring deposit changes
james-prysm 6287e3c
Merge branch 'develop' into eip6110
james-prysm be66a2d
Merge branch 'develop' into eip6110
james-prysm e3f50e9
removing circlular dependency and other small fix
james-prysm 560ef11
Merge branch 'develop' into eip6110
james-prysm 822cf02
fixing circular dependencies
james-prysm 91eadef
fixing validators file
james-prysm 8ffcb16
fixing more tests
james-prysm e4efcab
fixing unit tests
james-prysm babebea
Merge branch 'develop' into eip6110
james-prysm 3469f6b
wip deposit packing
james-prysm d000211
refactoring packing
james-prysm 4ba45f0
changing packing code some more
james-prysm c5189a7
fixing packing change
james-prysm 935baca
updating more tests
james-prysm 210a129
Merge branch 'develop' into eip6110
james-prysm d884737
removing comment
james-prysm b659925
fixing transition code for eip6110
james-prysm db5743f
Merge branch 'develop' into eip6110
james-prysm 358ae04
including inserts for validator index cache
james-prysm 1843ee5
Merge branch 'develop' into eip6110
james-prysm ade6c30
Merge branch 'develop' into eip6110
james-prysm 32bc6b4
adding tests and placeholder test
james-prysm dd24d42
Merge branch 'develop' into eip6110
james-prysm ee52e22
moving deposit related unit tests over
james-prysm d8608d1
adding in test for electra proposer packing
james-prysm ef10964
Merge branch 'develop' into eip6110
james-prysm 918ca0e
spec test wip
james-prysm e2af855
moving cache saving to the correct spot
james-prysm b6c1c37
eip-6110: deposit spectests
prestonvanloon 8f554db
adding deposit receipt spec tests
james-prysm d08900f
Merge branch 'develop' into eip6110
james-prysm 2c02712
reverting altair operations in this pr and will be handled separately
james-prysm ae4d911
Merge branch 'develop' into eip6110
james-prysm edc7198
Merge branch 'develop' into eip6110
james-prysm 99a0aff
Merge branch 'develop' into eip6110
james-prysm f9b56d1
Merge branch 'develop' into eip6110
james-prysm 261809b
Merge branch 'develop' into eip6110
james-prysm 7a0a7a4
Merge branch 'develop' into eip6110
james-prysm c322c09
Merge branch 'develop' into eip6110
james-prysm 3200781
fixing renames but need to refactor process deposits
james-prysm e0ae765
gaz
james-prysm fa3a689
fixing names
james-prysm 278d80c
fixing linting
james-prysm 69f77e7
Merge branch 'develop' into eip6110
james-prysm a39e014
fixing unit test
james-prysm 56f0728
fixing a test and updating test util
james-prysm ffe5260
bal never used
james-prysm 12fe34c
fixing more tests
james-prysm 212ef50
fixing one more test
james-prysm 644f938
Merge branch 'develop' into eip6110
james-prysm afc037b
Merge branch 'develop' into eip6110
james-prysm 575ae4c
addressing feedback
james-prysm 940d8e3
refactoring process deposits to be part of their own fork instead of …
james-prysm e34cd2f
adding new tests to cover functions and removing redundancies
james-prysm 83eacc0
Merge branch 'develop' into eip6110
james-prysm a45c7e7
removing comment based on feedback
james-prysm f919a8d
Merge branch 'develop' into eip6110
james-prysm c819897
resolving easy deepsource issue
james-prysm d7bd167
Merge branch 'develop' into eip6110
james-prysm 3cb4c5f
refactoring for appropriate aliasing and readability
james-prysm 1582be9
Merge branch 'develop' into eip6110
james-prysm c09cd25
reverting some changes to simplify diff
james-prysm dc38405
Merge branch 'develop' into eip6110
james-prysm 9b5a925
Merge branch 'develop' into eip6110
james-prysm bccfa0b
small edit to comment
james-prysm aff2231
fixing linting
james-prysm 04372f5
Merge branch 'develop' into eip6110
james-prysm a9a7aed
Merge branch 'develop' into eip6110
james-prysm f2be21f
Merge branch 'develop' into eip6110
james-prysm 502a721
Merge branch 'develop' into eip6110
james-prysm 43912e9
Merge branch 'develop' into eip6110
james-prysm 7fa467a
fixing merge changes and review comments
james-prysm 3e5f08b
Merge branch 'develop' into eip6110
james-prysm 2bb28d3
Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer_deposits.go
james-prysm 7fa48d1
Merge branch 'develop' into eip6110
james-prysm 45e9eb2
partial review comments
james-prysm 0dc3473
addressing slack feedback
james-prysm 649e94b
moving function from deposits to validator.go
james-prysm f2da526
adding in batch verification and improving logs
james-prysm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package electra_test | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
fuzz "github.com/google/gofuzz" | ||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/core/electra" | ||
state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" | ||
ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" | ||
"github.com/prysmaticlabs/prysm/v5/testing/require" | ||
) | ||
|
||
func TestFuzzProcessDeposits_10000(t *testing.T) { | ||
fuzzer := fuzz.NewWithSeed(0) | ||
state := ðpb.BeaconStateElectra{} | ||
deposits := make([]*ethpb.Deposit, 100) | ||
ctx := context.Background() | ||
for i := 0; i < 10000; i++ { | ||
fuzzer.Fuzz(state) | ||
for i := range deposits { | ||
fuzzer.Fuzz(deposits[i]) | ||
} | ||
s, err := state_native.InitializeFromProtoUnsafeElectra(state) | ||
require.NoError(t, err) | ||
r, err := electra.ProcessDeposits(ctx, s, deposits) | ||
if err != nil && r != nil { | ||
t.Fatalf("return value should be nil on err. found: %v on error: %v for state: %v and block: %v", r, err, state, deposits) | ||
} | ||
} | ||
} | ||
|
||
func TestFuzzProcessDeposit_10000(t *testing.T) { | ||
fuzzer := fuzz.NewWithSeed(0) | ||
state := ðpb.BeaconStateElectra{} | ||
deposit := ðpb.Deposit{} | ||
|
||
for i := 0; i < 10000; i++ { | ||
fuzzer.Fuzz(state) | ||
fuzzer.Fuzz(deposit) | ||
s, err := state_native.InitializeFromProtoUnsafeElectra(state) | ||
require.NoError(t, err) | ||
r, err := electra.ProcessDeposit(s, deposit, true) | ||
if err != nil && r != nil { | ||
t.Fatalf("return value should be nil on err. found: %v on error: %v for state: %v and block: %v", r, err, state, deposit) | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This filename doesn't make sense for what you've added. It should be called operations.go, in my opinion.
If you want to keep it with this pattern please use underscores for the name and avoid a
.sig.go
suffixThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another good catch was definitely not intentional...