-
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
accounts/abi.bind: don't fetch head in transact unless required #25988
Conversation
if GasFeeCap and GasTipCap are specified no need to retrieve head
.devcontainer/Dockerfile |
The change looks kinda reasonable to me, could you explain your reasoning a bit more and add a test maybe? |
@MariusVanDerWijden I guess it's for avoiding fetching head. Since we are already in London fork and 1559 is already activated, it's unnecessary to apply the check(header.basefee == nil) at this moment. But personally I still feel the check is necessary, mostly for other geth-based chains. They may or may not activate the 1559. |
I have used abigen to generate code for create and sends some transactions to a contract, but in some cases I dont need to send a tx I only need to produce a tx so I have used TransactOpts.NoSend and I send nil to NewContract instance as the client. |
Maybe you can just setup the client instance? |
When I want to use EIP-712 to produce input data and I dont have access to Internet so fetching head is just an overhead and a problem |
I get your point, but I don't think we will hold the condition that: sign transaction doesn't need any network connection. There are a few cases that we need to retrieve information from the node to fulfill the transaction a bit
Generally, the network access is required in our library I think. |
Clef is another tool which designed for off-line signing, which also supports EIP-712. Maybe it's something suitable for you?https://geth.ethereum.org/docs/clef/introduction |
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
…reum#25988) If GasFeeCap and GasTipCap are specified, we don't need to retrieve the head block for constructing a transaction
if GasFeeCap and GasTipCap are specified no need to retrieve head