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
[backup] #9012,[diem_vm] #8923(129) #10676
Closed
Closed
Conversation
This file contains 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
For use by VM compatilibity tests. Restores proper state snapshot, on top of which replays desired range of transactions, to comfirm compatibilities with the latest software. Closes: diem#9012
Nirish133
changed the title
[backup] #9012,[diem_vm] #8923
[backup] #9012,[diem_vm] #8923(129)
Dec 29, 2022
dhaneshacn
approved these changes
Jan 4, 2023
/canary |
💔 Test Failed - ci-test |
/canary |
💔 Test Failed - ci-test |
Nirish133
force-pushed
the
back-up-9012
branch
from
January 4, 2023 13:43
9c728f3
to
6e68c6c
Compare
/canary |
💔 Test Failed - ci-test |
Closing this PR due to merge issues |
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.
[backup] replay-verify CLI tool #9012
Motivation
For use by VM compatilibity tests. Restores proper state snapshot, on top of which replays desired range of transactions, to comfirm compatibilities with the latest software.
Test Plan
CI/CD test covers the test cases.
[diem_vm] Implemented a standalone parallel transaction executor #8923
Motivation
This PR aims to implement a standalone version of parallel executor that we will use in the diem network. The newly introduced
parallel_executor
crate will serve as the abstract scheduler and executor for parallel and have zero dependencies to diem/move components. The structure of the package will look like following:src/task.rs
This is the file that defines the type of transaction that could be parallelly processed by this executor and the single threaded executor for running such transaction.src/error.rs
Defines the error and result type of parallel execution.src/scheduler.rs
The naive scheduler that tracks transaction dependencies and task dispatcher for all threads.src/executor.rs
The actual orchestration of the computation: spawn threads to parallel process transactions that are passed in.src/proptest_types
Defines the proptest based testing and bencher strategytypes.rs
Defines a naive transaction type that implements all traits required by parallel executor and its sequentialcomputation baseline.
tests.rs
Defines a number of proptest to test the correctness of the scheduling algorithmbench.rs
Generates random transactions to be executed and test the throughput of the system under trivial payloads.Executing each transaction could yield one of the following results:
Note that for either
SkipRest
orAbort
state, the executor guarantees to return the first transaction in the list that causes such status, regardless of the scheduling order.Test Plan
A proptest strategy is implemented for the executor. The baic setup is following:
We randomly generate 100 distinct keys as a key universe. Then we randomly generate 3000 transactions where each of the transaction will randomly pick 10 keys they are estimated to write to, and will actually write to a half of those keys. Each transaction will also read a few keys and test if the value they see is the same as the sequential execution.
Based on the basic setup, we then randomly tell some of those transactions to return SkipRest or Abort signal to force the early termination of the algorithm. We then check if the termination is indeed at the right index (only the first of those transactions should matter for the scheduler).
We also tested the scenario when read set estimation is imprecise: the read inferencer will randomly drop a key that a transaction will read from, and make sure the system won't halt in such scenario.
Other than the proptest, we also implemented a bencher to test the system's raw throughput on those naive transaction, here's the result:
random_benches time: [73.161 ms 74.892 ms 76.656 ms]
The number reflects the time spent on processing 10k transactions generated in the previous setup described.