Commit Graph

184 Commits

Author SHA1 Message Date
Danny Ryan 8c9c943845
Merge pull request #2054 from ethereum/ralexstokes-patch-1
Typos in: p2p-interface.md
2020-09-22 17:32:10 -06:00
Danny Ryan a232efbeb7
revert incorrect type fix 2020-09-22 17:20:55 -06:00
protolambda 8ad0865424
Use gossip signing policy in p2p spec, see libp2p/specs#294 2020-09-15 01:15:16 +02:00
Danny Ryan 59cb56b564
Merge pull request #2044 from blacktemplar/use-raw-sha-as-message-id
use raw SHA256 as message-id
2020-09-14 11:25:34 -06:00
Danny Ryan 5a9fe89089
remove extraneous parens 2020-09-14 10:58:48 -06:00
Danny Ryan 89be1f5bc8
favor pythonic notation for array slices 2020-09-14 10:57:35 -06:00
blacktemplar deb58fd21e only use first 8 bytes of hash as message id 2020-09-14 10:09:48 +02:00
Alex Stokes 3cb15806be
Update p2p-interface.md
Typo fixes
2020-09-11 17:08:37 -07:00
blacktemplar 8f0b15f9f7 remove dot 2020-09-11 06:44:36 +02:00
Danny Ryan 8948f92def
Merge branch 'dev' into more_gossip_validations 2020-09-10 14:33:48 -06:00
Danny Ryan 42bf435c54
rearrange gossip conditions 2020-09-10 14:10:09 -06:00
blacktemplar 9cbc7c37f4 use raw SHA256 as message-id 2020-09-09 15:02:47 +02:00
lsankar4033 a156f3821f Add two more attestation gossip validations 2020-08-26 16:18:38 -07:00
lsankar4033 a4acd38981 fix typo 2020-08-26 16:11:42 -07:00
tintinweb c3ff87461f fix typo 2020-08-21 12:10:10 +02:00
Danny Ryan bf6d5ce3b6
port #2005 and rearrange conditions 2020-08-03 09:42:52 -06:00
lsankar4033 3a0dd2b253 Add self-consistency check to attestation gossip validation 2020-07-28 17:51:32 -07:00
Diederik Loerakker 247da83e62
Merge pull request #1985 from ethereum/non-viable-gossip
add that current block is in the same chain as finalized ancestor
2020-07-23 19:18:53 +02:00
Danny Ryan 3cf6832198
Apply suggestions from code review
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-07-23 10:46:31 -06:00
Danny Ryan b3e49ff0d3
add finalized ancestor checks to attestation gossip 2020-07-23 10:39:04 -06:00
Danny Ryan fb13f67cca
add that current block is in the same chain as finalized ancestor 2020-07-23 10:13:42 -06:00
Danny Ryan 289564aec0
pr feedback 2020-07-23 10:03:43 -06:00
Danny Ryan a64b8eba6e
remove 'ssz' format from req/resp. now only ssz_snappy 2020-07-23 09:37:16 -06:00
Danny Ryan 435f70208b
Merge pull request #1958 from ethereum/gossip-params
Match gossip v1.1 D_low, extend gossip_history param, add FAQ section
2020-07-21 18:18:25 -06:00
Danny Ryan 50cd0b2b31
Update specs/phase0/p2p-interface.md
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-07-21 17:49:39 -06:00
Danny Ryan edcce7bfef
format 2020-07-21 17:00:11 -06:00
Danny Ryan ec7be11c06
mod gossip params and rename to reflect spec names 2020-07-21 16:45:25 -06:00
protolambda 07274736b9
Match gossip v1.1 D_low, extend gossip_history param, add FAQ section 2020-07-08 01:42:09 +02:00
Danny Ryan 334947f523
rearrange queuing conditions 2020-07-07 16:20:31 -06:00
Danny Ryan 4c1fa7fa6f
add note about max queue sizes in gossip 2020-07-07 12:41:41 -06:00
Danny Ryan 953d106163
add queueing possibility to p2p messages in gossip 2020-07-07 12:34:39 -06:00
Danny Ryan 6195e027f1
working through new-lines 2020-07-03 09:19:15 -06:00
Danny Ryan 04a6c96cdf
break p2p topics into separate md headers for better linking 2020-07-03 07:50:30 -06:00
Danny Ryan e5f3b5dded
Merge pull request #1952 from status-im/no-tls
Update faq for tls
2020-07-03 07:37:38 -06:00
Jacek Sieka 30e0438d49
Update faq for tls
we're not using tls1.3 (yet?)
2020-07-03 10:47:17 +02:00
Danny Ryan bd61c2686b
PR feedback 2020-06-18 09:45:10 -06:00
protolambda 9b60a9b799
Avoid state usage in p2p validation, compute committee count per slot for epoch as a whole 2020-06-17 20:19:32 +02:00
Danny Ryan 7e44456be5
mod compute_subnet_for_attestation to be usable for lookahead 2020-06-05 09:50:49 -06:00
Michael Sproul c2b7ff7422
Re-clarify proposer slashing check
Fixes a typo from #1871
2020-06-04 16:16:37 +10:00
Michael Sproul 376c836190
Clarify proposer slashing gossip conditions 2020-06-04 12:51:17 +10:00
Danny Ryan cc5116bf33
Merge pull request #1837 from status-im/ssz-string
Use SSZ types in p2p spec
2020-06-02 16:35:31 -06:00
Diederik Loerakker e814d52ee5
Merge pull request #1866 from ethereum/tunable-genesis
Tunable genesis
2020-06-02 22:19:13 +02:00
Danny Ryan cf7b9993b5
clarify `head_root` is for a `BeaconBlock`
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-06-02 13:51:43 -06:00
Danny Ryan 06dfff022b
add comment about default of 0x00 for genesis finalized checkpoint in p2p spec 2020-06-02 11:22:09 -06:00
Danny Ryan 671fae6efe
change note about genesis delay in p2p spec to match new GENESIS_DELAY config value; fix tests 2020-06-02 11:09:42 -06:00
Jacek Sieka 33e115f8c6
Clean up remaining `[]` List syntax
..and use List[byte, 256] for error message
2020-05-30 20:59:12 +02:00
Alex Stokes 75633cfcf1
Update link so gossipsub encodings match the correct section 2020-05-26 11:00:02 -07:00
Jacek Sieka 56309342c0
Use `Bytes32` for `error_message`
`ErrorMessage.error_message` is a leftover from an older version of SSZ
that was able to encode unbounded lists. This is no longer the case -
all collection types now have a fixed upper bound on length.

In general, the `error_message`, just like the `graffitti` field, should
not be interpreted in any particular way except for debugging and vanity
- as such, using the same type, a `Bytes32`, seems reasonable.

An alternative would be `List[byte, 256]` which maybe could be
"reasonably backwards compatible" with whatever clients are are doing
now - depending on how they are dealing with this field type that no
longer exists in the SSZ spec :) It would however be the only place
where `List[uintN, N]` is used in the current spec.

As an exercise, this could be considered a security issue since it's
essentially unbounded and undefined behaviour.
2020-05-21 15:33:47 +02:00
protolambda 522e34efcf
Fix markdown, use multiple lines for change-control, and add step >= 1 case 2020-05-20 20:46:08 +02:00
protolambda 59a43142c2
Rebased on latest BlocksByRange spec, fix conflicts, clarify single chain, even with higher step 2020-05-20 20:39:52 +02:00
Jacek Sieka a29cbebc0e
cover `step` parameter in stricter range request 2020-05-20 20:29:43 +02:00
Jacek Sieka 607e23949c
require blocks to be ordered consecutively in block range request
Per the spec, if I request range 5-10, it is permissible for a client to
answer with block 7, 9 - even if the blocks 5, 6 and 8 exist.

Because blocks 7 and 9 cannot be validated as they arrive in such a
request, it seems better to close this gap - this update adds the spec
language that forbids well-behaving clients from answering this way.
2020-05-20 20:29:37 +02:00
Danny Ryan fdc7e846df
remove incorrect table format 2020-05-19 10:37:42 -06:00
Danny Ryan 724139a1f8
change gossipsub protocol ID to /meshsub/1.1.0 2020-05-19 10:23:12 -06:00
Danny Ryan 96ab76dcb2
Merge pull request #1804 from ethereum/use-all-attnets
[for discussion] Use all attestation subnets in phase 0
2020-05-14 14:29:05 -06:00
Danny Ryan 483f9a1d7b
Update specs/phase0/p2p-interface.md
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-05-14 14:25:32 -06:00
Danny Ryan c91e017b1f
Merge pull request #1801 from ethereum/non-aggregator-att
Loosen restrictions for aggregate propogation
2020-05-14 11:01:32 -06:00
Danny Ryan 511f803496
use all attnets across the epoch even when not max committees per slot 2020-05-11 12:52:52 -06:00
Danny Ryan ef18010778
Merge pull request #1800 from ethereum/reqresp-sizes
Update p2p reqresp with explicit handling of reqresp size bounds
2020-05-11 11:48:31 -06:00
Danny Ryan ca1876e12f
Merge pull request #1795 from ethereum/clarify-blocks-request
Clarify BlocksByRange request
2020-05-11 11:39:10 -06:00
Danny Ryan 30ecd9b602
p2p PR feedback 2020-05-11 11:22:34 -06:00
protolambda fcf003859d
remove duplicate response diagram 2020-05-11 17:01:18 +02:00
Danny Ryan b4bc2038e1
clarify that clients MAY stop block requests if fork choice changes 2020-05-11 08:39:30 -06:00
Danny Ryan 7d4d3e43ef
remove aggregate clarifiyng text that is not longer valid
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-05-11 08:38:22 -06:00
Paul Hauner b3dd99f4f4
Loosen restrictions for aggregate propogation 2020-05-11 08:28:21 -06:00
protolambda a8e3fe7551
Update p2p reqresp with explicit handling of reqresp size bounds 2020-05-09 21:44:28 +02:00
Danny Ryan fdcc6d65bc
gossipsub v1.1 and extended validators for gossip conditions 2020-05-08 12:00:05 -06:00
Danny Ryan 01eaf6cc99
Clarify the response of BlocksByRange to address #1765 2020-05-08 11:09:12 -06:00
Danny Ryan 08652f543b
Merge branch 'v012x' into empty-bits-case 2020-05-07 10:17:26 -06:00
protolambda 09cae4b3cc
Handle empty-aggregation-bits case, and add tests. See #1713 2020-05-01 15:17:41 +02:00
Danny Ryan 87586837c3
remove interop from phase 0 p2p specs 2020-04-27 17:39:39 -06:00
Danny Ryan d128400da5
remove interop from header and gossip sections in network spec 2020-04-27 17:39:31 -06:00
Diederik Loerakker 9d39c292e0
Merge pull request #1763 from ethereum/master
Backport v0.11.2 hotfixes from master to dev
2020-04-28 00:18:52 +02:00
protolambda 0c67aaa68e
Include fork digest in example gossip topic name 2020-04-25 00:05:37 +02:00
Paul Hauner bf806b9efa
Require "seen" aggregates to be valid 2020-04-24 15:01:18 +10:00
Danny Ryan 11d164748c
add 'valid' when de-deduplication of attestations on gossip subnets 2020-04-22 14:45:01 -06:00
Danny Ryan d8662d49ea
Merge pull request #1730 from ethereum/bootnode-enr
add note about distributing bootnode ENRs prior to genesis
2020-04-22 14:38:38 -06:00
Danny Ryan 3d4122a2f6
add note about distributing bootnode ENRs prior to genesis 2020-04-22 14:33:57 -06:00
Jacek Sieka 4915014a19
simplify block range request description
There's room for ambiguity as to what `count` means - this clarifies
that it always relates to the slot, and not the number of blocks in the
response which allows clients to request ranges epoch by epoch (for
example) without worrying about overlaps caused by empty slots.
2020-04-20 20:03:15 +02:00
Danny Ryan e58cfedb68
clarify ssz_snappy for gossip 2020-04-16 11:12:24 -06:00
Danny Ryan 2a36f366ef
Merge pull request #1710 from paulhauner/patch-20
Tighten aggregate attn propogation condition
2020-04-07 18:56:04 -06:00
Danny Ryan 26492651b6
Merge pull request #1706 from paulhauner/patch-19
Redefine attestation propogation condition
2020-04-07 18:55:41 -06:00
Paul Hauner c96a3366fa
Tighten aggregate attn propogation condition 2020-04-07 16:07:41 +10:00
Paul Hauner 616385a094
Fix spelling mistake 2020-04-07 07:45:15 +10:00
Paul Hauner 021cb98dbb
Use epoch for attestation subnet seen-ness. 2020-04-07 07:05:51 +10:00
Danny Ryan bdf087d7f3
add notes about how to handle peer discovery and gossip topics prior to genesis 2020-04-06 09:57:23 -06:00
Paul Hauner 7d4b97240b
Redefine attestation propogation condition 2020-04-06 17:46:33 +10:00
Paul Hauner 2daa26442b
Tighten restriction on a "seen" attestation
Declares that only a verified block can stop an attestation from being propagated.

This achieves two things:

1. Ensures that clients don't need to scan invalid blocks for attestations and then modify their state based upon them.
1. Disallows "muting" attestations by sending around a junk block with that attestation in it.
2020-03-30 10:44:46 +11:00
Danny Ryan d42e08a6e1
verify proposer sig before proposer shuffling in p2p block gossip conditions 2020-03-26 11:43:32 -06:00
Danny Ryan 050b42806d
Merge pull request #1684 from ethereum/enr-ping
MetaData and Ping
2020-03-26 10:40:46 -06:00
Danny Ryan ee45cf77ef
proto feedback on MetaData 2020-03-26 07:47:20 -06:00
Danny Ryan d5a9af6469
update ping protocol to use MetaData 2020-03-25 12:08:27 -06:00
Paul Hauner 88fddf2379
Remove unneccessary clock disparity check
There is no need to mention clock disparity when comparing two static slot values (assuming the clock disparity is less than a slot, even then I don't think that's the intention).
2020-03-24 08:13:36 -06:00
Age Manning f227e026fa
Draft PING and ENR rpc protocol 2020-03-24 15:10:47 +11:00
Age Manning cf20a7ae3e
Shift some ENR fields to MAY 2020-03-24 15:07:43 +11:00
Danny Ryan e6998a61cd
remove IK handshake from noise spec (removed in core libp2p specs) 2020-03-17 10:54:48 -06:00
Danny Ryan 5315f3db35
clarify proposer_index must be from expected shuffling when validating block gossip 2020-03-13 12:00:34 -06:00
Danny Ryan a612df1119
minor typos and clarifications in fork choice 2020-03-11 16:11:42 -06:00
Danny Ryan 0881e21dc5
cleanup gossip topic fork digest based on PR feedback 2020-03-11 12:02:31 -06:00
Danny Ryan fccd3ab1ce
clarify hex-encoded bytes string representation for fork digest in gossip topic
Co-Authored-By: Diederik Loerakker <proto@protolambda.com>
2020-03-10 15:04:44 -06:00