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

Calling eth_signTransaction via JSON RPC reports "gas not specified" when gas field missing in transaction #22223

Closed
th4s opened this issue Jan 23, 2021 · 4 comments

Comments

@th4s
Copy link

th4s commented Jan 23, 2021

According to the JSON RPC spec eth_signTransaction uses a gas default. However, when trying to sign a transaction with the gas field missing, geth reports { code: -32000, message: "gas not specified" }.

This does not happen when e.g. using the same transaction with the eth_sendTransaction procedure.

I am not sure if this is intended behavior or a bug. This behavior was observed using geth in --dev mode.

@th4s th4s added the type:docs label Jan 23, 2021
@MariusVanDerWijden
Copy link
Member

Yeah you're right, some methods calculate meaningful default values for the gas, gasprice and other fields while others do not. We're currently looking into creating a new standard for JSON-RPC requests s.th. we can properly test against it and find issues like this. If it is okay for you, I would propose not to fix this bug right now but rather wait until the new specification is written.

@th4s
Copy link
Author

th4s commented Feb 3, 2021

Thanks for the info. I am currently writing an alternative web3 implementation and noticed this one because I run some tests as integration tests against a geth node in --dev mode. There are some other deviations from the spec. Is there any interest to collect these deviations at some place?

From my side there is no need to fix this and we can wait for the new spec :)

@MariusVanDerWijden
Copy link
Member

Yes, we collect these deviations here: ethereum-oasis-op/eth1.x-JSON-RPC-API-standard#5
If you're interested in joining the calls about the JSON-RPC spec you can join the Ethereum R&D discord, there's a json-rpc-api channel there

@th4s
Copy link
Author

th4s commented Feb 4, 2021

Thanks for the link :) I will add my findings there. Also thanks for the discord link 👍

@th4s th4s closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants