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
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
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
aa389c82a1
Send attestations over feed at right place ( #8605 )
2021-03-15 07:47:10 -07:00
Victor Farazdagi
fa2084330b
Fix race condition in TestService_Initialized ( #8597 )
2021-03-11 21:16:40 +00:00
Victor Farazdagi
fa92766095
Fixes flaky TestBlocksFetcher_nonSkippedSlotAfter test ( #8586 )
...
* Fixes flaky TestBlocksFetcher_nonSkippedSlotAfter test
* fix conditional
2021-03-10 20:03:26 +00:00
terence tsao
bdf2b2019b
Use beacon state interfaces across ( #8552 )
2021-03-08 14:37:33 -08:00
Raul Jordan
090fbbf18c
Add Goland Standard "cmd" Pattern for Beacon-Chain Binaries ( #8540 )
...
* beacon chain cmd pattern
* imports spacing
* more import fix
* edit build file
* e2e viz
* amend e2e
2021-03-02 13:36:03 -06:00
pinglamb
5db5ca7056
Use eth2-types SSZUint64 ( #8514 )
2021-02-25 05:51:26 -08:00
Potuz
d44c27ec63
Log block arrival time ( #8485 )
...
* Log block arrival time
* Comment formatting
* Update beacon-chain/sync/validate_beacon_blocks.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-02-24 20:35:19 +00:00
Nishant Das
0625a6906c
Add Better Peer Pruning ( #8501 )
...
* add better pruning
* add test
* gaz
* victor's review
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-24 18:40:06 +00: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
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
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
Potuz
dd08305aa7
Clean duplicated topic field in debug log ( #8489 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-22 18:13:26 +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
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
Raul Jordan
36b6a71af4
Configurable DB Mmap Size for Beacon Node and Validator Client ( #8448 )
...
* add flag to beacon and validator
* gaz
* fuzz
* add dep viz
* add to tools
2021-02-15 20:29:47 +00:00
terence tsao
28631e7791
Verify nil block helper ( #8447 )
2021-02-15 15:11:25 +00:00
Radosław Kapka
0716519be9
Fix error formatting inside fmt.Errorf ( #8439 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-12 23:44:46 +00:00
Radosław Kapka
47fdb3b99a
Revert "Rename NewService
to New
( #8337 )" ( #8440 )
...
* Revert "Rename `NewService` to `New` (#8337 )"
This reverts commit d121b19145
.
# Conflicts:
# beacon-chain/sync/initial-sync/round_robin_test.go
* fix name in test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-12 17:45:22 +00: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
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
Panagiotis Georgiadis
0a180dc662
Make a const instead of 3 'abc' occurences ( #8406 )
2021-02-08 17:08:29 +01:00
Victor Farazdagi
372dc47b64
Deprecate enableSyncBacktracking flag ( #8371 )
...
* Deprecate enableSyncBacktracking flag
* keep deprecated flags
2021-02-01 11:18:24 +00:00
terence tsao
c0fda583e7
Update seen att slashing cache to use map ( #8332 )
...
* Hide beacon operation field if it's 0
* Use map as seen slashing cache
* Revert "Hide beacon operation field if it's 0"
This reverts commit 896fa11a0bb605212293d6fff02a8974c54710ab.
* Rm unused code
* Gaz
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-26 17:24:34 +00:00
terence tsao
d121b19145
Rename NewService
to New
( #8337 )
...
* Hide beacon operation field if it's 0
* Rename NewSerivce to New
* Revert "Hide beacon operation field if it's 0"
This reverts commit 896fa11a0bb605212293d6fff02a8974c54710ab.
* Fix NewServiceRegistry
* Update slasher/detection/service.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-26 10:26:57 +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
Ivan Martinez
7c59615ae2
Remove go-ssz entirely from prysm ( #8257 )
...
* Add DepositSigningData
* gaz
* Add to ssz tests
* Rename to DepositMessage
* Remove deprecated comment
* Remove return
* Fixes from review
* Fixes
* Remove some of gossz
* Remove go-ssz entirely
* Remove unneeded file
* Fix runtime with ssztypes
* Add back ssz files
* Fix formatting
* tidy
* Remove go-ssz from static
* tidy again
* Add tests
* Change to sig
* Fix test
* fx
* Fix visiblity
* Revert "Remove unneeded file"
This reverts commit d66fcda92925133db1a95f8f94ac61bbc6095c69.
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-20 21:03:46 +00: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
terence tsao
bc2c206832
Add verify slot target epoch function and apply all ( #8273 )
...
* Add verify slot target epoch function and apply all
* Fix TestProcessAttestationsNoVerify_IncorrectSlotTargetEpoch
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-19 21:41:44 +00:00
terence tsao
cf343be76a
Add a helper to validate nil attestation ( #8272 )
...
* Add verify nil attestation function and apply all
* Remove invalid attestatione debug log
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-15 22:19:17 +00:00
Nishant Das
ce397ce797
Prune Excess Peers Better ( #8260 )
...
* add method
* add changes
* formatting
* choose
* fix waitgroup
* add
* add debug logs
* gaz
* make it better
* fix
* godoc
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-14 21:28:20 +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
pinglamb
9369bb6781
Copied over ssz.DeepEqual as sszutil.DeepEqual from go-ssz ( #8258 )
...
* Copied over ssz.DeepEqual as sszutil.DeepEqual from go-ssz
* Added test cases for DeepEqual
* Remove commented code
2021-01-13 20:40:56 +00:00
terence tsao
bc650c82b4
Hydrate attestation for tests ( #8228 )
2021-01-07 21:00:21 +00:00
terence tsao
9ff825a570
Update variable names that are same as imports ( #8220 )
...
* Fix names that are same as import name
* Review feedbacks
2021-01-07 10:42:03 -06:00
Radosław Kapka
9b3e1eb643
Implement GetHealth in the node API ( #8217 )
...
* Implement GetHealth in the node API
* repair fuzz mock
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-06 20:11:20 +00:00
Radosław Kapka
392e61fbee
Revert changes to sync service status check ( #8215 )
2021-01-06 11:19:53 +00:00
Radosław Kapka
7135a8542f
Check if initial sync service has been initialized ( #8214 )
2021-01-06 10:45:22 +00:00
Victor Farazdagi
9d737d60f4
Declare err in loop to limit its scope ( #8200 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-05 13:55:23 +00:00
Victor Farazdagi
e772e8c8c2
Init sync: minor style fixes ( #8156 )
...
* simplify FSM calls
* improve calculateHeadAndTargetEpochs API
* simplify
* simplify nil assignment
2020-12-18 14:31:15 +00:00
terence tsao
20dede7532
Move state summary cache to DB ( #8101 )
2020-12-16 08:56:21 -08:00
Nishant Das
508c5fcf2f
More Efficient Validation of Proposer Index ( #8107 )
...
* metric
* make it better
* make it better
* gaz
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-12-15 16:27:05 +00:00
Victor Farazdagi
0f18867f08
Remove duplicate package imports ( #8104 )
...
* remove duplicate imports
* remove unused lookupLimit
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-12-14 22:22:55 +00:00
Steven Allen
2428880058
Update go-libp2p to 0.12.0 ( #8015 )
...
* Update go-libp2p to 0.12.0
go-libp2p 0.12.0 made some significant changes to the stream interfaces around
stream closing:
* Close now closes in both directions and frees the stream. However, unlike
FullClose did, it doesn't _wait_ for the remote peer to respond with an EOF.
* To close for writing, call CloseWrite (like one would on a TCP connection, etc.).
This patch:
* Replaces calls to FullClose with Close where appropriate.
* Replaces calls to Close with CloseWrite where appropriate.
* Removes redundant Close calls.
* Calls Reset to where appropriate to indicate that the request/response was
aborted. Unlike Close, this will not flush and will not cause the remote peer
to read an EOF. Instead, the remote peer will read an ErrReset error.
* Ensures we always either close or reset streams. Send wasn't closing the
stream on some error paths.
* Now that stream closing is async, we explicitly wait for a response when
"hanging up" on a peer (so we don't hang up before they receive our
response/goodbye message).
* update bazel
* Gazelle
* revert unintentional bazel workspace change
* appease an overzealous linter
* update to latest
* Refactor encoder
* gazelle
* Gazelle
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-12-14 17:22:25 +00:00
Potuz
4d1f01aacc
Change block_arrival_latency buckets to exponential format ( #8065 )
...
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-12-14 16:00:07 +00:00
Victor Farazdagi
b9848dc94f
Remove unused vars in tests ( #8103 )
...
* update process_block_test
* service_attester_test
* update service and rpc_status tests
* go fmt
2020-12-13 05:23:13 +00:00