-
Notifications
You must be signed in to change notification settings - Fork 721
handle nonce for eth tx #1707
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
handle nonce for eth tx #1707
Conversation
zjb0807
left a comment
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.
Please merge master. AcalaMultiSignature::Eip1559 was added.
xlc
left a comment
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.
I am not sure if this can handle recursive calls. i.e. when an evm call somehow triggers a dispatch of another evm call. this is not yet possible but could be in future.
@xlc maybe we can do take so skip_nonce_incremental is read once |
xlc
left a comment
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.
A DispatchError should still not resulting any state change. This means you will want to make it success even if the evm execution failed and emit another event to indicate the error
|
@ermalkaleci I think doing it in |
@zjb0807 nonce is incremented before |
But I think the |
|
Acala/modules/evm/src/runner/stack.rs Lines 226 to 229 in b8e0d02
Such as this error, we also need to increase nonce. |
|
Acala/modules/evm/src/runner/state.rs Line 384 in b8e0d02
Acala/modules/evm/src/runner/state.rs Line 577 in b8e0d02
Or remove these |
|
It seems that there is no need to guarantee that the nonce must be increased. In ethereum, there are some checks before increasing nonce. |
Co-authored-by: Shaun Wang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1707 +/- ##
==========================================
+ Coverage 66.91% 73.08% +6.16%
==========================================
Files 224 173 -51
Lines 19764 19182 -582
==========================================
+ Hits 13226 14020 +794
+ Misses 6538 5162 -1376
Continue to review full report at Codecov.
|
* origin/master: (53 commits) add new audit report Use ExitReason::Revert instead of ExitReason::Error (#1772) Claim Account to use Eip-712 (#1755) Benchmark evm (#1674) support evm create rpc and allow H160 default (#1771) Update template files license header. (#1770) Fix collect_fee (#1766) handle nonce for eth tx (#1707) updated to the ORML's test coverage file (#1760) rm runtime upgrade (#1757) Happy new year 2022. (#1761) Excluded some files from test coverage (#1759) XCM: add deposit error handler for multi-currency adapter. (#1756) update stable asset (#1758) Fix test coverage for acala (#1590) Fix collect_fee (#1754) Update HEADER-GPL3 Update extrinsic-ordering-check-from-bin.yml (#1752) Update HEADER-GPL3 bump version (#1751) ...
closes #1702