626 Commits

Author SHA1 Message Date
Paul Harris
a58b1f52dd clarify gossip sources wording 2024-12-15 08:37:22 +10:00
Justin Traglia
36bea27ca2 Merge remote-tracking branch 'origin/dev' into p2p-introductiion 2024-12-02 11:00:43 -06:00
Justin Traglia
e519845eb9 Merge branch 'dev' into delete-trailing-whitespace 2024-12-02 08:58:08 -06:00
Justin Traglia
bc7f927900 Merge pull request #3644 from nalepae/patch-2
`p2p-interface.md`: Add `quic` ENR entry.
2024-12-02 06:54:59 -06:00
Justin Traglia
eb60227357 Merge pull request #3767 from status-im/remove-ttfb
p2p: Deprecate TTFB, RESP_TIMEOUT, introduce rate limiting recommenda…
2024-10-31 09:40:07 -05:00
Jacek Sieka
a232b25e7f language 2024-10-21 09:29:28 +02:00
Justin Traglia
2445bf5194 Move p2p-interface intros to introduction section 2024-10-18 10:33:54 -05:00
Justin Traglia
c051f4f02a Fix validator fields in get_validator_from_deposit 2024-10-11 10:34:31 -05:00
Justin Traglia
68d32accf9 Delete trailing whitespace for markdown files 2024-10-11 07:54:50 -05:00
Jacek Sieka
456372e550 two streams again 2024-10-03 08:16:17 +02:00
Jacek Sieka
911019c41f constant for concurrent requests 2024-10-02 13:33:44 +02:00
Jacek Sieka
08e020e98d remove timeout constants 2024-08-23 13:38:12 +02:00
Jacek Sieka
e4919d71d8 Update specs/phase0/p2p-interface.md
Co-authored-by: Pop Chunhapanya <haxx.pop@gmail.com>
2024-05-22 07:57:43 +02:00
Jacek Sieka
f349bfcddc lint 2024-05-21 13:21:25 +02:00
Jacek Sieka
f97538719b p2p: Deprecate TTFB, RESP_TIMEOUT, introduce rate limiting recommendations
As part of the discussions surrounding EIP-7594 (peerdas), it was
highlighted that during sampling and/or data requests, the sampler does
not have timing information for when a samplee will have data available.
It is desireable to not introduce a deadline, since this artificially
introduces latency for the typical scenario where data becomes available
earlier than an agreed-upon deadline.

Similarly, when a client issues a request for blocks, it does often not
know what rate limiting policy of the serving end and must either
pessimistically rate limit itself or run the risk of getting
disconnected for spamming the server - outcomes which lead to
unnecessarily slow syncing as well as testnet mess with peer scoring and
disconnection issues.

This PR solves both problems by:

* removing the time-to-first-byte and response timeouts allowing
requesters to optimistically queue requests - the timeouts have
historically not been implemented fully in clients to this date
* introducing a hard limit in the number of concurrent requests that a
client may issue, per protocol
* introducing a recommendation for rate limiting that allows optimal
bandwidth usage without protocol changes or additional messaging
roundtrips

On the server side, an "open" request does not consume significant
resources while it's resting, meaning that allowing the server to manage
resource allocation by slowing down data serving is safe, as long as
concurrency is adequately limited.

On the client side, clients must be prepared to handle slow servers
already and they can simply apply their existing strategy both to
uncertainty and rate-limiting scenarios (how long before timeout, what
to do in "slow peer" scenarios).

Token / leaky buckets are a classic option for rate limiting with
desireable properties both for the case when we're sending requests to
many clients concurrently (getting good burst performance) and when the
requestees are busy (by keeping long-term resource usage in check and
fairly serving clients)
2024-05-14 17:15:44 +02:00
Navie Chan
191833bd0a index from AttestationData 2024-05-07 19:00:55 +03:00
Manu NALEPA
d46d27514a p2p-interface.md: Add quic ENR entry. 2024-04-02 13:40:24 +02:00
Hsiao-Wei Wang
1a65d4f648 Merge pull request #3627 from status-im/seen-ttl
Align `seen_ttl` with attestation lifetime
2024-03-29 10:29:31 +08:00
Mikhail Kalinin
702ac28858 eip7549: flatten aggregate_bits 2024-03-25 16:43:19 +06:00
Jacek Sieka
1242368b58 Align seen_ttl with attestation lifetime
https://github.com/ethereum/consensus-specs/pull/3360 effectively
extends the valid lifetime of an attestation/aggregate to 2 epochs -
this means that an aggregate that was published at the beginning of a
slot now is valid per the gossip rules up to 2 epochs later.

Then net effect of the above change is that peers are allowed to
republish old aggregates and attestations and libp2p will not stop the
spread with the settings we recommend - instead the messages will have
to be stopped with the "attestation cover rule" or similar, even though
they have been observed already.

Significant amounts of this kind of spam have been observed on the
aggregate channel in particular leading to a 5x increase in aggregate
traffic as some clients republish these old messages in spite of the
"attestation cover rule" which should have stopped them - this simple
change will provide an additional layer of protection against such bugs.
2024-03-19 08:53:54 +01:00
dapplion
38f269ca12 Update spec with @mkalinin suggestions 2024-03-05 20:58:05 +08:00
dapplion
accee2b8be Merge remote-tracking branch 'upstream/dev' into attestation-index 2024-03-05 17:19:49 +08:00
Mikhail Kalinin
3e2650811e Introduce UINT64_MAX_SQRT 2024-02-16 13:39:46 +06:00
Hsiao-Wei Wang
e3d91d8e2a Rename MAX_UINT_64 -> UINT64_MAX 2024-02-15 15:00:56 +08:00
Hsiao-Wei Wang
7076fb2b75 Handle integer_squareroot bound case 2024-02-14 17:18:05 +08:00
danny
a35d783b1c Merge pull request #3543 from etan-status/gv-finstore
Use fork choice to determine `finalized_checkpoint` in gossip validation
2024-01-16 09:06:32 -07:00
danny
8983893009 Merge pull request #3552 from etan-status/gv-alignaggregate
Align gossip validation for aggregates with single attestations
2024-01-16 08:59:02 -07:00
Hsiao-Wei Wang
be8b30a593 Merge branch 'dev' into fork-choice-changes-for-confirmaton-rule 2024-01-09 02:06:12 +08:00
dapplion
e8e00f332a move attestation index outside signed message 2023-12-05 14:16:07 +02:00
danny
d343b6f1d9 Apply suggestions from code review 2023-12-04 07:47:12 -07:00
Enrico Del Fante
ba09761ec3 remove gossip failure rules 2023-12-01 18:36:25 +01:00
Enrico Del Fante
dad09f64b3 Update specs/phase0/p2p-interface.md
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
2023-12-01 08:28:29 +01:00
Enrico Del Fante
c661e20e60 simplify and add a new rule 2023-11-30 16:11:33 +01:00
Enrico Del Fante
662c6ebc38 remove the last consider 2023-11-30 15:20:35 +01:00
Enrico Del Fante
4c5e5c886f Update specs/phase0/p2p-interface.md
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
2023-11-30 15:20:35 +01:00
Enrico Del Fante
6bbdeb88e0 Update specs/phase0/p2p-interface.md
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
2023-11-30 15:20:34 +01:00
Enrico Del Fante
c46c4ec7cb fix typo 2023-11-30 15:20:34 +01:00
Enrico Del Fante
e664d407ca Specify RPC byRoot blocks-sidecars elegibility 2023-11-30 15:20:34 +01:00
Etan Kissling
321870cbe9 Align gossip validation for aggregates with single attestations
A couple gossip validation rules are only specced out for single
un-aggregated attestations, but are also checked by implementations
for aggregates. This adds a copy of the missing gossip validation rules
to the aggregated attestation docs.
2023-11-19 23:12:11 -08:00
Etan Kissling
e30e8af58f Use fork choice to determine finalized_checkpoint in gossip validation
Update gossip validation rules to use the highest `finalized_checkpoint`
across _all_ branches (`store.finalized_checkpoint`), instead of the one
on the currently selected branch (`state.finalized_checkpoint`) when
deciding whether to ignore a block / blob because they are already
finalized.
2023-11-06 12:20:11 +01:00
Hsiao-Wei Wang
d8440f8bb4 Merge branch 'dev' into pr3034 2023-10-26 23:51:35 +08:00
Michael Sproul
3f1bc20512 Clarifications for proposer boost reorgs 2023-10-26 17:44:59 +11:00
Hsiao-Wei Wang
0f61819e5c Update other specs accordingly and re-order "Proposer head and reorg helpers" section 2023-10-20 14:41:51 +08:00
Hsiao-Wei Wang
651db2f858 Refactoring 2023-10-19 19:18:29 +08:00
Max Inden
909388ba8d fix(sepcs/p2p): link to libp2p Yamux specification
Previously the specification would link to the Hashicorp Yamux specification.

https://github.com/hashicorp/yamux/blob/master/spec.md

Since adoption by libp2p, there have been multiple refinements to the original specification. The improved specification can be found in the libp2p specification repository.

https://github.com/libp2p/specs/blob/master/yamux/README.md
2023-09-14 17:08:44 +02:00
Michael Sproul
45a3615816 Allow honest validators to reorg late blocks 2023-09-12 15:27:10 +10:00
Hsiao-Wei Wang
c5c7233e49 Merge pull request #3352 from michaelsproul/boost-first-block
Apply proposer boost to first block in case of equivocation
2023-09-12 10:56:58 +08:00
zhiqiangxu
6f57e2bd26 "can slashable" => "can be slashable" 2023-08-09 11:13:39 +08:00
Hsiao-Wei Wang
63c39dbaff Merge branch 'dev' into pr3352 2023-08-04 14:45:47 +08:00
Lion - dapplion
cc4c810b8f Whisk: complete TODO items in fork logic (#3427)
* Complete TODO items in fork logic

* Simpler underflow protection

* Add saturating_sub
2023-06-19 17:08:51 +03:00