-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
ethclient: use 'input', not 'data' as field for transaction input #28078
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just a heads up, guys. This will break with the current implementation of prysm since they use |
Unfortunately we cannot use v1.13.0, as that breaks our tests. See ethereum/go-ethereum#28078 and NomicFoundation/hardhat#4438
FYI, this breaks calling contracts with ethclient against an erigon node, as erigon still expects the data to be passed in the |
That is very odd, https://github.com/ledgerwatch/erigon/blob/devel/core/types/transaction_marshalling.go#L29 Data *hexutility.Bytes `json:"input"` Are you quite certain? |
Not sure if their RPC implementation uses a different decoding routine. But our tests against a node show that behavior: erigontech/erigon#8437 Edit: I believe erigon uses the following definition in this case https://github.com/ledgerwatch/erigon/blob/fe263ae02e08df8119cae7eaa54e49e75141762b/interfaces.go#L118 |
That strange too, because we have the same struct: https://github.com/ethereum/go-ethereum/blob/master/interfaces.go#L142 |
Hm, looking closer, this PR description talks about "transaction input", but in fact it addresses a parameter used in ? |
The spec object is for both. I think what happened in erigon might be, they used |
The hive-tests indicate that erigon does support |
…nput (ethereum#28078)" This reverts commit 6a22e29.
…nput (ethereum#28078)" This reverts commit 6a22e29.
The correct name for this field is 'input' according to the Ethereum specs [0]. However, for the longest time, clients have been using 'data' and servers have been lenient to accept both, preferring 'input' over 'data' when both appear. Our lack of support for 'input' had gone unnoticed until go-ethereum decided to adjust their ethclient implementation to issue eth_call and eth_estimateGas requests with the 'input' field instead of 'data' [1]. This suddenly broke apps using this client against Lotus' Eth API. [0]: https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml#L33-L35 [1]: ethereum/go-ethereum#28078
The correct name for this field is 'input' according to the Ethereum specs [0]. However, for the longest time, clients have been using 'data' and servers have been lenient to accept both, preferring 'input' over 'data' when both appear. Our lack of support for 'input' had gone unnoticed until go-ethereum decided to adjust their ethclient implementation to issue eth_call and eth_estimateGas requests with the 'input' field instead of 'data' [1]. This suddenly broke apps using this client against Lotus' Eth API. [0]: https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml#L33-L35 [1]: ethereum/go-ethereum#28078 Co-authored-by: raulk <[email protected]>
…#11505) The correct name for this field is 'input' according to the Ethereum specs [0]. However, for the longest time, clients have been using 'data' and servers have been lenient to accept both, preferring 'input' over 'data' when both appear. Our lack of support for 'input' had gone unnoticed until go-ethereum decided to adjust their ethclient implementation to issue eth_call and eth_estimateGas requests with the 'input' field instead of 'data' [1]. This suddenly broke apps using this client against Lotus' Eth API. [0]: https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml#L33-L35 [1]: ethereum/go-ethereum#28078 Co-authored-by: raulk <[email protected]>
…nput (ethereum#28078)" This reverts commit 5cf53f5. Signed-off-by: Justin Yang <[email protected]>
…nput (ethereum#28078)" This reverts commit 5cf53f5. Signed-off-by: Justin Yang <[email protected]>
The correct name for this field is 'input' according to the Ethereum specs [0]. However, for the longest time, clients have been using 'data' and servers have been lenient to accept both, preferring 'input' over 'data' when both appear. Our lack of support for 'input' had gone unnoticed until go-ethereum decided to adjust their ethclient implementation to issue eth_call and eth_estimateGas requests with the 'input' field instead of 'data' [1]. This suddenly broke apps using this client against Lotus' Eth API. [0]: https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml#L33-L35 [1]: ethereum/go-ethereum#28078 Co-authored-by: raulk <[email protected]>
The correct name for this field is 'input' according to the Ethereum specs [0]. However, for the longest time, clients have been using 'data' and servers have been lenient to accept both, preferring 'input' over 'data' when both appear. Our lack of support for 'input' had gone unnoticed until go-ethereum decided to adjust their ethclient implementation to issue eth_call and eth_estimateGas requests with the 'input' field instead of 'data' [1]. This suddenly broke apps using this client against Lotus' Eth API. [0]: https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml#L33-L35 [1]: ethereum/go-ethereum#28078 Co-authored-by: raulk <[email protected]>
It caused me more than a half day for troubleshooting a chain about "execution reverted" issue. The go-ethereum v1.13.8 uses "input" in eth_call instead of "data". |
ethereum/go-ethereum#28078 changed geth to use "input" instead of "data", which causes issues with multiple chain RPC endpoints. Temporarily revert that for those chains.
Closes #28077
This makes ethclient / gethclient use
input
instead ofdata
for passing input with a transaction.input
is the preferred way.See #15628, and https://github.com/ethereum/go-ethereum/blob/master/signer/core/apitypes/types.go#L93