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
Radosław Kapka
601493098b
Return error when request JSON contains unknown fields ( #9710 )
...
* Return error when request JSON contains unknown fields
* Update api/gateway/apimiddleware/process_request.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-09-30 19:42:20 +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
Raul Jordan
26978fcc50
Make Jaeger in E2E Sharding Aware ( #9711 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-30 17:35:05 +00:00
Nishant Das
7c67d381f4
Remove Peer Scorer From Dev ( #9712 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-30 16:51:13 +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
Preston Van Loon
6c5bf70021
CI: fix remote caching ( #9696 )
2021-09-29 00:18:31 +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
Preston Van Loon
c94ba40db2
config: ensure config matches altair presets ( #9690 )
...
* config: ensure config matches altair presets
* gofmt
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-09-28 20:02:12 +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
Nishant Das
bf2d2cf981
make opt max cover default ( #9684 )
2021-09-28 17:34:29 +08: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
cbb4361c64
Update spectests to v1.1.0 ( #9680 )
...
* Update spectests to v1.1.0
* ignore placeholder fields, fix spec config check
2021-09-28 00:50:06 +00:00
terence tsao
328e3e6caf
Update mainnet_config.go ( #9678 )
2021-09-27 13:39:55 -07: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
Radosław Kapka
3e640fe79f
Remove unused Eth1Data-related code from the proposer ( #9670 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-27 14:29:41 +00:00
Radosław Kapka
bf41fd854d
Remove fmt.Println
from committee cache ( #9677 )
2021-09-27 11:18:20 +00:00
Nishant Das
6eb158c16a
Check Head State For New Head Methods ( #9676 )
...
* check head state
* add tests
2021-09-27 08:27:11 +00:00
terence tsao
376d248c22
Add in progress handler to committee cache ( #9664 )
...
* Add in progress handler for committee cache
* Remove debug print
* Update validators.go
* Fix all the tests
* More tests
* Update committee_disabled.go
* Update committee_disabled.go
* Update testing util
* Update main.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-09-26 23:27:57 +08:00
Nishant Das
6e4c2b4b20
Wrap Gossip Validators With Error ( #9660 )
2021-09-25 18:06:48 -07:00
Raul Jordan
75936853af
Optimized Slasher Docs and Helpers ( #9578 )
...
* bring over helpers
* slasher helpers pass tests
* fix dead link
* rem eth2
* gaz
* params
* gaz
* builds
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-09-24 13:38:13 -05:00
terence tsao
ea9ceeff03
Various clean up before v2 ( #9672 )
...
* Update package names
* Various clean up
* Gazelle
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-24 17:42:16 +00:00
Radosław Kapka
78ea402d9d
Correct the semantics of startEpoch
calculation in registerSyncSubnet
( #9671 )
2021-09-24 16:02:55 +00:00
Radosław Kapka
fae806c73e
Small changes in API Middleware ( #9666 )
...
* Small changes in API Middleware's custom hooks
* reorder fields in `Endpoint`
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-24 14:34:19 +00:00
Radosław Kapka
45510fafea
Fix error handing for block v2 endpoints ( #9667 )
...
* Fix error handing for block v2 endpoints
* rename helper func
2021-09-24 13:52:00 +00:00
Radosław Kapka
12480e12b2
Add flags for disabling selected API ( #9606 )
...
* Add flags for disabling selected API
* tests
* build file
* Use comma-separated modules
* test fix
* fix gateway tests
* fix import in flag tests
2021-09-24 09:25:42 +00:00