Skip to content
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

[chain] Parallel Transaction Execution During Building and Verification #560

Merged
merged 36 commits into from
Oct 16, 2023

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Oct 15, 2023

Resolves: #493
Resolves: #510
Resolves: #76
Prerequisite: #559

TODO

  • add concurrent execution to verify
  • add concurrent execution to build
  • make execution concurrency configurable
  • fix tests in tstate and in executor
  • add metric for how many transactions are immediately executable (one for build, one for verify)
  • update README

@patrick-ogrady
Copy link
Contributor Author

patrick-ogrady commented Oct 15, 2023

BUG: Verify is counting a read as cold when it should be warm

build (3): -> [760,28,28,25,66]
00b9d8cfc9806132aa2e624378cbd0d8ac880f02f56575de275c0b759dade2c3690001 Some[[]uint8]{[0 0 0 0 0 0 0 209]}
020001 Some[[]uint8]{[0 0 1 139 53 93 207 233]}
030008 Some[[]uint8]{[0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 124 0 0 0 0 0 0 2 248 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 0 0 0 0 28 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26 0 0 0 0 0 0 0 28 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 0 0 0 0 0 0 0 25 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 39 0 0 0 0 0 0 0 66]}
010001 Some[[]uint8]{[0 0 0 0 0 0 0 3]}
002a25550aa7d0182c52a01def8c172f8887a7bcadb0ff709730740ec6d3393f4f0001 Some[[]uint8]{[0 0 0 0 0 151 8 110]}
00080fa56040051a0b877656ab9ed26b945697c46a66e65d9028b9ede287553bff0001 Some[[]uint8]{[0 0 0 0 0 1 135 210]}

verify (3): -> [760,28,52,25,45]
020001 Some[[]uint8]{[0 0 1 139 53 93 207 233]}
030008 Some[[]uint8]{[0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 124 0 0 0 0 0 0 2 248 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 0 0 0 0 28 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26 0 0 0 0 0 0 0 52 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 0 0 0 0 0 0 0 25 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 39 0 0 0 0 0 0 0 45]}
002a25550aa7d0182c52a01def8c172f8887a7bcadb0ff709730740ec6d3393f4f0001 Some[[]uint8]{[0 0 0 0 0 151 9 55]}
00b9d8cfc9806132aa2e624378cbd0d8ac880f02f56575de275c0b759dade2c3690001 Some[[]uint8]{[0 0 0 0 0 0 0 210]}
010001 Some[[]uint8]{[0 0 0 0 0 0 0 3]}

@patrick-ogrady patrick-ogrady changed the title [Chain] concurrent verification [chain] concurrent verification Oct 16, 2023
@patrick-ogrady patrick-ogrady changed the title [chain] concurrent verification [chain] Parallel Block Building and Verification Oct 16, 2023
@patrick-ogrady patrick-ogrady changed the title [chain] Parallel Block Building and Verification [chain] Parallel Transaction Execution During Building and Verification Oct 16, 2023
@patrick-ogrady patrick-ogrady marked this pull request as ready for review October 16, 2023 20:49
@@ -81,6 +83,8 @@ type VM interface {
RecordBuildCapped()
RecordEmptyBlockBuilt()
RecordClearedMempool()
GetBuildMetrics() executor.Metrics
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this GetExecutorBuildRecorder

vm/metrics.go Outdated Show resolved Hide resolved
@patrick-ogrady patrick-ogrady merged commit defff97 into main Oct 16, 2023
20 checks passed
@patrick-ogrady patrick-ogrady deleted the concurrent-verification branch October 16, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
1 participant