* 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>
* 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
* 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>
* 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>
* 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
* 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>
* First take at updating everything to v5
* Patch gRPC gateway to use prysm v5
Fix patch
* Update go ssz
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* in progress...
* in progress...
* remove log
* log root
* Revert "Auxiliary commit to revert individual files from f12a609ea2a2f1e87e97321f3a717cd324b5ae97"
This reverts commit 5ae35edb6477d8d0ea4e94b273efc6590484da85.
* cleanup
* remove log
* remove whitespace
* remove logs
* more stuff
* copy
* always rebuild trie
* revert
* add state
* init state
* fix all
* uintptr
* move slice to new package
* lock in `Detach`
* remove constraint
* reorder
* blockroots and stateroots
* fill roots in empty()
* fix hasher
* implement slice for balances and inactivity scores
* detach in setters
* Revert "implement slice for balances and inactivity scores"
This reverts commit 59eb9df8d7.
# Conflicts:
# beacon-chain/state/state-native/setters_validator.go
* use counter to track states
* typos
* rename interface
* balances
* gauge
* some improvements
* first try with map
* fix
* inactivity scores in progress
* fix test
# Conflicts:
# beacon-chain/state/state-native/helpers_test.go
* test fixes
* ToProto fix
* copy roots
* validators
* build fixes
* fix bug in `ToProto`
* fix fuzz test
* fix bug in slice getters
* fix state equality checks
* make tests pass
* make tests pass
* more test updates
* Revert "Auxiliary commit to revert individual files from 34e7344bff08a589e6341bb1829e3cb74159e878"
This reverts commit ecd64efa8917f37ca41460e0356ff007fe55dd9d.
* Revert "make tests pass"
This reverts commit 0cf00f19ee.
* Revert "make tests pass"
This reverts commit 521b65e1d2.
* pass tests
* deepequal identifiable types
* Deflake `cloners_test.go`
* feature flag for block roots
* feature flag
* remove recursive locks
* reduce complexity of rootSelector
* fix randao mixes root
* some fixes
* revisit tests
* revert change to field trie helpers
* initialize field map for tests
* remove whitespace
* initialize roots with proper length
* more fixes
* out of bounds message fix
* optimize length calculation
* remove call to Len in PubkeyAtIndex
* don't log deposits
* unit tests
* unit tests
* fix
* comments
* test fixes
* id
* remove Enumerator interface
* review feedback
* simplify field trie
* bring back fieldtrie package
* fix bazel file
* use handle32ByteArrays for root computation
* fix locks
* metrics
* bzl
* simplify some things
* use htr in state test
* remove code from require package
* gzl
* more htr
* Fuzzing of the multi-value slice
* assert values
* getter optimizations
* use At when reading from validators
* Nishant's review
* restore safe copy
* remove empty line
* build fix
* restore how we get root at index for deafult mode
* more review comments
* optimize default behavior
* simplify Slice calls
* test fix
* remove unnecessary package
* remove unused setter
* make fieldMap unexported
* some improvements in state package
* call `Slice` instead of manually copying
* unlock in ReadFromEveryValidator
* Potuz's comments
* lock the state when reading from all validators
# Conflicts:
# beacon-chain/state/state-native/getters_validator.go
* add back preston's changes
* add index
---------
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
Co-authored-by: nisdas <nishdas93@gmail.com>
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* v0
* getters/setters
* init and copy
* hasher
* all the nice stuff
* make bazel happy
* remove tests for smaller PR
* remove old states
* move files
* import fixes
* custom MarshalSSZ
* fixed deadlock
* copy version when copying state
* correct issues in state_trie
* fix Copy()
* better e2e comment
* add code to minimal state
* spectest test
* Revert "Auxiliary commit to revert individual files from 84154423464e8372f7e0a03367403656ac5cd78e"
This reverts commit 9602599d183081291dfa0ba4f1036430f63a7822.
* native state assert
* always error
* always log
* more native state usage
* cleanup
* remove empty line
* Revert "spectests"
This reverts commit 1c49bed5d1cf6224afaf21e18562bf72fae5d2b6.
# Conflicts:
# beacon-chain/powchain/service.go
# beacon-chain/state/v1/state_trie.go
# beacon-chain/state/v2/state_trie.go
# beacon-chain/state/v3/state_trie.go
# testing/spectest/shared/phase0/finality/BUILD.bazel
# testing/spectest/shared/phase0/finality/runner.go
* dedup field trie
* fix test issues
* cleanup
* use correct field num in FinalizedRootProof
* use existing version constant
* halfway there
* "working" version
* some fixes
* fix field nums in tests
* rename v0types to nativetypes
* Revert "Auxiliary commit to revert individual files from dc549b1cf8e724bd08cee1ecc760ff3771d5592d"
This reverts commit 7254d3070d8693b283fc686a2e01a822ecbac1b3.
* uncomment code
* remove map size
* Revert "Revert "spectests""
This reverts commit 39c271ae6b.
* use reverse map
* Revert "Revert "Revert "spectests"""
This reverts commit 19ba8cf95c.
* finally found the bug
(cherry picked from commit a5414c4be1bdb61a50b391ea5301895e772cc5e9)
* simplify populateFieldIndexes
* fix copy
(cherry picked from commit 7da4fb8cf51557ef931bb781872ea52fc6731af5)
* remove native state from e2e
* remove index map
* unsupported functions
* Use ProtobufBeaconState() from native state
* tests
* typo
* reduce complexity of `SaveStatesEfficient`
* remove unused receiver name
* update doc.go
* fix test assertion
* fix test assertion 2
* Phase0 justification bits
* bring back state tests
* rename fieldIndexRev
* versioning of ToProto
* remove version check from unexported function
* hasher tests
* don't return error from JustificationBits
* extract fieldConvertersNative
* helper error function
* use fieldConvertersNative
* Introduce RealPosition method on FieldIndex
* use RealPosition in hasher
* remove unused fields
* remove TestAppendBeyondIndicesLimit
(cherry picked from commit 3017e700282969c30006b64c95c21ffe6b166f8b)
* simplify RealPosition
* rename field interface
* use helper in proofs.go
* Update beacon-chain/core/altair/upgrade.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>