-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
Inconsistent API #15628
Milestone
Comments
To be fair, it's called |
fjl
added a commit
to fjl/go-ethereum
that referenced
this issue
Dec 14, 2017
The tx data field is called "input" in returned objects and "data" in argument objects. Make it so "input" can be used in args, but bail if both "input" and "data" are set. Fixes ethereum#15628
This was referenced Sep 8, 2023
2 tasks
AKACoder
added a commit
to AKACoder/EthereumRPCShell
that referenced
this issue
Sep 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The API:s are dangerously inconsistent.
Used in
eth.sendTransaction
:And we also have, returned from e.g.
getTransaction
:Not to mention
In case someone tries to resend a transaction manually by first fetching from the pool, changing the gas, and resubmitting. What the user won't know, is that the data now resides in
input
, and won't be present in the replacement tx.This is a disaster waiting to happen.
Suggested fix
We can't do simple renaming, imo.. I'd prefer doing something like this:
data
, the user passesinput
anddata
is nil, we do Xdata
, the users passes bothinput
anddata
, which are not equal, we do YAnd vice versa. Maybe X is convert+warn, and maybe Y is reject+warn.
The text was updated successfully, but these errors were encountered: