|
1 | 1 | # Ethereum Wire Protocol (ETH)
|
2 | 2 |
|
3 | 3 | 'eth' is a protocol on the [RLPx] transport that facilitates exchange of Ethereum
|
4 |
| -blockchain information between peers. The current protocol version is **eth/67**. See end |
| 4 | +blockchain information between peers. The current protocol version is **eth/68**. See end |
5 | 5 | of document for a list of changes in past protocol versions.
|
6 | 6 |
|
7 | 7 | ### Basic Operation
|
@@ -56,6 +56,11 @@ state of that block.
|
56 | 56 |
|
57 | 57 | ### Block Propagation
|
58 | 58 |
|
| 59 | +**Note: after the PoW-to-PoS transition ([The Merge]), block propagation is no longer |
| 60 | +handled by the 'eth' protocol. The text below only applies to PoW and PoA (clique) |
| 61 | +networks. Block propagation messages (NewBlock, NewBlockHashes...) will be removed from |
| 62 | +the protocol in a future version.** |
| 63 | + |
59 | 64 | Newly-mined blocks must be relayed to all nodes. This happens through block propagation,
|
60 | 65 | which is a two step process. When a [NewBlock] announcement message is received from a
|
61 | 66 | peer, the client first verifies the basic header validity of the block, checking whether
|
@@ -379,17 +384,19 @@ block.
|
379 | 384 |
|
380 | 385 | ### NewPooledTransactionHashes (0x08)
|
381 | 386 |
|
382 |
| -`[txhash₁: B_32, txhash₂: B_32, ...]` |
| 387 | +`[[txtype₁: P, txtype₂: P, ...], [txsize₁: B_4, txsize₂: B_4, ...], [txhash₁: B_32, txhash₂: B_32, ...]]` |
383 | 388 |
|
384 | 389 | This message announces one or more transactions that have appeared in the network and
|
385 |
| -which have not yet been included in a block. To be maximally helpful, nodes should inform |
386 |
| -peers of all transactions that they may not be aware of. |
| 390 | +which have not yet been included in a block. Note that the message payload contains three |
| 391 | +sub-lists containing the [transaction types], sizes, and hashes of the announced |
| 392 | +transactions. All three sub-lists must be of equal length. |
387 | 393 |
|
388 |
| -The recommended soft limit for this message is 4096 hashes (128 KiB). |
| 394 | +The recommended soft limit for this message is 4096 hashes (~150 KiB). |
389 | 395 |
|
390 |
| -Nodes should only announce hashes of transactions that the remote peer could reasonably be |
391 |
| -considered not to know, but it is better to return more transactions than to have a nonce |
392 |
| -gap in the pool. |
| 396 | +To be maximally helpful, nodes should inform peers of all transactions that they may not |
| 397 | +be aware of. However, nodes should only announce hashes of transactions that the remote |
| 398 | +peer could reasonably be considered not to know, but it is better to return more |
| 399 | +transactions than to have a nonce gap in the pool. |
393 | 400 |
|
394 | 401 | ### GetPooledTransactions (0x09)
|
395 | 402 |
|
@@ -443,14 +450,20 @@ The recommended soft limit for Receipts responses is 2 MiB.
|
443 | 450 |
|
444 | 451 | ## Change Log
|
445 | 452 |
|
| 453 | +### eth/68 ([EIP-5793], October 2022) |
| 454 | + |
| 455 | +Version 68 changed the [NewPooledTransactionHashes] message to include types and sizes of |
| 456 | +the announced transactions. Prior to this update, the message payload was simply a list of |
| 457 | +hashes: `[txhash₁: B_32, txhash₂: B_32, ...]`. |
| 458 | + |
446 | 459 | ### eth/67 ([EIP-4938], March 2022)
|
447 | 460 |
|
448 | 461 | Version 67 removed the GetNodeData and NodeData messages.
|
449 | 462 |
|
450 | 463 | - GetNodeData (0x0d)
|
451 |
| - `[request_id: P, [hash_0: B_32, hash_1: B_32, ...]]` |
| 464 | + `[request-id: P, [hash₁: B_32, hash₂: B_32, ...]]` |
452 | 465 | - NodeData (0x0e)
|
453 |
| - `[request_id: P, [value_0: B, value_1: B, ...]]` |
| 466 | + `[request-id: P, [value₁: B, value₂: B, ...]]` |
454 | 467 |
|
455 | 468 | ### eth/66 ([EIP-2481], April 2021)
|
456 | 469 |
|
@@ -544,7 +557,10 @@ Version numbers below 60 were used during the Ethereum PoC development phase.
|
544 | 557 | [EIP-2464]: https://eips.ethereum.org/EIPS/eip-2464
|
545 | 558 | [EIP-2481]: https://eips.ethereum.org/EIPS/eip-2481
|
546 | 559 | [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
|
| 560 | +[transaction types]: https://eips.ethereum.org/EIPS/eip-2718 |
547 | 561 | [EIP-2976]: https://eips.ethereum.org/EIPS/eip-2976
|
548 | 562 | [EIP-4938]: https://eips.ethereum.org/EIPS/eip-4938
|
| 563 | +[EIP-5793]: https://eips.ethereum.org/EIPS/eip-5793 |
| 564 | +[The Merge]: https://eips.ethereum.org/EIPS/eip-3675 |
549 | 565 | [London hard fork]: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md
|
550 | 566 | [Yellow Paper]: https://ethereum.github.io/yellowpaper/paper.pdf
|
0 commit comments