Skip to content

Conversation

@aodhgan
Copy link
Contributor

@aodhgan aodhgan commented Oct 2, 2025

New RPC method eth_sendRawTransactionSync(rawTx, timeoutMs?) that submits a signed tx and blocks until a receipt is available or a timeout elapses.

Uses a ChainEvent subscription to grep receipts and filter for the receipt of interest.

Two CLI flags to tune server-side limits:

--rpc.txsync.defaulttimeout (default wait window)

--rpc.txsync.maxtimeout (upper bound; requests are clamped)

Success/timeout unit tests added.

closes #32094

@aodhgan aodhgan changed the title feat(rpc): add eth_SendRawTransactionSync internal/ethapi: add eth_SendRawTransactionSync Oct 2, 2025
@fjl fjl assigned s1na Oct 7, 2025
@s1na s1na removed the status:triage label Oct 8, 2025
@s1na
Copy link
Contributor

s1na commented Oct 8, 2025

We can do a slight refactor with this PR merged: #32697 (comment)

@s1na
Copy link
Contributor

s1na commented Oct 9, 2025

We can do a slight refactor with this PR merged: #32697 (comment)

This PR was merged ^

@aodhgan aodhgan force-pushed the ag/feat/add-ethsendRawTransactionSync branch from 0daa396 to 3a3c46a Compare October 9, 2025 19:23
@Sahil-4555
Copy link

@s1na @gawnieg
According to the EIP-7966, if a transaction is not ready to be processed, the handler should return error code 5 along with an error message. I checked the SubmitTransaction function but didn’t see this implemented—should it be added here or handling elsewhere?

@ethereumorg092-arch ethereumorg092-arch mentioned this pull request Oct 10, 2025
@aodhgan
Copy link
Contributor Author

aodhgan commented Oct 10, 2025

@s1na @gawnieg According to the EIP-7966, if a transaction is not ready to be processed, the handler should return error code 5 along with an error message. I checked the SubmitTransaction function but didn’t see this implemented—should it be added here or handling elsewhere?

The given examples (missing nonce or insufficient funds) are already covered by their own more granular codes (https://github.com/aodhgan/go-ethereum/blob/ag/feat/add-ethsendRawTransactionSync/internal/ethapi/errors.go#L102). There is an option to coalesce these into the new error code 5 but dont see much value? (Also considering the EIP says SHOULD (vs MUST)). The "node not ready to accept new transactions" seems to require a deeper set of changes? wdyt @s1na?

@Sahil-4555
Copy link

The given examples (missing nonce or insufficient funds) are already covered by their own more granular codes (https://github.com/aodhgan/go-ethereum/blob/ag/feat/add-ethsendRawTransactionSync/internal/ethapi/errors.go#L102). There is an option to coalesce these into the new error code 5 but dont see much value? (Also considering the EIP says SHOULD (vs MUST)). The "node not ready to accept new transactions" seems to require a deeper set of changes? wdyt @s1na?

Got it, that makes sense. Since the EIP says SHOULD and not MUST, it’s optional. I just wanted to check if we plan to follow that or keep using the current detailed error codes.

@s1na
Copy link
Contributor

s1na commented Oct 13, 2025

There is an option to coalesce these into the new error code 5 but dont see much value? (Also considering the EIP says SHOULD (vs MUST)). The "node not ready to accept new transactions" seems to require a deeper set of changes? wdyt @s1na?

On the nod ready-ness we could query and see if it is in sync or not, but that's not something we do for the other sendTransaction variants. I'm not sure why it was introduced to this method.

On the other point I think I agree that coalescing means losing info, and given the wording, I'd go with the current approach.

@s1na s1na added this to the 1.16.6 milestone Oct 16, 2025
Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the contribution!

@s1na s1na merged commit ff54ca0 into ethereum:master Oct 16, 2025
5 of 6 checks passed
rjl493456442 pushed a commit to rjl493456442/go-ethereum that referenced this pull request Oct 28, 2025
New RPC method eth_sendRawTransactionSync(rawTx, timeoutMs?) that
submits a signed tx and blocks until a receipt is available or a timeout
elapses.

Two CLI flags to tune server-side limits:

--rpc.txsync.defaulttimeout (default wait window)

--rpc.txsync.maxtimeout (upper bound; requests are clamped)

closes ethereum#32094

---------

Co-authored-by: aodhgan <gawnieg@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
@melgaralberto21
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EIP 7966 - eth_sendRawTransactionSync

7 participants