5777 Commits

Author SHA1 Message Date
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
George Kadianakis
fdeff744ff
EIP-7594: Add a missing check and a missing test vector (#3765) 2024-05-14 17:18:14 +03:00
Nishant Das
8f73a47423
Update p2p-interface.md 2024-05-09 16:14:52 +08:00
Nishant Das
b9befda08b
Update p2p-interface.md 2024-05-09 16:03:55 +08:00
Hsiao-Wei Wang
812ac2ce8f
Merge pull request #3759 from jtraglia/ext-aggregate-and-proof
Add electra version of AggregateAndProof
2024-05-08 20:25:06 +08:00
Justin Traglia
93c043a647 Revert moving IndexedAttestation
I'll do this in a separate PR.
2024-05-07 19:14:48 -05:00
Justin Traglia
f3d0a0e89b Move containers to validator.md 2024-05-07 19:13:24 -05:00
Justin Traglia
8aed03767a Change "new" to "modified" 2024-05-07 16:37:23 -05:00
Justin Traglia
0da03ab5ac Update TOC 2024-05-07 16:33:06 -05:00
Justin Traglia
99ccfe0163 Add electra version of AggregateAndProof 2024-05-07 16:29:49 -05:00
Navie Chan
191833bd0a index from AttestationData 2024-05-07 19:00:55 +03:00
Hsiao-Wei Wang
313a64e9c1
Merge pull request #3748 from ethereum/fix-get_custody_columns
Fix `get_custody_columns`
2024-05-07 22:43:46 +08:00
Hsiao-Wei Wang
9ffd08a9dc
The return values MUST be sent in (slot, column_index) order. 2024-05-07 20:28:34 +08:00
Hsiao-Wei Wang
fdad206f3c
Apply @dankrad's suggestion 2024-05-07 20:26:56 +08:00
Hsiao-Wei Wang
950136c50d
Apply suggestions from code review
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2024-05-07 18:30:28 +08:00
Hsiao-Wei Wang
34756a81c6
Add DataColumnSidecarsByRange v1 Req/Resp 2024-05-06 19:11:23 +08:00
Hsiao-Wei Wang
9c1acbb5e5
Fix get_custody_columns 2024-05-06 17:25:47 +08:00
George Kadianakis
1ef75e0875 Be consistent between ids and indices 2024-05-03 19:00:51 +03:00
Kevaundray Wedderburn
5699eedd4d pad column_indices 2024-05-03 16:43:11 +01:00
Mikhail Kalinin
e0ee2808d8
Merge pull request #3740 from rkapka/get-committee-indices-typo
EIP-7549: Fix typo in `get_committee_indices`
2024-05-02 17:48:42 +06:00
rkapka
c4e8dc23f4 Fix typo in get_committee_indices 2024-05-02 16:54:17 +09:00
kevaundray
e7b49dc670
chore: Add type casts reducing the diff for #3697 (#3734) 2024-04-29 08:14:55 -05:00
Hsiao-Wei Wang
a4e04ebf64
Misc fix 2024-04-27 12:11:29 +08:00
Hsiao-Wei Wang
b625daf421
Merge pull request #3707 from terencechain/patch-145
Minor comment on `ExecutionLayerWithdrawalRequest`
2024-04-27 01:05:03 +08:00
Justin Traglia
b4188829b3 Rename compute_cells_and_proofs to compute_cells_and_kzg_proofs 2024-04-25 21:57:22 -05:00
Justin Traglia
4f66521208 Fix parameter indentations 2024-04-25 17:34:10 -05:00
Justin Traglia
ac1ce3b3f0 Rename verify_cell_proof to verify_cell_kzg_proof 2024-04-25 17:31:22 -05:00
Hsiao-Wei Wang
e1d71216bb
Merge pull request #3715 from ethereum/das-test-vectors
Make `get_custody_columns` return sorted values and add `get_custody_columns` tests
2024-04-25 03:01:51 +08:00
Hsiao-Wei Wang
24899b7fba
Apply suggestions from @jtraglia 2024-04-24 19:04:40 +08:00
Alex Stokes
b13e03e671
Merge pull request #3714 from kevaundray/kw/use-optimized-bls-msm
chore: use py-arkworks's multi-exp method inside of `g1_lincomb` and `g2_lincomb`
2024-04-23 11:57:13 -06:00
Alex Stokes
ddee2cefc8
Merge pull request #3711 from EchoAlice/dev
Refactor `upgrade_to_electra()`
2024-04-23 11:08:31 -06:00
Hsiao-Wei Wang
a526cdf446
Fix: use TypeVar for "point" rather than bytes 2024-04-24 00:22:20 +08:00
Hsiao-Wei Wang
bab254b0ba
Add description of multi_exp 2024-04-24 00:08:42 +08:00
Kevaundray Wedderburn
f3302a3836 - return serialized identity points
- result = None initially
2024-04-23 15:11:46 +01:00
Kevaundray Wedderburn
d28a0164d2 add is_zero check 2024-04-23 14:55:37 +01:00
Kevaundray Wedderburn
5eb19b3cef modify g1_lincomb and g2_lincomb 2024-04-23 14:21:54 +01:00
Kevaundray Wedderburn
5a74f40442 g2_lincomb uses g2_multi_exp 2024-04-23 13:38:27 +01:00
Kevaundray Wedderburn
e7e49ec71a lint fixes 2024-04-23 13:38:14 +01:00
Hsiao-Wei Wang
57c14e5400
Add get_custody_columns tests 2024-04-23 20:21:33 +08:00
Kevaundray Wedderburn
640675f628 add g1_multi_exp 2024-04-23 12:44:50 +01:00
Justin Traglia
73637c84b2
EIP-7594: Add asserts for public functions (#3684)
* Add length asserts for public PeerDAS functions

* Fix cell asserts

* Rename field variable to satisfy linter

* Add asserts for row/column indices

* Use CELLS_PER_EXT_BLOB

* Update to work with new spec changes

* Fix indentation

* Add explict check for cell_id
2024-04-23 12:12:26 +03:00
EchoAlice
b52182cdd6 Refactor upgrade_to_electra() 2024-04-22 13:31:37 -06:00
kevaundray
e51f7df77d
chore: make list copy explicit in divide_polynomialcoeff (#3706) 2024-04-22 10:43:04 -05:00
George Kadianakis
4fceca2b75
Merge pull request #3710 from kevaundray/kw/rm-field-elements-from-das-core
chore: use CELLS_PER_EXT_BLOB to compute the number of columns
2024-04-22 17:59:31 +03:00
Justin Traglia
bcd0a09e68
Integrate new Coset/CosetEvals types (#3701)
* Add CellBytes type

* Use ByteVector, not Vector

* Fix tests

* Replace b"" with []

* Apply suggestions for bytes_to_cell

* Add/integrate new CosetEvals type

* Remove accidental new line

* Fix recover_all_cells

* Fix recover_matrix

* fix CosetEvals abstraction leak

* Introduce internal Coset type for `coset_for_cell()`

* Use CosetEvals in compute_kzg_proof_multi_impl()

* update test

* satisfy linter

* Fix two nits I noticed

---------

Co-authored-by: Kevaundray Wedderburn <kevtheappdev@gmail.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2024-04-22 17:03:57 +03:00
Kevaundray Wedderburn
79d255b15a use CELLS_PER_EXT_BLOB in das-core 2024-04-22 14:08:44 +01:00
kevaundray
5c561722b8
add BLS_MODULUS to places where we subtract two integers (#3709) 2024-04-22 15:57:52 +03:00
George Kadianakis
858f51617d
Merge pull request #3708 from kevaundray/kw/hww-max-extended-matrix-size
chore: add a new config `MAX_EXTENDED_MATRIX_SIZE`
2024-04-22 15:56:51 +03:00
Kevaundray Wedderburn
3f2d498cee rename 2024-04-22 13:02:42 +01:00