Radosław Kapka
545424dd09
Fix epoch calculation when fetching sync committee duties ( #9767 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-10-14 18:52:26 +00:00
Nishant Das
508b18f1bd
Return Error For Batch Verifier ( #9766 )
...
* fix it
* make err check happy
* radek's review
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-10-13 23:52:22 +00:00
Radosław Kapka
e644e6b626
Remove special preparation of graffiti ( #9770 )
...
* add attestations to migration tests
* remove sepcial preparation of graffiti
* Revert "add attestations to migration tests"
This reverts commit adbe8cf4bf2fa9751ff40f85b97227e89207ef2b.
2021-10-13 15:32:15 +00:00
Radosław Kapka
280dc4ecf0
Register v1alpha2
endpoints in the gateway ( #9768 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-10-12 15:13:52 +00:00
Nishant Das
b81f5fc7a5
Handle Invalid Number Of Leaves ( #9761 )
...
* fix bad trie
* handle edge case
* radek's review
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-10-12 10:36:57 +00:00
Nishant Das
06c084ff52
Log out Gossip Handling Errors ( #9765 )
2021-10-12 07:44:47 +00:00
Nishant Das
f8f037b63d
updateInterval ( #9764 )
2021-10-11 22:12:07 -05:00
terence tsao
f114a47b5b
Improve "synced block.." log ( #9760 )
2021-10-09 15:27:34 +02:00
Nishant Das
65d2df4609
Add in Stronger Length Checks ( #9758 )
...
* add changes
* radek's review
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-10-08 17:41:36 +00:00
Radosław Kapka
63349d863b
Do not return data for validators without sync duties ( #9756 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-10-08 15:20:40 +00:00
terence tsao
271ee2ed32
Cleanup slot helpers into intended locations ( #9752 )
...
* Refactor slot time helpers to intended locations
* Gazelle
* Update beacon-chain/core/time/slot_epoch.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/core/time/slot_epoch_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Go fmt
* Update transition_fuzz_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-10-07 19:15:35 +00:00
Radosław Kapka
b5f0bd88b0
Add sync details to error messages ( #9750 )
2021-10-07 20:50:03 +02:00
terence tsao
e7085897ad
Use BLS signature length config value ( #9746 )
...
* Use `BeaconConfig().BLSSignatureLength`
* Update BUILD.bazel
* Fix build
* Update BUILD.bazel
2021-10-07 10:37:53 -05:00
terence tsao
a9f9026c78
Minor cleanups ( #9743 )
...
* Minor cleanups
* Delete slasher client files
* Revert "Delete slasher client files"
This reverts commit 0c995a1d4a834ded97385e6e338fe630c81db26b.
* Update slasher_client.go
2021-10-06 13:23:40 -05:00
Radosław Kapka
9aa50352b6
Allow fetching sync committee duties for current and next period's epochs ( #9728 )
2021-10-05 08:46:16 -07:00
Mohamed Zahoor
362dfa691a
GetBlock() - Simple optimisations ( #9541 )
...
* GetBlock() optimizations
* addressed preston's comments
* fix fmt
* added benchmarks
* fix deepsource
* merge fix
* remove unnesesary check
* fixed terence's comments
* Update beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-10-05 17:28:02 +08:00
terence tsao
644038ba61
eth2 api: use balance instead of effective balance ( #9722 )
...
* Use balance instead of effective balance
* Update test to reflect validator balance
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-10-04 20:57:40 +00:00
Håvard Anda Estensen
b793d6258f
Add Golangci-lint to GitHub Actions and add Deadcode linter ( #9597 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-10-04 13:06:21 +02:00
Raul Jordan
f7845afa57
Use Unique Slot Time Tickers for Slasher ( #9723 )
2021-10-03 07:49:01 +00:00
terence tsao
c21e43e4c5
Refactor: move functions beacon-chain/core/time
-> time/slots
( #9719 )
...
* Move necessary functions beacon-chain/core/time -> time/slots
* Fix fuzz
* Fix build
* Update slot_epoch.go
2021-10-01 15:17:57 -05:00
Raul Jordan
4f31ba6489
Changes to E2E for Optimized Slasher ( #9698 )
...
* remaining slasher e2e changes
* testing gaz
* slash e2e
* deepsource
* gaz
* viz
* revert wait group changes
* comment
* lock around reset cache
* add slashing reason
* revert changes
* is sync
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
2021-09-30 20:28:14 +00:00
terence tsao
2bc3f4bc6a
Update sync time error message ( #9713 )
...
* Update sync_committee.go
* Update beacon-chain/core/altair/sync_committee.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Fix slot calculation
* Go fmt
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-30 20:03:57 +00:00
terence tsao
8219af46e4
Move slot epoch from core to time pkg ( #9714 )
...
* Move slot epoch from core to time pkg
* Fix fuzz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-30 19:00:14 +00:00
Raul Jordan
f5234634d6
Prevent Saving Empty Chunks to Disk ( #9707 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-30 18:29:40 +00:00
Nishant Das
a196c78bed
clean up ( #9709 )
2021-09-30 08:10:49 -07:00
Nishant Das
3c052d917f
Use Scoring Parameters To Enable Global Score ( #8794 )
...
* fix score parameters
* add check
* fix deadlock issues
* fix
* fix again
* gaz
* comment
* fix tests and victor's review
* gaz
* clean up
* fix tests
* fix tests
* gate behind flag
* add scorer to dev
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-30 03:39:53 +00:00
Raul Jordan
7dae66afc9
Highest Attestations Endpoint for Optimized Slasher ( #9706 )
...
* begin highest atts
* highest atts
* deep source
2021-09-29 21:33:28 -05:00
Radosław Kapka
62dc74af2f
Move head event's epoch transition to epoch start ( #9704 )
...
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-29 17:18:10 -05:00
Raul Jordan
13cdb83591
Validator Changes for Optimized Slasher ( #9705 )
...
* val changes
* mock
* mocks
* gomock any
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-29 21:25:45 +00:00
Preston Van Loon
520bc9d955
Update validator reporting logs and metrics for Altair ( #9589 )
...
* Mark fields as deprecated due to Altair
* Only print inclusion distance fields before Altair fork
* Report phase0 and altair metrics respectively
* only set phase0 fields in phase0, only set altair fields in altair
* better use of fields
* Update go pbs
* Update individual votes method
* regen go proto files
* formatting
* Feedback from @potuz
* Annotate metrics per @potuz suggestion
* Set previous release e2e to end 1 epoch before altair. Add some out of bounds checks for validator metrics reporting and a panic catch
* gofmt
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-29 20:49:58 +00:00
Raul Jordan
df33ce3309
Remaining Slasher Beacon Node Changes ( #9701 )
...
* slasher beacon node changes
* remaining beacon node items
* moar changes
* gaz
* flag fix
* rem slashable
* builds
* imports
* fix up
* pruning faster test
* deepsource
* fix wrong item
* node node feature flags
* broken test
* preston review
* more preston comments
* comment
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-29 18:17:37 +00:00
terence tsao
86efa87101
Refactor sync and participation field roots ( #9703 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-29 17:46:51 +00:00
Potuz
ff625d55df
Use target root for pending attestations in tests instead of unrelated one ( #9699 )
...
* Use target root for pending attestations instead of unrelated one
* remove unnecessary block saves
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-29 12:27:47 -05:00
Mohamed Zahoor
0678e9f718
finalise deposits before we initialise the node ( #9639 )
...
* finalize deposits before we initialize the node
* Update beacon-chain/blockchain/service.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update beacon-chain/blockchain/service.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* moved this when intiializing caches
* added test case
* satisfy deepsource
* fix gazel
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-29 15:43:24 +00:00
Nishant Das
10251c4191
increase size ( #9702 )
2021-09-29 10:01:10 -05:00
Potuz
861c2f5120
remove unnecessary asserts from tests ( #9700 )
2021-09-29 22:17:06 +08:00
terence tsao
bfc821d03a
Can save justified checkpoint to DB ( #9697 )
...
* Can save justified checkpoint to DB
* Update beacon-chain/blockchain/process_block_test.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
* Update beacon-chain/blockchain/process_block.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
* Update beacon-chain/blockchain/process_block.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
* Update beacon-chain/blockchain/process_block.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-09-29 03:00:52 +00:00
Raul Jordan
9edba29f64
Slasher Simulator Code for Testing Optimized Slasher Behavior ( #9695 )
...
* slashing simulator
* add in necessary items for slasher sim
* sim item
* fix up
* fixed build
* rev
* slasher sim in testing
* testonly
* gaz
* gaz
* fix viz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
2021-09-29 02:27:21 +00:00
Nishant Das
0edb3b9e65
Flatten Attestation Packing ( #9683 )
...
* flatten attestation packing
* dedup again
* terence's review
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-09-29 01:56:55 +00:00
Nishant Das
393549ad19
Add in Balance Safety Check ( #9419 )
...
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-28 22:19:10 +00:00
terence tsao
8f8ccf11e4
Update head more timely before ( #9651 )
...
* Move update head closer to transition
* Update process_block.go
* Update tests
* Move savePostStateInfo back
* Update process_block.go
* Update process_block_helpers.go
* Minor clean up for better diff
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-28 21:51:11 +00:00
terence tsao
806bcf1d29
Clean up unused types & function comments ( #9691 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-28 21:21:07 +00:00
Raul Jordan
2a2239d937
Detect Slashable Attestations in Optimized Slasher ( #9694 )
...
* detect slashable attestations
* Update beacon-chain/slasher/detect_attestations.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-28 20:54:17 +00:00
Raul Jordan
1816906bc7
Detect Slashable Blocks in Optimized Slasher ( #9693 )
...
* pass
* Update beacon-chain/slasher/detect_blocks.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update beacon-chain/slasher/detect_blocks.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-28 19:33:45 +00:00
Radosław Kapka
c32090aae5
Allow sending Altair blocks to /eth/v1/beacon/blocks
( #9685 )
...
* Allow sending Altar blocks to `/eth/v1/beacon/blocks`
* tests
* add documentation
* fix ineffectual assignment
* change type of sync committee bits
* remove unused import
* fix Altair epoch calculation
* compare slot against slot
* do not publicly export E2E constant
* tests for setInitialPublishBlockPostRequest
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-28 19:07:32 +00:00
Raul Jordan
57f965df50
Include Slasher Receiving Methods ( #9692 )
...
* first
* add receive details
* ensure most builds
* add slasherkv changes
* db iface additions
* build
* gaz
* proper todo comment
* terence comments
* sig check
* bad sig checks
* proper lock issue
* fix test
* fix up tests
2021-09-28 18:13:16 +00:00
Radosław Kapka
8a6e2a5c63
Add MIN_SYNC_COMMITTEE_PARTICIPANTS
parameter to config ( #9689 )
...
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-28 16:54:12 +00:00
Raul Jordan
6d79f61fda
Process Slashings for Newly Optimized Slasher ( #9687 )
...
* add process slashings
* verify sig
* add method
* add test
* add in process slashings functionality
* target state for aggregate
* comment
* Radek comments
2021-09-28 10:27:40 -05:00
Raul Jordan
f2840c9ffa
Slasher Min/Max Chunk Logic ( #9673 )
...
* slasher chunks code
* slasher chunks code
* avoid using shared
* testing helper
* slasher gaz
* radek comments
* preston feedback
2021-09-28 02:04:32 +00:00
Preston Van Loon
ee0a453b7b
core: refactor signing and domain methods from helper to core/signing pkg ( #9520 )
...
* Move domain function and all signing root functions from beacon-chain/core/helpers to beacon-chain/core
* @terencechain suggestion to put these methods under core/signing
2021-09-27 16:19:20 +00:00