* Prepare for future fork boilerplate.
* Implement the Fulu fork boilerplate.
* `Upgraded state to <fork> log`: Move from debug to info.
Rationale:
This log is the only one notifying the user a new fork happened.
A new fork is always a little bit stressful for a node operator.
Having at least one log indicating the client switched fork is something useful.
* Update testing/util/helpers.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Fix Radek's comment.
* Fix Radek's comment.
* Update beacon-chain/state/state-native/state_trie.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/state/state-native/state_trie.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Fix Radek's comment.
* Fix Radek's comment.
* Fix Radek's comment.
* Remove Electra struct type aliasing.
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Use 16 bit random value
* enforce 0x02 credentials for consolidations
* Limit consolidating balance by validator effective balance
* Update max blob commitment size
* Fix next sync committee indices
* Bytes to little endian
* Handle proposer computations in between forks
* Fix config and tests
Fix tests
Fix tests
* Fix test stream events by properly set effective balance
Fix test stream events by properly set effective balance
* Preallocate buffers to avoid repeated allocations
* Potuz's feedback
* Use 16 bit random value
* enforce 0x02 credentials for consolidations
* Limit consolidating balance by validator effective balance
* Update max blob commitment size
* Fix next sync committee indices
* Bytes to little endian
* Handle proposer computations in between forks
* Fix config and tests
Fix tests
Fix tests
* Fix test stream events by properly set effective balance
Fix test stream events by properly set effective balance
* Preallocate buffers to avoid repeated allocations
* Potuz's feedback
* Fix change log
* Rename existing AttestationCache
* Cache with simple Add
* fix import cycle
* logic for unaggregated, aggregated and block attestations
* some small fixes
* remove Seen
* finishing touches
* feature flag
* extract forkchoice atts to separate type
* gate new functionality behind feature flag
* revert test files
* preparing for review
* change Id to [32]byte
* Potuz's review
* Potuz's review pt 2
* Nishant's review
* keep flat list of atts
* fix ForkchoiceAttestations() function
* Tests for Add, GetAll, Count
* Tests for remaining functions
* use DeepEqual
* fix tests
* documentation
* changelog <3
* v2 handlers
* nil check for forkchoice atts
* guard against 0 bits set
* fix failing test
* Preston's review
* better godocs
* Add missed exit checks to consolidation processing
* Use safe add
* gaz
* Pass spec tests (except single attestation)
Revert params.SetupTestConfigCleanupWithLock(t)
* Update earlist exit epoch for upgrade to electra
* Validate that each committee bitfield in an aggregate contains at least one non-zero bit
* Add single attestation
* Add single attestation to ssz static
* Fix typo
Co-authored-by: Md Amaan <114795592+Redidacove@users.noreply.github.com>
* Update UpgradeToElectra comments
* Add no lint dupword
---------
Co-authored-by: james-prysm <james@prysmaticlabs.com>
Co-authored-by: Md Amaan <114795592+Redidacove@users.noreply.github.com>
* Make it the default
* Changelog
* Remove outdated flag
* Update `go-libp2p` to `v0.36.5` and `webtransport-go` to `master`.
---------
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
* wip
* updating types and wip on functions
* renaming to MAX_PENDING_DEPOSITS_PER_EPOCH
* fixing linting and conversions
* adding queue deposit changes
* fixing test and cloning
* removing unneeded test based on update
* gaz
* wip apply pending deposit
* fixing replay test and adding apply pending deposit
* fixing setters test
* updating transition test
* changelog
* updating pending deposits
* fixing ProcessPendingDeposit unit tests
* gaz
* fixing cyclic dependencies
* fix visiblity
* missed adding the right signature verification
* adding point to infinity topup test
* adding apply pending deposit test
* making changes based on eip6110 changes
* fixing ineffassign
* gaz
* adding batched verifications sigs
* fixing broken type
* fixing proto
* updated consensus spec tests and fixed consensus bug tests
* testing readability improvement by avoiding ApplyPendingDeposit
* removing the boolean from apply pending deposit
* improve naming
* review comments and fixing a small bug using wrong variable
* fixing tests and skipping a test
* adding some test skips
* fixing bugs terence found
* adding test for batchProcessNewPendingDeposits
* gaz
* adding churn test
* updating spec tests to alpha.8
* adding pr to changelog
* addressing terence's comments
* Update beacon-chain/core/electra/validator.go
Co-authored-by: terence <terence@prysmaticlabs.com>
* adding tests for batch verify and rename some variables
* skipping tests , add them back in later
* skipping one more test
---------
Co-authored-by: terence <terence@prysmaticlabs.com>
* Add Current Changes To Routine
* Add In New Test
* Add Feature Flag
* Add Discovery Rebooter feature
* Do Not Export Mutex And Use Zero Value Mutex
* Wrap Error For Better Debugging
* Fix Function Name and Add Specific Test For it
* Manu's Review
* removing extra container for ssz blob sidecar response
* gaz and changelog
* gaz
* fixing dependencies
* fixing test
* updating values based on feedback"
* wip passing e2e
* reverting temp comment
* remove unneeded comments
* fixing merge errors
* fixing more bugs from merge
* fixing test
* WIP moving code around and fixing tests
* unused linting
* gaz
* temp removing these tests as we need placeholder/wrapper APIs for them with the removal of the gateway
* attempting to remove dependencies to gRPC gateway , 1 mroe left in deps.bzl
* renaming flags and other gateway services to http
* goimport
* fixing deepsource
* git mv
* Update validator/package/validator.yaml
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update validator/package/validator.yaml
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* addressing feedback
* missed lint
* renaming import
* reversal based on feedback
* fixing web ui registration
* don't require mux handler
* gaz
* removing gRPC service from validator completely, merged with http service, renames are a work in progress
* updating go.sum
* linting
* trailing white space
* realized there was more cleanup i could do with code reuse
* adding wrapper for routes
* reverting version
* fixing dependencies from merging develop
* gaz
* fixing unit test
* fixing dependencies
* reverting unit test
* fixing conflict
* updating change log
* Update log.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* gaz
* Update api/server/httprest/server.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* addressing some feedback
* forgot to remove deprecated flag in usage
* gofmt
* fixing test
* fixing deepsource issue
* moving deprecated flag and adding timeout handler
* missed removal of a flag
* fixing test:
* Update CHANGELOG.md
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* addressing feedback
* updating comments based on feedback
* removing unused field for now, we can add it back in if we need to use the option
* removing unused struct
* changing api-timeout flag based on feedback
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* hardcoded GenesisValidatorsRoot
* added in mainnet.config
* updated desc
* added it in all testnets
* minor change
* added roots instead of empty and fn to compute byte32 from hex
* added in e2e testnet_config
* fixed test
* minor fix
* removed fn and added bytes output directly
* Add test for genesis validator root mainnet value
* removed root from minimal and testnet
* removed root
* Update CHANGELOG.md
* Fix bazel package visiblity
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
Co-authored-by: Preston Van Loon <preston@pvl.dev>
* feat: (WIP)implement ``ComputeFieldRootsForBlockBody`` function to compute roots of fields in BlockBody
* calculate field roots upto ``deposits``
* add some required constants fix some errors
* implement ``ComputeFieldRootsForBlockBody`` function for all fields in ``BeaconBlockBody``
* populate `fieldRoots` based on block body version
* fix constants
* `bazel run //:gazelle -- fix`
* remove nested `if`s
* formatting 1
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com>
* formatting 2
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com>
* remove unrequired check
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com>
* update naming 1
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com>
* update function name
* add test for Phase0 block body
* update Phase0 test
* update phase0 test without setting any fields
* fix some errors in Phase0 test
* don't set fields
* add altair test
* add tests upto Electra
* fix the function for deneb and newer forks
* update dependencies
* add checks to ensure interface implements the asserted type
---------
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* using fork instead of eip6110flag for validator index cache
* updating validator indicies on initialize from poroto unsafe
* fixing bad version check
* attempting to fix unit test
* reverting test changes
* changing incorrect initialization
* updating comment
* radek's comment'
* renaming functions and fields based on consensus changes
* execution api rename
* fixing test
* reverting spectests changes, it should be changed with new version
* reverting temporarily
* revert exclusions
* wip fork logic upgrade
* fixing replay and fork.go
* improving process function and adding tests for transition
* updating unit tests and temporarily removing some fields on state_trie.go
* updating state
* wip adding upgrade to electra code
* adding some comments
* adding spec tests
* fixing values used in state transition logic
* updating upgrade test
* gofmt
* avoid dup word linting
* fixing spec tests for fork
* gaz
* fixing tests
* improving unit test with new getters
* fixing bazel for minimal fork test
* adding bazel file
* Update beacon-chain/core/electra/upgrade.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* addressing some comments and adding more tests
* addressing more feedback
* one more feedback
* changing value to interface after talking to preston
* adding missed review feedback
* fixing linting
* noticed I was using the wrong function in the state upgrade
* fixing and ignoring some deepsource issues
* moving core electra validator functions to helper to remove circular dependencies in other PRs
* missed deepsource complaint
* Update upgrade.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update testing/util/electra_state.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update testing/util/electra_state.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* addressing feedback
* removing deepsoure ignore comments
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Electra: Beacon State
* Electra: Beacon state fixes from PR 13919
* Add missing tests - part 1
* Split eip_7251_root.go into different files and reuse/share code with historical state summaries root. It's identical!
* Add missing tests - part 2
* deposit receipts start index getters and setters (#13947)
* adding in getters and setters for deposit receipts start index
* adding tests
* gaz
* Add missing tests - part 3 of 3
Update the electra withdrawal example with a ssz state containing pending partial withdrawals
* add tests for beacon-chain/state/state-native/getters_balance_deposits.go
* Add electra field to testing/util/block.go execution payload
* godoc commentary on public methods
* Fix failing test
* Add balances index out of bounds check and relevant tests.
* Revert switch case electra
* Instead of copying spectest data into testdata, use the spectest dependency
* Deepsource fixes
* Address @rkapka PR feedback
* s/MaxPendingPartialsPerWithdrawalSweep/MaxPendingPartialsPerWithdrawalsSweep/
* Use multivalue slice compatible accessors for validator and balance in ActiveBalanceAtIndex
* More @rkapka feedback. What a great reviewer!
* More tests for branching logic in ExitEpochAndUpdateChurn
* fix build
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* Electra: full beacon config
Fix TestGetSpec
* Fix beacon config spec compliance test so that it properly loads the config from spec tests. Tests failing for now.
* fix tests and comply with spec presets
* Remove EnableEIP4881 flag
* Gaz
* Fix missing error handler
* Remove old tree and fix tests
* Gaz
* Fix build import
* Replace depositcache
* Add pendingDeposit tests
* Nishant's fix
* Fix unsafe uint64 to int
* Fix other unsafe uint64 to int
* Remove: RemovePendingDeposit
* Deprecate and remove DisableEIP4881 flag
* Check: index not greater than deposit count
* Move index check