Preston Van Loon
2fd6bd8150
Add golang.org/x/tools modernize static analyzer and fix violations ( #15946 )
...
* Ran gopls modernize to fix everything
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
* Override rules_go provided dependency for golang.org/x/tools to v0.38.0.
To update this, checked out rules_go, then ran `bazel run //go/tools/releaser -- upgrade-dep -mirror=false org_golang_x_tools` and copied the patches.
* Fix buildtag violations and ignore buildtag violations in external
* Introduce modernize analyzer package.
* Add modernize "any" analyzer.
* Fix violations of any analyzer
* Add modernize "appendclipped" analyzer.
* Fix violations of appendclipped
* Add modernize "bloop" analyzer.
* Add modernize "fmtappendf" analyzer.
* Add modernize "forvar" analyzer.
* Add modernize "mapsloop" analyzer.
* Add modernize "minmax" analyzer.
* Fix violations of minmax analyzer
* Add modernize "omitzero" analyzer.
* Add modernize "rangeint" analyzer.
* Fix violations of rangeint.
* Add modernize "reflecttypefor" analyzer.
* Fix violations of reflecttypefor analyzer.
* Add modernize "slicescontains" analyzer.
* Add modernize "slicessort" analyzer.
* Add modernize "slicesdelete" analyzer. This is disabled by default for now. See https://go.dev/issue/73686 .
* Add modernize "stringscutprefix" analyzer.
* Add modernize "stringsbuilder" analyzer.
* Fix violations of stringsbuilder analyzer.
* Add modernize "stringsseq" analyzer.
* Add modernize "testingcontext" analyzer.
* Add modernize "waitgroup" analyzer.
* Changelog fragment
* gofmt
* gazelle
* Add modernize "newexpr" analyzer.
* Disable newexpr until go1.26
* Add more details in WORKSPACE on how to update the override
* @nalepae feedback on min()
* gofmt
* Fix violations of forvar
2025-11-14 01:27:22 +00:00
Bastin
92bd211e4d
upgrade v6 to v7 ( #15989 )
...
* upgrade v6 to v7
* changelog
* update-go-ssz
2025-11-06 16:16:23 +00:00
terence
d0f5253b8d
Update go-bitfield from prysmaticlabs to OffchainLabs ( #15968 )
2025-11-03 23:59:03 +00:00
kasey
3da40ecd9c
Refactor fork schedules ( #15490 )
...
* overhaul fork schedule management for bpos
* Unify log
* Radek's comments
* Use arg config to determine previous epoch, with regression test
* Remove unnecessary NewClock. @potuz feedback
* Continuation of previous commit: Remove unnecessary NewClock. @potuz feedback
* Remove VerifyBlockHeaderSignatureUsingCurrentFork
* cosmetic changes
* Remove unnecessary copy. entryWithForkDigest passes by value, not by pointer so it shold be fine
* Reuse ErrInvalidTopic from p2p package
* Unskip TestServer_GetBeaconConfig
* Resolve TODO about forkwatcher in local mode
* remove Copy()
---------
Co-authored-by: Kasey <kasey@users.noreply.github.com >
Co-authored-by: terence tsao <terence@prysmaticlabs.com >
Co-authored-by: rkapka <radoslaw.kapka@gmail.com >
Co-authored-by: Preston Van Loon <preston@pvl.dev >
2025-08-11 16:08:53 +00:00
Manu NALEPA
149e220b61
Validator custody: Update to the latest specification. ( #15532 )
...
* Validator custody: Update to the latest specfication.
* Update beacon-chain/blockchain/process_block.go
Co-authored-by: terence <terence@prysmaticlabs.com >
* Fix James' comment.
* Fix James' comment.
* Fix James' comment.
---------
Co-authored-by: terence <terence@prysmaticlabs.com >
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2025-08-02 06:21:08 +00:00
Preston Van Loon
499d27b6ae
Use time.Time instead of uint64 for genesis time ( #15419 )
...
* 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 >
2025-07-14 21:04:50 +00:00
terence
774b9a7159
Migrate Prysm repo to Offchain Labs organization ahead of Pectra V6 ( #15140 )
...
* 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
2025-04-10 15:40:39 +00:00
Preston Van Loon
2aa52fb56a
Add static analyzer to discourage use of panic() ( #15075 )
...
* 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
2025-03-19 18:04:15 +00:00
terence
5c24978702
Add hoodi testnet flag ( #15057 )
...
* Add hoodi testnet flag
* Add upstream test
* Fix test
2025-03-17 05:49:27 +00:00
Sammy Rosso
170a864239
Otel migration ( #14424 )
...
* remove opencensus
* gaz
* update dependencies
* add missing dependencies
* fix test?
* Fix note relevance
* add otel http transport middleware
* gaz
* tidy up
* gaz
* changelog
* feedback
* gaz
* fix merge issues
2024-09-12 23:00:20 +00:00
Nishant Das
2f42f7e313
Add a Tracing Wrapper Package ( #14207 )
...
* Adds a wrapper package
* Gazelle
* Add in Empty Span
* Revert It Back
* Add back reference
* Set It As Empty
* fix missing import
* remove redundant alias
* remove unused
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
Co-authored-by: Saolyn <sammy@rosso.red >
2024-08-27 20:00:53 +00:00
Khanh Hoa
7a394062e1
refactor: enable errorlint and refactor code ( #14110 )
...
* refactor: enable errorlint and refactor code
* revert
* revert
* add bazel
* gofmt
* gofmt
* gofmt
* gofmt
* gci
* lint
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-07-04 22:40:13 +00:00
Manu NALEPA
be1bfcce63
P2P: Add QUIC support ( #13786 )
...
* (Unrelated) DoppelGanger: Improve message.
* `beacon-blocks-by-range`: Add `--network` option.
* `ensurePeerConnections`: Remove capital letter in error message.
* `MultiAddressBuilder{WithID}`: Refactor.
* `buildOptions`: Improve log.
* `NewService`: Bubbles up errors.
* `tcp` ==> `libp2ptcp`
* `multiAddressBuilderWithID`: Add the ability to build QUIC multiaddr
* `p2p Start`: Fix error message.
* `p2p`: Add QUIC support.
* Status: Implement `{Inbound,Outbound}Connected{TCP,QUIC}`.
* Logging: Display the number of TCP/QUIC connected peers.
* P2P: Implement `{Inbound,Outbound}ConnectedWithProtocol`.
* Hide QUIC protocol behind the `--enable-quic` feature flag.
* `e2e`: Add `--enable-quic` flag.
* Add `--enable-quic` in `devModeFlag`.
* `convertToMultiAddrs` ==> `retrieveMultiAddrsFromNode`.
* `convertToAddrInfo`: Ensure `len(infos) == 1`.
2024-04-04 12:21:35 +00:00
terence
5a66807989
Update to V5 ( #13622 )
...
* 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 >
2024-02-15 05:46:47 +00:00
Nishant Das
233f4d99a2
Update Libp2p To v0.32.1 and Go to v1.21.5 ( #13304 )
...
* update libp2p
* fix tests
* fix tests
* fix build
* update to go v1.21
* workflow
* workflow again
* update ci
* update golangci
* disable quic
2023-12-21 16:09:54 +00:00
Nishant Das
bc125a95ae
Set Verbosity of Goodbye Logs to Trace ( #13077 )
2023-10-19 03:49:34 +00:00
terencechain
35fc1c976f
Improved Logging for Blob Sidecar ( #12883 )
...
* feat: improve blob sidecar logs
* Kasey's feedback
2023-09-11 20:46:06 +00:00
terencechain
95106a7533
feat(prysmctl): request blobs ( #12544 )
2023-08-31 08:41:57 -05:00
Radosław Kapka
abc81e6dde
Merge all block unblinding code into a single unblinder struct ( #12240 )
...
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2023-05-23 11:38:52 +02:00
Radosław Kapka
328e6fb074
Move some errors to separate consensus-types package ( #12329 )
...
* move `ErrNilObjectWrapped` to separate package
* build fix
* move not supported
---------
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-04-25 15:07:24 +00:00
Justin Traglia
8428a79971
Enable whitespace linter & fix findings ( #12273 )
...
* Enable whitespace linter & fix findings
* Fix new finding
* fix new violation
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2023-04-18 18:58:27 +00:00
terencechain
d17996f8b0
Update to V4 🚀 ( #12134 )
...
* Update V3 from V4
* Fix build v3 -> v4
* Update ssz
* Update beacon_chain.pb.go
* Fix formatter import
* Update update-mockgen.sh comment to v4
* Fix conflicts. Pass build and tests
* Fix test
2023-03-17 18:52:56 +00:00
Nishant Das
4f38ba38b7
Update Libp2p ( #12096 )
...
* update deps
* add preston's fix
* fix build
* gaz
* test fixes
2023-03-08 23:52:51 +08:00
Radosław Kapka
77d3ccb9ad
Clean up state types ( #11916 )
...
* Clean up state types
* rename package
2023-01-26 14:40:12 +00:00
james-prysm
043079dafe
Adding exit codes to cli commands ( #11735 )
...
* adding exit codes to cmd
* adding in fatal logs to other cli actions
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2022-12-13 12:13:33 +00:00
Preston Van Loon
6bea17cb54
Update libp2p to support go 1.19 ( #11309 )
...
* Update libp2p to support go 1.19
* gaz
* go mod tidy
* Only update the minimum deps
* go mod tidy
* revert .bazelrc
* Update go-libp2p to v0.22.0 and update import paths (#11440 )
* Fix import paths
* Fix go-libp2p-peerstore import
* Bazel updates
* fix
* revert some comments changes
* revert some comment stuff
* fix dependency issues
* vendor problematic library
* use your brain
* remove
* tests
Co-authored-by: Marco Munizaga <marco@marcopolo.io >
Co-authored-by: Nishant Das <nishdas93@gmail.com >
2022-10-07 15:24:51 +08:00
Raul Jordan
100ca0ebaf
Prysmctl Command to Request Beacon Nodes for Block Ranges Over P2P ( #11035 )
...
* first
* attempt p2p connect send tool
* attempt
* stream registration
* trying to register
* attempt
* workinnnn
* begin
* p2p prysmctl tool
* ignore
* fix
* delete deprecated
* p2p smaller iface surface area
* further p2p refactor
* gaz
* better logging
* process
* all functionality
* fix up
* rhandle
* v2 req
* cmd
* send sub
* v1 handle
* show head slot
* cmd
* cmd lib
* gazelle fix
* bazel
* gaz
* work on the handshake items
* prevent dial to self
* add config awareness
* gaz
* inferring host addrs from p2p
* initialize data mappings
* add own mock
* fix up logic
* gaz
* add img
* gaz
* add images
* builds
* builds
* nishant feedback:
Co-authored-by: Nishant Das <nishdas93@gmail.com >
2022-08-17 06:38:57 +00:00