Zerokit's RLN wrappers and implementation in Go
Go to file
Alvaro Revuelta a8e8aab76c
Remove hardcoded epoch size (#24)
2024-06-14 12:20:49 +02:00
.github/workflows Add CI for tests (#18) 2024-01-16 15:31:15 +01:00
rln Remove hardcoded epoch size (#24) 2024-06-14 12:20:49 +02:00
.gitignore chore: allow passing configs when instantiating RLN 2023-08-07 15:54:39 -04:00
.gitmodules refactor: split into submodules 2023-04-01 08:25:39 -04:00
LICENSE chore: add iOS libraries (#2) 2022-09-07 15:19:28 -04:00
README.md chore: update README.md 2023-12-15 08:50:18 -04:00
cbindgen.toml feat: initial version with linux and android support (#1) 2022-09-07 15:15:43 -04:00
go.mod Custom witness proof with RLN v2 (#22) 2024-05-30 14:53:54 +02:00
go.sum Custom witness proof with RLN v2 (#22) 2024-05-30 14:53:54 +02:00

README.md

go-zerokit-rln

Go wrappers for zerokit's RLN

Updating vacp2p/zerokit

To overcome the limit of 500mb github has for repositories, go-zerokit-rln depends on 3 projects:

Zerokit must be updated in these 3 repositories. The instructions are the same for each of the architectures, except for -apple which require macos to be executed. You need to have docker and rust installed.

export GO_RLN_ARCH=x86_64       # Replace this for x86_64, arm or apple
export ZEROKIT_COMMIT=master    # Use a commit, branch or tag

git clone https://github.com/waku-org/go-zerokit-rln_${GO_RLN_ARCH}
cd go-zerokit-rln-${GO_RLN_ARCH}
git submodule init
git submodule update --recursive
cd zerokit
git pull
git checkout ${ZEROKIT_COMMIT}
cd ..
make
git add zerokit
git add libs/*/librln.a
git commit -m "chore: bump zerokit"
git push

Once you execute the previous commands for each one of the architectures, update go.mod:

cd /path/to/go-zerokit-rln
go get github.com/waku-org/go-zerokit-rln-apple@latest
go get github.com/waku-org/go-zerokit-rln-arm@latest
go get github.com/waku-org/go-zerokit-rln-x86_64@latest
git checkout master
git add go.mod
git add go.sum
git commit -m "chore: bump zerokit"
git push

And later in go-waku, update the go-zerokit-rln dependency with

cd /path/to/go-waku
git fetch
git checkout -b `date +"%Y%m%d%H%M%S"-bump-zerokit` origin/master
go get github.com/waku-org/go-zerokit-rln@latest
git add go.mod
git add go.sum
git commit -m "chore: bump go-zerokit-rln"
git push

And create a PR

Adding a new architecture

  1. Depending on the architecture/platform you want to add, clone one of these repositories.
  1. Edit ./scripts/build.sh to add the new architecture. Refer to this list of supported targets
  2. Edit ./rln/link.go to add a cgo build tag for the new architecture
  3. Commit the changes and then execute
export GO_RLN_ARCH=x86_64       # Replace this for the platform you just updated: x86_64, arm or apple
cd /path/to/go-zerokit-rln
git checkout master
git pull
go get github.com/waku-org/go-zerokit-rln-${GO_RLN_ARCH}@latest
git add go.mod
git add go.sum
git commit -m "chore: bump go-zerokit-rln-${GO_RLN_ARCH}"
git push