* Revert "Modify the algorithm of `updateFinalizedBlockRoots` (#13486)"
This reverts commit 32fb183392.
* migration to fix index corruption from pr 13486
* bail as soon as we see 10 epochs without the bug
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* Remove check for duplicates in pending attestation queue
The current queue will only save 1 unaggregated attestation for a pending block because we wrap the object into a SignedAggregatedAttestationAndProof with a zeroed aggregator.
* fix tests
* add max/min span visualisation tool cli
* go mod tidy
* lint imports
* remove typo
* fix epoch table value
* fix deepsource
* add dep to bazel
* fix dep import order
* change command name from span to slasher-span-display
* change command args style using - instead of _
* sed s/CONFIGURATION/SLASHER PARAMS//
* change double neg to double pos condition
* remove unused anonymous func
* better function naming
* add range condition
* [deepsource] Fix Empty slice literal used to declare a variable
GO-W1027
* correct typo
* do not show incorrect epochs due to round robin
* fix import
---------
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
ValidateClock in ValidateAttestationTime is useless
The check is that the attSlot is not > than the currentslot + 128 slots.
Later there's a check that the attSlot start time is not > than current slot
start time + clockDisparity.
if attSlot > than currentSlot + 128 slots, then the second check would fail
anyway.
The lattest check already guarantees that the attSlot cannot be larger than the
currentSlot, therefore it may never happen that attEpoch > currentEpoch. We just
need to check for Deneb that attEpoch >= currentEpoch - 1.
Removes also some duplicated variables like the attestation epoch being computed
twice.
* refactor batch verifier to share with pending queue
* unit test for batch verifier
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* add log message if in da check at slot end
* don't bother logging late da check start
* break up defer with a var, too dense all together
* pass slot instead of block ref
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* addressing errors on events endpoint
* reverting timeout on get health
* fixing linting
* fixing more linting
* Update validator/client/beacon-api/beacon_api_validator_client.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update beacon-chain/rpc/eth/events/events.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* reverting change and removing line on context done which creates a superfluous response.WriteHeader error
* gofmt
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* make it very big
* use new pruning implementation
* handle pre deneb
* revert cache change
* less verbose
* gaz
* Update beacon-chain/operations/attestations/prune_expired.go
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* gofmt
* be safer
---------
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* handle special case of batch size=1
* unit test case for backfill batch len=1
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* flag to set an older backfill slot target
* wire up flag to main cli and usage
* fix deepsource complaints
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* `subscribeStaticWithSubnets`: Fix docstring.
* `buildOptions`: Avoid `options` mutations.
* `dv5Cfg`: Avoid mutation.
* `RefreshENR`: Use default for all but Phase0.
* `udp4`, `udp6`: Create enum.
* `p2p.Config`: `BootstrapNodeAddr`==> `BootstrapNodeAddrs`.
* `p2p.Config`: `Discv5BootStrapAddr` ==> `Discv5BootStrapAddrs`.
* `TestScorers_BadResponses_Score`: Improve.
* `BeaconNode`: Avoid mutation.
* `TestStore_TrustedPeers`: Remove blankline.
* Remove blank identifiers.
* `privKey`: Keep the majority of code with low indentation.
* `P2PPreregistration`: Return error instead of fatal log.
* `parseBootStrapAddrs` => `ParseBootStrapAddrs` (export)
* `p2p.Config`: Remove `BootstrapNodeAddrs`.
* `NewService`: Avoid mutation when possible.
* `Service`: Remove blank identifier.
* `buildOptions`: Avoid `log.Fatalf` (make deepsource happy).
* `registerGRPCGateway`: Use `net.JoinHostPort` (make deepsource happy).
* `registerBuilderService`: Make deepsource happy.
* `scorers`: Add `NoLock` suffix (make deepsource happy).
* `scorerr`: Add some `NoLock`suffixes (making deepsource happy).
* `discovery_test.go`. Remove init.
Rationale:
`rand.Seed` is deprecated: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator.
This makes deepsource happy as well.
* `createListener`: Reduce cyclomatic complexity (make deepsource happy).
* `startDB`: Reduce cyclomatic complexity (make deepsource happy).
* `main`: Log a FATAL on error.
This way, the error message is very readable.
Before this commit, the error message is the less readable
message in the logs.
* `New`: Reduce cyclomatic complexity (make deepsource happy).
* `main`: Avoid `App` mutation, and make deepsource happy.
* Update beacon-chain/node/node.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
* `bootnodes` ==> `BootNodes` (Fix PR comment).
* Remove duplicate `configureFastSSZHashingAlgorithm` since already done in `configureBeacon`. (Fix PR comment)
* Add `TestCreateLocalNode`. (PR comment fix.)
* `startModules` ==> `startBaseServices (Fix PR comment).
* `buildOptions` return errors consistently.
* `New`: Change ordering.
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>