Skip to content

Commit

Permalink
Add EIP-5793: eth/68: Add transaction type to tx announcement (ethere…
Browse files Browse the repository at this point in the history
…um#5793)

* add eth/68 proposal

* eip-5793: rename draft md

* eip-5793: updated links

* formatting

* weird fixes for the bot

* Fix intiial errors

* eip-5793: update eip

* EIP-5793: minor tweaks and clarifications

* Update EIPS/eip-5793.md

Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>

* Update EIPS/eip-5793.md

Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>

* Update EIPS/eip-5793.md

Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>

* eip-5793: fix markdown lint errors

Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
  • Loading branch information
4 people authored and nachomazzara committed Jan 13, 2023
1 parent a16511f commit 22edfbc
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions EIPS/eip-5793.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
eip: 5793
title: eth/68 - Add tx type to tx announcement
description: Adds the transaction type and transaction size to tx announcement messages in the wire protocol
author: Marius van der Wijden (@MariusVanDerWijden)
discussions-to: https://ethereum-magicians.org/t/eip-5793-eth-68-add-transaction-type-to-tx-announcement/11364
status: Draft
type: Standards Track
category: Networking
created: 2022-10-18
requires: 2464, 2481, 4938
---

## Abstract

The Ethereum Wire Protocol defines request and response messages for exchanging data between clients. The `NewPooledTransactionHashes` message announces transactions available in the node. This EIP extends this announcement message such that beside the transaction hashes, the node sends the transaction types and their sizes (as defined in [EIP-2718](./eip-2718.md)) as well.

## Motivation

The `NewPooledTransactionHashes` message announces transaction hashes, allowing the peer to selectively fetch transactions it does not yet have.

[EIP-4844](./eip-4844.md) introduces a new transaction type for blob transactions. Since these blob transactions are large, naively broadcasting them to `sqrt(peers)` could significantly increase bandwidth requirements. Adding the transaction type and the size to the announcement message will allow nodes to select which transactions they want to fetch and also allow them to load balance or throttle peers based on past behavior.

The added metadata fields will also enable future - upgradeless - protocol tweaks to prevent certain transaction type (e.g. blob transactions) or certain transaction sizes (e.g. 128KB+) from being blindly broadcast to many peers. Enforcing announcements only and retrieval on demand would ensure a much more predictable networking behavior, limiting the amplification effect of transaction propagation DoS attack.

## Specification

Modify the `NewPooledTransactionHashes (0x08)` message:

* **(eth/67)**: `[hash_0: B_32, hash_1: B_32, ...]`
* **(eth/68)**: `[[type_0: B_1, type_1: B_1, ...], [size_0: B_4, size_1: B_4, ...], [hash_0: B_32, hash_1: B_32, ...]]`

## Rationale

This change will make the `eth` protocol future-proof for new transaction types that might not be relevant for all nodes. It gives the receiving node better control over the data it fetches from the peer as well as allow throttling the download of specific types.

## Backwards Compatibility

This EIP changes the `eth` protocol and requires rolling out a new version, `eth/68`. Supporting multiple versions of a wire protocol is possible. Rolling out a new version does not break older clients immediately, since they can keep using protocol version `eth/67`.

This EIP does not change consensus rules of the EVM and does not require a hard fork.

## Security Considerations

None

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).


0 comments on commit 22edfbc

Please sign in to comment.