Skip to content

Commit

Permalink
chore: remove no longer required bls-eth-go/blst
Browse files Browse the repository at this point in the history
this library was used for our custom bls12 precompile that we ditched to reuse the
cosmwasm bls12 precompile from v2.0+
  • Loading branch information
hussein-aitlahcen committed Dec 10, 2024
1 parent 2df7bad commit e6e41d3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 138 deletions.
94 changes: 1 addition & 93 deletions flake.lock

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

22 changes: 0 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};

# Prysm bls12-381 native for eth LC aggregate/verify custom query
blst = {
url = "github:supranational/blst?rev=3dd0f804b1819e5d03fb22ca2e6fac105932043a";
flake = false;
};
bls-eth-go = {
url = "git+https://github.com/herumi/bls-eth-go-binary?ref=refs/tags/v1.33.0&submodules=1";
flake = false;
};

ibc-go = {
url = "github:unionlabs/ibc-go-union?rev=bfabb646cf7384bd33ee672f51a0e1325f545c10";
flake = false;
Expand Down Expand Up @@ -83,14 +73,6 @@
url = "github:CosmWasm/wasmvm/v1.5.4";
flake = false;
};
wasmvm-1_5_0 = {
url = "github:CosmWasm/wasmvm/v1.5.0";
flake = false;
};
wasmvm-2_0_0 = {
url = "github:CosmWasm/wasmvm/v2.0.0";
flake = false;
};
wasmvm-2_1_2 = {
url = "github:CosmWasm/wasmvm/v2.1.2";
flake = false;
Expand All @@ -99,10 +81,6 @@
url = "github:CosmWasm/wasmvm/v2.1.3";
flake = false;
};
wasmvm-2_2_0 = {
url = "github:CosmWasm/wasmvm/v2.2.0-rc.2";
flake = false;
};
stargaze = {
url = "git+https://github.com/public-awesome/stargaze?ref=main&submodules=1";
flake = false;
Expand Down
24 changes: 1 addition & 23 deletions uniond/uniond.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
}:
let
libwasmvm = self'.packages.libwasmvm-2_1_3;
CGO_CFLAGS = "-I${self'.packages.libblst}/include -I${self'.packages.libblst.src}/src -I${self'.packages.libblst.src}/build -I${self'.packages.bls-eth.src}/bls/include -O";
CGO_LDFLAGS = "-z noexecstack -static -L${goPkgs.musl}/lib -L${libwasmvm}/lib -L${self'.packages.bls-eth}/lib -s -w";
CGO_LDFLAGS = "-z noexecstack -static -L${goPkgs.musl}/lib -L${libwasmvm}/lib -s -w";

mkUniondImage =
uniond:
Expand All @@ -42,26 +41,6 @@
in
{
packages = {
bls-eth =
let
isAarch64 = (builtins.head (pkgs.lib.splitString "-" system)) == "aarch64";
in
pkgs.pkgsStatic.stdenv.mkDerivation {
pname = "bls-eth";
version = inputs.bls-eth-go.shortRev;
src = inputs.bls-eth-go;
nativeBuildInputs = [
pkgs.pkgsStatic.nasm
] ++ (pkgs.lib.optionals isAarch64 [ pkgs.llvmPackages_9.libcxxClang ]);
installPhase = ''
mkdir -p $out/lib
ls -al bls/lib/linux/
mv bls/lib/linux/${if isAarch64 then "arm64" else "amd64"}/*.a $out/lib
'';
enableParallelBuilding = true;
doCheck = true;
};

# Statically link on Linux using `pkgsStatic`, dynamically link on Darwin using normal `pkgs`.
uniond =
(if pkgs.stdenv.isLinux then goPkgs.pkgsStatic.buildGo123Module else goPkgs.buildGo123Module)
Expand All @@ -83,7 +62,6 @@
// (
if pkgs.stdenv.isLinux then
{
inherit CGO_CFLAGS;
inherit CGO_LDFLAGS;
nativeBuildInputs = [ goPkgs.musl ];
ldflags = [
Expand Down

0 comments on commit e6e41d3

Please sign in to comment.