Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
draft

Update default.nix

Update packages.nix

Delete packages/datamodel-code-generator.nix

Update flake.nix

Update default.nix

Update flake.nix

feat: cw limit size according default cosmos host (informalsystems#188)

* cw limit size

* fixed profile folder

Add Namada chain (informalsystems#193)

* WIP: add Namada chain

* Update to Namada v0.28.1

* fix broken buildscript for librocksdb-sys

* fmt

* update broken ics hash

---------

Co-authored-by: Jonathan Lorimer <[email protected]>
Co-authored-by: Jonathan Lorimer <[email protected]>

chore: update osmosis to mainnet release (informalsystems#195)

* update osmosis

* fixing wasm version

Add additional substituters (informalsystems#198)

update hermes (informalsystems#197)
  • Loading branch information
dzmitry-lahoda committed Mar 15, 2024
1 parent 8f8e9cb commit ffbc365
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 93 deletions.
78 changes: 48 additions & 30 deletions flake.lock

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

36 changes: 14 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
nixConfig = {
substituters = "https://cosmosnix-store.s3.us-east-2.amazonaws.com";
trusted-public-keys = "cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk=";
substituters = "https://cosmosnix-store.s3.us-east-2.amazonaws.com 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=";
};

description = "A reproducible package set for Cosmos, IBC and CosmWasm";
Expand Down Expand Up @@ -42,7 +42,6 @@
nix-std.url = "github:chessai/nix-std";
flake-parts.url = "github:hercules-ci/flake-parts";
gomod2nix.url = "github:JonathanLorimer/gomod2nix/jonathan/update-go";
poetry2nix.url = "github:nix-community/poetry2nix";

# Freshautomations inputs
stoml-src.url = "github:freshautomations/stoml";
Expand All @@ -59,7 +58,7 @@
ibc-rs-src.url = "github:informalsystems/ibc-rs/v1.0.0";
ibc-rs-src.flake = false;

hermes-src.url = "github:informalsystems/hermes/v1.6.0";
hermes-src.url = "github:informalsystems/hermes/v1.7.4";
hermes-src.flake = false;

relayer-src.url = "github:cosmos/relayer/v1.0.0";
Expand Down Expand Up @@ -144,7 +143,7 @@
juno-src.url = "github:CosmosContracts/juno/v17.1.1";
juno-src.flake = false;

osmosis-src.url = "github:osmosis-labs/osmosis/v20.4.0";
osmosis-src.url = "github:osmosis-labs/osmosis/v21.0.0";
osmosis-src.flake = false;

sentinel-src.url = "github:sentinel-official/hub/v0.9.0-rc0";
Expand Down Expand Up @@ -201,9 +200,6 @@
wasmvm_1_beta7-src.url = "github:CosmWasm/wasmvm/v1.0.0-beta7";
wasmvm_1_beta7-src.flake = false;

cosmwasm-src.url = "github:CosmWasm/cosmwasm/v1.5.0";
cosmwasm-src.flake = false;

apalache-src.url = "github:informalsystems/apalache/v0.42.0";
apalache-src.flake = false;

Expand All @@ -225,32 +221,28 @@
celestia-src.url = "github:celestiaorg/celestia-app/v1.4.0";
celestia-src.flake = false;

namada-src.url = "github:anoma/namada/v0.28.1";
namada-src.flake = false;

neutron-src.url = "github:neutron-org/neutron/v2.0.0";
neutron-src.flake = false;

beaker-src.url = "github:osmosis-labs/beaker/v0.1.6";
beaker-src.flake = false;

provenance-src.url = "github:/provenance-io/provenance/v1.17.0";
provenance-src.flake = false;

# Contracts
cw-plus-src.url = "github:CosmWasm/cw-plus/v1.1.2";
cw-plus-src.flake = false;


# Tools
gex-src.url = "github:cosmos/gex/233d335dc9e8c89fb318d1081fae74435f6cac11";
gex-src.flake = false;
cosmwasm-src.url = "github:CosmWasm/cosmwasm/v1.5.0";
cosmwasm-src.flake = false;

# Python supports (usually for MEV/Trading/AI/Indexing)
datamodel-code-generator-src = {
url = "github:koxudaxi/datamodel-code-generator";
flake = false;
};
beaker-src.url = "github:osmosis-labs/beaker/v0.1.6";
beaker-src.flake = false;

cosmpy-src = {
url = "github:fetchai/cosmpy";
flake = false;
};
gex-src.url = "github:cosmos/gex/233d335dc9e8c89fb318d1081fae74435f6cac11";
gex-src.flake = false;
};
}
18 changes: 9 additions & 9 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ nix-std: {
# people use different profiles a lot
profile ? "release",
nativeBuildInputs ? [],
# as per https://github.com/CosmWasm/wasmd/blob/main/README.md
maxWasmSizeBytes ? 819200,
...
}: let
binaryName = "${builtins.replaceStrings ["-"] ["_"] pname}.wasm";
Expand All @@ -45,12 +47,18 @@ nix-std: {
buildPhase = ''
cargo build --lib --target ${target} --profile ${profile} --package ${pname}
mkdir -p ./output/lib
wasm-opt "target/${target}/release/${binaryName}" -o "./output/lib/${binaryName}" -Os --signext-lowering
wasm-opt "target/${target}/${profile}/${binaryName}" -o "./output/lib/${binaryName}" -Os --signext-lowering
cp -r ./output $out
'';
checkPhase = ''
cargo test
cosmwasm-check "$out/lib/${binaryName}"
SIZE=$(stat --format=%s "$out/lib/${binaryName}")
if [[ "$SIZE" -gt ${builtins.toString maxWasmSizeBytes} ]]; then
echo "Wasm file size is $SIZE, which is larger than the maximum allowed size of ${builtins.toString maxWasmSizeBytes} bytes."
echo "Either reduce size or increase maxWasmSizeBytes if you know what you are doing."
exit 1
fi
'';
}
// cleanedArgs
Expand Down Expand Up @@ -131,14 +139,6 @@ nix-std: {
in {
inherit buildCosmwasmContract;
mkCosmosGoApp = buildApp;
cosmpy-package = let
inherit (inputs.poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryPackages;
in
(mkPoetryPackages {
projectDir = inputs.cosmpy-src;
checkGroups = [];
})
.poetryPackages;

wasmdPreFixupPhase = libwasmvm: binName:
if pkgs.stdenv.hostPlatform.isLinux
Expand Down
4 changes: 4 additions & 0 deletions modules/apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@
type = "app";
program = "${packages.provenance}/bin/provenanced";
};
namada = {
type = "app";
program = "${packages.namada}/bin/namada";
};
};
};
}
13 changes: 5 additions & 8 deletions modules/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
inherit pkgs;
inherit (inputs) cosmwasm-src;
};
datamodel-code-generator = let
inherit (inputs.poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication;
in
import ../packages/datamodel-code-generator.nix {
inherit mkPoetryApplication;
inherit (inputs) datamodel-code-generator-src;
};
cosmovisor = import ../packages/cosmovisor.nix {
inherit (pkgs) buildGoModule;
inherit (inputs) cosmos-sdk-src;
Expand Down Expand Up @@ -104,7 +97,7 @@
};
osmosis = import ../packages/osmosis.nix {
inherit (inputs) osmosis-src;
inherit (self'.packages) libwasmvm_1_2_3;
inherit (self'.packages) libwasmvm_1_5_0;
inherit cosmosLib;
};
provenance = import ../packages/provenance.nix {
Expand Down Expand Up @@ -151,6 +144,10 @@
inherit (self'.packages) libwasmvm_1_2_3;
inherit cosmosLib;
};
namada = import ../packages/namada.nix {
inherit pkgs;
inherit (inputs) namada-src;
};
}
# This list contains attr sets that are recursively merged into the
# base attrset
Expand Down
12 changes: 0 additions & 12 deletions packages/datamodel-code-generator.nix

This file was deleted.

5 changes: 2 additions & 3 deletions packages/hermes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
}:
pkgs.rustPlatform.buildRustPackage {
pname = "hermes";
version = "v1.6.0";
version = "v1.7.4";
src = hermes-src;
nativeBuildInputs = with pkgs; [rust-bin.stable.latest.default] ++ lib.lists.optionals stdenv.isDarwin [darwin.apple_sdk.frameworks.Security];
cargoSha256 = "sha256-xCSH8L8do6mS3NKPBZoXKrbJizEDiCJrZnUeG0aisRE=";
cargoSha256 = "sha256-oAsRn0THb5FU1HqgpB60jChGeQZdbrPoPfzTbyt3ozM=";
doCheck = false;
cargoCheckCommand = "true";
}
2 changes: 1 addition & 1 deletion packages/interchain-security.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkCosmosGoApp {
appName = "interchain-security";
version = "v3.0.0-pre";
src = interchain-security-src;
vendorHash = "sha256-TnU7lJnoD/ZzPS2XfvFGkb/ycLbH3iHvKRim+31+Yro=";
vendorHash = "sha256-j0xus8vN6bnFMUXyvT8r7ONPQyaEBydKQ8qH2BevWPs=";
tags = ["netgo"];
engine = "cometbft/cometbft";
doCheck = false; # tests are currently failing
Expand Down
Loading

0 comments on commit ffbc365

Please sign in to comment.