Skip to content

Commit f833791

Browse files
committed
[DDW-1220] Update cardano-node to 8.1.1 (via cardano-wallet)
1 parent c90fea0 commit f833791

10 files changed

+103
-100
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
### Chores
1010

11+
- Updated cardano-node to 8.1.1 (via cardano-wallet) ([PR 3133](https://github.com/input-output-hk/daedalus/pull/3133))
1112
- Updated @trezor/connect to v9.0.8 ([PR 3127](https://github.com/input-output-hk/daedalus/pull/3127))
1213
- Add members of Cardano Wallet team to the "About Daedalus" screen ([PR 3092](https://github.com/input-output-hk/daedalus/pull/3092))
1314
- Removed Chromatic from project ([PR 3126](https://github.com/input-output-hk/daedalus/pull/3126))

flake.lock

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

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
inputs = {
55
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
6-
cardano-wallet-unpatched.url = "github:input-output-hk/cardano-wallet/v2023-04-14";
6+
cardano-wallet-unpatched.url = "github:cardano-foundation/cardano-wallet/pull/4003/head"; # TODO: PR→release
77
cardano-wallet-unpatched.flake = false; # otherwise, +10k quadratic dependencies in flake.lock…
8-
cardano-world.url = "github:input-output-hk/cardano-world/a0a315100ee320395be97fcc83f46678d5a7fb6e";
8+
cardano-world.url = "github:input-output-hk/cardano-world/d751a12be1dd4e5e2bd3bafaf4c254390469292d";
99
cardano-world.flake = false; # otherwise, +19k quadratic dependencies in flake.lock…
1010
cardano-shell.url = "github:input-output-hk/cardano-shell/0d1d5f036c73d18e641412d2c58d4acda592d493";
1111
cardano-shell.flake = false;

installer-clusters-available.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
preprod mainnet preview selfnode shelley_qa staging alonzo_purple
1+
mainnet preprod preview selfnode shelley_qa

installers/common/MacInstaller.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ makeComponentRoot Options{oBackend,oCluster} appRoot darwinConfig@DarwinConfig{d
365365
forM_ ["config.yaml", "genesis.json", "topology.yaml" ] $ \f ->
366366
cp f (dataDir </> f)
367367
when (oCluster /= Selfnode) $ do
368-
forM_ ["genesis-byron.json", "genesis-shelley.json", "genesis-alonzo.json" ] $ \f ->
368+
forM_ ["genesis-byron.json", "genesis-shelley.json", "genesis-alonzo.json", "genesis-conway.json" ] $ \f ->
369369
cp f (dataDir </> f)
370370

371371
when (oCluster == Selfnode) $ do

installers/common/WindowsInstaller.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
221221
file [] "topology.yaml"
222222
file [] "genesis.json"
223223
when (clusterName /= Selfnode) $ do
224+
file [] "genesis-conway.json"
224225
file [] "genesis-byron.json"
225226
file [] "genesis-shelley.json"
226227
file [] "genesis-alonzo.json"
227228
file [] "libsodium-23.dll"
228-
file [] "libsecp256k1-1.dll"
229-
file [] "libsecp256k1-0.dll"
229+
file [] "libsecp256k1-2.dll"
230230
file [] "libssl-3-x64.dll"
231231
file [] "libcrypto-3-x64.dll"
232232
when (clusterName == Selfnode) $ do
Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
1+
diff --git a/flake.nix b/flake.nix
2+
index 37ea1cfa12..8d0871d52b 100644
3+
--- a/flake.nix
4+
+++ b/flake.nix
5+
@@ -217,8 +217,22 @@
6+
collectChecks
7+
check;
8+
9+
- nodePkgs = cardano-node-runtime.legacyPackages.${system};
10+
- nodeProject = cardano-node-runtime.project.${system};
11+
+ cardano-node-runtime-patched =
12+
+ if system != "aarch64-darwin"
13+
+ then cardano-node-runtime
14+
+ else (import ./nix/flake-compat.nix {
15+
+ src = {
16+
+ outPath = toString (pkgs.runCommandLocal "patched-cardano-node" {} ''
17+
+ cp -r ${cardano-node-runtime} $out
18+
+ chmod -R +w $out
19+
+ cat ${./nix/supported-systems.nix} >$out/nix/supported-systems.nix
20+
+ '');
21+
+ inherit (cardano-node-runtime.sourceInfo) rev shortRev lastModified lastModifiedDate;
22+
+ };
23+
+ }).defaultNix;
24+
+
25+
+ nodePkgs = cardano-node-runtime-patched.legacyPackages.${system};
26+
+ nodeProject = cardano-node-runtime-patched.project.${system};
27+
28+
project = (import ./nix/haskell.nix
29+
CHaP
130
diff --git a/nix/supported-systems.nix b/nix/supported-systems.nix
2-
index 6e3f0d94e3..5de7138b32 100644
31+
index 6e3f0d94e3..a0c0ae17dc 100644
332
--- a/nix/supported-systems.nix
433
+++ b/nix/supported-systems.nix
5-
@@ -1,6 +1,5 @@
6-
[
34+
@@ -2,5 +2,5 @@
735
"x86_64-linux"
836
"x86_64-darwin"
9-
- # TODO: Enable aarch64-darwin when there are Hydra builders for it
37+
# TODO: Enable aarch64-darwin when there are Hydra builders for it
1038
- # "aarch64-darwin"
1139
+ "aarch64-darwin"
1240
]

nix/cardano-wallet--proper-runtimeNodePkgs.patch

Lines changed: 0 additions & 45 deletions
This file was deleted.

nix/launcher-config.nix

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,9 @@
1919

2020

2121
let
22-
clusterOverrides = {
23-
mainnet_flight = {
24-
cardanoEnv = cardanoLib.environments.mainnet;
25-
cluster = "mainnet";
26-
networkName = "mainnet";
27-
};
28-
alonzo_purple = {
29-
cardanoEnv = cardanoLib.environments.alonzo-purple;
30-
cluster = "alonzo-purple";
31-
networkName = "alonzo-purple";
32-
};
22+
clustersAvailable = rec {
23+
mainnet = fromCardanoWorld "mainnet";
24+
mainnet_flight = mainnet;
3325
shelley_qa = fromCardanoWorld "shelley_qa";
3426
vasil_dev = fromCardanoWorld "vasil-dev";
3527
preprod = fromCardanoWorld "preprod";
@@ -48,11 +40,12 @@ let
4840
topology = builtins.fromJSON (builtins.unsafeDiscardStringContext (
4941
builtins.readFile (originalFiles + "/topology.json")));
5042

51-
topologyFirstAccessPoint = builtins.head (builtins.head topology.PublicRoots).publicRoots.accessPoints;
43+
topologyFirstAccessPoint = builtins.head (builtins.head topology.publicRoots).accessPoints;
5244

5345
isP2P = originalNodeConfig ? EnableP2P && originalNodeConfig.EnableP2P;
5446

5547
nodeConfig = originalNodeConfig // {
48+
ConwayGenesisFile = originalFiles + "/" + originalNodeConfig.ConwayGenesisFile;
5649
AlonzoGenesisFile = originalFiles + "/" + originalNodeConfig.AlonzoGenesisFile;
5750
ByronGenesisFile = originalFiles + "/" + originalNodeConfig.ByronGenesisFile;
5851
ShelleyGenesisFile = originalFiles + "/" + originalNodeConfig.ShelleyGenesisFile;
@@ -117,9 +110,7 @@ let
117110
mkConfigPath = configSrc: configPath: "${(configDir configSrc).${os}}${dirSep}${configPath}";
118111

119112
envCfg = let
120-
cardanoEnv = if __hasAttr network clusterOverrides
121-
then clusterOverrides.${network}.cardanoEnv
122-
else cardanoLib.environments.${network};
113+
cardanoEnv = clustersAvailable.${network}.cardanoEnv;
123114
in if network == "selfnode" then selfnodeConfig else cardanoEnv;
124115
kind = if network == "local" then "shelley" else if (envCfg.nodeConfig.Protocol == "RealPBFT" || envCfg.nodeConfig.Protocol == "Byron") then "byron" else "shelley";
125116

@@ -213,8 +204,8 @@ let
213204
workingDir = dataDir;
214205
stateDir = dataDir;
215206
tlsPath = "${dataDir}${dirSep}tls";
216-
cluster = if __hasAttr network clusterOverrides then clusterOverrides.${network}.cluster else network;
217-
networkName = if __hasAttr network clusterOverrides then clusterOverrides.${network}.networkName else network;
207+
cluster = if __hasAttr network clustersAvailable then clustersAvailable.${network}.cluster else network;
208+
networkName = if __hasAttr network clustersAvailable then clustersAvailable.${network}.networkName else network;
218209
isFlight = network == "mainnet_flight";
219210
isStaging = (envCfg.nodeConfig.RequiresNetworkMagic == "RequiresNoMagic");
220211
nodeImplementation = "cardano";
@@ -233,6 +224,7 @@ let
233224
${lib.optionalString (envCfg.nodeConfig ? ByronGenesisFile) "cp ${envCfg.nodeConfig.ByronGenesisFile} $out/genesis-byron.json"}
234225
${lib.optionalString (envCfg.nodeConfig ? ShelleyGenesisFile) "cp ${envCfg.nodeConfig.ShelleyGenesisFile} $out/genesis-shelley.json"}
235226
${lib.optionalString (envCfg.nodeConfig ? AlonzoGenesisFile) "cp ${envCfg.nodeConfig.AlonzoGenesisFile} $out/genesis-alonzo.json"}
227+
${lib.optionalString (envCfg.nodeConfig ? ConwayGenesisFile) "cp ${envCfg.nodeConfig.ConwayGenesisFile} $out/genesis-conway.json"}
236228
'';
237229

238230
mkConfigCardano = let
@@ -247,6 +239,7 @@ let
247239
ByronGenesisFile = "genesis-byron.json";
248240
ShelleyGenesisFile = "genesis-shelley.json";
249241
AlonzoGenesisFile = "genesis-alonzo.json";
242+
ConwayGenesisFile = "genesis-conway.json";
250243
})));
251244
genesisFile = let
252245
genesisFile'.selfnode = ../utils/cardano/selfnode/genesis.json;

nix/old-default.nix

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,52 @@ let
2121
});
2222
};
2323
};
24-
walletFlake = (import inputs.flake-compat {
25-
# FIXME: add patches in `flake.nix` after <https://github.com/NixOS/nix/issues/3920>
26-
src = pkgs.runCommand "cardano-wallet" {} ''
27-
cp -r ${inputs.cardano-wallet-unpatched} $out
28-
chmod -R +w $out
29-
cd $out
30-
patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch}
31-
patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch}
32-
patch -p1 -i ${./cardano-wallet--proper-runtimeNodePkgs.patch}
33-
'';
34-
}).defaultNix // {
35-
inherit (inputs.cardano-wallet-unpatched) rev shortRev sourceInfo;
36-
};
24+
flake-compat = import inputs.flake-compat;
25+
26+
walletFlake = let
27+
unpatched = inputs.cardano-wallet-unpatched;
28+
in (flake-compat {
29+
src = {
30+
outPath = toString (pkgs.runCommand "source" {} ''
31+
cp -r ${unpatched} $out
32+
chmod -R +w $out
33+
cd $out
34+
patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch}
35+
patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch}
36+
'');
37+
inherit (unpatched) rev shortRev lastModified lastModifiedDate;
38+
};
39+
}).defaultNix;
40+
41+
nodeFlake = let
42+
unpatched = walletFlake.inputs.cardano-node-runtime;
43+
in (flake-compat {
44+
src = {
45+
outPath = toString (pkgs.runCommand "source" {} ''
46+
cp -r ${unpatched} $out
47+
chmod -R +w $out
48+
cd $out
49+
cp ${walletFlake}/nix/supported-systems.nix $out/nix/supported-systems.nix
50+
'');
51+
inherit (unpatched.sourceInfo) rev shortRev lastModified lastModifiedDate;
52+
};
53+
}).defaultNix;
54+
3755
walletPackages = {
3856
x86_64-windows = walletFlake.packages.x86_64-linux.windowsPackages;
3957
x86_64-linux = walletFlake.packages.x86_64-linux;
4058
x86_64-darwin = walletFlake.packages.x86_64-darwin;
4159
aarch64-darwin = walletFlake.packages.aarch64-darwin;
4260
}.${target};
43-
cardanoWorldFlake = (import inputs.flake-compat { src = inputs.cardano-world; }).defaultNix.outputs;
61+
62+
nodePackages = {
63+
x86_64-windows = nodeFlake.legacyPackages.x86_64-linux.hydraJobs.windows; # a bug in ${cardano-node}/flake.nix
64+
x86_64-linux = nodeFlake.packages.x86_64-linux;
65+
x86_64-darwin = nodeFlake.packages.x86_64-darwin;
66+
aarch64-darwin = nodeFlake.packages.aarch64-darwin;
67+
}.${target};
68+
69+
cardanoWorldFlake = (flake-compat { src = inputs.cardano-world; }).defaultNix.outputs;
4470
crossSystem = {
4571
x86_64-windows = pkgs.lib.systems.examples.mingwW64;
4672
}.${target} or null;
@@ -50,7 +76,7 @@ let
5076
ostable.aarch64-darwin = "macos64-arm";
5177

5278
packages = self: {
53-
inherit walletFlake cardanoWorldFlake cluster pkgs target;
79+
inherit walletFlake nodeFlake cardanoWorldFlake cluster pkgs target;
5480
inherit (walletFlake.legacyPackages.${system}.pkgs) cardanoLib;
5581
daedalus-bridge = self.callPackage ./cardano-bridge.nix {};
5682

@@ -59,10 +85,10 @@ let
5985
inherit (walletPackages) mock-token-metadata-server;
6086
cardano-shell = import inputs.cardano-shell { inherit system crossSystem; };
6187
local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null;
62-
cardano-node = walletPackages.cardano-node;
63-
cardanoNodeVersion = self.cardano-node.version + "-" + builtins.substring 0 9 walletFlake.inputs.cardano-node-1_35_4.rev;
88+
cardano-node = nodePackages.cardano-node;
89+
cardanoNodeVersion = self.cardano-node.identifier.version + "-" + builtins.substring 0 9 nodeFlake.rev;
6490
cardanoWalletVersion = self.daedalus-bridge.wallet-version + "-" + builtins.substring 0 9 walletFlake.rev;
65-
cardano-cli = walletPackages.cardano-cli;
91+
cardano-cli = nodePackages.cardano-cli;
6692

6793
launcherConfigs = self.callPackage ./launcher-config.nix {
6894
inherit devShell system;

0 commit comments

Comments
 (0)