Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wasm variant of ibc-go v7 and v8 #270

Merged
merged 3 commits into from
Aug 26, 2024
Merged
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
36 changes: 36 additions & 0 deletions flake.lock

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

18 changes: 17 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
nixConfig = {
substituters = "https://cosmos-nix.cachix.org https://cache.nixos.org https://nix-community.cachix.org";
trusted-public-keys = "cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
trusted-public-keys = "cosmos-nix.cachix.org-1:I9dmz4kn5+JExjPxOd9conCzQVHPl0Jo1Cdp6s+63d4= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public key for the cosmos-nix Cachix is somehow wrong. So I am updating it. Source: https://app.cachix.org/cache/cosmos-nix

};

description = "A reproducible package set for Cosmos, IBC and CosmWasm";
Expand Down Expand Up @@ -147,6 +147,22 @@
ibc-go-v9-src.url = "github:cosmos/ibc-go/v9.0.0-beta.1";
ibc-go-v9-src.flake = false;

ibc-go-v7-wasm-src = {
type = "github";
owner = "cosmos";
repo = "ibc-go";
ref = "modules/light-clients/08-wasm/v0.3.1+ibc-go-v7.4-wasmvm-v1.5";
flake = false;
};

ibc-go-v8-wasm-src = {
type = "github";
owner = "cosmos";
repo = "ibc-go";
ref = "modules/light-clients/08-wasm/v0.4.1+ibc-go-v8.4-wasmvm-v2.0";
flake = false;
};

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

Expand Down
8 changes: 8 additions & 0 deletions modules/apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@
type = "app";
program = "${packages.ibc-go-v9-simapp}/bin/simd";
};
ibc-go-v7-wasm-simapp = {
type = "app";
program = "${packages.ibc-go-v7-wasm-simapp}/bin/simd";
};
ibc-go-v8-wasm-simapp = {
type = "app";
program = "${packages.ibc-go-v8-wasm-simapp}/bin/simd";
};
ignite-cli = {
type = "app";
program = "${packages.ignite-cli}/bin/ignite";
Expand Down
2 changes: 1 addition & 1 deletion modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
# IBC Go
(import ../packages/ibc-go.nix {
inherit inputs;
inherit (self'.packages) libwasmvm_2_1_0;
inherit (self'.packages) libwasmvm_1_5_0 libwasmvm_2_1_0;
inherit (cosmosLib) mkCosmosGoApp wasmdPreFixupPhase;
})
# Libwasm VM
Expand Down
31 changes: 31 additions & 0 deletions packages/ibc-go.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
inputs,
libwasmvm_1_5_0,
libwasmvm_2_1_0,
mkCosmosGoApp,
wasmdPreFixupPhase,
Expand Down Expand Up @@ -102,4 +103,34 @@ with inputs;
'';
buildInputs = [libwasmvm_2_1_0];
};

ibc-go-v7-wasm-simapp = {
name = "simd";
version = "v7.4.0-wasm";
src = "${ibc-go-v7-wasm-src}/modules/light-clients/08-wasm";
rev = ibc-go-v7-wasm-src.rev;
vendorHash = "sha256-jPd1mjyjFlS3thN0LlpPUhnA6D4UyVkDU+pcJwI9tp0=";
goVersion = "1.22";
tags = ["netgo"];
engine = "cometbft/cometbft";
preFixup = ''
${wasmdPreFixupPhase libwasmvm_1_5_0 "simd"}
'';
buildInputs = [libwasmvm_1_5_0];
};

ibc-go-v8-wasm-simapp = {
name = "simd";
version = "v8.4.0-wasm";
src = "${ibc-go-v8-wasm-src}/modules/light-clients/08-wasm";
rev = ibc-go-v8-wasm-src.rev;
vendorHash = "sha256-z+hmzuAeyVYXtbb3SClfwQW0+nrUiYYYZCP6Vvc4dmQ=";
goVersion = "1.22";
tags = ["netgo"];
engine = "cometbft/cometbft";
preFixup = ''
${wasmdPreFixupPhase libwasmvm_2_1_0 "simd"}
'';
buildInputs = [libwasmvm_2_1_0];
};
}