Skip to content

Commit 5c16fdf

Browse files
committed
imp: add ledger db default config for 10.4.0
1 parent dd47887 commit 5c16fdf

File tree

5 files changed

+68
-5
lines changed

5 files changed

+68
-5
lines changed

cardano-lib/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ let
120120
# as needed. Any node version string suffixes, such as `-pre`, should be
121121
# removed from this string identifier.
122122
#
123-
# Min currently 10.2.1 for `GenesisMode` support.
124-
minNodeVersion = { MinNodeVersion = "10.2.1"; };
123+
# Min currently 10.4.0 for `LedgerDB` config support.
124+
minNodeVersion = { MinNodeVersion = "10.4.0"; };
125125

126126
environments = mapAttrs (name: env: {
127127
inherit name;

cardano-lib/mainnet-config.nix

+20-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
############### Cardano Node Configuration ###############
44
##########################################################
55

6-
{
6+
with builtins; {
77
##### Locations #####
88

99
ByronGenesisFile = ./mainnet + "/byron-genesis.json";
@@ -50,6 +50,25 @@
5050
SyncTargetNumberOfKnownBigLedgerPeers = 100;
5151
MinBigLedgerPeersForTrustedState = 5;
5252

53+
# Default Ledger Configuration
54+
# Additional configuration options can be found at:
55+
# https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating
56+
LedgerDB = {
57+
# The time interval between snapshots, in seconds.
58+
SnapshotInterval = (fromJSON (readFile ./mainnet/shelley-genesis.json)).securityParam * 2;
59+
60+
# The number of disk snapshots to keep.
61+
NumOfDiskSnapshots = 2;
62+
63+
# When querying the store for a big range of UTxOs (such as with
64+
# QueryUTxOByAddress), the store will be read in batches of this size.
65+
QueryBatchSize = 100;
66+
67+
# The backend can either be in memory with `V2InMemory` or on disk with
68+
# `V1LMDB`.
69+
Backend = "V2InMemory";
70+
};
71+
5372
##### Update system parameters #####
5473

5574
# This protocol version number gets used by block producing nodes as part

cardano-lib/preprod-config.nix

+20-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
############### Cardano Node Configuration ###############
44
##########################################################
55

6-
{
6+
with builtins; {
77
##### Locations #####
88

99
ByronGenesisFile = ./preprod + "/byron-genesis.json";
@@ -45,6 +45,25 @@
4545
SyncTargetNumberOfKnownBigLedgerPeers = 100;
4646
MinBigLedgerPeersForTrustedState = 5;
4747

48+
# Default Ledger Configuration
49+
# Additional configuration options can be found at:
50+
# https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating
51+
LedgerDB = {
52+
# The time interval between snapshots, in seconds.
53+
SnapshotInterval = (fromJSON (readFile ./preprod/shelley-genesis.json)).securityParam * 2;
54+
55+
# The number of disk snapshots to keep.
56+
NumOfDiskSnapshots = 2;
57+
58+
# When querying the store for a big range of UTxOs (such as with
59+
# QueryUTxOByAddress), the store will be read in batches of this size.
60+
QueryBatchSize = 100;
61+
62+
# The backend can either be in memory with `V2InMemory` or on disk with
63+
# `V1LMDB`.
64+
Backend = "V2InMemory";
65+
};
66+
4867
##### Update system parameters #####
4968

5069
# This protocol version number gets used by block producing nodes as part

cardano-lib/preview-config.nix

+20-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
############### Cardano Node Configuration ###############
44
##########################################################
55

6-
{
6+
with builtins; {
77
##### Locations #####
88

99
ByronGenesisFile = ./preview + "/byron-genesis.json";
@@ -45,6 +45,25 @@
4545
SyncTargetNumberOfKnownBigLedgerPeers = 100;
4646
MinBigLedgerPeersForTrustedState = 5;
4747

48+
# Default Ledger Configuration
49+
# Additional configuration options can be found at:
50+
# https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating
51+
LedgerDB = {
52+
# The time interval between snapshots, in seconds.
53+
SnapshotInterval = (fromJSON (readFile ./preview/shelley-genesis.json)).securityParam * 2;
54+
55+
# The number of disk snapshots to keep.
56+
NumOfDiskSnapshots = 2;
57+
58+
# When querying the store for a big range of UTxOs (such as with
59+
# QueryUTxOByAddress), the store will be read in batches of this size.
60+
QueryBatchSize = 100;
61+
62+
# The backend can either be in memory with `V2InMemory` or on disk with
63+
# `V1LMDB`.
64+
Backend = "V2InMemory";
65+
};
66+
4867
##### Update system parameters #####
4968

5069
LastKnownBlockVersion-Major = 3;

cardano-lib/testnet-template/config.json

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
"LastKnownBlockVersion-Alt": 0,
99
"LastKnownBlockVersion-Major": 3,
1010
"LastKnownBlockVersion-Minor": 1,
11+
"LedgerDB": {
12+
"Backend": "V2InMemory",
13+
"NumOfDiskSnapshots": 2,
14+
"QueryBatchSize": 100,
15+
"SnapshotInterval": 216
16+
},
1117
"MaxConcurrencyDeadline": 4,
1218
"MaxKnownMajorProtocolVersion": 2,
1319
"PBftSignatureThreshold": 1.1,

0 commit comments

Comments
 (0)