-
Notifications
You must be signed in to change notification settings - Fork 589
core, blockstm, state: add BlockSTM v2 parallel transaction execution #2210
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
base: develop
Are you sure you want to change the base?
Changes from 5 commits
268e976
a7c0b00
7e99f1f
df8a4bb
4c688e4
e8e367a
0c26b08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| # Auto detect text files and perform LF normalization | ||
| * text=auto | ||
| *.sol linguist-language=Solidity | ||
| core/blockstm/testdata/*.witness.gz filter=lfs diff=lfs merge=lfs -text | ||
| core/blockstm/testdata/*.block filter=lfs diff=lfs merge=lfs -text | ||
| core/blockstm/testdata/codes.tar.gz filter=lfs diff=lfs merge=lfs -text | ||
| core/blockstm/testdata/codes/*.bin filter=lfs diff=lfs merge=lfs -text |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| //go:build !invariants | ||
|
|
||
| package blockstm | ||
|
|
||
| // Invariants build tag — production builds use these zero-cost stubs. | ||
| // Build with `-tags invariants` to enable the runtime checks defined in | ||
| // invariants_on.go. Inlined by the compiler; no perf cost in prod. | ||
|
|
||
| // assertSettleOrder verifies the load-bearing inductive invariant of the | ||
| // V2 validation loop: when validateOne(idx) runs, every reexecDone[j] for | ||
| // j < idx-1 must be nil, because validateOne(j+1) finalised it on the | ||
| // previous iteration. A future "skip earlier validations" optimisation | ||
| // that violates this would silently break settle order and split state | ||
| // roots — keep the check on in CI. | ||
| func (x *v2ExecCtx) assertSettleOrder(reexecDone []chan struct{}, idx int) {} | ||
|
Check failure on line 15 in core/blockstm/invariants_off.go
|
||
|
|
||
| // assertReexecVisitedExactlyOnce ensures runValidationLoop's drain loop | ||
| // observes every dispatched re-execution exactly once. Catches a future | ||
| // off-by-one in the drain that would either skip a settle or send twice | ||
| // (deadlocking on chSettle's bounded buffer). | ||
| func (x *v2ExecCtx) assertReexecVisitedExactlyOnce(reexecDone []chan struct{}) {} | ||
|
Check failure on line 21 in core/blockstm/invariants_off.go
|
||
Uh oh!
There was an error while loading. Please reload this page.