* Update Earliest available slot when pruning
* bazel run //:gazelle -- fix
* custodyUpdater interface to avoid import cycle
* bazel run //:gazelle -- fix
* simplify test
* separation of concerns
* debug log for updating eas
* UpdateEarliestAvailableSlot function in CustodyManager
* fix test
* UpdateEarliestAvailableSlot function for FakeP2P
* lint
* UpdateEarliestAvailableSlot instead of UpdateCustodyInfo + check for Fulu
* fix test and lint
* bugfix: enforce minimum retention period in pruner
* remove MinEpochsForBlockRequests function and use from config
* remove modifying earliest_available_slot after data column pruning
* correct earliestAvailableSlot validation: allow backfill decrease but prevent increase within MIN_EPOCHS_FOR_BLOCK_REQUESTS
* lint
* bazel run //:gazelle -- fix
* lint and remove unwanted debug logs
* Return a wrapped error, and let the caller decide what to do
* fix tests because updateEarliestSlot returns error now
* avoid re-doing computation in the test function
* lint and correct changelog
* custody updater should be a mandatory part of the pruner service
* ensure never increase eas if we are in the block requests window
* slot level granularity edge case
* update the value stored in the DB
* log tidy up
* use errNoCustodyInfo
* allow earliestAvailableSlot edit when custodyGroupCount doesnt change
* undo the minimal config change
* add context to CustodyGroupCount after merging from develop
* cosmetic change
* shift responsibility from caller to callee, protection for updateEarliestSlot. UpdateEarliestAvailableSlot returns cgc
* allow increase in earliestAvailableSlot only when custodyGroupCount also increases
* remove CustodyGroupCount as it is no longer needed as UpdateEarliestAvailableSlot returns cgc now
* proper place for log and name refactor
* test for Nil custody info
* allow decreasing earliest slot in DB (just like in memory)
* invert if statement to make more readable
* UpdateEarliestAvailableSlot for DB (equivalent of p2p's UpdateEarliestAvailableSlot) & undo changes made to UpdateCustodyInfo
* in UpdateEarliestAvailableSlot, no need to return unused values
* no need to log stored group count
* log.WithField instead of log.WithFields
* create lc cache to track branches
* save lc stuff
* remove finalized data from LC cache on finalization
* read lc stuff
* edit tests
* changelog
* linter
* address commments
* address commments 2
* address commments 3
* address commments 4
* lint
* address commments 5 x_x
* set beacon lcStore to mimick registrable services
* clean up the error propagation
* pass the state to saveLCBootstrap since it's not saved in db yet
* Add flag for colocation whitelisting. --p2p-ip-colocation-whitelist
This change updates the peer IP colocation checking to respect the
configured CIDR whitelist (--p2p-ip-colocation-whitelist flag).
Changes:
- Added IPColocationWhitelist field to peers.StatusConfig
- Added ipColocationWhitelist field to Status struct to store parsed IPNets
- Parse CIDR strings into net.IPNet in NewStatus constructor
- Updated isfromBadIP method to skip colocation limits for whitelisted IPs
- Pass IPColocationWhitelist from Service config when creating Status
The IP colocation whitelist allows operators to exempt specific IP ranges
from the colocation limit, useful for deployments with known trusted
address ranges or legitimate node clustering.
Only check if an IP is in the whitelist when the colocation limit
is actually exceeded, rather than checking for every IP. This is
more efficient and matches the intended behavior.
* Changelog fragment
* Apply suggestion from @nalepae
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
* Apply suggestion from @nalepae
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
* @kasey feedback: Move IP colocation parsing to the node construction
---------
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
* propose block changes from peerdas branch
* breaking out broadcast code into its own helper, changing fulu broadcast for rest api to properly send datasidecars
* renamed validate blobsidecars to validate blobs, and added check for max blobs
* gofmt
* adding in batch verification for blobs"
* changelog
* adding kzg tests, moving new kzg functions to validation.go
* linting and other small fixes
* fixing linting issues and adding some proposer tests
* missing dependencies
* fixing test
* fixing more tests
* gaz
* removed return on broadcast data columns
* more cleanup and unit test adjustments
* missed removal of unneeded field
* adding data column receiver initialization
* Update beacon-chain/rpc/eth/beacon/handlers.go
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
* partial review feedback from manu
* gaz
* reverting some code to peerdas as I don't believe the broadcast code needs to be reused
* missed removal of build dependency
* fixing tests and adding another test based on manu's suggestion
* fixing linting
* Update beacon-chain/rpc/eth/beacon/handlers.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/blockchain/kzg/validation.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* radek's review changes
* adding missed test
---------
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* `startBaseServices`: Warm data column storage cache.
* `TestFindPeers_NodeDeduplication`: Use `t.context`.
* `BUILD.bazel`: Moge `# gazelle.ignore` at the top of the file.
Rationale: This directive is applied to the whole file, regardless its position in the file.
* Improve `TestConstructGenericBeaconBlock`: Courtesy of Terence
* Add `TestDataColumnStoragePath_FlagSpecified`.
* `appFlags`: Move `flags.SubscribeAllDataSubnets` (cosmetic).
* `appFlags`: Add `storage.DataColumnStoragePathFlag`.
* Add changelog.
* initialize genesis data asap at node start
* add genesis validation tests with embedded state verification
* Add test for hardcoded mainnet genesis validator root and time from init() function
* Add test for UnmarshalState in encoding/ssz/detect/configfork.go
* Add tests for genesis.Initialize
* Move genesis/embedded to genesis/internal/embedded
* Gazelle / BUILD fix
* James feedback
* Fix lint
* Revert lock
---------
Co-authored-by: Kasey <kasey@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@pvl.dev>
* Add entry for sequence number in chain-metadata bucket & Basic getter/setter
* Mark p2p-metadata flag as deprecated
* Fix metaDataFromConfig: use DB instead to get seqnum
* Save sequence number after updating the metadata
* Fix beacon-chain/p2p unit tests: add DB in config
* Add changelog
* Add ReadOnlyDatabaseWithSeqNum
* Code suggestion from Manu
* Remove seqnum getter at interface
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* Convert genesis times from seconds to time.Time
* Fixing failed forkchoice tests in a new commit so it doesn't get worse
Fixing failed spectest tests in a new commit so it doesn't get worse
Fixing forkchoice tests, then spectests
* Fixing forkchoice tests, then spectests. Now asking for help...
* Fix TestForkChoice_GetProposerHead
* Fix broken build
* Resolve TODO(preston) items
* Changelog fragment
* Resolve TODO(preston) items again
* Resolve lint issues
* Use consistant field names for sinceSlotStart (no spaces)
* Manu's feedback
* Renamed StartTime -> UnsafeStartTime, marked as deprecated because it doesn't handle overflow scenarios.
Renamed SlotTime -> StartTime
Renamed SlotAt -> At
Handled the error in cases where StartTime was used.
@james-prysm feedback
* Revert beacon-chain/blockchain/receive_block_test.go from 1b7844de
* Fixing issues after rebase
* Accepted suggestions from @potuz
* Remove CanonicalHeadSlot from merge conflicts
---------
Co-authored-by: potuz <potuz@prysmaticlabs.com>
* Use otelgrpc for tracing grpc server and client.
* Changelog fragment
* gofmt
* Use context in prometheus service
* Remove async start of prometheus service
* Use random port to reduce the probability of concurrent tests using the same port
* Remove comment
* fix lint error
---------
Co-authored-by: Bastin <bastin.m@proton.me>
* 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
* add lcStore to Node
* changelog entry
* add atomic getters and setters for the store
* change store fields visibility to private
* refactor method names and add tests
* remove get from getters
* Implement static analysis to prevent panics
* Add nopanic to nogo
* Fix violations and add exclusions
Fix violations and add exclusions for all
* Changelog fragment
* Use pass.Report instead of pass.Reportf
* Remove strings.ToLower for checking init method name
* Add exclusion for herumi init
* Move api/client/beacon template function to init and its own file
* Fix nopanic testcase
* Beacon flags: Comment on deprecated section
* Beacon flags: Organize flags relevant to logging, comment on logging section
* Beacon flags: Organize flags relevant to p2p, comment on p2p section
* Beacon flags: Introduce db flag section, organize flags relevant to db, comment on db section
* Beacon flags: Introduce builder flag section, organize flags relevant to builder, comment on builder section
* Beacon flags: Introduce sync flag section, organize flags relevant to sync, comment on sync section
* Beacon flags: Introduce execution layer flag section, organize flags relevant to execution layer, comment on execution layer section
* Beacon flags: Introduce monitoring flag section, organize flags relevant to monitoring, comment on monitoring section
* Beacon flags: Organizing remaining flags in cmd and beacon-chain sections
* Beacon flags: Introduce slasher flag section, organize flags relevant to slasher, comment on slasher section
* Move slasher flag from features to the slasher section
* Changelog fragment
* Beacon flags: Reorganize sections
* Move MaxGoroutines to debug section
* EIP-7549: slasher
* update chunks and detection
* update tests
* encode+decode
* timer
* test fixes
* testing the timer
* Decouple pool from service
* update mock
* cleanup
* make review easier
* comments and changelog
* 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
* 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
* sse implementation that sheds stuck clients
* Radek and James feedback
* Refactor event streamer code for readability
* less-flaky test signaling
* test case where queue fills; fixes
* add changelog entry
* james and preston feedback
* swap our Subscription interface with an alias
* event.Data can be nil for the payload attr event
* deepsource
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* wip passing e2e
* reverting temp comment
* remove unneeded comments
* fixing merge errors
* fixing more bugs from merge
* fixing test
* WIP moving code around and fixing tests
* unused linting
* gaz
* temp removing these tests as we need placeholder/wrapper APIs for them with the removal of the gateway
* attempting to remove dependencies to gRPC gateway , 1 mroe left in deps.bzl
* renaming flags and other gateway services to http
* goimport
* fixing deepsource
* git mv
* Update validator/package/validator.yaml
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update validator/package/validator.yaml
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* addressing feedback
* missed lint
* renaming import
* reversal based on feedback
* fixing web ui registration
* don't require mux handler
* gaz
* removing gRPC service from validator completely, merged with http service, renames are a work in progress
* updating go.sum
* linting
* trailing white space
* realized there was more cleanup i could do with code reuse
* adding wrapper for routes
* reverting version
* fixing dependencies from merging develop
* gaz
* fixing unit test
* fixing dependencies
* reverting unit test
* fixing conflict
* updating change log
* Update log.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* gaz
* Update api/server/httprest/server.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* addressing some feedback
* forgot to remove deprecated flag in usage
* gofmt
* fixing test
* fixing deepsource issue
* moving deprecated flag and adding timeout handler
* missed removal of a flag
* fixing test:
* Update CHANGELOG.md
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* addressing feedback
* updating comments based on feedback
* removing unused field for now, we can add it back in if we need to use the option
* removing unused struct
* changing api-timeout flag based on feedback
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>