Preston Van Loon
a91f2688f1
Set test timeout on //beacon-chain/rpc/validator:go_default_test. Sometimes exceeds 800s otherwise ( #8752 )
2021-04-13 00:24:04 +00:00
terence tsao
1c1bf37b33
Refactor EligibleForRewards into its own helper ( #8739 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-12 20:26:08 +00:00
terence tsao
74cf2320ad
Altair: Split no verify functions in own file ( #8747 )
...
* Split transition no verify functions in its own file
* Remove redeclared functions
* Go fmt
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-12 16:42:08 +00:00
terence tsao
2a1c880673
Altair: Split state getters and setters into its own file ( #8746 )
...
* Categorize getters and setters into its own file
* Go fmt
2021-04-12 14:23:55 +00:00
terence tsao
19a9b4b064
Refactor finality helpers to helpers pkg ( #8734 )
...
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-04-10 16:12:52 +00:00
Victor Farazdagi
0808c02c65
Update spec comments ( #8727 )
2021-04-08 19:33:54 +00:00
Victor Farazdagi
76390c94af
Refactor ProcessFinalUpdates(), per updated specs ( #8724 )
2021-04-08 14:20:52 +00:00
Victor Farazdagi
74d0134ee3
Weak subjectivity minor refactoring ( #8715 )
...
* Add IsWithinWeakSubjectivityPeriod helper method
* Add LatestWeakSubjectivityEpoch method
* ParseWeakSubjectivityInputString helper
* switch to Checkpoint
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-06 14:32:49 +00:00
Victor Farazdagi
91df0112c7
Add LatestWeakSubjectivityEpoch() method ( #8707 )
...
* Add IsWithinWeakSubjectivityPeriod helper method
* Add LatestWeakSubjectivityEpoch method
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-06 09:08:44 +03:00
terence tsao
7998348bcb
Fix deep source complains ( #8714 )
2021-04-05 23:04:26 +00:00
Victor Farazdagi
dfe5372db5
Add IsWithinWeakSubjectivityPeriod helper method ( #8706 )
...
* Add IsWithinWeakSubjectivityPeriod helper method
* Nishant's suggestion on cache reset
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-05 18:26:31 +00:00
terence tsao
f2f509be0e
Block deposit: refactor batch verify and validation activation ( #8698 )
...
* Block deposit: refactor batch verify and validation activation
* Return beacon state
* Return nil
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-05 16:49:17 +00:00
terence tsao
01eb77c834
ProcessPreGenesisDeposits: Remove context.TODO() usage ( #8705 )
...
* ProcessPreGenesisDeposits: Remove context.TODO() usage
* apply #8704 change
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-05 15:07:56 +00:00
terence tsao
1c6c058bba
Genesis beacon state: refactor update eth1 data ( #8704 )
2021-04-03 23:19:48 +02:00
terence tsao
528cd89616
Move chainheads to blockchain pkg ( #8700 )
...
* Move chainheads to block chain's head info
* Fix mock
2021-04-03 11:25:25 +00:00
terence tsao
f67228bacb
Change ProcessDeposits
argument to use deposits
( #8696 )
2021-04-02 14:48:41 +00:00
Nishant Das
af3d3e8cd3
Update Gossip Parameters ( #8683 )
...
* add in more accurate aggregate parameters
* add more param changes
* more cleanup
* fix order of operations
* comments
* remove redundant declaration
* clean up better
* fix up
* victor's review
* disable mesh scoring
* disable mesh scoring
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-04-02 20:21:19 +08:00
Victor Farazdagi
acf17f9b82
Weak subjectivity period calculating helper ( #8695 )
...
* move helpers to their own file
* implement ComputeWeakSubjectivityCheckptEpoch
* remove helper func
* fix unit tests
* rename
2021-04-01 22:50:04 +00:00
Radosław Kapka
f822f0436e
Break long lines in beacon chain package ( #8686 )
...
* Break long lines in beacon chain package
* change log formatting
* Revert "change log formatting"
This reverts commit b610fd67edbf4f9f095f0336e313376e4472d50a.
* Revert "Break long lines in beacon chain package"
This reverts commit 53215fdcde0ad5cbed5c9e0616979e3ae396322c.
* wrap lines over 160
* revert go.mod and go.sum
2021-03-30 11:24:46 +00:00
Potuz
0b06c48ed0
Fix typo in comment for LoadGenesis ( #8685 )
2021-03-30 00:45:14 +00:00
Radosław Kapka
190d862552
Implement GetBeaconState in the debug API ( #8631 )
...
* Return status.Errorf instead of plain errors from gRPC functions
* return plain errors from helper functions
* change errors to lowercase in node
* correct test expectations
* extracted StateFetcher
* StateFetcher tests
* extract beacon state creation option and fix state tests
* add comment to StateFetcher
* register the server
* implement grpc function
* test ToProto
* gRPC function test with mock state fetcher
* reduce visibility of packages
* add missing error assertion
* removed unused code
* overwrite config name
* gzl
* Fix service fields
* rename StateFetcher to Provider
* Update beacon-chain/state/stateV0/state_trie.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* adjust code to new v0 interfaces
* interface/struct naming changes
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-29 21:04:35 +00:00
terence tsao
a8ab279cb8
Protoarray: add ChainHeads ( #8684 )
...
* Add ChainHeads
* Add only has bestChild case
* Update beacon-chain/forkchoice/protoarray/store.go
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-29 17:40:38 +00:00
Victor Farazdagi
feeb59de23
Add a separate unit test for ComputeDomainAndSign ( #8600 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-29 15:26:50 +00:00
terence tsao
2ec3f79146
Remove unused interface ( #8682 )
2021-03-28 22:53:34 +02:00
Nishant Das
4886a4e749
Add Remaining Gossip Scoring Topics ( #8678 )
...
* add for topics
* Apply suggestions from code review
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-03-28 09:37:25 +08:00
Victor Farazdagi
54cf5f3c7a
Add connectivity E2E test ( #8607 )
...
* Add connectivity e2e test
* randomized backoff period on discovery
* fix signature
* gazelle
* deterministic randg
* define ComponentRunner
* update ETH1 node
* extrace BootNode
* add logger
* remove refs to t
* gazelle
* update BeaconNode
* parametrize tests
* update log formatting
* update ValidatorNode
* remove redundant test id from params
* decrease delta
* move BootNode
* update BootNode
* revert params
* update SlasherNode
* mask unused param
* update helpers
* update test runner
* go mod tidy
* remove unused fields
* re-arrange tests
* extract sync into its own method
* gazelle
* BeaconNode
* types/types.go
* BootNode
* gofmt
* remove unused argument
* remove redundant comment
* add deprecation comment
* types comment
* remove deprecated method
* BeaconNodes -> BeaconNodeSet
* make sure that slasher is required component
* update StartBeaconNodeSet() and StartValidatorNodeSet()
* update SlasherNodeSet
* gazelle
* update connectivity tests
* Nishant's suggestion
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-27 00:33:50 +00:00
terence tsao
5f2f53a0a6
Harden beacon state interface for Altair ( #8673 )
...
* State: clean up
* Add error to return signature
* Remove SetCurrentEpochAttestations and SetPreviousEpochAttestations
* Fix tests
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-26 18:15:03 +00:00
Nishant Das
7f0c92504f
Add DB To P2P Service ( #8676 )
...
* add files
* goimports
2021-03-26 09:51:58 -05:00
Preston Van Loon
5d12cc1ded
Add beaconState RotateAttestations API method ( #8669 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-25 22:05:15 +00:00
Raul Jordan
82f25bacf2
Fix All Deep Source Shell Issues and Go Issues ( #8661 )
...
* most issues resolved
* fuzz wrapper fixes
* more deepsource
* more shell
* export
* shell
* combine func params, fix go deep source issues
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-24 19:57:27 +00:00
Potuz
9cb4eafad4
Change early exit error message ( #8657 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-24 11:17:52 -05:00
Radosław Kapka
2fe50c5edd
Rename state_fetcher.go ( #8646 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-24 09:08:39 +00:00
Radosław Kapka
3e92ae0f48
Use context timeout during gateway service shutdown ( #8644 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-24 05:00:47 +00:00
Radosław Kapka
c112d27ab5
Extract filling testutil's beacon chain root ( #8645 )
...
* Extract filling testutil's beacon chain root
* gzl
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-24 03:47:36 +00:00
terence tsao
a539e3d66e
Move handleValidatorSlice
and handleByteArrays
to stateutil pkg ( #8653 )
...
* State: clean up
* Share handleArray and handleValdiator root functions
2021-03-24 01:59:23 +00:00
terence tsao
446029c1ba
State: rename a few things ( #8650 )
...
* State: clean up
* Rename to Uint64ListRootWithRegistryLimit
* Gazelle
2021-03-23 21:17:09 +00:00
Nishant Das
fba56df765
Fix Powchain Genesis ( #8647 )
...
* fix powchain genesis
* Setup test with a deposit cache
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-03-23 16:44:57 +00:00
Radosław Kapka
8281634131
Introduce API StateFetcher ( #8639 )
...
* Return status.Errorf instead of plain errors from gRPC functions
* return plain errors from helper functions
* change errors to lowercase in node
* correct test expectations
* extracted StateFetcher
* StateFetcher tests
* extract beacon state creation option and fix state tests
* add comment to StateFetcher
* remove empty line
* overwrite config name
* fix field names
* remove FillRootsNaturalOpt helper
* reduce statefetcher package visibility
* gzl
* add missing error assertion
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-22 15:19:38 +00:00
Nishant Das
b346cde919
fix deduplication ( #8640 )
2021-03-22 07:07:58 -07:00
kevlu93
eca67cec4c
Embed Config Pattern for Sync Services ( #8636 )
...
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-21 19:07:42 +00:00
kevlu93
4a64d4d133
Embed Config Pattern For Attestation, POW Chain, and RPC Services ( #8635 )
2021-03-21 16:58:41 +00:00
terence tsao
9421ac13d8
State: various clean up ( #8633 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-19 20:03:19 +00:00
terence tsao
799a4d80cd
State: refactor common root functions ( #8630 )
2021-03-18 16:29:06 -07:00
Preston Van Loon
e477fdfd6d
Embedded mainnet genesis state + load genesis.ssz from file ( #8614 )
...
* Update rules_go and fix proto conflicts
* gaz
* Update generated code
* First pass inclusion of using baked states
* more emptypb fixes
* remove testnet genesis files, only embed mainnet
* Refactoring for SaveGenesisData, fix tests that use mainnet config but do not support mainnet genesis values
* a bit more refactoring, load genesis from a file. Needs tests still
* Add method to ensure an embedded genesis file also has the appropriate genesis block
* gofmt
* more clear error
* Check genesis fork version to ensure testnet config matches genesis file
* viz
* test for SaveGenesisData
* More genesis db method tests
* Merge
* Minor tweaks, lint, fmt, etc
* Add more test to genesis db methods
* Revert beacon-chain/state/stateV0/BUILD.bazel
* Update beacon-chain/db/iface/errors.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* PR feedback
* Update beacon-chain/db/kv/genesis.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* fmt.Errorf works better for nil errors
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-18 21:00:00 +00:00
Nishant Das
693ce7b952
Mask All Debug Logs for Endpoints ( #8624 )
2021-03-18 09:13:01 +00:00
terence tsao
ce725ceec3
Move state pkg to stateV0 pkg ( #8620 )
...
* Move state pkg to stateV0 pkg
* Build.bazel
* Remove unused RootsArrayHashTreeRoot
* Revert "Remove unused RootsArrayHashTreeRoot"
This reverts commit bf0bda30d1a8eb7a071f6e3ce9ee85041b45aca6.
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-17 19:49:49 +00:00
kevlu93
ecf25d1284
Embed Config Pattern For Blockchain Service and Update Dependency Names Accordingly ( #8618 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-17 13:36:56 -05:00
Radosław Kapka
0a73be7389
Return status.Errorf instead of plain errors from gRPC functions ( #8619 )
...
* Return status.Errorf instead of plain errors from gRPC functions
* return plain errors from helper functions
* change errors to lowercase in node
* correct test expectations
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-17 16:47:44 +00:00
terence tsao
7b16601399
State: Return interface{} for pb related methods ( #8617 )
...
* Return interface{} instead of *pbp2p.BeaconState
* Comment
2021-03-16 22:26:17 -05:00
terence tsao
50e99fb6c1
State: Move compute field roots functions next to implementation ( #8615 )
2021-03-16 11:14:26 -07:00