You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/next/experimental/blockstm.mdx
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,37 @@ Block-STM implements a form of optimistic concurrency control to enable parallel
29
29
30
30
Block-STM is currently only integrated into the `FinalizeBlock` phase of execution, meaning the code path is never accessed until the block is agreed upon in consensus. It is possible that the algorithm may be extended in the future to support different execution models, but as of right now it expects a complete block and returns its result after the entire block has been executed. For this reason, Block-STM is expected to produce identical results to serial execution. In other words, the `AppHash` produced by Block-STM's parallel execution should be equal to the `AppHash` produced by the default serial transaction runner.
31
31
32
+
## Safe Deployment Practices
33
+
34
+
Given the Block-STM executor is a general purpose parallel execution engine, we recommend a phased rollout with
35
+
extensive
36
+
testing for each application individually.
37
+
38
+
*_Phased Rollout_
39
+
40
+
Since parallel execution is purely a performance optimization, applications should expect to calculate the same
41
+
AppHash when using Block-STM as they would when serial execution is enabled via the default TxRunner. This allows teams
42
+
to turn on parallel execution for a fraction of their nodes--API nodes instead of validators or on a portion of a
43
+
distributed validator cluster for example.
44
+
45
+
Running with a mixed fleet of parallel and serial execution for an extended time should minimize blast radius in the
46
+
event that a failure occurs.
47
+
48
+
*_Message Type Support_
49
+
50
+
We have done testing on as many of the core SDK message types as possible, but given the Cosmos SDK allows arbitrary
51
+
message creation it will be impossible to validate all message types that exist and all combinations of workflows.
52
+
Each team integrating Block-STM in production should validate their own message types for both correctness and performance.
53
+
54
+
NOTE: We specifically have __not__ validated support for CosmWasm message types run using Block-STM. Run independent
55
+
validation before enabling if your chain uses CosmWasm.
56
+
57
+
*_Caching Risks_
58
+
59
+
Block-STM works via dependency tracking within the SDK's `MultiStore` interface. Any data which could cause stateful
60
+
changes to execution that lives outside the store poses the biggest risk for indeterminism. We recommend in general
61
+
avoiding the use of cached data, in memory stores, or persisting any state outside the scope of a `Store`.
62
+
32
63
## App Integration
33
64
34
65
Integration of parallel execution is abstracted into two interfaces: `DeliverTxFunc` and `TxRunner`.
0 commit comments