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 8f8723d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 212 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.

23 changes: 0 additions & 23 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 Expand Up @@ -249,7 +227,6 @@
./tools/tools.nix
./tools/wasm-light-client.nix
./tools/libwasmvm/libwasmvm.nix
./tools/libblst/libblst.nix
./tools/tidy/tidy.nix
./tools/rust/rust.nix
./tools/rust/crane.nix
Expand Down
71 changes: 0 additions & 71 deletions tools/libblst/libblst.nix

This file was deleted.

1 change: 0 additions & 1 deletion typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,6 @@ files.extend-exclude = [
"legendres" = "legendres"
"legos" = "legos"
"lerp" = "lerp"
"libblst" = "libblst"
"libc" = "libc"
"libclang" = "libclang"
"libcxx" = "libcxx"
Expand Down
26 changes: 2 additions & 24 deletions uniond/uniond.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ inputs, ... }:
{ ... }:
{
perSystem =
{
Expand All @@ -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 8f8723d

Please sign in to comment.