terence tsao
45b6a80a30
Validator: perform sync committee duties ( #9411 )
...
* Validator sync committee methods
* Gazelle
* Update visibility
* Add setupWithKey
* Refactor selection proofs
* Fix build
* Refactor compute and sign
* Fix sign request
* 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-08-24 17:33:42 +00:00
terence tsao
cd4bb6a9c8
Add altair process epoch ( #9449 )
...
* Add altair process epoch
* Verify balance
* Gaz
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-24 16:07:11 +00:00
terence tsao
6457ec17bf
Process epoch: precompute previous and finalized epoch ( #9445 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-24 01:42:05 +00:00
terence tsao
63e0a4de84
Transition: Altair process block ( #9430 )
...
* Add altair transition
* Add tests
* refactor exit into operation funcs
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-08-21 00:32:37 +00:00
terence tsao
cac1e94f04
Add altair epoch processing functions ( #9404 )
2021-08-20 16:55:42 -07:00
Radosław Kapka
af2801f215
Implement GetEpochSyncCommittees
in the beacon API ( #9434 )
...
* initial implementation
* get committee for epoch
* test
* fix failing test
# Conflicts:
# beacon-chain/rpc/prysm/v1alpha1/validator/assignments_test.go
* combine function arguments
* review feedback
* use sync committee setter
* fix failing test
* fix build
* remove bad test
* refactor for single responsibilities
* radek suggestions
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-08-20 21:32:56 +00:00
terence tsao
67c3ae0117
Add signature verification using current fork ( #9405 )
2021-08-20 07:38:35 -07:00
Raul Jordan
eac542a8ac
Change Eth2 Repository Names ( #9425 )
...
* eth2 repo name changes
* rem sha
* use consensus spec terminology and pin sha
2021-08-19 13:00:57 -05:00
Nishant Das
9f36116c2f
Update Core Helpers ( #9393 )
...
* add helpers
* naming
* remove comments
* Terence's feedback
* Revert `UpdateCommitteeCache` changes
* Update beacon-chain/core/helpers/committee.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-08-19 12:18:27 +00:00
terence tsao
d874b9140f
Optimize process attestations ( #9418 )
2021-08-18 15:41:09 -07:00
Preston Van Loon
dfd740414f
Altair: operations spectests ( #9413 )
...
* Update spectests to v1.1.0-beta.1 from hf1 branch
* fix params loading
* Altair: operations spectests
* gazelle and nosec on trusted variable inputs
* remove legacy statement from spectest/minimal/altair/operations/BUILD.bazel
2021-08-18 22:01:05 +00:00
terence tsao
61acf6f1d1
Slash validator with altair config ( #9415 )
2021-08-18 18:44:17 +00:00
Nishant Das
8e503d0980
Change Back Read-Only Validator Declaration ( #9410 )
...
* remove indirection
* fix
2021-08-18 11:59:55 +08:00
terence tsao
e3492698f8
Core: modified process attestation for Altair ( #9367 )
...
* Add epoch participation and proposer base reward helpers
* Update beacon-chain/core/altair/attestation.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Check length
* Go fmt
* Add process att
* Refactor and tests
* Update attestation.go
* Gazelle
* Under flow error message
* Update beacon-chain/core/altair/attestation.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-11 21:58:25 -05:00
terence tsao
225f9a74f6
Add epoch participation and proposer base reward helpers ( #9356 )
...
* Add epoch participation and proposer base reward helpers
* Update beacon-chain/core/altair/attestation.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Check length
* Go fmt
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-11 20:54:45 +00:00
terence tsao
d77616f705
Fixes Issues Found by Goland IDE Code Inspect ( #9368 )
...
* Ran code inspect
* Update shared/testutil/altair.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-11 20:12:22 +00:00
terence tsao
8df6854a74
Core: upgrade state to Altair ( #9349 )
...
* Add upgrade to altair
* Update BUILD.bazel
* Update beacon-chain/core/altair/upgrade.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Move getter and setter outside the loop
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-08-09 21:27:51 +00:00
terence tsao
38787353a2
Attestation: get participation status ( #9340 )
...
* Add participation flag indics matching helpers
* Gazelle
* Tests
* Update BUILD.bazel
* Update attestation.go
2021-08-09 16:35:46 +00:00
Nishant Das
170e2e115b
Fix Flaky Sync Committee Test ( #9337 )
...
* fix flake
* Update beacon-chain/core/altair/sync_committee_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-08-09 14:49:13 +00:00
terence tsao
be85b7f909
Cleanup: remove test only process block/attestation ( #9345 )
...
* Remove test only process block attestation code
* Rm fuzz process block
* Revert "Rm fuzz process block"
This reverts commit 5d1b0f0741eb1dd7489aa6998bdf8987a26e20e0.
* Still can test fuzz
* Fix return
* More unused funcs
2021-08-08 22:01:06 -05:00
terence tsao
ad048a8750
Rewards/penalties: epoch processing for Altair ( #9334 )
...
* Add epoch precompute methods
* Better name
* Bring expensive computation outside
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-08-06 20:02:35 +00:00
terence tsao
4cce4f1ee5
Refactor slash validator func's signature ( #9321 )
...
* Refactor slash validator func's signature
* Named arguments
* Update beacon-chain/core/blocks/proposer_slashing.go
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-08-06 04:06:49 +00:00
terence tsao
4d33068496
Core helper: validate sync message time ( #9325 )
...
* Add validate sync message time
* Update BUILD.bazel
2021-08-05 12:39:32 +08:00
terence tsao
6e9faa3618
Epoch: precompute functions for Altair part 1 ( #9309 )
...
* Add epoch precompute methods
* Split into part 1 for better review
* Update epoch_precompute_test.go
* Preston's feedback
* Skip if the valiator is not eligible
* Add regression test for non eligible
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-04 15:13:05 +00:00
Nishant Das
fd42cb712f
Fix Incorrect Conditional Check ( #9323 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-08-04 13:50:27 +00:00
terence tsao
461be99fac
Block: process sync aggregate ( #9308 )
...
* Add altair base reward funcs
* Update BUILD.bazel
* Add process sync aggregate
* Update BUILD.bazel
* Update block.go
* Update block_test.go
* Feedback, refactor and more tests
* Further refactor sync committee votes
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-08-03 16:14:15 +00:00
Preston Van Loon
0c1fc65604
Core/deposit: refactor blocks.ProcessDeposit for less complex altair implementation ( #9305 )
...
* Refactor blocks.ProcessDeposit to return whether or not the deposit resulted in a new validator entry.
* Only mark validator as new after successfully appending it to the state
* fix merge conflict
* fix merge conflict
* gofmt
* fix merge conflict
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-07-31 23:42:07 +00:00
terence tsao
5c36d59672
Reward: altair base reward ( #9307 )
...
* Add altair base reward funcs
* Update BUILD.bazel
* Better tests
* Update BUILD.bazel
2021-07-30 19:17:20 +00:00
terence tsao
d130bf0035
Fix more duplicated import prefix ( #9306 )
2021-07-30 18:05:38 +00:00
terence tsao
560fe69425
Core: sync committee helpers ( #9269 )
...
* Add sync committee helpers
* Create BUILD.bazel
* Update BUILD.bazel
* Update BUILD.bazel
* Fix visibility
* Preston's review
2021-07-29 23:19:32 +00:00
terence tsao
012d279663
Fix duplicated imports ( #9304 )
...
* Fix duplicated imports
* Fix metrics test
2021-07-29 16:45:17 -05:00
Raul Jordan
9145310647
Eliminate Proto V2 Namespace ( #9297 )
...
* get rid of v2 in prysm codebase
* replace block2
* builds
* terence comments
* gazelle
2021-07-28 21:23:44 +00:00
terence tsao
f16b9859e7
Test: add altair test utility ( #9287 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-07-28 17:15:23 +00:00
terence tsao
7129af5ccf
Core/deposit: altair processing methods and tests ( #9227 )
2021-07-27 12:10:08 -07:00
terence tsao
8db0c9a0e6
Move proto/interfaces -> proto/prysm/v2 ( #9270 )
...
* Move proto/interfaces -> proto/prysm
* Update paths
* Fix block2
* Update blocks_fetcher_utils.go
* Update BUILD.bazel
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-07-23 20:10:15 +00:00
Preston Van Loon
c0076cc7a2
State: move state interfaces into state package ( #9268 )
...
* Move interfaces from github.com/prysmaticlabs/prysm/beacon-chain/state/interface to github.com/prysmaticlabs/prysm/beacon-chain/state
* remove/rename state2
2021-07-23 16:11:21 +00:00
Raul Jordan
2d10bcf179
Move State Protos Into V2 Namespace ( #9257 )
...
* move state protos
* regen ssz
* edit v1 code
* fix imports
* building
* beacon chain builds
* validator and shared builds
* fuzz builds
* changes
* spectest builds
* tools build
* remove import cycle
* generate ssz
* pcli
* gaz
* kafka
* gaz
2021-07-23 08:07:40 -05:00
terence tsao
c8685d256c
Lint: add v1 as import alias ( #9250 )
...
* Add v1 as import alias
* Update helpers.go
* More
* Update skip_slot_cache_test.go
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-07-22 17:13:18 +00:00
terence tsao
9addb5f7c3
Core/epoch: sync committee period ( #9248 )
...
* Combine function parameters
* Add sync committee epoch calculations
* Update BUILD.bazel
2021-07-22 16:13:42 +00:00
Raul Jordan
6dadb80cc4
Move v1alpha1 into Prysm API namespace ( #9245 )
2021-07-21 21:34:07 +00:00
Preston Van Loon
8d1c9fe1e2
epoch/precompute: Add changes from Altair ( #9219 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-07-19 19:39:23 +00:00
Preston Van Loon
412ddbb29e
beacon-chain/state/v1: ReadOnlyValidator wrapper constructor method ( #9221 )
...
* Introduce changes from Altair hf1 branch
* go pkg viz changes
* Fix test
* goimports for some reason
* Use a more safe method of wrapping validators with regards to nil validators. Add basic tests for this wrapped validator
* Use a more safe method of wrapping validators with regards to nil validators. Add basic tests for this wrapped validator
* Panic fixes
* Fix tests
* remove nil validator test as it is no longer possible
* goimports for some reason
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-07-19 18:26:39 +00:00
terence tsao
9a4ab41761
BaseReward
test only (#9189 )
...
* Move baseward to test only
* Update BUILD.bazel
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-07-13 20:12:53 +00:00
terence tsao
6ba741f251
Calculate epoch outside of loop ( #9178 )
2021-07-12 12:35:36 -07:00
terence tsao
1d3a9983cc
Move block interface next to generated pb ( #9146 )
...
* Move block interface next to pb
* Update fuzz build bazel
* Move interface to /proto/interface and wrapper next to generated pb
* Fix fuzz build bazel
* Add //proto/eth/v1alpha1/wrapper
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-07-06 15:34:05 +00:00
Preston Van Loon
d6bd619429
Bazel: minimal test build transitions ( #9122 )
...
* Add build transitions for minimal config based tests
* respect existing gotags
* clean up import
* Add some commentary
* gaz
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: rauljordan <raul@prysmaticlabs.com>
2021-06-30 19:22:09 +00:00
Raul Jordan
b23f63a064
Beacon State V2 Interface Definition With Semantic Version Paths ( #9125 )
...
* v2 state initialize and semantic paths
* ensure build
* gaz changes to ignored build files
* gaz
2021-06-30 15:06:19 +00:00
Raul Jordan
a860648960
Reduce Usage of Eth2 Terminology in Prysm ( #9104 )
...
* remove all mentions
* more changes
* folder by folder
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-06-26 19:00:33 +00:00
terence tsao
a4be7c4a46
Testutil: Reset deposit cache internally ( #9059 )
...
* Reset testutil cache internally
* Fix import
* Fix test to correct error
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-06-18 04:05:40 +00:00
Mohamed Zahoor
e953804239
Process future Blocks and Attestations ( #8975 )
...
* queue future blocks
* process early attestations
* fix formatting
* fix testcases
* fix signature testcase and move verify slot time to original place
* Add testcases to test early blocks and slot processing
* added test case to cover failure case while inserting in block pending queue
* satisfy deepsource
* fix review comments
* remove invalid testcase
* do not queue blocks which are within MAXIMUM_GOSSIP_CLOCK_DISPARITY
* format fix
* added a helper to check of the block slot is within MAXIMUM_GOSSIP_CLOCK_DISPARITY
* add helper to check clock disparity and test case for the same
* deepsource fix
* satisfy deepsoruce
* sysc/service.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-06-17 00:17:52 +00:00