Skip to content
Closed
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: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Fixed out-of-memory errors on https://ci.iog.io ([PR 3145](https://github.com/input-output-hk/daedalus/pull/3145))

### Chores

- Updated cardano-node to 8.1.1 (via cardano-wallet) ([PR 3133](https://github.com/input-output-hk/daedalus/pull/3133))

## 5.3.0

### Features
Expand Down
20 changes: 10 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
cardano-wallet-unpatched.url = "github:input-output-hk/cardano-wallet/v2023-04-14";
cardano-wallet-unpatched.url = "github:cardano-foundation/cardano-wallet/v2023-07-18";
cardano-wallet-unpatched.flake = false; # otherwise, +10k quadratic dependencies in flake.lock…
cardano-world.url = "github:input-output-hk/cardano-world/a0a315100ee320395be97fcc83f46678d5a7fb6e";
cardano-world.url = "github:input-output-hk/cardano-world/d751a12be1dd4e5e2bd3bafaf4c254390469292d";
cardano-world.flake = false; # otherwise, +19k quadratic dependencies in flake.lock…
cardano-shell.url = "github:input-output-hk/cardano-shell/0d1d5f036c73d18e641412d2c58d4acda592d493";
cardano-shell.flake = false;
Expand Down
2 changes: 1 addition & 1 deletion installers/common/MacInstaller.hs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ makeComponentRoot Options{oBackend,oCluster} appRoot darwinConfig@DarwinConfig{d
forM_ ["config.yaml", "genesis.json", "topology.yaml" ] $ \f ->
cp f (dataDir </> f)
when (oCluster /= Selfnode) $ do
forM_ ["genesis-byron.json", "genesis-shelley.json", "genesis-alonzo.json" ] $ \f ->
forM_ ["genesis-byron.json", "genesis-shelley.json", "genesis-alonzo.json", "genesis-conway.json" ] $ \f ->
cp f (dataDir </> f)

when (oCluster == Selfnode) $ do
Expand Down
4 changes: 2 additions & 2 deletions installers/common/WindowsInstaller.hs
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
file [] "topology.yaml"
file [] "genesis.json"
when (clusterName /= Selfnode) $ do
file [] "genesis-conway.json"
file [] "genesis-byron.json"
file [] "genesis-shelley.json"
file [] "genesis-alonzo.json"
file [] "libsodium-23.dll"
file [] "libsecp256k1-1.dll"
file [] "libsecp256k1-0.dll"
file [] "libsecp256k1-2.dll"
file [] "libssl-3-x64.dll"
file [] "libcrypto-3-x64.dll"
when (clusterName == Selfnode) $ do
Expand Down
2 changes: 1 addition & 1 deletion nix/internal/any-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let
in rec {

inherit common;
inherit (common) nodejs nodePackages yarn yarn2nix offlineCache srcLockfiles srcWithoutNix;
inherit (common) nodejs yarn yarn2nix offlineCache srcLockfiles srcWithoutNix;

# The following is used in all `configurePhase`s:
darwinSpecificCaches = let
Expand Down
36 changes: 32 additions & 4 deletions nix/internal/cardano-wallet--enable-aarch64-darwin.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
diff --git a/flake.nix b/flake.nix
index 37ea1cfa12..8d0871d52b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -217,8 +217,22 @@
collectChecks
check;

- nodePkgs = cardano-node-runtime.legacyPackages.${system};
- nodeProject = cardano-node-runtime.project.${system};
+ cardano-node-runtime-patched =
+ if system != "aarch64-darwin"
+ then cardano-node-runtime
+ else (import ./nix/flake-compat.nix {
+ src = {
+ outPath = toString (pkgs.runCommandLocal "patched-cardano-node" {} ''
+ cp -r ${cardano-node-runtime} $out
+ chmod -R +w $out
+ cat ${./nix/supported-systems.nix} >$out/nix/supported-systems.nix
+ '');
+ inherit (cardano-node-runtime.sourceInfo) rev shortRev lastModified lastModifiedDate;
+ };
+ }).defaultNix;
+
+ nodePkgs = cardano-node-runtime-patched.legacyPackages.${system};
+ nodeProject = cardano-node-runtime-patched.project.${system};

project = (import ./nix/haskell.nix
CHaP
diff --git a/nix/supported-systems.nix b/nix/supported-systems.nix
index 6e3f0d94e3..5de7138b32 100644
index 6e3f0d94e3..a0c0ae17dc 100644
--- a/nix/supported-systems.nix
+++ b/nix/supported-systems.nix
@@ -1,6 +1,5 @@
[
@@ -2,5 +2,5 @@
"x86_64-linux"
"x86_64-darwin"
- # TODO: Enable aarch64-darwin when there are Hydra builders for it
# TODO: Enable aarch64-darwin when there are Hydra builders for it
- # "aarch64-darwin"
+ "aarch64-darwin"
]
45 changes: 0 additions & 45 deletions nix/internal/cardano-wallet--proper-runtimeNodePkgs.patch

This file was deleted.

61 changes: 43 additions & 18 deletions nix/internal/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,36 @@ rec {
};
};

walletFlake = (import inputs.flake-compat {
# FIXME: add patches in `flake.nix` after <https://github.com/NixOS/nix/issues/3920>
src = pkgs.runCommand "cardano-wallet" {} ''
cp -r ${inputs.cardano-wallet-unpatched} $out
chmod -R +w $out
cd $out
patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch}
patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch}
patch -p1 -i ${./cardano-wallet--proper-runtimeNodePkgs.patch}
'';
}).defaultNix // {
inherit (inputs.cardano-wallet-unpatched) rev shortRev sourceInfo;
};
flake-compat = import inputs.flake-compat;

walletFlake = let
unpatched = inputs.cardano-wallet-unpatched;
in (flake-compat {
src = {
outPath = toString (pkgs.runCommand "source" {} ''
cp -r ${unpatched} $out
chmod -R +w $out
cd $out
patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch}
patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch}
'');
inherit (unpatched) rev shortRev lastModified lastModifiedDate;
};
}).defaultNix;

nodeFlake = let
unpatched = walletFlake.inputs.cardano-node-runtime;
in (flake-compat {
src = {
outPath = toString (pkgs.runCommand "source" {} ''
cp -r ${unpatched} $out
chmod -R +w $out
cd $out
cp ${walletFlake}/nix/supported-systems.nix $out/nix/supported-systems.nix
'');
inherit (unpatched.sourceInfo) rev shortRev lastModified lastModifiedDate;
};
}).defaultNix;

walletPackages = {
x86_64-windows = walletFlake.packages.x86_64-linux.windowsPackages;
Expand All @@ -44,7 +61,14 @@ rec {
aarch64-darwin = walletFlake.packages.aarch64-darwin;
}.${targetSystem};

cardanoWorldFlake = (import inputs.flake-compat { src = inputs.cardano-world; }).defaultNix.outputs;
nodePackages = {
x86_64-windows = nodeFlake.legacyPackages.x86_64-linux.hydraJobs.windows; # a bug in ${cardano-node}/flake.nix
x86_64-linux = nodeFlake.packages.x86_64-linux;
x86_64-darwin = nodeFlake.packages.x86_64-darwin;
aarch64-darwin = nodeFlake.packages.aarch64-darwin;
}.${targetSystem};

cardanoWorldFlake = (flake-compat { src = inputs.cardano-world; }).defaultNix.outputs;

inherit (walletFlake.legacyPackages.${pkgs.system}.pkgs) cardanoLib;

Expand All @@ -55,7 +79,9 @@ rec {
local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null;
});

inherit (walletPackages) cardano-node cardano-cli cardano-wallet cardano-address mock-token-metadata-server;
inherit (walletPackages) cardano-wallet cardano-address mock-token-metadata-server;

inherit (nodePackages) cardano-node cardano-cli;

cardano-shell = import inputs.cardano-shell {
inherit (pkgs) system;
Expand All @@ -64,7 +90,8 @@ rec {
}.${targetSystem} or null;
};

cardanoNodeVersion = cardano-node.version + "-" + builtins.substring 0 9 walletFlake.inputs.cardano-node-1_35_4.rev;
cardanoNodeVersion = cardano-node.identifier.version + "-" + builtins.substring 0 9 nodeFlake.rev;

cardanoWalletVersion = daedalus-bridge.mainnet.wallet-version + "-" + builtins.substring 0 9 walletFlake.rev;

mkLauncherConfigs = { devShell ? false, cluster }: import ./launcher-config.nix {
Expand Down Expand Up @@ -124,8 +151,6 @@ rec {
)) drv.patches;
});

nodePackages = pkgs.nodePackages.override { inherit nodejs; };

yarn = (pkgs.yarn.override { inherit nodejs; }).overrideAttrs (drv: {
# XXX: otherwise, unable to run our package.json scripts in Nix sandbox (patchShebangs doesn’t catch this)
postFixup = (drv.postFixup or "") + ''
Expand Down
27 changes: 10 additions & 17 deletions nix/internal/launcher-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,9 @@


let
clusterOverrides = {
mainnet_flight = {
cardanoEnv = cardanoLib.environments.mainnet;
cluster = "mainnet";
networkName = "mainnet";
};
alonzo_purple = {
cardanoEnv = cardanoLib.environments.alonzo-purple;
cluster = "alonzo-purple";
networkName = "alonzo-purple";
};
clustersAvailable = rec {
mainnet = fromCardanoWorld "mainnet";
mainnet_flight = mainnet;
shelley_qa = fromCardanoWorld "shelley_qa";
vasil_dev = fromCardanoWorld "vasil-dev";
preprod = fromCardanoWorld "preprod";
Expand All @@ -48,11 +40,12 @@ let
topology = builtins.fromJSON (builtins.unsafeDiscardStringContext (
builtins.readFile (originalFiles + "/topology.json")));

topologyFirstAccessPoint = builtins.head (builtins.head topology.PublicRoots).publicRoots.accessPoints;
topologyFirstAccessPoint = builtins.head (builtins.head topology.publicRoots).accessPoints;

isP2P = originalNodeConfig ? EnableP2P && originalNodeConfig.EnableP2P;

nodeConfig = originalNodeConfig // {
ConwayGenesisFile = originalFiles + "/" + originalNodeConfig.ConwayGenesisFile;
AlonzoGenesisFile = originalFiles + "/" + originalNodeConfig.AlonzoGenesisFile;
ByronGenesisFile = originalFiles + "/" + originalNodeConfig.ByronGenesisFile;
ShelleyGenesisFile = originalFiles + "/" + originalNodeConfig.ShelleyGenesisFile;
Expand Down Expand Up @@ -117,9 +110,7 @@ let
mkConfigPath = configSrc: configPath: "${(configDir configSrc).${os}}${dirSep}${configPath}";

envCfg = let
cardanoEnv = if __hasAttr network clusterOverrides
then clusterOverrides.${network}.cardanoEnv
else cardanoLib.environments.${network};
cardanoEnv = clustersAvailable.${network}.cardanoEnv;
in if network == "selfnode" then selfnodeConfig else cardanoEnv;
kind = if network == "local" then "shelley" else if (envCfg.nodeConfig.Protocol == "RealPBFT" || envCfg.nodeConfig.Protocol == "Byron") then "byron" else "shelley";

Expand Down Expand Up @@ -213,8 +204,8 @@ let
workingDir = dataDir;
stateDir = dataDir;
tlsPath = "${dataDir}${dirSep}tls";
cluster = if __hasAttr network clusterOverrides then clusterOverrides.${network}.cluster else network;
networkName = if __hasAttr network clusterOverrides then clusterOverrides.${network}.networkName else network;
cluster = if __hasAttr network clustersAvailable then clustersAvailable.${network}.cluster else network;
networkName = if __hasAttr network clustersAvailable then clustersAvailable.${network}.networkName else network;
isFlight = network == "mainnet_flight";
isStaging = (envCfg.nodeConfig.RequiresNetworkMagic == "RequiresNoMagic");
nodeImplementation = "cardano";
Expand All @@ -233,6 +224,7 @@ let
${lib.optionalString (envCfg.nodeConfig ? ByronGenesisFile) "cp ${envCfg.nodeConfig.ByronGenesisFile} $out/genesis-byron.json"}
${lib.optionalString (envCfg.nodeConfig ? ShelleyGenesisFile) "cp ${envCfg.nodeConfig.ShelleyGenesisFile} $out/genesis-shelley.json"}
${lib.optionalString (envCfg.nodeConfig ? AlonzoGenesisFile) "cp ${envCfg.nodeConfig.AlonzoGenesisFile} $out/genesis-alonzo.json"}
${lib.optionalString (envCfg.nodeConfig ? ConwayGenesisFile) "cp ${envCfg.nodeConfig.ConwayGenesisFile} $out/genesis-conway.json"}
'';

mkConfigCardano = let
Expand All @@ -247,6 +239,7 @@ let
ByronGenesisFile = "genesis-byron.json";
ShelleyGenesisFile = "genesis-shelley.json";
AlonzoGenesisFile = "genesis-alonzo.json";
ConwayGenesisFile = "genesis-conway.json";
})));
genesisFile = let
genesisFile'.selfnode = ../../utils/cardano/selfnode/genesis.json;
Expand Down
2 changes: 1 addition & 1 deletion nix/internal/x86_64-linux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let
in rec {

inherit common;
inherit (common) nodejs nodePackages yarn yarn2nix offlineCache srcLockfiles srcWithoutNix electronVersion electronChromedriverVersion originalPackageJson;
inherit (common) nodejs yarn yarn2nix offlineCache srcLockfiles srcWithoutNix electronVersion electronChromedriverVersion originalPackageJson;

package = genClusters (cluster: mkDaedalus { sandboxed = false; inherit cluster; });

Expand Down