-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: eth: return the correct nonce from EthGetTransactionCount #10300
Conversation
EVM contracts track this number internally. fixes #10255
88f9b9d
to
a3bc65b
Compare
@@ -367,6 +368,29 @@ func (a *EthModule) EthGetTransactionCount(ctx context.Context, sender ethtypes. | |||
return ethtypes.EthUint64(0), xerrors.Errorf("cannot parse block param: %s", blkParam) | |||
} | |||
|
|||
// First, handle the case where the "sender" is an EVM actor. |
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.
this comment should be on line 380?
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.
It's the entire section. I've put it into a block to make that clear.
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.
Eh, I switched it to an if chain.
Related Issues
fixes #10255
Proposed Changes
In EthGetTransactionCount, get the "correct" nonce for EVM contracts in case someone is using this method to, e.g., predict CREATE addresses.
EVM contracts track this number internally.
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps