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
Add new option to allow BlocksReExecutor to commit state to disk
Add new boolean option to BlocksReExecutor called
CommitStateToDisk that will allow BlocksReExecutor.Blocks
range to not only re-executes blocks but it also commit
their state to triedb.
Signed-off-by: Igor Braga <[email protected]>
Blocks: `[[0,0]]`, // execute from chain start to chain end
75
+
CommitStateToDisk: false,
74
76
MinBlocksPerThread: 0,
75
77
TrieCleanLimit: 0,
76
78
ValidateMultiGas: false,
@@ -81,6 +83,7 @@ var TestConfig = Config{
81
83
Enable: true,
82
84
Mode: "full",
83
85
Blocks: `[[0,0]]`, // execute from chain start to chain end
86
+
CommitStateToDisk: false,
84
87
Room: util.GoMaxProcs(),
85
88
TrieCleanLimit: 600,
86
89
MinBlocksPerThread: 0,
@@ -93,6 +96,7 @@ func ConfigAddOptions(prefix string, f *pflag.FlagSet) {
93
96
f.Bool(prefix+".enable", DefaultConfig.Enable, "enables re-execution of a range of blocks against historic state")
94
97
f.String(prefix+".mode", DefaultConfig.Mode, "mode to run the blocks-reexecutor on. Valid modes full and random. full - execute all the blocks in the given range. random - execute a random sample range of blocks with in a given range")
95
98
f.String(prefix+".blocks", DefaultConfig.Blocks, "json encoded list of block ranges in the form of start and end block numbers in a list of size 2")
99
+
f.Bool(prefix+".commit-state-to-disk", DefaultConfig.CommitStateToDisk, "if set, blocks-reexecutor not only re-executes blocks but it also commits their state to triedb")
96
100
f.Int(prefix+".room", DefaultConfig.Room, "number of threads to parallelize blocks re-execution")
97
101
f.Uint64(prefix+".min-blocks-per-thread", DefaultConfig.MinBlocksPerThread, "minimum number of blocks to execute per thread. When mode is random this acts as the size of random block range sample")
98
102
f.Int(prefix+".trie-clean-limit", DefaultConfig.TrieCleanLimit, "memory allowance (MB) to use for caching trie nodes in memory")
@@ -110,9 +114,10 @@ type BlocksReExecutor struct {
110
114
fatalErrChanchanerror
111
115
blocks [][3]uint64// start, end and minBlocksPerThread of block ranges
0 commit comments