Skip to content
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

sendTransaction method of RPC should validate and reject invalid transaction earlier #1687

Closed
jangko opened this issue Aug 17, 2023 · 0 comments · Fixed by #1698
Closed

sendTransaction method of RPC should validate and reject invalid transaction earlier #1687

jangko opened this issue Aug 17, 2023 · 0 comments · Fixed by #1698
Labels
bug Something isn't working medium refactoring RPC JSON-RPC over HTTP/websocket txpool tx pool related issue

Comments

@jangko
Copy link
Contributor

jangko commented Aug 17, 2023

Instead of waiting the transaction to be validated by the executor, the RPC should reject and respond with error.
This need refactor validateTransaction into complete and basic validation.

basic ValidateTransaction is a helper method to check whether a transaction is valid
according to the consensus rules, but does not check state-dependent validation
(balance, nonce, etc).

The txpool should use this basic transaction validation and reject immediately invalid txs.
The RPC method should query the rejection status from txpool and see if it's rejected.

move inPoolAndOk from graphql/ethapi.nim and sync/handlers/eth.nim to txpool.

@jangko jangko added bug Something isn't working refactoring RPC JSON-RPC over HTTP/websocket txpool tx pool related issue medium labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium refactoring RPC JSON-RPC over HTTP/websocket txpool tx pool related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant