* Break out several helpers from `postBlockProcess`
In addition fix a bug found by @terencechain where we should use a slot
context instead of the parent context in the second FCU call.
* Remove calls for tracked proposer
getPayloadAttribute already takes care of this
Also compute correctly the time into voting window
* call with attributes only when incoming block is canonical
* check for empty payload instead of only nil
* add unit tests
* move log for non-canonical block
* return early if the incoming block does not change head
* Pass fcuArgs as arguments
* lint
* Initial code for head event streaming
* handle events and error
* keepalive event
* tests
* generate new mock
* remove single case select
* cleanup
* explain eventByteLimit
* use 2 channels in test
* review
* more review
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* Remove unsafe proposer indices cache
* Simplify FCU #1
This PR starts the process of gradually simplifying FCU
It removes the responsibility of getting the state and block from this
function and informing if head has changed. It is only called when the
imported block has actually become head.
* Add a call to FCU in edge cases
* 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
* use different keys for the proposer indices cache
* Add a way to get the proposer indices from a checkpoint
* fix fuzzing tests
* use htr instead of body root
* move comment
* Use a cache of one entry to build attestation
* Gazelle
* Enforce on RPC side
* Rm unused var
* Potuz feedback, dont use pointer
* Fix tests
* Init fetcher
* Add in-progress
* Add back missing lock
* Potuz feedback
* Update beacon-chain/rpc/prysm/v1alpha1/validator/attester_test.go
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
---------
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* fix all cases
* update web3signer
* current progress
* fix it finally
* push it back to capella
* remove hard-coded forks
* fix failing tests
* gaz
* fix dumb bug
* fix bad test setup
* change back