Skip to content

Commit

Permalink
Add ibc-go-v9 with wasm (#281)
Browse files Browse the repository at this point in the history
* Add ibc-go-v9 with wasm from branch and add libwasmvm 2.1.4

* Remove gaia 6.0.3 from apps.nix

* Remove Gaia 4 from apps.nix
  • Loading branch information
ljoss17 authored Jan 8, 2025
1 parent a615496 commit 662d2ec
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 10 deletions.
38 changes: 37 additions & 1 deletion flake.lock

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

11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@
flake = false;
};

ibc-go-v9-wasm-src = {
type = "github";
owner = "cosmos";
repo = "ibc-go";
ref = "08-wasm/release/v0.5.x%2Bibc-go-v9.0.x-wasmvm-v2.1.x";
flake = false;
};

cosmos-sdk-src.url = "github:cosmos/cosmos-sdk/v0.46.0";
cosmos-sdk-src.flake = false;

Expand Down Expand Up @@ -220,6 +228,9 @@
wasmvm_1-src.url = "github:CosmWasm/wasmvm/v1.0.0";
wasmvm_1-src.flake = false;

wasmvm_2_1_4-src.url = "github:CosmWasm/wasmvm/v2.1.4";
wasmvm_2_1_4-src.flake = false;

wasmvm_2_1_3-src.url = "github:CosmWasm/wasmvm/v2.1.3";
wasmvm_2_1_3-src.flake = false;

Expand Down
8 changes: 0 additions & 8 deletions modules/apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@
type = "app";
program = "${packages.hermes}/bin/hermes";
};
gaia = {
type = "app";
program = "${packages.gaia6_0_3}/bin/gaiad";
};
gaia4 = {
type = "app";
program = "${packages.gaia4}/bin/gaiad";
};
gaia5 = {
type = "app";
program = "${packages.gaia5}/bin/gaiad";
Expand Down
2 changes: 1 addition & 1 deletion modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
# IBC Go
(import ../packages/ibc-go.nix {
inherit inputs;
inherit (self'.packages) libwasmvm_1_5_0 libwasmvm_2_1_0;
inherit (self'.packages) libwasmvm_1_5_0 libwasmvm_2_1_0 libwasmvm_2_1_4;
inherit (cosmosLib) mkCosmosGoApp wasmdPreFixupPhase;
})
# Libwasm VM
Expand Down
16 changes: 16 additions & 0 deletions packages/ibc-go.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
inputs,
libwasmvm_1_5_0,
libwasmvm_2_1_0,
libwasmvm_2_1_4,
mkCosmosGoApp,
wasmdPreFixupPhase,
}:
Expand Down Expand Up @@ -129,4 +130,19 @@ with inputs;
'';
buildInputs = [libwasmvm_2_1_0];
};

ibc-go-v9-wasm-simapp = {
name = "simd";
version = "08-wasm/release/v0.5.x%2Bibc-go-v9.0.x-wasmvm-v2.1.x";
src = "${ibc-go-v9-wasm-src}/modules/light-clients/08-wasm";
rev = ibc-go-v9-wasm-src.rev;
vendorHash = "sha256-6ceJhOA2GRgRi+WDt8DN2YhvtUsk4gg1OhG+R/jXJcM=";
goVersion = "1.22";
tags = ["netgo"];
engine = "cometbft/cometbft";
preFixup = ''
${wasmdPreFixupPhase libwasmvm_2_1_4 "simd"}
'';
buildInputs = [libwasmvm_2_1_4];
};
}
12 changes: 12 additions & 0 deletions packages/libwasmvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
in
builtins.mapAttrs (_: libwasmvm: pkgs.rustPlatform.buildRustPackage (libwasmvmCommon // libwasmvm))
{
libwasmvm_2_1_4 = {
src = "${inputs.wasmvm_2_1_4-src}/libwasmvm";
version = "v2.1.4";
cargoSha256 = "sha256-BFou131HI+YKXU9H51Xa/y7A441Z7QkAA92mhquJ5l4=";
cargoLock = {
lockFile = "${inputs.wasmvm_2_1_4-src}/libwasmvm/Cargo.lock";
outputHashes = {
"cosmwasm-crypto-2.1.5" = "sha256-URkpx8+PXZ1IaYnFFC/zBhNd1+FvwNhquR/O5kAyC5U=";
};
};
};

libwasmvm_2_1_3 = {
src = "${inputs.wasmvm_2_1_3-src}/libwasmvm";
version = "v2.1.3";
Expand Down

0 comments on commit 662d2ec

Please sign in to comment.