* feat: implement function `PayloadProof` to calculate proof of execution payload
* remove comments
* feat: implement function to compute field roots of
* feat: implement function to compute `BeaconBlock` field roots and add tests
* fix dependencies
* check if interface implements the assserted type
* fix: lint
* replace `ok != true` with `!ok`
* remove unused parameter from `PayloadProof`
* remove test and move `PayloadProof` to `blocks/proofs.go`
* remove `PayloadProof` from `fieldtrie`
* replace `fieldtrie.ProofFromMerkleLayers` with `trie.ProofFromMerkleLayers`
* Update container/trie/sparse_merkle.go
* update dependencies
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com>
* 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>
* 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>
* 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>
* backfill service
* fix bug where origin state is never unlocked
* support mvslice states
* use renamed interface
* refactor db code to skip block cache for backfill
* lint
* add test for verifier.verify
* enable service in service init test
* cancellation cleanup
* adding nil checks to configset juggling
* assume blocks are available by default
As long as we're sure the AvailableBlocker is initialized correctly
during node startup, defaulting to assuming we aren't in a checkpoint
sync simplifies things greatly for tests.
* block saving path refactor and bugfix
* fix fillback test
* fix BackfillStatus init tests
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* init
- getLocalPayload does not use the proposer ID from the cache but takes
it from the block
- Fixed tests in blockchain package
- Fixed tests in the RPC package
- Fixed spectests
EpochProposers takes 256 bytes that can be avoided to be copied, but
this optimization is not clear to be worth it.
assginmentStatus can be optimized to use the cached version from the
TrackedValidatorsCache
We shouldn't cache the proposer duties when calling getDuties but when
we update the epoch boundary instead
* track validators on prepare proposers
* more rpc tests
* more rpc tests
* initialize grpc caches
* Add back fcu log
Also fix two existing bugs wrong parent hash on pre Capella and wrong
blockhashes on altair
* use beacon default fee recipient if there is none in the vc
* fix validator test
* radek's review
* push always proposer settings even if no flag is specified in the VC
* Only register with the builder if the VC flag is set
Great find by @terencechain
* add regression test
* Radek's review
* change signature of registration builder
* Add sanity checks for bundle from builder
* Add more checks to BlobsBundle.ToProto()
* Fix minor typo
* Fix tests & add new ones
* Add tests for ToProto
* Add "not" to error message
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* removing fake wrappers
* fixing conficts and missed tests
* fixing more conflicts
* addressing missed unit test
* fixing nogo error
* fixing more unit tests
* fixing more tests
* making needed changes to beacon API based on removal of blobsidecar from block contents
* fixing tests and reverting some changes to be addressed later
* fixing generated code from protos
* gaz
* fixing get blob handler and adding blob storage to the blob service
* updating unit tests
* WIP
* wip tests
* got tests passing but needs cleanup
* removing gomod and gosum changes
* fixing more tests
* fixing more tests
* fixing more tests
* gaz
* moving some proto types around
* removing unneeded unit test
* fixing proposer paths
* adding more tests
* fixing more tests
* improving more unit tests
* updating one blob only unit test
* changing arguments of buildBlobSidecar
* reverting a change based on feedback
* terence's review items
* fixing test based on new develop changes
* radek's comments
* addressed more comments from radek
* adding in blobs to test data
* fixing casing in test
* removing extra line
* fixing issue from bad merge
* Update beacon-chain/rpc/eth/beacon/handlers_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/rpc/eth/beacon/handlers_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/rpc/eth/beacon/handlers_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/rpc/eth/blob/handlers.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* moving core getblob business logic to blocker based on radek's comment
* fixing mock blocker
* gaz
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* scaffolding for verification package
* WIP blob verification methods
* lock wrapper for safer forkchoice sharing
* more solid cache and verification designs; adding tests
* more test coverage, adding missing cache files
* clearer func name
* remove forkchoice borrower (it's in another PR)
* revert temporary interface experiment
* lint
* nishant feedback
* add comments with spec text to all verifications
* some comments on public methods
* invert confusing verification name
* deep source
* remove cache from ProposerCache + gaz
* more consistently early return on error paths
* messed up the test with the wrong config value
* terence naming feedback
* tests on BeginsAt
* lint
* deep source...
* name errors after failure, not expectation
* deep sooource
* check len()==0 instead of nil so empty lists work
* update test for EIP-7044
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>