Victor Farazdagi
23ff14c34b
Move spectests into a separate package ( #8798 )
...
* move general/phase0/bls tests
* phase0/operations tests
* phase0/sanity/blocks
* fix import
* phase0/sanity/slots
* phase0/sanity/slots minimal
* phase0/epoch_processing tests
* phase0/rewards tests
* simplify
* more simplification
* phase0/shuffling tests
* phase0/ssz_static tests
* spectest/utils
* fix build
* readme
* update test sizes
* update readme
2021-04-22 14:53:30 +00:00
Victor Farazdagi
823f7c99d2
Update spec tests ( #8792 )
...
* update path to minimal tests
* update specs testutils
* fix attestation_test
* attester_slashing_test
* fix block_header_test
* block_processing_minimal
* core/blocks minimal spectests
* epoch_processing minimal spectests
* slot_processing minimal spectests
* bls spectests
* update mainnet tests
* fix remaining tests
* gazelle
2021-04-20 23:54:06 +00:00
terence tsao
a4ff97d24b
Refactor signature function's argument ( #8773 )
2021-04-15 11:35:53 -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
terence tsao
228033f7a3
Pass SlashValidator func as argument to ProcessProposer[Attester]Slashings
( #8763 )
...
* Pass slash validator func as argument
* Gazelle
2021-04-13 20:32:49 -05:00
Victor Farazdagi
cc9bec7a19
Update specs comments ( #8750 )
...
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 05:35:22 +00:00
Victor Farazdagi
0808c02c65
Update spec comments ( #8727 )
2021-04-08 19:33:54 +00:00
terence tsao
7998348bcb
Fix deep source complains ( #8714 )
2021-04-05 23:04:26 +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
f67228bacb
Change ProcessDeposits
argument to use deposits
( #8696 )
2021-04-02 14:48:41 +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
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
Potuz
9cb4eafad4
Change early exit error message ( #8657 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-24 11:17:52 -05: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
7b16601399
State: Return interface{} for pb related methods ( #8617 )
...
* Return interface{} instead of *pbp2p.BeaconState
* Comment
2021-03-16 22:26:17 -05:00
Radosław Kapka
c577fbd772
Move attestation's source checkpoint validation to VerifyAttestationNoVerifySignature ( #8598 )
...
* Move attestation's source checkpoint validation to VerifyAttestationNoVerifySignature
* change parameter type to ReadOnlyBeaconState
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-12 21:43:20 +00:00
terence tsao
bdf2b2019b
Use beacon state interfaces across ( #8552 )
2021-03-08 14:37:33 -08:00
terence tsao
90da16432f
Refactor ProcessAttestationNoVerifySignature
to VerifyAttestationNoVerifySignature
( #8566 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-06 14:53:28 +00:00
terence tsao
c6b74b2ba7
Beacon state: Add interfaces ( #8544 )
...
* Define Readonly and writeonly
* Comment
* First take at clean up
* Completed interfaces
* Fix build and test
* Reordering interfaces
* Add build.bazel
* Add build.bazel
* Fix visibility
2021-03-03 02:26:24 +00: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
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
4bed8d4ed4
Remove unused core functions ( #8449 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-15 22:50:50 +00:00
terence tsao
28631e7791
Verify nil block helper ( #8447 )
2021-02-15 15:11:25 +00:00
terence tsao
d3e93dd106
Process attestation: reduce checkpoint copies ( #8409 )
...
* Clean up process attestation
* Add matching getters
* Fix tests
* Update tests
* Fix test
* Remove read locks
* Typo
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-10 19:30:11 +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
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
Preston Van Loon
d6cccc18c3
verifyDepositDataWithDomain: Use helpers.ComputeSigningRoot ( #8302 )
2021-01-20 20:30:58 +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
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
Ivan Martinez
e5556db49d
Add DepositMessage in preparation to remove go-ssz ( #8244 )
...
* Add DepositSigningData
* gaz
* Add to ssz tests
* Rename to DepositMessage
* Remove deprecated comment
* Remove return
* Fixes from review
* Fixes
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 00:45:11 +00:00
Raul Jordan
d97596348e
Add Back New Attester Protection DB Logic ( #8242 )
...
* Revert "Revert New Attester Protection DB Logic (#8237 )"
This reverts commit 6738fa3493
.
* Batch Attestation Records and Flush All at Once in Validator DB (#8243 )
* begin flushing logic
* finalize logic before starting tests
* make code DRY
* better log fields
* gaz
* tweak parameter
* rename
* clarifying comment on error handling in event feed
* comprehensive tests
* more comments
* explain parameters in comments
* renamed consts
* Apply suggestions from code review
* gaz
* simplify
* typo
* comments
2021-01-11 23:59:17 +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
Raul Jordan
6738fa3493
Revert New Attester Protection DB Logic ( #8237 )
...
* Revert "Optimize Migration for new Attester Protection DB (#8231 )"
This reverts commit c4ab67832f
.
* Revert "Integrate New Slashing Protection DB Methods at Runtime (#8219 )"
This reverts commit 3858068201
.
* Revert "DB Migration for Optimal Local Slashing Protection (#8212 )"
This reverts commit dd3ac6c2ed
.
2021-01-09 04:00:56 +00:00
Raul Jordan
3858068201
Integrate New Slashing Protection DB Methods at Runtime ( #8219 )
...
* integrate at runtime and revamp tests
* historical att
* Update validator/db/iface/interface.go
* deepsource
* import
* log the slashing kind
* gaz
* create a slashutils
* integrate new slashutil
* imports
2021-01-07 23:30:25 +00:00
terence tsao
bc650c82b4
Hydrate attestation for tests ( #8228 )
2021-01-07 21:00:21 +00:00
Victor Farazdagi
e5c69bd387
Add space at the start of comments ( #8202 )
...
* add space at the start of comments
* undo case change
2021-01-05 13:09:41 +00:00
Victor Farazdagi
ee8aacbbbf
Remove redundant lambda around cleanup code ( #8192 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-04 18:16:18 +00:00
terence tsao
70c0bb106b
Beacon node code health improvements ( #8109 )
...
* Apply code health fixes after code inspect
* Remove attestationRoot
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-12-14 23:41:24 +00:00
terence tsao
ec2e677668
Update to not return state ( #7786 )
2020-11-11 16:40:43 -08:00
Potuz
d3ca9985eb
log validator index in verifyExitConditions ( #7773 )
...
* log validator index in verifyExitConditions
* Fix missing symbol
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2020-11-11 12:55:33 +01:00
Nishant Das
5995d2394c
Pass By Value Instead Of Reference ( #7710 )
...
* change to value from reference
* fix up
* make it a pointer
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-09 10:08:08 +00:00
Nishant Das
8661eb356f
Fuzz: sigp/beaconfuzz#91 ( #7725 )
2020-11-04 14:05:48 +00:00
Raul Jordan
d2ae1b9286
Continue In ProcessPreGenesisDeposits ( #7678 )
...
* return error properly
* add in test
* reset
* Apply suggestions from code review
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: nisdas <nishdas93@gmail.com>
2020-11-02 10:34:37 -06:00
Nishant Das
211d9bc0b9
Update BLST And Herumi ( #7632 )
...
* fix build from source
* clean up
* update again
* change everything
* workaround for now
* fix versioning
* all passing now
* fix build issues
* clean up
* revert use of MulVerify
* gaz
* stub
* Apply suggestions from code review
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* fix all
* fix test
* todo
* fix stub
* revert back
* make deep source happy
* Update shared/bls/herumi/public_key.go
* Update shared/bls/blst/signature.go
* Update shared/bls/blst/signature_test.go
* imports
* move iface to common, export errors
* rm iface build
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-10-30 19:06:33 +00:00