Håvard Anda Estensen
7f3ec4221f
Add errcheck and gosimple linters ( #9729 )
...
* Add errcheck linter
* Check unchecked error
* Add gosimple linter
* Remove type assertion to same type
* Omit nil check
len() for nil slices is defined as zero
* Revert "Remove type assertion to same type"
This reverts commit af69ca1ac8a4f0243a5ccaf5042dbebad6d2cf1c.
* Revert "Revert "Remove type assertion to same type""
This reverts commit 5fe8931504fa22347d04d3d06558e5f478f5bf50.
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-10-22 17:40:03 -05:00
terence tsao
a80b1c252a
Refactor rpc proposer into smaller files ( #9796 )
...
* Refactor rpc proposer into smaller files
* Update BUILD.bazel
* Fix test
* Update BUILD.bazel
2021-10-18 11:35:32 -05:00
Nishant Das
bfcb113f78
Fix Doppelganger Protection ( #9748 )
...
* add fix
* fix tests
* Update beacon-chain/rpc/prysm/v1alpha1/validator/status.go
* fix tests
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-10-18 13:09:14 +00:00
Nishant Das
65d2df4609
Add in Stronger Length Checks ( #9758 )
...
* add changes
* radek's review
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-10-08 17:41:36 +00:00
terence tsao
e7085897ad
Use BLS signature length config value ( #9746 )
...
* Use `BeaconConfig().BLSSignatureLength`
* Update BUILD.bazel
* Fix build
* Update BUILD.bazel
2021-10-07 10:37:53 -05:00
Mohamed Zahoor
362dfa691a
GetBlock() - Simple optimisations ( #9541 )
...
* GetBlock() optimizations
* addressed preston's comments
* fix fmt
* added benchmarks
* fix deepsource
* merge fix
* remove unnesesary check
* fixed terence's comments
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-10-05 17:28:02 +08:00
Håvard Anda Estensen
b793d6258f
Add Golangci-lint to GitHub Actions and add Deadcode linter ( #9597 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-10-04 13:06:21 +02:00
terence tsao
c21e43e4c5
Refactor: move functions beacon-chain/core/time
-> time/slots
( #9719 )
...
* Move necessary functions beacon-chain/core/time -> time/slots
* Fix fuzz
* Fix build
* Update slot_epoch.go
2021-10-01 15:17:57 -05:00
terence tsao
8219af46e4
Move slot epoch from core to time pkg ( #9714 )
...
* Move slot epoch from core to time pkg
* Fix fuzz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-30 19:00:14 +00:00
Raul Jordan
7dae66afc9
Highest Attestations Endpoint for Optimized Slasher ( #9706 )
...
* begin highest atts
* highest atts
* deep source
2021-09-29 21:33:28 -05:00
Preston Van Loon
520bc9d955
Update validator reporting logs and metrics for Altair ( #9589 )
...
* Mark fields as deprecated due to Altair
* Only print inclusion distance fields before Altair fork
* Report phase0 and altair metrics respectively
* only set phase0 fields in phase0, only set altair fields in altair
* better use of fields
* Update go pbs
* Update individual votes method
* regen go proto files
* formatting
* Feedback from @potuz
* Annotate metrics per @potuz suggestion
* Set previous release e2e to end 1 epoch before altair. Add some out of bounds checks for validator metrics reporting and a panic catch
* gofmt
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-29 20:49:58 +00:00
Raul Jordan
df33ce3309
Remaining Slasher Beacon Node Changes ( #9701 )
...
* slasher beacon node changes
* remaining beacon node items
* moar changes
* gaz
* flag fix
* rem slashable
* builds
* imports
* fix up
* pruning faster test
* deepsource
* fix wrong item
* node node feature flags
* broken test
* preston review
* more preston comments
* comment
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-29 18:17:37 +00:00
Nishant Das
0edb3b9e65
Flatten Attestation Packing ( #9683 )
...
* flatten attestation packing
* dedup again
* terence's review
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-09-29 01:56:55 +00:00
terence tsao
806bcf1d29
Clean up unused types & function comments ( #9691 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-28 21:21:07 +00:00
Preston Van Loon
ee0a453b7b
core: refactor signing and domain methods from helper to core/signing pkg ( #9520 )
...
* Move domain function and all signing root functions from beacon-chain/core/helpers to beacon-chain/core
* @terencechain suggestion to put these methods under core/signing
2021-09-27 16:19:20 +00:00
Radosław Kapka
3e640fe79f
Remove unused Eth1Data-related code from the proposer ( #9670 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-27 14:29:41 +00:00
terence tsao
376d248c22
Add in progress handler to committee cache ( #9664 )
...
* Add in progress handler for committee cache
* Remove debug print
* Update validators.go
* Fix all the tests
* More tests
* Update committee_disabled.go
* Update committee_disabled.go
* Update testing util
* Update main.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-09-26 23:27:57 +08:00
terence tsao
ea9ceeff03
Various clean up before v2 ( #9672 )
...
* Update package names
* Various clean up
* Gazelle
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-24 17:42:16 +00:00
Radosław Kapka
78ea402d9d
Correct the semantics of startEpoch
calculation in registerSyncSubnet
( #9671 )
2021-09-24 16:02:55 +00:00
Raul Jordan
a9a4bb9163
Move Shared/Testutil into Testing ( #9659 )
...
* move testutil
* util pkg
* build
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-23 18:53:46 +00:00
Raul Jordan
29513c804c
Create Encoding Bytesutil ( #9658 )
...
* bytesutil
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-23 15:23:37 +00:00
Radosław Kapka
8d4cdde07e
Clean up code in Eth API ( #9650 )
...
* typo fix
* code cleanup
* fix spans
* move state convertion to migration package
* add migration package to v1 visibility
2021-09-22 17:59:06 +00:00
Raul Jordan
191bce3655
Add True Eth2 Deposit Contract, Bytecode, ABI ( #9637 )
...
* solidity contract, abi, and deposit util
* gaz
* gaz
* drain contract remove
* build
* fix up deploy
* add readme
* fix e2e
* revert
* revert flag
* fix
* revert test flag
* fix broken test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-22 17:27:13 +00:00
terence tsao
f52f737d2b
Review Altair core epoch files with changes ( #9556 )
...
* Clean up core epoch for Altair
* Update BUILD.bazel
* Remove check for spec test
* Update validators_test.go
* Update validators_test.go
* Update beacon-chain/core/altair/epoch_precompute.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/core/altair/epoch_precompute_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/core/altair/epoch_spec.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-22 15:07:05 +00:00
Raul Jordan
f3d6dbcc1e
Move Shared/Params Into Config/Params ( #9642 )
...
* config params into pkg
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-21 19:59:25 +00:00
Raul Jordan
eebcd52ee6
Miscellaneous Packages from Shared Into Proper Folders ( #9638 )
...
* slashutil
* builds
* interop
* viz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-21 18:11:16 +00:00
deepsource-autofix[bot]
531f05d30d
Unused parameter should be replaced by underscore ( #9632 )
...
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-09-20 20:51:59 +00:00
terence tsao
161a13ac09
Correctly filter sync committee message at period boundary ( #9626 )
...
* Add head sync committee indices with slot consideration
* Apply rpc
* Apply sync
* Update tests
* Update mock.go
* Update sync_committee_test.go
* Update validator_test.go
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-20 18:06:43 +00:00
terence tsao
2ba29a3cfc
Move block and attestation to proto v1alpha1 folder ( #9618 )
...
* Add block and attestation to container pkg
* Move aggregation into attestation
* Update attestation_test.go
* Move them to proto
* Gazelle
* fix cycle
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-09-20 16:17:03 +00:00
Raul Jordan
11a1f681e0
Move Shared Packages Into Async/ ( #9620 )
...
* async packages
* change pkg
* build
* working
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-18 17:26:11 +00:00
Raul Jordan
7dadc780b8
Move Shared Packages into Math/ and IO/ ( #9622 )
...
* amend
* building
* build
* userprompt
* imports
* build val
* gaz
* io file
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-17 21:55:24 +00:00
Raul Jordan
d2f74615ab
Move Miscellaneous Shared/ Packages Into Semantic Groups ( #9624 )
...
* remove shared network and ip util
* forkutil
* gaz
* build
* gaz
* nogo
* genrule
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-17 19:20:50 +00:00
Raul Jordan
8f0008c45a
Move Related Packages Into API/ Pkg ( #9619 )
...
* begin on api pkg
* build
* build
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-16 19:55:51 +00:00
Raul Jordan
23e2d62c0c
Create Container Package for Shared/ Subpackages ( #9607 )
...
* ensure run
* amend
* fix initial sync test target
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-16 12:05:58 -05:00
Raul Jordan
495e92ce9f
Create Runtime Package for Moving Several Packages in Shared/ ( #9588 )
...
* add maxprocs
* add prereqs
* add tos and version pkg
* add in all runtime packages
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-16 09:46:29 +00:00
terence tsao
ee5d75732d
Add pkg crypto ( #9603 )
...
* Add pkg crypto
* Update go.yml
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-15 22:55:11 +00:00
Nishant Das
34391fa780
Implement Batch Verifier For Pubsub Objects ( #9344 )
...
* add initial commit
* add aggregates in
* fmt
* add new changes
* gaz
* fix copy
* terence's review
* fix broken build
2021-09-15 05:49:50 +00:00
terence tsao
31a78ab22a
Create config package for Shared/featureconfig ( #9593 )
...
* add config/features
* Gazelle
* Gazelle
* Fix build
* Go mod tidy
* active cache
Co-authored-by: rauljordan <raul@prysmaticlabs.com>
2021-09-15 01:18:39 +00:00
terence tsao
3e71997290
Create time Package for Shared/timeutil, mclock and slotutil ( #9594 )
...
* add time pkg
* Go fmt
2021-09-15 00:09:04 +00:00
Raul Jordan
9935ca3733
Move Shared/ Subpackages Into Monitoring/ Folder ( #9591 )
...
* add tracing
* monitoring pkg
* move prom
* Add client stats
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-14 20:59:51 +00:00
Radosław Kapka
cb9c1ad0fe
Implement Semi-Generic GetBeaconBlock
RPC Endpoint for Pre & Post-Fork Blocks ( #9517 )
...
* BuildBlockData
* GetBlockAlatair
* build file
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go
* review comments
* add alias
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* add get block test
* comment
* implement get beacon block
* commentary
* test setup issues
* Use correct genesis state
* test renames
* pass
* rem commented code
* ctx unused
* proper grpc errors
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-09-09 05:26:49 +00:00
Raul Jordan
83a9079700
Implement Generic ProposeBeaconBlock Function for RPC ( #9549 )
...
* add in generic propose block method
* propose generic with tests
* ineff assign issue
2021-09-08 18:54:04 +00:00
terence tsao
7c45c5f8cd
More misc altair changes ( #9547 )
...
* More altair changes
* Gazelle
2021-09-08 17:52:37 +00:00
Preston Van Loon
b586d3784b
Rename beacon-chain/core/state to beacon-chain/core/transition pkg ( #9530 )
...
* Move, refactor, fix
* @rkapka PR feedback: revert irrelevant changes
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-08 10:41:47 +00:00
Raul Jordan
d210dd7691
Maintainable Beacon Block API Endpoints ( #9528 )
...
* add new proto endpoints and deprecate old
* regen protos
* regen mocks
* begin fixing tests
* build tests
* e2e build
* go build
* resolve conflicts
* pass tests
* amend generated name
* fix build
* more fixes
* update gateway paths
* radek comments
* fix comment
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-07 15:17:50 +00:00
Preston Van Loon
dc71f35f4f
Remove copyutil pkg, move v1alpha1 copy methods into v1alpha1 pkg ( #9533 )
2021-09-04 06:55:57 +00:00
Preston Van Loon
4beb352e6f
Move Slot and Epoch functions from helpers to core pkg ( #9519 )
...
* Move Slot and Epoch functions from helpers to core
* limited viz
* goimports
* fix fuzz build
* fix fuzz build
* fix
* fix
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-03 20:10:31 +00:00
terence tsao
29b851a2b7
RPC: Stream altair block ( #9521 )
...
* Add tests
* Fix tests
* Fix test
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-03 19:11:40 +00:00
Radosław Kapka
e875fe3dfc
Implement ProduceSyncCommitteeContribution
in the beacon API ( #9524 )
...
* implementation
* test
* change func signature
* remove broadcaster from test
2021-09-03 09:47:35 -05:00
terence tsao
924fe20dcd
RPC: list block altair end point ( #9494 )
...
* Implement list block altair
* Dont export block container
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-02 22:21:33 +00:00