Skip to content

Commit bc614e5

Browse files
authored
Merge pull request #3294 from input-output-hk/chore/node-10-5-1
Update `cardano-node` to 10.5.1 and support `peer-snapshot.json`
2 parents eff9b8e + 3552624 commit bc614e5

File tree

9 files changed

+58
-45
lines changed

9 files changed

+58
-45
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## vNext
4+
5+
### Chores
6+
7+
- Update `cardano-node` to 10.5.1 and support `peer-snapshot.json` ([PR 3294](https://github.com/input-output-hk/daedalus/pull/3294))
8+
39
## 7.2.0
410

511
### Fixes

flake.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
66
cardano-wallet-unpatched.url = "github:cardano-foundation/cardano-wallet/v2025-03-31";
77
cardano-wallet-unpatched.flake = false; # otherwise, +10k quadratic dependencies in flake.lock…
8-
cardano-node-override.url = "github:IntersectMBO/cardano-node/10.2.1";
8+
cardano-node-override.url = "github:IntersectMBO/cardano-node/10.5.1";
99
cardano-node-override.flake = false;
10-
cardano-playground.url = "github:input-output-hk/cardano-playground/d3322dce0ab1c00386adc93899aabe9252342b54";
10+
cardano-playground.url = "github:input-output-hk/cardano-playground/56ebfef5595c43014029b039ade01b0ef06233e0";
1111
cardano-playground.flake = false; # otherwise, +9k dependencies in flake.lock…
12-
cardano-shell.url = "github:input-output-hk/cardano-shell/0d1d5f036c73d18e641412d2c58d4acda592d493";
12+
cardano-shell.url = "github:input-output-hk/cardano-shell/79f48aa3aa8007a1597cbedc22031eab1f05decd";
1313
cardano-shell.flake = false;
1414
tullia.url = "github:input-output-hk/tullia";
1515
tullia.flake = false; # otherwie, +1k dependencies in flake.lock…

installers/common/WindowsInstaller.hs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
213213
detailPrint "Removing previously installed version"
214214
rmdir [Recursive] "$INSTDIR"
215215

216+
-- FIXME: Let's make it recursively take all files from a single install directory…
217+
-- FIXME: Why the repetition?
218+
216219
iff_ (fileExists "$APPDATA\\$InstallDir\\Wallet-1.0\\open\\*.*") $
217220
rmdir [] "$APPDATA\\$InstallDir\\Wallet-1.0\\open"
218221
case oBackend of
@@ -224,11 +227,14 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
224227
file [] "config.yaml"
225228
file [] "topology.yaml"
226229
file [] "genesis.json"
230+
when (clusterName == Mainnet) $ do
231+
file [] "checkpoints.json"
227232
when (clusterName /= Selfnode) $ do
228233
file [NonFatal] "genesis-conway.json"
229234
file [] "genesis-byron.json"
230235
file [] "genesis-shelley.json"
231236
file [] "genesis-alonzo.json"
237+
file [] "peer-snapshot.json"
232238
file [] "libsodium-23.dll"
233239
file [] "libsecp256k1-2.dll"
234240
when (clusterName == Selfnode) $ do
@@ -240,16 +246,16 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
240246
file [] "mock-token-metadata-server.exe"
241247
file [] "token-metadata.json"
242248
file [] "cardano-launcher.exe"
243-
file [] "libatomic-1.dll"
244249
file [] "libffi-8.dll"
245250
file [] "libgmp-10.dll"
246251
file [] "libstdc++-6.dll"
247252
file [] "mcfgthread-12.dll"
248253
file [] "libmcfgthread-1.dll"
249-
file [] "libquadmath-0.dll"
250-
file [] "libssp-0.dll"
254+
file [] "libmcfgthread-minimal-1.dll"
251255
file [] "libgcc_s_seh-1.dll"
252256
file [] "zlib1.dll"
257+
file [] "liblmdb.dll"
258+
file [] "libz.dll"
253259
--file [] "cardano-x509-certificates.exe"
254260
--file [] "log-config-prod.yaml"
255261
--file [] "wallet-topology.yaml"

nix/internal/any-darwin.nix

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ in rec {
166166
)
167167
'';
168168

169-
bundle-cardano-launcher = mkBundle "cardano-launcher" (common.cardano-shell.haskellPackages.cardano-launcher.components.exes.cardano-launcher + "/bin/cardano-launcher");
169+
bundle-cardano-launcher = mkBundle "cardano-launcher" (common.cardano-launcher + "/bin/cardano-launcher");
170170
bundle-cardano-node = mkBundle "cardano-node" (lib.getExe common.cardano-node);
171171
bundle-cardano-cli = mkBundle "cardano-cli" (lib.getExe common.cardano-cli);
172172
bundle-cardano-address = mkBundle "cardano-address" (lib.getExe common.cardano-address);
@@ -289,15 +289,15 @@ in rec {
289289
echo "Preparing files ..."
290290
cp installers/launcher-config.yaml "$dataDir"/
291291
292-
cp -r ${bundle-cardano-launcher}/. "$dir"/
293-
cp -r ${bundle-cardano-node }/. "$dir"/
294-
cp -r ${bundle-cardano-cli }/. "$dir"/
295-
cp -r ${bundle-cardano-address }/. "$dir"/
296-
cp -r ${bundle-cardano-wallet }/. "$dir"/
292+
cp -r ${bundle-cardano-launcher}/. "$dir"/ && chmod -R +w "$dir/"
293+
cp -r ${bundle-cardano-node }/. "$dir"/ && chmod -R +w "$dir/"
294+
cp -r ${bundle-cardano-cli }/. "$dir"/ && chmod -R +w "$dir/"
295+
cp -r ${bundle-cardano-address }/. "$dir"/ && chmod -R +w "$dir/"
296+
cp -r ${bundle-cardano-wallet }/. "$dir"/ && chmod -R +w "$dir/"
297297
298298
${lib.optionalString (cluster == "selfnode") ''
299-
cp -r ${bundle-mock-token-metadata-server}/. "$dir"/
300-
cp -r ${bundle-local-cluster }/. "$dir"/
299+
cp -r ${bundle-mock-token-metadata-server}/. "$dir"/ && chmod -R +w "$dir/"
300+
cp -r ${bundle-local-cluster }/. "$dir"/ && chmod -R +w "$dir/"
301301
''}
302302
303303
cp installers/{config.yaml,genesis.json,topology.yaml} "$dataDir"/

nix/internal/cardano-bridge.nix

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ target, runCommandCC, cardano-wallet, cardano-node, cardano-shell, cardano-cli, cardano-address, lib, local-cluster ? null, mock-token-metadata-server, darwin }:
1+
{ target, runCommandCC, cardano-wallet, cardano-node, cardano-launcher, cardano-cli, cardano-address, lib, local-cluster ? null, mock-token-metadata-server, darwin }:
22

33
runCommandCC "daedalus-cardano-bridge" {
44
passthru = {
@@ -11,7 +11,7 @@ runCommandCC "daedalus-cardano-bridge" {
1111
echo ${cardano-wallet.version} > $out/version
1212
cp ${cardano-wallet}/bin/* .
1313
cp -f ${cardano-address}/bin/cardano-address* .
14-
cp -f ${cardano-shell.haskellPackages.cardano-launcher.components.exes.cardano-launcher}/bin/* .
14+
cp -f ${cardano-launcher}/bin/* .
1515
cp -f ${cardano-node}/bin/* .
1616
cp -f ${cardano-cli}/bin/cardano-cli* .
1717
${lib.optionalString (local-cluster != null) ''
@@ -31,13 +31,6 @@ runCommandCC "daedalus-cardano-bridge" {
3131
cp -f ${mock-token-metadata-server}/bin/* . || true
3232
cp -f ${./../../utils/cardano/selfnode}/token-metadata.json .
3333
''}
34-
${lib.optionalString (target == "x86_64-linux") ''
35-
chmod +w -R .
36-
for x in cardano-launcher; do
37-
$STRIP $x
38-
patchelf --shrink-rpath $x
39-
done
40-
''}
4134
${lib.optionalString (target == "aarch64-darwin") ''
4235
chmod +w -R .
4336
for x in cardano-address cardano-node cardano-launcher cardano-cli cardano-wallet; do

nix/internal/common.nix

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,19 @@ rec {
7272
daedalus-bridge = pkgs.lib.genAttrs sourceLib.installerClusters (cluster: import ./cardano-bridge.nix {
7373
target = targetSystem;
7474
inherit (pkgs) lib runCommandCC darwin;
75-
inherit cardano-wallet cardano-node cardano-shell cardano-cli cardano-address mock-token-metadata-server;
75+
inherit cardano-wallet cardano-node cardano-launcher cardano-cli cardano-address mock-token-metadata-server;
7676
local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null;
7777
});
7878

7979
inherit (walletPackages) cardano-wallet cardano-address mock-token-metadata-server;
8080

8181
inherit (nodePackages) cardano-node cardano-cli;
8282

83-
cardano-shell = import inputs.cardano-shell {
84-
inherit (pkgs) system;
85-
crossSystem = {
86-
x86_64-windows = pkgs.lib.systems.examples.mingwW64;
87-
}.${targetSystem} or null;
88-
};
83+
cardano-shell = (flake-compat {
84+
src = inputs.cardano-shell;
85+
}).defaultNix;
86+
87+
cardano-launcher = cardano-shell.hydraJobs.cardano-launcher.${targetSystem};
8988

9089
cardanoNodeVersion = cardano-node.identifier.version + "-" + builtins.substring 0 9 nodeFlake.rev;
9190

nix/internal/launcher-config.nix

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let
4343
fromCardanoPlayground = envName: let
4444
originalFiles = builtins.path {
4545
name = "cardano-playground-config-${envName}";
46-
path = cardano-playground + ("/static/book.play.dev.cardano.org/environments/" + envName);
46+
path = cardano-playground + ("/docs/environments/" + envName);
4747
};
4848

4949
originalNodeConfig = builtins.fromJSON (builtins.unsafeDiscardStringContext (
@@ -63,8 +63,11 @@ let
6363
cardanoEnv = {
6464
inherit nodeConfig;
6565
topologyFile = originalFiles + "/topology.json";
66+
peerSnapshotFile = originalFiles + "/peer-snapshot.json";
6667
metadataUrl = tokenMetadataServers.${envName};
67-
};
68+
} // (let
69+
checkpointsFile = originalFiles + "/checkpoints.json";
70+
in if builtins.pathExists checkpointsFile then { inherit checkpointsFile; } else {});
6871
};
6972

7073
dirSep = if os == "windows" then "\\" else "/";
@@ -267,6 +270,12 @@ let
267270
cp ${genesisFile} $out/genesis.json
268271
cp $nodeConfigPath $out/config.yaml
269272
cp $topologyFile $out/topology.yaml
273+
${lib.optionalString (envCfg ? peerSnapshotFile) ''
274+
cp ${envCfg.peerSnapshotFile} $out/peer-snapshot.json
275+
''}
276+
${lib.optionalString (envCfg ? checkpointsFile) ''
277+
cp ${envCfg.checkpointsFile} $out/checkpoints.json
278+
''}
270279
${lib.optionalString (network == "selfnode") ''
271280
cp ${envCfg.delegationCertificate} $out/delegation.cert
272281
cp ${envCfg.signingKey} $out/signing.key

nix/internal/x86_64-windows.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ in rec {
167167
inherit version;
168168
outputHashMode = "recursive";
169169
outputHashAlgo = "sha256";
170-
outputHash = "sha256-7+vNhYbrizqhoIDL6vN7vE+Gq2duoYW5adMgOpJgw2w=";
170+
outputHash = "sha256-6RVneGKjsEMYGfZSYg5mMafjl0itdZQXtzLPRdrawII=";
171171
buildInputs = [];
172172
dontUnpack = true;
173173
dontConfigure = true;

0 commit comments

Comments
 (0)