Skip to content

Commit 892d977

Browse files
committed
feat(scripts): add LSM support as UTXO_BACKEND option
Change supported UTXO_BACKEND values to include 'disklmdb' for the existing `V1LMDB` backend in both fast and slow cluster scripts. Add the new `V2LSM` backend option as 'disk'. Update testnet.json files accordingly to reflect these changes.
1 parent 381f41c commit 892d977

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

src/cardonnay_scripts/scripts/common/common-start-fast

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ initialize_globals() {
5656
fi
5757

5858
case "${UTXO_BACKEND:=""}" in
59-
"" | mem | disk)
59+
"" | mem | disk | disklmdb)
6060
;;
6161
*)
6262
echo "Unknown \`UTXO_BACKEND\`: '$UTXO_BACKEND', line $LINENO in ${BASH_SOURCE[0]}" >&2
@@ -223,12 +223,13 @@ edit_node_configs() {
223223
| ."LastKnownBlockVersion-Major" = $prot_ver
224224
| if $backend == "mem" then
225225
(.LedgerDB.Backend = "V2InMemory"
226-
| .LedgerDB.NumOfDiskSnapshots = 2
227-
| .LedgerDB.QueryBatchSize = 100000
228226
| .LedgerDB.SnapshotInterval = 216)
229227
elif $backend == "disk" then
228+
.LedgerDB.Backend = "V2LSM"
229+
elif $backend == "disklmdb" then
230230
(.LedgerDB.Backend = "V1LMDB"
231-
| .LedgerDB.LiveTablesPath = $live_tables_path)
231+
| .LedgerDB.LiveTablesPath = $live_tables_path
232+
| .LedgerDB.SnapshotInterval = 300)
232233
elif has("LedgerDB") then
233234
.LedgerDB |= del(.Backend)
234235
else

src/cardonnay_scripts/scripts/common/common-start-slow

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ initialize_globals() {
6262
fi
6363

6464
case "${UTXO_BACKEND:=""}" in
65-
"" | mem | disk)
65+
"" | mem | disk | disklmdb)
6666
;;
6767
*)
6868
echo "Unknown \`UTXO_BACKEND\`: '$UTXO_BACKEND', line $LINENO in ${BASH_SOURCE[0]}" >&2
@@ -219,12 +219,13 @@ edit_node_configs() {
219219
end
220220
| if $backend == "mem" then
221221
(.LedgerDB.Backend = "V2InMemory"
222-
| .LedgerDB.NumOfDiskSnapshots = 2
223-
| .LedgerDB.QueryBatchSize = 100000
224222
| .LedgerDB.SnapshotInterval = 216)
225223
elif $backend == "disk" then
224+
.LedgerDB.Backend = "V2LSM"
225+
elif $backend == "disklmdb" then
226226
(.LedgerDB.Backend = "V1LMDB"
227-
| .LedgerDB.LiveTablesPath = $live_tables_path)
227+
| .LedgerDB.LiveTablesPath = $live_tables_path
228+
| .LedgerDB.SnapshotInterval = 300)
228229
elif has("LedgerDB") then
229230
.LedgerDB |= del(.Backend)
230231
else

src/cardonnay_scripts/scripts/conway_fast/testnet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"SMASH": "if set, will start and configure smash",
77
"ENABLE_LEGACY": "if set, local cluster will use legacy networking",
88
"MIXED_P2P": "if set, local cluster will use P2P for some nodes and legacy topology for others",
9-
"UTXO_BACKEND": "'mem' or 'disk', default is 'mem' (or legacy) if unset",
9+
"UTXO_BACKEND": "'mem', 'disk' or 'disklmdb', default is 'mem' (or legacy) if unset",
1010
"NO_CC": "if set, will not create committee",
1111
"DRY_RUN": "if set, will not start the cluster",
1212
"PROTOCOL_VERSION": "if set, will use the specified protocol version (e.g., 11 for latest Conway, etc.)"

src/cardonnay_scripts/scripts/conway_slow/testnet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"SMASH": "if set, will start and configure smash",
77
"ENABLE_LEGACY": "if set, local cluster will use legacy networking",
88
"MIXED_P2P": "if set, local cluster will use P2P for some nodes and legacy topology for others",
9-
"UTXO_BACKEND": "'mem' or 'disk', default is 'mem' (or legacy) if unset",
9+
"UTXO_BACKEND": "'mem', 'disk' or 'disklmdb', default is 'mem' (or legacy) if unset",
1010
"NO_CC": "if set, will not create committee",
1111
"DRY_RUN": "if set, will not start the cluster",
1212
"PROTOCOL_VERSION": "if set, will use the specified protocol version (e.g., 11 for latest Conway, etc.)"

src/cardonnay_scripts/scripts/mainnet_fast/testnet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"SMASH": "if set, will start and configure smash",
77
"ENABLE_LEGACY": "if set, local cluster will use legacy networking",
88
"MIXED_P2P": "if set, local cluster will use P2P for some nodes and legacy topology for others",
9-
"UTXO_BACKEND": "'mem' or 'disk', default is 'mem' (or legacy) if unset",
9+
"UTXO_BACKEND": "'mem', 'disk' or 'disklmdb', default is 'mem' (or legacy) if unset",
1010
"NO_CC": "if set, will not create committee",
1111
"DRY_RUN": "if set, will not start the cluster",
1212
"PROTOCOL_VERSION": "if set, will use the specified protocol version (e.g., 11 for latest Conway, etc.)"

0 commit comments

Comments
 (0)