Skip to content

Commit a7b9ef6

Browse files
authored
Merge pull request #6195 from IntersectMBO/jl/add-snapshot-converter
Add snapshot-converter
2 parents 003bfdf + ed33da4 commit a7b9ef6

9 files changed

+54
-13
lines changed

configuration/cardano/mainnet-config-bp.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
"LastKnownBlockVersion-Alt": 0,
1313
"LastKnownBlockVersion-Major": 3,
1414
"LastKnownBlockVersion-Minor": 0,
15+
"LedgerDB": {
16+
"Backend": "V2InMemory",
17+
"NumOfDiskSnapshots": 2,
18+
"QueryBatchSize": 100,
19+
"SnapshotInterval": 4320
20+
},
1521
"MaxKnownMajorProtocolVersion": 2,
1622
"MinBigLedgerPeersForTrustedState": 5,
17-
"MinNodeVersion": "10.2.1",
23+
"MinNodeVersion": "10.4.0",
1824
"PeerSharing": false,
1925
"Protocol": "Cardano",
2026
"RequiresNetworkMagic": "RequiresNoMagic",

configuration/cardano/mainnet-config.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
"LastKnownBlockVersion-Alt": 0,
1313
"LastKnownBlockVersion-Major": 3,
1414
"LastKnownBlockVersion-Minor": 0,
15+
"LedgerDB": {
16+
"Backend": "V2InMemory",
17+
"NumOfDiskSnapshots": 2,
18+
"QueryBatchSize": 100,
19+
"SnapshotInterval": 4320
20+
},
1521
"MaxKnownMajorProtocolVersion": 2,
1622
"MinBigLedgerPeersForTrustedState": 5,
17-
"MinNodeVersion": "10.2.1",
23+
"MinNodeVersion": "10.4.0",
1824
"PeerSharing": true,
1925
"Protocol": "Cardano",
2026
"RequiresNetworkMagic": "RequiresNoMagic",

configuration/cardano/mainnet-config.yaml

+22-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ TargetNumberOfKnownPeers: 150
4343
TargetNumberOfRootPeers: 60
4444

4545

46-
##### Network Configuration #####
46+
##### Consensus Configuration #####
4747

4848
ConsensusMode: PraosMode
4949
SyncTargetNumberOfActivePeers: 0
@@ -53,9 +53,29 @@ SyncTargetNumberOfKnownBigLedgerPeers: 100
5353
MinBigLedgerPeersForTrustedState: 5
5454

5555

56+
##### Ledger Configuration #####
57+
58+
# Additional configuration options can be found at:
59+
# https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/migrating
60+
LedgerDB:
61+
# The time interval between snapshots, in seconds.
62+
SnapshotInterval: 4320
63+
64+
# The number of disk snapshots to keep.
65+
NumOfDiskSnapshots: 2
66+
67+
# When querying the store for a big range of UTxOs (such as with
68+
# QueryUTxOByAddress), the store will be read in batches of this size.
69+
QueryBatchSize: 100
70+
71+
# The backend can either be in memory with `V2InMemory` or on disk with
72+
# `V1LMDB`.
73+
Backend: V2InMemory
74+
75+
5676
##### Version Information #####
5777

58-
MinNodeVersion: 10.2.1
78+
MinNodeVersion: 10.4.0
5979

6080
##### Logging configuration #####
6181

configuration/cardano/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,

configuration/cardano/update-config-files.sh

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ copyCfg "mainnet-alonzo-genesis.json"
3030
copyCfg "mainnet-byron-genesis.json"
3131
copyCfg "mainnet-checkpoints.json"
3232
copyCfg "mainnet-config.json"
33+
copyCfg "mainnet-config-bp.json"
3334
copyCfg "mainnet-conway-genesis.json"
3435
copyCfg "mainnet-peer-snapshot.json"
3536
copyCfg "mainnet-shelley-genesis.json"

flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+4-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
// (with project.hsPkgs; {
131131
# Add some executables from other relevant packages
132132
inherit (bech32.components.exes) bech32;
133-
inherit (ouroboros-consensus-cardano.components.exes) db-analyser db-synthesizer db-truncater;
133+
inherit (ouroboros-consensus-cardano.components.exes) db-analyser db-synthesizer db-truncater snapshot-converter;
134134
# Add cardano-node and cardano-cli with their git revision stamp.
135135
# Keep available an alternative without the git revision, like the other
136136
# passthru (profiled, asserted and eventlogged in nix/haskell.nix) that
@@ -330,6 +330,8 @@
330330
#
331331
# It stands to question though, whether or not we want those to be
332332
# in the cardano-node-linux as executables anyway?
333+
#
334+
# Also explicitly excluded from musl in nix/haskell.nix.
333335
removeAttrs projectExes ["tx-generator" "gen-plutus"]
334336
);
335337
};
@@ -387,7 +389,7 @@
387389
# FIXME: plutus-scripts-bench's gen-plutus does not compile for musl
388390
"musl\\.(.*\\.)?tx-generator.*"
389391
"musl\\.(.*\\.)?gen-plutus.*"
390-
# hlint required status is controled via the github action:
392+
# hlint required status is controlled via the github action:
391393
"native\\.(.*\\.)?checks/hlint"
392394
# system-tests are build and run separately:
393395
"native\\.(.*\\.)?system-tests"

nix/haskell.nix

-4
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ let
134134
packages.plutus-ledger-api.components.library.doHaddock = false;
135135
})
136136
({ lib, pkgs, ...}: lib.mkIf (pkgs.stdenv.hostPlatform.isWindows) {
137-
# Remvoe this once mingwx is mapped to null in haskell.nix (haskell.nix#2032), and we bumped _past_ that.
138-
# we need to plugin in pthreads as force overrides https://github.com/input-output-hk/haskell.nix/blob/9823e12d5b6e66150ddeea146aea682f44ee4d44/overlays/windows.nix#L109.
139-
packages.unix-time.components.library.libs = lib.mkForce [ pkgs.windows.mingw_w64_pthreads ];
140-
141137
# This fix seems fairly fishy; but somehow it's required to make this work :confused_parrot:
142138
packages.unix-compat.postPatch = ''
143139
sed -i 's/msvcrt//g' unix-compat.cabal

nix/nixos/tests/cardano-node-artifact.nix

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ in {
5959
machine = {config, ...}: {
6060
nixpkgs.pkgs = pkgs;
6161

62+
# The default disk size of 1024 MB is insufficient for the binary artifact
63+
# and tar gzip expansion.
64+
virtualisation.diskSize = 2048;
65+
6266
system.activationScripts.prepTest.text = let
6367
binPath = makeBinPath [gnutar gzip];
6468
in ''

0 commit comments

Comments
 (0)