Skip to content

Add EIP: eth_sendRawTransactionSync Method #9890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

SmoothBot
Copy link

EIP: eth_sendRawTransactionSync RPC Method for Lower Latency Transaction Submission

This EIP proposes a new JSON-RPC method eth_sendRawTransactionSync which reduces the latency between transaction submission and user confirmation by blocking until the transaction has been included in a block or safely gossiped to peers. This method addresses the user experience gap in high-frequency applications by offering stronger delivery guarantees than eth_sendRawTransaction.

@SmoothBot SmoothBot requested a review from eth-bot as a code owner June 11, 2025 05:39
@eth-bot
Copy link
Collaborator

eth-bot commented Jun 11, 2025

File EIPS/eip-7966.md

Requires 1 more reviewers from @g11tech, @lightclient, @SamWilsn

@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-interface labels Jun 11, 2025
@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Jun 11, 2025
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jun 11, 2025
@eth-bot eth-bot changed the title Add EIP: eth_sendRawTransactionSync RPC Method for Lower Latency Transaction Submission Add EIP: eth_sendRawTransactionSync Method Jun 12, 2025
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Jun 12, 2025
- `DATA`. The signed transaction data.

### Returns
- **On success**. Return the transaction receipt object as defined by the [`eth_getTransactionReceipt`](https://docs.metamask.io/services/reference/ethereum/json-rpc-methods/eth_gettransactionreceipt/) method. If the transaction is not yet included in a block, the fields blockHash will be populated but all other fields will be `null` or omitted depending on the client implementation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid explaining "why" certain decisions were made.
"If the transaction is not yet included in a block, the fields blockHash will be populated but all other fields will be null or omitted depending on the client implementation." This explanation is behavioral context that's implementation-specific and not a strict part of the “what” — this belongs in a Rationale

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have refined the description.

Upon receiving an `eth_sendRawTransactionSync` request, the handler function performs the follow task.
- Submit the signed transaction to the network as per the existing `eth_sendRawTransaction` semantics.
- Poll for the transaction receipt at short intervals (e.g., every 10 milliseconds).
- If the receipt is found within the specified timeout, return it immediately.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a specification. This should use precise language like (all-caps MUST, SHOULD, MAY, etc.) for example "MUST poll every X milliseconds"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this has been addressed in 56a439 and a65994

- **On standard error**. Return A JSON-RPC error object consistent with existing RPC error formats.

### Behavior
Upon receiving an `eth_sendRawTransactionSync` request, the handler function performs the follow task.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Upon receiving an `eth_sendRawTransactionSync` request, the handler function performs the follow task.
Upon receiving an `eth_sendRawTransactionSync` request, the handler function performs the following tasks.

- align blockchain interactions closer to traditional Web2 request-response patterns;
- maintain backward-compatibility and optionality, preserving existing RPC methods and semantics.

## Specification

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In here, we need to have consistent use of RFC 2119 keywords (MUST, SHOULD, etc.). For example, in places where we currently have phrases like "this should be", we need to revise them to use proper normative language, such as:

  • "The handler function MUST submit the signed transaction to the network."
  • "The implementation MUST poll for the receipt at an interval not greater than 100 milliseconds until the timeout elapses."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this has been addressed in 56a439 and a65994

}
```

Other implementations such as [`go-ethereum`](https://github.com/ethereum/go-ethereum) can utilize channel to signify receipt availability instead of polling. A prototype is being developed in reth:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Other implementations such as [`go-ethereum`](https://github.com/ethereum/go-ethereum) can utilize channel to signify receipt availability instead of polling. A prototype is being developed in reth:
Other implementations such as [`go-ethereum`](https://github.com/ethereum/go-ethereum) can utilize a channel to signify receipt availability instead of polling. A prototype is being developed in reth:


## Reference Implementation

A minimal reference implementation can be realized by wrapping existing `eth_sendRawTransaction` submission with a polling loop that queries `eth_getTransactionReceipt` at short intervals until receipt is found or timeout occurs. Polling intervals and timeout values can be tuned by client implementations to optimize performance.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A minimal reference implementation can be realized by wrapping existing `eth_sendRawTransaction` submission with a polling loop that queries `eth_getTransactionReceipt` at short intervals until receipt is found or timeout occurs. Polling intervals and timeout values can be tuned by client implementations to optimize performance.
A minimal reference implementation can be realized by wrapping existing `eth_sendRawTransaction` submission with a polling loop that queries `eth_getTransactionReceipt` at short intervals until receipt is found or a timeout occurs. Polling intervals and timeout values can be tuned by client implementations to optimize performance.


## Backwards Compatibility

This EIP introduces a new RPC method and does not modify or deprecate any existing methods. Clients and servers that do not implement this method will continue operating normally. Existing applications using `eth_sendRawTransaction` are unaffected. Clients not supporting the method will simply return `method not found`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This EIP introduces a new RPC method and does not modify or deprecate any existing methods. Clients and servers that do not implement this method will continue operating normally. Existing applications using `eth_sendRawTransaction` are unaffected. Clients not supporting the method will simply return `method not found`.
This EIP introduces a new RPC method and does not modify or deprecate any existing methods. Clients and servers that do not implement this method will continue operating normally. Existing applications using `eth_sendRawTransaction` are unaffected. Clients that do not support the method will simply return `method not found`.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jun 16, 2025
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jun 16, 2025
Copy link

The commit 3f74e21 (as a parent of 7e408a0) contains errors.
Please inspect the Run Summary for details.

@g11tech
Copy link
Contributor

g11tech commented Jun 23, 2025

@SmoothBot let us know when you have fixed the issues flagged by the bot and this PR is draft ready

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jun 23, 2025
@LampardNguyen234
Copy link

@SmoothBot let us know when you have fixed the issues flagged by the bot and this PR is draft ready

Thank you @g11tech, all issues flagged by the bot have been resolved now.


- The handler function MUST submit the signed transaction to the network as per the existing `eth_sendRawTransaction` semantics.
- The handler function MUST wait for the transaction receipt until the timeout elapses.
- If the receipt is found within the specified timeout, the handler function MUST return it immediately.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mention the timeout is specified but not how it is specified. Should it be a parameter to this function or should it be configured by the node?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wjmelements, thank you for the comment. We have addressed the timeout issue in 316cf05.

@g11tech
Copy link
Contributor

g11tech commented Jun 24, 2025

@SmoothBot seems like there are a few things more flagged by other technical reviewers which you might want to accomodate or respond to. let me know when you are done so we can consider it for merging this draft

@SmoothBot
Copy link
Author

@SmoothBot seems like there are a few things more flagged by other technical reviewers which you might want to accomodate or respond to. let me know when you are done so we can consider it for merging this draft

Thanks, there are a few technical discussions happening still. We will ping you when it's ready 🙏

@LampardNguyen234
Copy link

@SmoothBot seems like there are a few things more flagged by other technical reviewers which you might want to accomodate or respond to. let me know when you are done so we can consider it for merging this draft

Thank you @g11tech, these have been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants