Skip to content

10.4 LedgerDB default env config #597

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

Merged
merged 1 commit into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cardano-lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ let
# as needed. Any node version string suffixes, such as `-pre`, should be
# removed from this string identifier.
#
# Min currently 10.2.1 for `GenesisMode` support.
minNodeVersion = { MinNodeVersion = "10.2.1"; };
# Min currently 10.4.0 for `LedgerDB` config support.
minNodeVersion = { MinNodeVersion = "10.4.0"; };

environments = mapAttrs (name: env: {
inherit name;
Expand Down
21 changes: 20 additions & 1 deletion cardano-lib/mainnet-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
############### Cardano Node Configuration ###############
##########################################################

{
with builtins; {
##### Locations #####

ByronGenesisFile = ./mainnet + "/byron-genesis.json";
Expand Down Expand Up @@ -50,6 +50,25 @@
SyncTargetNumberOfKnownBigLedgerPeers = 100;
MinBigLedgerPeersForTrustedState = 5;

# Default Ledger Configuration
# Additional configuration options can be found at:
# https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating
LedgerDB = {
# The time interval between snapshots, in seconds.
SnapshotInterval = (fromJSON (readFile ./mainnet/shelley-genesis.json)).securityParam * 2;

# The number of disk snapshots to keep.
NumOfDiskSnapshots = 2;

# When querying the store for a big range of UTxOs (such as with
# QueryUTxOByAddress), the store will be read in batches of this size.
QueryBatchSize = 100;

# The backend can either be in memory with `V2InMemory` or on disk with
# `V1LMDB`.
Backend = "V2InMemory";
};

##### Update system parameters #####

# This protocol version number gets used by block producing nodes as part
Expand Down
21 changes: 20 additions & 1 deletion cardano-lib/preprod-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
############### Cardano Node Configuration ###############
##########################################################

{
with builtins; {
##### Locations #####

ByronGenesisFile = ./preprod + "/byron-genesis.json";
Expand Down Expand Up @@ -45,6 +45,25 @@
SyncTargetNumberOfKnownBigLedgerPeers = 100;
MinBigLedgerPeersForTrustedState = 5;

# Default Ledger Configuration
# Additional configuration options can be found at:
# https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating
LedgerDB = {
# The time interval between snapshots, in seconds.
SnapshotInterval = (fromJSON (readFile ./preprod/shelley-genesis.json)).securityParam * 2;

# The number of disk snapshots to keep.
NumOfDiskSnapshots = 2;

# When querying the store for a big range of UTxOs (such as with
# QueryUTxOByAddress), the store will be read in batches of this size.
QueryBatchSize = 100;

# The backend can either be in memory with `V2InMemory` or on disk with
# `V1LMDB`.
Backend = "V2InMemory";
};

##### Update system parameters #####

# This protocol version number gets used by block producing nodes as part
Expand Down
21 changes: 20 additions & 1 deletion cardano-lib/preview-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
############### Cardano Node Configuration ###############
##########################################################

{
with builtins; {
##### Locations #####

ByronGenesisFile = ./preview + "/byron-genesis.json";
Expand Down Expand Up @@ -45,6 +45,25 @@
SyncTargetNumberOfKnownBigLedgerPeers = 100;
MinBigLedgerPeersForTrustedState = 5;

# Default Ledger Configuration
# Additional configuration options can be found at:
# https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating
LedgerDB = {
# The time interval between snapshots, in seconds.
SnapshotInterval = (fromJSON (readFile ./preview/shelley-genesis.json)).securityParam * 2;

# The number of disk snapshots to keep.
NumOfDiskSnapshots = 2;

# When querying the store for a big range of UTxOs (such as with
# QueryUTxOByAddress), the store will be read in batches of this size.
QueryBatchSize = 100;

# The backend can either be in memory with `V2InMemory` or on disk with
# `V1LMDB`.
Backend = "V2InMemory";
};

##### Update system parameters #####

LastKnownBlockVersion-Major = 3;
Expand Down
6 changes: 6 additions & 0 deletions cardano-lib/testnet-template/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
"LastKnownBlockVersion-Alt": 0,
"LastKnownBlockVersion-Major": 3,
"LastKnownBlockVersion-Minor": 1,
"LedgerDB": {
"Backend": "V2InMemory",
"NumOfDiskSnapshots": 2,
"QueryBatchSize": 100,
"SnapshotInterval": 216
},
"MaxConcurrencyDeadline": 4,
"MaxKnownMajorProtocolVersion": 2,
"PBftSignatureThreshold": 1.1,
Expand Down
Loading