Commit Graph

6542 Commits

Author SHA1 Message Date
protolambda 9050897cb2
fix committee work status and commitment references 2021-06-03 19:11:47 +02:00
Diederik Loerakker d4f6459108
Define missing header_root
Co-authored-by: Anton Nashatyrev <Nashatyrev@users.noreply.github.com>
2021-06-03 18:00:51 +02:00
protolambda c0af420130
shard work status enum, prefix instead of suffix + move full committee balance init line 2021-06-03 17:32:35 +02:00
Hsiao-Wei Wang 45d554aee8
Merge branch 'dev' into SyncCommitteeSignature-to-SyncCommitteeMessage 2021-06-03 22:13:53 +08:00
Hsiao-Wei Wang 049c18b6c4
Bump mypy to v0.812 (latest) 2021-06-03 20:49:29 +08:00
Mikhail Kalinin 7f64757b51 Fix Optional[TransitionStore] issue to satisfy linter 2021-06-03 16:08:56 +06:00
Hsiao-Wei Wang 989d33f6ec
Bump mypy to v0.800. This release adds Python 3.9 support. 2021-06-03 17:30:43 +08:00
Mikhail Kalinin 6872c01682 Add an extra line between function def 2021-06-03 12:31:59 +06:00
Danny Ryan 48ecc98b75
Merge branch 'dev' into altair_epoch_tests 2021-06-02 16:46:30 -06:00
Danny Ryan b3f2635ce7
Merge pull request #2466 from terencechain/patch-123
Altair: missing `block_root` in `SyncCommitteeSignature`
2021-06-02 16:09:13 -06:00
Danny Ryan 45a71eb267
line length lint 2021-06-02 15:58:51 -06:00
Danny Ryan 79f919eb19
Merge pull request #2464 from ethereum/JustinDrake-patch-7
Minor Altair cosmetic polishing
2021-06-02 15:51:35 -06:00
Danny Ryan 693b2283b0
Merge pull request #2465 from ethereum/sync-committee-penalty-tests
Fix sync committee penalty tests on #2453
2021-06-02 15:46:43 -06:00
terence tsao 65f48178b7
Include block_root in SyncCommitteeSignature 2021-06-02 14:41:24 -07:00
Danny Ryan d598c09876
Merge pull request #2443 from ralexstokes/fix-altair-transition-test
Fix bug in Altair transition tests with missing state root
2021-06-02 11:13:17 -06:00
Mikhail Kalinin 6604830729 Apply suggestions after the review 2021-06-02 15:00:01 +06:00
protolambda 417dda8326
fix committee index assertion 2021-06-01 22:38:36 +02:00
Hsiao-Wei Wang 67809e76e1
Fix tests 2021-06-02 01:40:54 +08:00
Potuz c115fa9a86
make it pass the linter 2021-06-02 01:22:27 +08:00
Potuz b8d426b028
Align Sync Committee Tests to Specs 2021-06-02 01:22:26 +08:00
Justin d87e076ce3
Minor Altair cosmetic polishing 2021-06-01 17:05:12 +01:00
Hsiao-Wei Wang b298d4d63d
Update mainnet preset file 2021-06-01 22:09:31 +08:00
Hsiao-Wei Wang 65f8d3d296
Merge branch 'dev' into SyncCommitteeSignature-to-SyncCommitteeMessage 2021-06-01 22:05:10 +08:00
Mikhail Kalinin db32c8b013 Fix linter errors 2021-06-01 17:44:58 +06:00
Mikhail Kalinin 6226be9e1e Implement TransitionStore and transition total difficulty computation 2021-06-01 16:28:30 +06:00
protolambda 2545c3e2d0
update pending header weights after epoch transition, fix committee index loop, fix header processing status assert, add todos for Altair-like shard attestation rewards 2021-05-31 18:55:08 +02:00
Diederik Loerakker 5a235d0251
Review suggestions
Co-authored-by: Anton Nashatyrev <Nashatyrev@users.noreply.github.com>
2021-05-31 17:03:06 +02:00
Mikhail Kalinin fd4369dc7c Add merge/fork.md with upgrade_to_merge definition 2021-05-31 19:30:54 +06:00
Diederik Loerakker d857935d6c
Merge pull request #2459 from ethereum/pyspec-build-var-fix
Pyspec builder internal config formatting fix
2021-05-31 15:28:54 +02:00
protolambda 8f005c18e5
when an untyped var is not the last config var, it needs a comma 2021-05-31 15:20:50 +02:00
protolambda bb3d581b13
update shard processing naming and doc structure 2021-05-29 23:55:16 +02:00
protolambda 31f48b7b3b
update sharding presets 2021-05-29 22:39:25 +02:00
protolambda 3665dbea8b
name (slot, shard) union wrapper ShardWork 2021-05-29 21:28:00 +02:00
Alex Stokes 042ca57a61
Merge pull request #2458 from ethereum/ralexstokes-patch-1
Clarify language on ssz Unions
2021-05-28 20:00:30 -07:00
Alex Stokes fa09d89648
Update simple-serialize.md 2021-05-28 18:13:22 -07:00
Diederik Loerakker 482b028b88
Merge pull request #2436 from terencechain/patch-122
Sharding p2p: minor fixes
2021-05-28 22:09:58 +02:00
Diederik Loerakker 12335a2702
Merge pull request #2456 from ralexstokes/clean-up-ssz-null
Clean up SSZ `null`
2021-05-28 22:05:24 +02:00
protolambda 72215412fa
For slow shard confirmation, assuming it is available via DAS, we could confirm the best pending header 2021-05-28 21:56:13 +02:00
Alex Stokes b763416a6b
remove unnecessary defn of `null` 2021-05-28 12:27:29 -07:00
Alex Stokes ef9b7125c2
whitespace 2021-05-28 12:27:19 -07:00
protolambda 38a0f4f211
update to wrap the union, clean up initialization and typing 2021-05-28 21:27:05 +02:00
Diederik Loerakker f08cc15b8d
Merge pull request #2445 from ethereum/union-type-update
Union type update
2021-05-28 20:20:52 +02:00
protolambda e5521af1f8
new union-based shard headers/commitments representation 2021-05-28 20:18:29 +02:00
protolambda d11586122f
update remerkleable, union support 2021-05-28 01:02:08 +02:00
Alex Stokes 6ecbc5e357
Add new file to spec infra 2021-05-27 12:21:04 -07:00
Alex Stokes b0500c3de1
Update specs/altair/beacon-chain.md 2021-05-27 12:06:01 -07:00
Alex Stokes 7a14e93c65
PR feedback 2021-05-27 12:02:44 -07:00
Alex Stokes 4d5bc83af4
Re-org files 2021-05-27 11:59:15 -07:00
Alex Stokes 3cd842a94d
Update specs/altair/beacon-chain.md 2021-05-27 11:39:29 -07:00
vbuterin a89ecced1c
Modify sync committee logic and parameters to reduce variance
Sync committee rewards as currently implemented significantly increase variance in proposer rewards: https://github.com/ethereum/eth2.0-specs/issues/2448

For example, if there are 200000 validators (6.4m ETH staked), then during each 1/4-eek (~54 hour) period there is a chance of 512/200000 that a validator will get accepted into the sync committee, so on average that will happen once every 200000/512 * 1/4 = 97.6 eeks, or close to two years. The payout of this "lottery" is 1/8 of that, or ~12.2 eeks (a bit less than four months) of revenue. This is much more severe than block proposing (a chance of 1/200000 per slot, or a lottery worth ~0.38 eeks of revenue once every ~3.05 eeks).

This PR makes three changes to cut make the sync committee lottery less drastic and bring variance closer in line with what is available from block proposing:

* Reduce the `SYNC_REWARD_WEIGHT` from 8 to 2
* Add a penalty for not participating in the sync committee, so that despite the first change the total net reward for participating vs not participating is only cut down by 2x
* Reduce the sync committee period from 1/4 eek to 1/8 eek (~27 hours)

With these three factors combined, the lottery reduces to ~1.5 eeks of revenue, on average occurring every ~48 eeks. Validators who are maximally unlucky (ie. never become part of a sync committee) only lose ~3.12% of their rewards instead of ~12.5%.

The compromises that this approach makes are:

* In the extreme case where >50% of proposers are operating efficiently, being in a sync committee becomes a net burden. However, this should be extremely rare, and in such cases validators would likely be suffering inactivity leak penalties anyway.
* Incentive to participate in a sync committee decreased by 2x (but this is IMO an improvement; sync committees are _not_ as important as proposals and deserve to have lower rewards)
* Minimum data syncing needed to maintain a light client increases by 2x (from 24 kB per 54 hours to 24 kB per 27 hours). A burden for on-chain light clients, but still insignificant for others.
2021-05-27 09:02:51 -06:00