Commit Graph

172 Commits

Author SHA1 Message Date
Jacek Sieka ffc78e9928
fixes
* separate constant for blob requests
* pedantry
2023-02-10 10:40:43 +01:00
Jacek Sieka deb82e2f26
fix member 2023-02-07 11:23:18 +01:00
Jacek Sieka 1e07685f74
doctoc 2023-02-07 11:14:59 +01:00
Jacek Sieka 65d3c6aeb6
Free the blobs
This PR reintroduces and further decouples blocks and blobs in EIP-4844,
so as to improve network and processing performance.

Block and blob processing, for the purpose of gossip validation, are
independent: they can both be propagated and gossip-validated
in parallel - the decoupled design allows 4 important optimizations
(or, if you are so inclined, removes 4 unnecessary pessimizations):

* Blocks and blobs travel on independent meshes allowing for better
parallelization and utilization of high-bandwidth peers
* Re-broadcasting after validation can start earlier allowing more
efficient use of upload bandwidth - blocks for example can be
rebroadcast to peers while blobs are still being downloaded
* bandwidth-reduction techniques such as per-peer deduplication are more
efficient because of the smaller message size
* gossip verification happens independently for blocks and blobs,
allowing better sharing / use of CPU and I/O resources in clients

With growing block sizes and additional blob data to stream, the network
streaming time becomes a dominant factor in propagation times - on a
100mbit line, streaming 1mb to 8 peers takes ~1s - this process is
repeated for each hop in both incoming and outgoing directions.

This design in particular sends each blob on a separate subnet, thus
maximising the potential for parallelisation and providing a natural
path for growing the number of blobs per block should the network be
judged to be able to handle it.

Changes compared to the current design include:

* `BlobsSidecar` is split into individual `BlobSidecar` containers -
each container is signed individually by the proposer
  * the signature is used during gossip validation but later dropped.
* KZG commitment verification is moved out of the gossip pipeline and
instead done before fork choice addition, when both block and sidecars
have arrived
  * clients may verify individual blob commitments earlier
* more generally and similar to block verification, gossip propagation
is performed solely based on trivial consistency checks and proposer
signature verification
* by-root blob requests are done per-blob, so as to retain the ability
to fill in blobs one-by-one assuming clients generally receive blobs
from gossip
* by-range blob requests are done per-block, so as to simplify
historical sync
* range and root requests are limited to `128` entries for both blocks
and blobs - practically, the current higher limit of `1024` for blocks
does not get used and keeping the limits consistent simplifies
implementation - with the merge, block sizes have grown significantly
and clients generally fetch smaller chunks.
2023-02-07 11:05:51 +01:00
George Kadianakis 6e397b195b
EIP4844: Public methods take bytes as input (explicit validation) (#3224) 2023-01-25 16:15:19 +01:00
kevaundray 5eca56901e
Update polynomial-commitments.md (#3223) 2023-01-24 15:14:25 +01:00
George Kadianakis 2626126935
EIP4844: compute_kzg_proof() now takes bytes as input (#3219) 2023-01-24 14:02:22 +01:00
Danny Ryan dd5c5af117
Merge pull request #3217 from pawanjay176/remove-point-validation
Remove kzg point and blob validations in gossip
2023-01-24 10:38:03 +01:00
Pawan Dhananjay a0791712cd
Remove kzg point validations in gossip 2023-01-20 21:32:03 +05:30
Emilia Hane f1435d456d
Update p2p-interface.md 2023-01-19 21:26:21 +01:00
Hsiao-Wei Wang 04d8f28cf6
Merge pull request #3214 from asn-d6/barycentric_no_assert
EIP4844: Handle barycentric evaluation at roots of unity
2023-01-17 23:00:17 +08:00
George Kadianakis 296ba921c9 EIP4844: Handle barycentric evaluations at roots of unity 2023-01-16 17:51:50 +02:00
Etan Kissling ca32fe8347
Add docstrings to explain empty header 2023-01-13 11:19:53 +01:00
Etan Kissling 82d6267951
Merge branch 'dev' into lc-eph 2023-01-12 18:44:54 +01:00
Danny Ryan fc6bdade50
Merge pull request #3174 from terencechain/clarify-empty-blob-sidecar
EIP4844: Clarify ratelimit behavior for sidecar with zero blobs
2023-01-11 19:45:03 -07:00
Danny Ryan 8d841c864b
minor copy edit 2023-01-11 19:44:39 -07:00
terence tsao 96a553615a Add rate limit suggestion 2023-01-10 10:28:19 -08:00
Etan Kissling 53a95f0007
Merge branch 'dev' into lc-eph 2023-01-10 13:43:15 +01:00
Hsiao-Wei Wang f057f530fe
Add `historical_summaries` setup to fork.md 2023-01-10 16:45:58 +08:00
Danny Ryan ed1c6be132
Merge pull request #3185 from ethereum/fc-is_data_available
Move `is_data_available` check to fork-choice `on_block`
2023-01-06 10:55:29 -05:00
Danny Ryan 4ba2266fd5
Update specs/eip4844/fork-choice.md 2023-01-06 08:45:20 -07:00
Hsiao-Wei Wang c9f8e4fef8
Move `BlobsSidecar` 2023-01-06 23:39:04 +08:00
Hsiao-Wei Wang e154b3414c
Move `validate_blobs_sidecar` to fork-choice and add spec into execution spec scope 2023-01-06 23:19:44 +08:00
Danny Ryan 75937e5b55
Merge pull request #3181 from terencechain/4844-enable-withdrawal
EIP4844: Enable withdrawal
2023-01-06 10:12:57 -05:00
Hsiao-Wei Wang e937e2abbc
Apply suggestions from code review
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2023-01-06 13:08:32 +08:00
Etan Kissling 375436094c
Merge branch 'dev' into lc-eph 2023-01-05 13:53:29 +01:00
henridf 7d2482a025
Fix typo in eip4844/BeaconBlocksByRoot docs 2023-01-04 16:29:15 +01:00
Hsiao-Wei Wang bb3601dcfa
Merge branch 'dev' into pr3181 2023-01-04 01:07:30 +08:00
Hsiao-Wei Wang 6b94aab3af
Move `is_data_available` check to fork-choice `on_block` 2023-01-04 00:15:15 +08:00
Etan Kissling b0471511e5
Merge branch 'dev' into lc-eph 2023-01-03 15:36:37 +01:00
Danny Ryan 280f6e0568
Merge pull request #3167 from ethereum/akzg-tp
Add `compute_kzg_proof` as a public method
2023-01-01 14:14:53 -06:00
Dankrad Feist 4c573ff6b9 Add compute_kzg_proof to public methods 2023-01-01 14:04:56 -06:00
terence tsao 2afb02ba30 Fix Toc 2022-12-28 18:49:02 -08:00
terence tsao 45b1eb7979 EIP4844: Enable withdrawal 2022-12-28 18:42:24 -08:00
terence tsao 7204b5c3aa Merge branch 'clarify-empty-blob-sidecar' of github.com:terencechain/eth2.0-specs into clarify-empty-blob-sidecar 2022-12-23 22:24:40 +08:00
terence tsao 491bb1d207 Clean ups 2022-12-23 22:21:51 +08:00
terencechain 518c49bbba
Update specs/eip4844/p2p-interface.md
Co-authored-by: g11tech <develop@g11tech.io>
2022-12-23 20:47:14 +08:00
terence tsao 42121adeb0 Clarify what empty means 2022-12-23 14:30:30 +08:00
terence tsao 5a75704e37 Clarify behavior for empty blobs sidecar 2022-12-23 14:02:33 +08:00
Danny Ryan 4f77493b0f
Merge pull request #3169 from ethereum/false-after-prune
Handle unavailable data outside of prune window
2022-12-20 17:15:17 -07:00
Danny Ryan e6f5ab9a16
Merge pull request #3154 from dapplion/blobs-byroot-errorcode
Clarify BeaconBlockAndBlobsSidecarByRoot no blob available
2022-12-20 17:14:39 -07:00
djrtwo 4be8f7d669 clarify how to handle unavailable data outside of the prune window 2022-12-19 10:15:18 -07:00
dapplion fac4b49a9b Change range lower bound to EIP4844_FORK_EPOCH 2022-12-15 11:27:33 +07:00
dapplion eaa1268dc4 Place dominant factor first 2022-12-15 11:12:37 +07:00
dapplion 29d36d8a78 Merge two sentences + drop range 2022-12-15 11:11:15 +07:00
George Kadianakis 05c2eb8ace
Merge pull request #3159 from kevaundray/patch-3
EIP4844: Clarify that z should not be in the domain
2022-12-14 17:47:48 +02:00
Danny Ryan f7187a6657
Merge pull request #3156 from ethereum/kzg-trusted-setup
Update G2 trusted setup length to 65
2022-12-14 08:15:53 -07:00
kevaundray e467ab9556
clarify that z should not be in the domain 2022-12-14 11:01:40 +00:00
Justin Traglia 224b0f20cf Add missing qoute 2022-12-13 11:53:18 -06:00
Justin Traglia 26605ac724 Fix some nits in eip4844 specs 2022-12-13 10:07:37 -06:00