Skip to content

Commit

Permalink
use w3f bls (#174)
Browse files Browse the repository at this point in the history
* rm submodule

* new ffi

* fix build

* use correct pub key schema

* remove extra comments

* use tinybls and test common seeds

* upgrade lint and fix

* fix

* fix

* fix
  • Loading branch information
qiweiii authored Oct 18, 2024
1 parent b2523e9 commit a961f5c
Show file tree
Hide file tree
Showing 27 changed files with 1,186 additions and 1,040 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: librocksdb-dev libzstd-dev libbz2-dev liblz4-dev
- name: Get blst submodule commit hash
id: blst-commit-hash
run: |
echo "commit-hash=$(git submodule status Utils/Sources/blst/ | cut -c2-41)" >> $GITHUB_OUTPUT
- name: Cache SPM
uses: actions/cache@v4
with:
Expand All @@ -53,22 +49,22 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
Utils/Sources/bandersnatch/target/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache blst static lib
uses: actions/cache@v4
with:
path: .lib/libblst.a
key: ${{ runner.os }}-libs-blst-${{ steps.blst-commit-hash.outputs.commit-hash }}
restore-keys: |
${{ runner.os }}-libs-blst
- name: Cache bandersnatch_vrfs static lib
uses: actions/cache@v4
with:
path: .lib/libbandersnatch_vrfs.a
key: ${{ runner.os }}-libs-libbandersnatch-${{ hashFiles('Utils/Sources/bandersnatch/**') }}
restore-keys: |
${{ runner.os }}-libs-libbandersnatch
- name: Cache bls static lib
uses: actions/cache@v4
with:
path: .lib/libbls.a
key: ${{ runner.os }}-libs-libbls-${{ hashFiles('Utils/Sources/bls/**') }}
restore-keys: |
${{ runner.os }}-libs-libbls
- name: Cache erasure-coding static lib
uses: actions/cache@v4
with:
Expand All @@ -83,7 +79,7 @@ jobs:
with:
components: rustfmt
- name: Check rust format
run: cargo +nightly fmt --all --manifest-path Utils/Sources/bandersnatch/Cargo.toml -- --check
run: cargo +nightly fmt --all -- --check
- name: Build
run: make build
- name: Test
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "JAMTests/jamtestvectors"]
path = JAMTests/jamtestvectors
url = https://github.com/AcalaNetwork/jamtestvectors.git
[submodule "blst"]
path = Utils/Sources/blst
url = https://github.com/supranational/blst.git
2 changes: 1 addition & 1 deletion Blockchain/Sources/Blockchain/Types/State+Genesis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extension State {
devKeys.append(ValidatorKey(
bandersnatch: keySet.bandersnatch.data,
ed25519: keySet.ed25519.data,
bls: Data144(), // TODO: figure out BLS pub key size
bls: keySet.bls.data,
metadata: Data128()
))
}
Expand Down
Loading

0 comments on commit a961f5c

Please sign in to comment.