* Add the new Fulu state with the new field
* fix the hasher for the fulu state
* Fix ToProto() and ToProtoUnsafe()
* Add the fields as shared
* Add epoch transition code
* short circuit the proposer cache to use the state
* Marshal the state JSON
* update spectests to 1.6.0-alpha.1
* Remove deneb and electra entries from blob schedule
This was cherry picked from PR #15364
and edited to remove the minimal cases
* Fix minimal tests
* Increase deadling for processing blocks in spectests
* Preston's review
* review
---------
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* remove usages of params from proto packages
* make it harder to mess up the order of request limit args
* remove errant edit (Terence review)
* fix missed updates after sig change
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* adding in proto for getdutiesv2
* adding in GetDutiesV2
* updating changelog and mock
* fixing tests
* breaking up function into smaller functions for gocognit
* reverting some changes so we can break it into a separate PR for validator client only
* reverted too much adding mock change back in
* removing reserved based on preston's feedback
* adding duties tests back in
* Update beacon-chain/rpc/prysm/v1alpha1/validator/duties.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* updating based on preston's feedback
* updating build for new files
* maybe there's some flake with how the state is used, trying with it moved
* reverting config override
* reverting all changes to get duties v1 based on preston's feedback
* Update proto/prysm/v1alpha1/validator.proto
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* addressing partial feedback
* adding small comment
* reorganizing function based on feedback
* removing unused field
* adding some more unit tests
* adding attribute for pubkeys to span
* preston's feedback
* fixing current to next
* probably safer to register current period now
* Update beacon-chain/core/helpers/beacon_committee.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* adding in preston's comment
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Migrate Prysm repo to Offchain Labs organization ahead of Pectra upgrade v6
* Replace prysmaticlabs with OffchainLabs on general markdowns
* Update mock
* Gazelle and add mock.go to excluded generated mock file
* wip
* fixing unit tests
* changing is aggregator function
* wip
* fully removing the use of committee from validator client, adding a wrapper type for duties
* fixing tests
* fixing linting
* fixing more tests
* changelog
* adding some more tests
* Update proto/prysm/v1alpha1/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* radek's feedback
* removing accidently checked in
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update rules_go to v0.53.0
* Update staticcheck to v0.6.0
* Update to go 1.24.0
* Update github.com/trailofbits/go-mutexasserts to latest
* Use rules_go @ cf3c3af34bd869b864f5f2b98e2f41c2b220d6c9
* Provide the go binary to SszGen.
https://github.com/bazel-contrib/rules_go/pull/4173
* Unskip SA9003
* Update github ci checks to go1.24.0
* CI: Update gosec to v2.22.1 and golangci to v1..64.5
* Temporarily disable usetesting lint check for go1.24
* gosec: Disable G115 - integer overflow conversion
* gosec: Ignore G407 for "hardcoded" IV. It's not hardcoded.
* Fix uses of rand.Seed. This is a no-op in go1.24 and deprecated since go1.20.
* Changelog fragment
* Decompose Electra block attestations
* comments
* changelog <3
* remove redundant comparison
* typo in comment
* fix changelog section name
* review from James and Sammy
* continue pruning on error
* only prune when committees are cached
* fix bad assignments in test
* change field IDs in `AggregateAttestationAndProofElectra`
* fix typo in `validator.proto`
* correct slashing indices length and shashings length
* check length in indexed attestation's `ToConsensus` method
* use `fieldparams.BLSSignatureLength`
* Add length checks for execution request
* fix typo in `beacon_state.proto`
* fix typo in `ssz_proto_library.bzl`
* fix error messages about incorrect types in block factory
* add Electra case to `BeaconBlockContainerToSignedBeaconBlock`
* move PeerDAS config items to PeerDAS section
* remove redundant params
* rename `PendingDepositLimit` to `PendingDepositsLimit`
* improve requests unmarshaling errors
* rename `get_validator_max_effective_balance` to `get_max_effective_balance`
* fix typo in `consolidations.go`
* rename `index` to `validator_index` in `PendingPartialWithdrawal`
* rename `randomByte` to `randomBytes` in `validators.go`
* fix for version in a comment in `validator.go`
* changelog <3
* Revert "rename `index` to `validator_index` in `PendingPartialWithdrawal`"
This reverts commit 87e4da0ea2.
* 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>
* Re-organize thet content of the `*.proto` files.
The content of the `*.proto` files is sorted by hard fork,
then with a top-down fashion.
Sorting first by hard fork lets the reader to easily see new or modified fields.
Then, sorting with a top-down fashion lets the user to first see the big picture,
then to dive into details.
Also, the `new in <hard fork>` mentions are only written for the given hard fork.
Thus, it'll avoid in the future the majority of the fields, not initially
present in phase 0, to have the `new in <hard fork> mention`.
This commit does not bring any new functional change.
* Update proto/prysm/v1alpha1/attestation.proto
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update proto/prysm/v1alpha1/beacon_state.proto
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Fix Radek's comment.
---------
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>
* `listenForNewNodes` and `FindPeersWithSubnet`: Stop using `Readnodes` and use iterator instead.
It avoids infinite loop in small devnets.
* Update beacon-chain/p2p/discovery.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
* adding nil checks on interface
* changelog
* add linting
* adding missed checks
* review feedback
* attestation bits should not be in nil check
* fixing nil checks
* simplifying function
* fixing some missed items
* more missed items
* fixing more tests
* reverting some changes and fixing more tests
* adding in source check back in
* missed test
* sammy's review
* radek feedback
* implementing new decisions around exectuion requests
* fixing test fixture
* adding in more edge case checks and tests
* changelog
* fixing unsafe type cast
* Update beacon-chain/execution/engine_client_test.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update proto/engine/v1/electra.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update proto/engine/v1/electra.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update proto/engine/v1/electra.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update proto/engine/v1/electra.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update proto/engine/v1/electra_test.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update proto/engine/v1/electra_test.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* updating based on preston's feedback and adding more tests for edge cases
* adding more edgecases, and unit tests
* fixing tests
* missed some export changes
* adding more tests
* Update proto/engine/v1/electra.go
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* reducing complexity of function based on feedback
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* Use engine api get-blobs for block subscriber
Debug
changelog
add proto marshal and unmarshal
Kasey's feedback
* Feedback
* Preston's feedback
* Exist argument should not be hardcoded with kzg count
* wip
* gaz
* rename field
* sammy review
* updating execution api request and reverting response back
* fixing linting
* changelog
* changelog
* adding in serialization of requests
* code cleanup
* adding some happy path tests and fixing mock
* mock still broken
* fixing linting
* updating name on proto
* missed naming
* placeholder fix for TestClient_HTTP
* removing duplicate change log
* adding in test for get payloadv4 as well as some tests
* added tests for execution client testing, fixed encode type
* adding comment for placeholder test
* fixing test and addressing feedback
* feedback
* flipping the test names, was used in reverse
* feedback from kasey
* reverting switch back to if statements to fix bug
* lint