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
terence tsao
dfd2cc751c
Refactor helpers for Altair ( #9026 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-06-11 19:29:50 +00:00
Raul Jordan
6eb006175a
Capture ChainReorg, FinalizedCheckpoint, and NewHead Events in Beacon Node ( #9011 )
...
* capture missing events needed for eth2 apis
* handle underflow
* no hash tree roots
* gazelle
* static
* race tests passing
* simplify
* correctness and abstracting method for forwarding to state feed
* genesis root
* add in slotutil
2021-06-10 16:13:15 -05:00
terence tsao
8433a313f0
Enhance att sig set checks ( #8978 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-06-03 15:30:46 +08:00
Raul Jordan
5aac06f04e
Move EthereumAPIs Into Prysm ( #8968 )
...
* begin move
* use same import path
* imports
* regen protos
* regen
* no rename
* generate ssz
* gaz
* fmt
* edit build file
* imports
* modify
* remove generated files
* remove protos
* edit imports in prysm
* beacon chain all builds
* edit script
* add generated pbs
* add replace rules
* license for ethereumapis protos
* change visibility
* fmt
* update build files to gaz ignore
* use proper form
* edit imports
* wrap block
* revert scripts
* revert go mod
2021-06-02 18:49:52 -05:00
terence tsao
638e76cbd7
Sort imports ( #8959 )
2021-05-31 20:47:30 +02:00
Nishant Das
6bb3cc45ef
Add Nested Nil Checks To Wrapper ( #8951 )
...
* add checks
* fix
2021-05-27 16:07:51 +00:00
terence tsao
276d03553c
Block interface clean up ( #8947 )
2021-05-26 11:33:46 -07:00
Nishant Das
caf9bdbc6f
Use Block Interface Across Prysm ( #8918 )
...
* commit initial work
* checkpoint current work
* gaz
* checkpoint
* req/resp changes
* initial-sync
* finally works
* fix error
* fix bugs
* fix issue
* fix issues
* fix refs
* tests
* more text fixes
* more text fixes
* more text fixes
* fix tests
* fix tests
* tests
* finally fix builds
* finally
* comments
* fix fuzz
* share common library
* fix
* fix
* add in more defensive nil checks
* add in more defensive nil checks
* imports
* Apply suggestions from code review
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Apply suggestions from code review
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update shared/interfaces/block_interface.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update shared/interfaces/block_wrapper.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update shared/interfaces/block_interface.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* imports
* fix bad changes
* fix
* terence's review
* terence's review
* fmt
* Update beacon-chain/rpc/beacon/blocks.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* fix tests
* fix
* fix all tests
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-05-26 16:19:54 +00:00
Preston Van Loon
7b55213e6d
Refactor attestationDelta to reuse the sqrt value of active current epoch ( #8945 )
...
* Refactor attestationDelta to reuse the sqrt value of active current epoch
* use baseRewardsPerEpoch
2021-05-26 09:37:35 -05:00
Nishant Das
76cdbaca22
Interface Analyzer ( #8923 )
2021-05-23 21:55:42 -07:00