Commit Graph

4621 Commits

Author SHA1 Message Date
Jacek Sieka 530c87e30d
typo 2022-03-18 08:50:03 +01:00
Jacek Sieka d5f4c46183
add subset ignore rule to sync contributions as well 2022-03-18 08:48:00 +01:00
Jacek Sieka a0755c2e86
Ignore subset aggregates
When aggregates are propagated through the network, it is often the case
that a better aggregate has already been seen - in particular, this
happens when an aggregator has not been able to include itself in the
mesh and therefore publishes an aggregate with only its own
attestations.

This new ignore rule allows dropping all aggregates that are
(non-strict) subsets of aggregates that have already been seen on the
network. In particular, it does not mandate dropping aggregates where a
union of previous aggregates would cause it to become a subset).

The logic for allowing this is based on the premise that any aggregate
that has already been seen by a peer will also have been seen by its
neighbours - a subset aggregate (strict or not) brings no new value to
the aggregation algorithm, except in the extreme edge case where you
could combine several such sparse aggregates into a single, more dense
"combined" aggregate and thus use less block space.

Further, as a small benefit, computing the `hash_tree_root` of the full
aggregate is generally not done -however, `hash_tree_root(data)` is
already done for other purposes as this is used as index in the beacon
API.
2022-03-03 18:31:09 +01:00
Danny Ryan 72d4597131
Merge pull request #2828 from ethereum/is_finality_update
Refactoring: add `is_finality_update` helper
2022-02-28 08:39:38 -07:00
Danny Ryan 3f2d5ecda7
Merge pull request #2838 from ethereum/revert-dupe-condition
revert removal of aggregate deduplication condition from #2183
2022-02-28 08:19:45 -07:00
Danny Ryan bbdb50278c
Merge pull request #2830 from status-im/ignore-atts
Ignore attestations voting for the wrong finalized checkpoint
2022-02-25 11:18:41 -07:00
Danny Ryan 03f0f6762a
revert removal of aggregate deduplication condition from #2183 2022-02-25 10:25:27 -07:00
Mikhail Kalinin 1280fe2a02 Bellatrix: random -> prev_randao 2022-02-22 17:16:33 +06:00
Jacek Sieka 9fb2dd16c1
Ignore attestations voting for the wrong finalized checkpoint
When nodes are syncing but have not yet reached the canonical `head`,
they cannot determine whether nodes they are connected to serve a valid
history or are making bogus claims in their `Status` advertisement.

Thus, the best course of action that a client can take is to vote for
its "current" best synced head, regardless of whether it's connected to
peers that claim to have other heads or not.

However, in the p2p spec, we penalize such peers with a `REJECT` - this
should be an `IGNORE` instead because this vote is correct per the spec,
albeit "late" according to the validating clients' view of the chain.
2022-02-11 17:12:13 +01:00
Hsiao-Wei Wang 6d11d627f8 Refactoring: add `is_finality_update` helper 2022-02-09 18:13:51 -07:00
Danny Ryan 5a09b5f8a8
Merge pull request #2814 from etan-status/lc-opt-fin
Ensure light client `optimistic_header` to be at head
2022-02-09 10:06:57 -07:00
Danny Ryan 824ff970f5
Merge pull request #2818 from etan-status/err-unavailable
Update reserved libp2p error documentation
2022-02-03 09:00:34 -07:00
Hsiao-Wei Wang f2fd673a66
Merge pull request #2807 from etan-status/compute-sync-period
Consistently use `compute_sync_committee_period`
2022-02-01 16:05:58 -08:00
Etan Kissling 20c8d0d641
Update reserved libp2p error documentation
The spec reserves the libp2p error code range `[3, 127]` for future use
but actually defines error code `3` as `ResourceUnavailable`. This patch
updates the reserved range to `[4, 127]`.
2022-01-28 00:33:38 +01:00
Mikhail Kalinin eb4497fae7 Bellatrix: Rename execute_payload to notify_new_payload 2022-01-27 15:24:53 +06:00
Danny Ryan b517092770
Merge pull request #2812 from tersec/intervals_per_slot
use INTERVALS_PER_SLOT in sync committee specs
2022-01-25 15:18:53 -07:00
Danny Ryan d5e4828aec
Merge pull request #2770 from sigp/opt-sync-2
Optimistic Sync
2022-01-25 10:26:29 -07:00
Etan Kissling 0e9460b8dd
Ensure light client `optimistic_header` to be at head
When a light client updates its `finalized_header` using a forced update
because of the timeout, and the new header was not signed by enough sync
committee participants to pass `get_safety_threshold(store)`, it may
occur that `store.finalized_header.slot > store.optimistic_header.slot`.
This patch ensures that the `optimistic_header` is updated to the latest
`finalized_header` if that happens, so that it always indicates the
latest known and accepted head.
2022-01-25 10:09:10 +01:00
Dustin Brody 182e4496c3
use INTERVALS_PER_SLOT in sync committee specs 2022-01-21 19:01:56 +00:00
Danny Ryan 2232d76735
Merge pull request #2808 from ethereum/receipts-root
receipt_root -> receipts_root
2022-01-20 08:37:57 -07:00
Alex Stokes 02b32100ed
Merge pull request #2803 from ralexstokes/clean-up-linter
add `pylint` to catch unused args
2022-01-18 09:29:54 -06:00
Danny Ryan f77fc055f8
Update specs/bellatrix/beacon-chain.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-01-18 07:19:00 -07:00
Paul Hauner 092f3e0b16
Propose -> Propagate 2022-01-18 11:22:07 +11:00
Paul Hauner 6225236a52
Specify about EL/CL scoring rules 2022-01-18 11:20:52 +11:00
Paul Hauner b1ec9bcfbc
Update gossip conditions 2022-01-18 11:12:55 +11:00
Paul Hauner 15ef2f30d2
Apply suggestions from @djrtwo review
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2022-01-18 09:30:01 +11:00
Danny Ryan 671c4f0e3a
receipt_root -> receipts_root 2022-01-17 13:42:10 -07:00
Etan Kissling 8319d07084
Consistently use `compute_sync_committee_period`
There were a couple instances where a division was used on an epoch
to derive the corresponding sync committee period instead of calling the
`compute_sync_committee_period` function.
These instances were changed to also use the function.
2022-01-17 17:38:24 +01:00
Etan Kissling fd89b72c6b
`doctoc` on `custody_game` specs
This updates the TOC in `custody_game/beacon-chain.md` using
`make doctoc specs`.
2022-01-17 12:56:51 +01:00
Alex Stokes 2b45496fe4
clean up unused argument from `phase0` 2022-01-13 11:39:36 -08:00
Hsiao-Wei Wang 16c350ebcd
Merge pull request #2796 from etan-status/lc-aggregate
Rename `sync_committee_aggregate` > `sync_aggregate`
2022-01-13 21:07:50 +08:00
Paul Hauner 0c2e416a6e
Run doctoc 2022-01-13 06:56:32 +11:00
Paul Hauner 90fb7f6871
Add rationale 2022-01-12 19:04:43 +11:00
Paul Hauner e97335a09a
Merge branch 'dev' into opt-sync-2 2022-01-12 16:22:05 +11:00
Paul Hauner 1228e01883
Update p2p-networking 2022-01-12 16:18:53 +11:00
Danny Ryan 7b435bd470
Merge pull request #2797 from etan-status/lc-update-doc
Fix light client docs to match function signature
2022-01-11 06:57:19 -07:00
Etan Kissling 79c456b9f4
Fix light client docs to match function signature
In the light client docs a mentioning of a function trigger is lacking
the `genesis_validators_root` argument. This patch adds that argument
to the documentation to match the real function signature. It also
slightly improves the grammar.
2022-01-11 12:10:30 +01:00
Etan Kissling 212eb00fc1
Document light client constants
This adds documentation about the unit and actual value of light client
specific constants, consistently with the rest of the spec.
2022-01-11 12:10:09 +01:00
Etan Kissling 48e19b15ae
Rename `sync_committee_aggregate` > `sync_aggregate`
This renames the `sync_committee_aggregate` field of `LightClientUpdate`
to `sync_aggregate` for consistency with the terminology in the rest of
the spec.
2022-01-11 11:22:39 +01:00
Hsiao-Wei Wang 3970fa7a75
PR feedback from @ralexstokes 2021-12-24 01:38:33 +08:00
Hsiao-Wei Wang 8c226013fd
minor fix 2021-12-23 17:32:15 +08:00
Hsiao-Wei Wang 41af639517
PR feedback from @mkalinin 2021-12-23 17:26:48 +08:00
Hsiao-Wei Wang 8facc0a095
Merge -> Bellatrix 2021-12-23 14:25:43 +08:00
Hsiao-Wei Wang 2fa396f67d
Merge pull request #2746 from ethereum/vbuterin-patch-12
Simplify sync protocol and update to calculate optimistic heads
2021-12-16 00:12:36 +08:00
Hsiao-Wei Wang de892382db
Minor style fixes 2021-12-15 23:44:29 +08:00
Hsiao-Wei Wang 25d88fee24
Fix `process_light_client_update` 2021-12-14 22:05:09 +08:00
Hsiao-Wei Wang 2f618f7b48
Fix lint and presets 2021-12-14 21:38:58 +08:00
vbuterin 916193bd69
Updates in response to comments 2021-12-10 07:48:14 -06:00
Hsiao-Wei Wang 200ed58dd9
Merge branch 'dev' into ex-ante-tests 2021-12-07 18:29:48 +08:00
Danny Ryan 3a9777eebc
Update specs/phase0/fork-choice.md 2021-12-02 14:00:06 -07:00