terence tsao
bc27a73600
Various code cleanups ( #8889 )
2021-05-13 08:29:14 +02:00
Nishant Das
255354f27e
Fallback For Deposit Trie Creation ( #8869 )
...
* fallback
* make it an error
* comment
* Update beacon-chain/rpc/validator/proposer.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-05-10 07:34:10 +08:00
Nishant Das
71f53d908f
Add Stricter Checks To The Deposit Cache ( #8838 )
...
* add stricter checks
* fix tests
2021-04-29 14:24:13 +02:00
Preston Van Loon
424e115331
Independent eth1 voting ( #8811 )
2021-04-24 18:32:45 -07:00
terence tsao
169cd78bbd
Refactor process operation function arguments ( #8767 )
...
* Pass slash validator func as argument
* Refactor ProcessBlockHeaderNoVerify
* Refactor Eth1Data and Randao
* Refactor ProposerSlashing
* Refactor AttesterSlashing
* Refactor VoluntaryExit
* Add VerifyNilBeaconBlock to ProcessBlock
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-04-15 13:58:54 +00:00
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
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
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
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
terence tsao
bdf2b2019b
Use beacon state interfaces across ( #8552 )
2021-03-08 14:37:33 -08:00
Victor Farazdagi
f2125e5f64
Proposer attestation selection using max-cover ( #8571 )
...
* Proposer attestation selection using max-cover
* better alisgn struct field
* more tests
* cleanup
* simplify expressions
* add benchmarks
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-08 18:46:24 +00:00
Nishant Das
067a519b37
Add Spans To Attestation Caches ( #8556 )
...
* add spans
* preston's comments
* add span
2021-03-05 09:17:27 -06:00
Radosław Kapka
4da7a7797e
Implement ListPoolProposerSlashings and ListPoolVoluntaryExits in the beacon API ( #8508 )
...
* Implement ListPoolProposerSlashings in the beacon API
* implement ListPoolAttesterSlashings
* add comments to bool arguments
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-24 15:29:25 +00:00
terence tsao
1db3c86b68
Use DeepSSZEqual to satisfy go tests ( #8499 )
...
* Use DeepSSZEqual to satisfy go tests
* New line
* New line
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-23 22:20:11 +00:00
Radosław Kapka
e40fba7679
Implement ListPoolAttesterSlashings in the beacon API ( #8492 )
...
* pool interface and mock
* implementation
* gofmt
* gzl
* Use migration package for slashing mapping
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-23 16:17:07 +01:00
terence tsao
6b82873737
Use validatorIndex
instead of validatorID
( #8498 )
...
* Use ValidtorIndex across Prysm. Build ok
* First take at fixing tests
* Clean up e2e, fuzz... etc
* Fix new lines
* Update beacon-chain/cache/proposer_indices_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/rewards_penalties.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/shuffle.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/graffiti/parse_graffiti_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Raul's feedback
* Fix downcast int -> uint64
* Victor's feedback
* Replace validator id with validator index
* Replace validator id with validator index
* Typo
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-22 19:40:58 -06:00
terence tsao
3edfa8cb88
Use Custom Type ValidatorIndex Across Prysm ( #8478 )
...
* Use ValidtorIndex across Prysm. Build ok
* First take at fixing tests
* Clean up e2e, fuzz... etc
* Fix new lines
* Update beacon-chain/cache/proposer_indices_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/rewards_penalties.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/shuffle.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/graffiti/parse_graffiti_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Raul's feedback
* Fix downcast int -> uint64
* Victor's feedback
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-23 00:14:50 +00:00
terence tsao
dc1bec79ed
Use Eth2 type CommitteeIndex ( #8477 )
...
* Use types.CommitteeIndex
* Go fmt
* Update validator pkg
* Fix e2e
* Happy fuzz tests
* Sync with upstream ethereumapi
* Go mod tidy
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-18 20:11:20 +00:00
Nishant Das
fe27ca359c
Deprecate Uneeded Flags ( #8455 )
...
* remove disable pruning flag
* deprecate disable majority vote flag
* remove eth1dataVoteCache
* remove outdated methods
* gaz
2021-02-16 15:27:37 +00:00
Victor Farazdagi
a069738c20
ETH2 Types: Slot ( #8408 )
...
* update shared/params
* update eth2-types deps
* update protobufs
* update shared/*
* fix testutil/state
* update beacon-chain/state
* update beacon-chain/db
* update tests
* fix test
* update beacon-chain/core
* update beacon-chain/blockchain
* update beacon-chain/cache
* beacon-chain/forkchoice
* update beacon-chain/operations
* update beacon-chain/p2p
* update beacon-chain/rpc
* update sync/initial-sync
* update deps
* update deps
* go fmt
* update beacon-chain/sync
* update endtoend/
* bazel build //beacon-chain - works w/o issues
* update slasher code
* udpate tools/
* update validator/
* update fastssz
* fix build
* fix test building
* update tests
* update ethereumapis deps
* fix tests
* update state/stategen
* fix build
* fix test
* add FarFutureSlot
* go imports
* Radek's suggestions
* Ivan's suggestions
* type conversions
* Nishant's suggestions
* add more tests to rpc_send_request
* fix test
* clean up
* fix conflicts
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: nisdas <nishdas93@gmail.com>
2021-02-16 07:45:34 +00:00
terence tsao
068f758f49
Code inspect - clean ups ( #8445 )
2021-02-12 17:04:45 -06:00
Victor Farazdagi
a8e501b3cf
ETH2 Types: Epoch ( #8373 )
...
* update deps
* update deps
* update protos/*
* update deps
* reset protos
* update protos
* update shared/params/config
* update protos
* update /shared
* update shared/slotutil and shared/testutil
* update beacon-chain/core/helpers
* updates beacon-chain/state
* update beacon-chain/forkchoice
* update beacon-chain/blockchain
* update beacon-chain/cache
* update beacon-chain/core
* update beacon-chain/db
* update beacon-chain/node
* update beacon-chain/p2p
* update beacon-chain/rpc
* update beacon-chain/sync
* go mod tidy
* make sure that beacon-chain build suceeds
* go fmt
* update e2e tests
* update slasher
* remove redundant alias
* update validator
* gazelle
* fix build errors in unit tests
* go fmt
* update deps
* update fuzz/BUILD.bazel
* fix unit tests
* more unit test fixes
* fix blockchain UTs
* more unit test fixes
2021-02-09 10:05:22 +00:00
terence tsao
fed65122fe
Use EnableNextSlotStateCache
few more places ( #8398 )
2021-02-08 13:11:21 -08:00
Radosław Kapka
86a9d4c6a4
Configurable testutil's BeaconState ( #8407 )
...
* Configurable testutil's BeaconState
* fix shared and fuzz tests
* return state copy
* use mainnet config values for default state
* handle error in block fuzz
* goimports
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-08 20:00:09 +00:00
Victor Farazdagi
d53fdcf781
Simplify expressions ( #8370 )
...
* Simplify expressions
* avoid escaping
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-01 15:14:36 +00:00
terence tsao
3aaa98decf
Next slot state caching ( #8357 )
...
* Add and use trailing slot state cache
* Remove comment
* Update comments
* Update comments
* Move it to background
* Warn is more appropiate
* Raul's comment
* Same strategy for proposer
* Own helper
* Minor touchups
* Tests
* Feature flag
* Gaz
2021-01-29 16:52:43 +00:00
terence tsao
d5ec248691
Rename getter functions to be idiomatic ( #8320 )
...
* Rename getter functions
* Rename new
* Radek's feedback
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-25 21:27:30 +00:00
Radosław Kapka
7842fd9da6
Replace bytes.Equal with assert.DeepEqual in tests ( #8318 )
...
* beacon chain
* format imports
* Update beacon-chain/db/kv/migration_archived_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/db/kv/migration_block_slot_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* remove unused imports
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/db/kv/migration_archived_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/db/kv/migration_block_slot_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-01-22 15:15:40 +00:00
Preston Van Loon
33e266388f
GetDuties: Refactor assignment status to deduplicate status computation ( #8313 )
2021-01-21 14:22:05 -08:00
terence tsao
5d841874f7
Return error on AttestingIndices
bitfield length check ( #8285 )
...
* Return error on committee len check
* AttestingIndices unit test
* Add equality check
* Fixing more tests
* Fix rest of the tests
* Fix invalid bit length test
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-20 03:00:52 +00:00
Radosław Kapka
f89fd67952
Better receiver names in beacon chain module ( #8286 )
2021-01-19 13:21:32 +00:00
terence tsao
daf6da5beb
Add hydrate indexed att test helper ( #8261 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-13 22:05:57 +00:00
terence tsao
eeda9f18fe
Disallow duties request where req.Epoch > current.Epoch+1 ( #8252 )
...
* Disallow request epoch to be out of bound
* Input Slot and epoch checks
* Tests
* Review feedbacks
* Unavailable error code
* Rename genesis time fetcher to time fetcher
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 23:27:37 +00:00
Radosław Kapka
5fd03f8fb0
Unify the pattern of using a package-level logger ( #8245 )
...
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-01-11 20:03:28 +00:00
terence tsao
9a1866b735
Hydrate header test helper ( #8234 )
...
* Hydrate headers and fix tests
* Gazelle
* Fix a slashing test
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-01-09 16:45:45 +00:00
terence tsao
bc650c82b4
Hydrate attestation for tests ( #8228 )
2021-01-07 21:00:21 +00:00
Victor Farazdagi
04b2e0776d
Fix import shadowing of state package ( #8191 )
...
* update shadowed var name
* update var names
* remove unnecessary delta
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-04 20:07:12 +00:00
Victor Farazdagi
f038d782c2
Fix issue with custom chain/network ID configuration ( #8147 )
...
* move chain/network id to beacon config
* go fmt
* improve tests
* validator params
* update deposit contract address
* complete tests
* re-arrange comments
* Less mis-leading comment, per Terence's review
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-12-18 22:22:48 +00:00
Nishant Das
e2d7ec6f97
Refactor Method Signatures For Powchain ( #8110 )
...
* checkpoint
* fix tests
* fix visibility
* fix
* victor's review
* remove redundant LF
* remove redundant LF
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-12-17 12:33:34 +00:00
Nishant Das
82bba593eb
Do Not Verify Attestations When Packing Them ( #8135 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-12-16 18:06:49 +00:00
terence tsao
20dede7532
Move state summary cache to DB ( #8101 )
2020-12-16 08:56:21 -08:00
Victor Farazdagi
46d99fdc00
Attestation aggregation: remove proper set duplicates ( #8063 )
...
* fix proper-set issue
* move test into dedicated test file
* move functionality from maxcover -> proposer
* adds dedup to proposer
* fix tests
* update tests
* remove redundant proper subset test
* fix bug with identical expression
2020-12-11 11:13:14 +03:00
Victor Farazdagi
be078d6a16
Update TestMain(): do not call os.Exit() explicitly ( #8046 )
...
* update workspace
* update testmain
2020-12-04 16:10:07 +00:00
terence tsao
2153a2d7c3
Remove logging deposit inclusion slot ( #8023 )
...
* Remove logging deposit inclusion slot
* Remove old tests
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-12-02 21:17:47 +00:00
Preston Van Loon
29c6a0c42c
Fix zero genesis check, make processAttestation routine wait for genesis time to be set ( #7947 )
...
* Fix zero genesis check, make processAttestation routine wait for genesis time to be set
* Update beacon-chain/blockchain/receive_attestation.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-25 18:52:59 +00:00
terence tsao
a051e684ae
Update log levels ( #7931 )
2020-11-23 13:16:08 -08:00
terence tsao
97ad5cd5fd
Reduce no attestation in pool to warn ( #7863 )
...
* Reduce no attestation in pool to warn
* Use NotFound
* Update validator/client/aggregate.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/client/aggregate.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-11-20 12:17:26 -08:00
Ivan Martinez
cfed4fa1b5
Remove listen for ChainStarted in WaitForChainStart ( #7849 )
...
* Remove GenValRoot from ChainStarted and remove ChainStarted from WaitForChainStart
* Fix test and add logs
2020-11-18 05:51:00 +00:00
Ivan Martinez
fec469291e
Add GenesisValidatorRoot to ChainStartResponse ( #7846 )
...
* Add genesis validator root to chainstartresposne
* Deps
* Tidy
* Fix tests
* Fix test
* Fix test and add to ChainStartedData
2020-11-17 20:15:48 -06:00
Ivan Martinez
5889670cc7
Remove WaitForSynced ( #7835 )
...
* Remove waitforsynced
* Remove WaitForsynced entirely
* Fix bazel
* tidy
2020-11-16 20:48:16 -06:00