-
Notifications
You must be signed in to change notification settings - Fork 180
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
[EVM] Batch run transactions #5614
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5614 +/- ##
==========================================
+ Coverage 55.63% 55.69% +0.05%
==========================================
Files 1094 1094
Lines 85411 85571 +160
==========================================
+ Hits 47520 47655 +135
+ Misses 33317 33307 -10
- Partials 4574 4609 +35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -311,7 +372,7 @@ func TestContractInteraction(t *testing.T) { | |||
require.NoError(t, err) | |||
}) | |||
}) | |||
account.SetNonce(account.Nonce() + 1) | |||
account.SetNonce(account.Nonce() + 4) |
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.
Will this test fail if it is not run after "test batch running transactions"? Can we do this differently? Ideally we would be able to run any test individually.
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.
yeah, this sucks I agree, the tests right now assume this managing nonce like that. I think it touches couple of tests, so probably a separate issue. Will open it. #5744
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.
Looks good to me,
maybe if you have time just add an extra test in emulator or evm with a sequence of transactions (each emit an event and update a value) like this:
Successful, Invalid, Successful, Failed, Successful
Then we can check no side effect across transactions.
Added this to the issue: #5748 (comment) |
# Conflicts: # fvm/evm/evm_test.go
# Conflicts: # fvm/evm/emulator/emulator.go # fvm/evm/stdlib/contract.go # fvm/evm/testutils/contracts/test_bytes.hex
Closes: #5501
Implements ability to batch run transactions and expose it on the EVM contract as
batchRun(txs: [[UInt8]], coinbase: EVMAddress): [Result]
.The transactions will be run sequentially and each transaction will produce a result which will be accumulated and returned as an array of results.
Corresponding FLIP update: onflow/flips#257