Repository navigation
Conversation
…nsactionRequest The nonce, latest block, and priority fee were requested one after another, although none of them depends on the others when the chain has no fee hooks. They are now requested together, so preparing a transaction takes two round trips instead of four once the chain's EIP-1559 support is cached. Chains that define function fee hooks keep the sequential order, since the hooks receive the block and the request.
|
@backseats is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: d0b3d03 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Member
|
Thanks @backseats! Superseded by #5505, which keeps your commit and adds the review fixes on top (nonce error precedence, fee hook detection, and http-transport based tests). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
prepareTransactionRequestrequests the nonce, the latest block, and the priority fee one after another, although none of them depends on the others when the chain has no fee hooks. This PR requests them together.eth_estimateGasstill runs last, with the nonce and fees filled in.Effect
Traced with a local account on Base and 100 ms of simulated latency per RPC, on a node without
eth_fillTransaction:mainThe first transaction gains less because the block is needed to detect EIP-1559 support before the priority fee can be requested. That result is cached per client.
With
batch: trueon thehttptransport, the three requests are sent as one batch.Behavior
fees(baseFeeMultiplier,defaultPriorityFee,estimateFeesPerGas,maxPriorityFeePerGas) keep the sequential order, because those hooks receive the block and the request.type: 'eip1559'is forced on a chain without EIP-1559,eth_maxPriorityFeePerGasis sent before the sameEip1559FeesNotSupportedErroris thrown.internal_estimateMaxPriorityFeePerGasaccepts a block promise as well as a block, so itseth_gasPricefallback reuses the block request instead of making a second one.Tests
Two tests in
prepareTransactionRequest.test.tsrecord which requests are pending when each request is sent. One asserts that the three requests overlap, and fails onmain. The other asserts that they stay sequential on a chain with a fee hook.Locally,
args: maxFeePerGas (under default tip)(witheth_fillTransaction) andestimateGas > args: blobsfail for me onmainas well as on this branch, so I left them alone. I did not run the Tempo suites.