Solidity verifier implementation for accountable light client. This project is funded by the web3 foundation.
This repo holds two scheme apk verifier and associated libs:
To install with Foundry:
forge install darwinia-network/apk-verifier
To install dependencies and compile contracts:
git clone --recurse-submodules https://github.com/darwinia-network/apk-verifier.git && cd apk-verifier
make tools
make
See inline code docs in the book
- Install Rust.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install Foundry.
curl -L https://foundry.paradigm.xyz | bash
- Build Darwinia Node.
git clone https://github.com/darwinia-network/darwinia.git --branch apk-verifier
cargo build --release -p darwinia --features pangolin-native
- Run darwinia node.
./target/release/darwinia --chain pangolin-dev --alice --tmp --rpc-external --rpc-cors all --execution=native
- Deploy basic/packed contract to local darwinia node.
make deploy-basic
make deploy-packed
- Contract deployed at last transaction hash.
- Run test script.
make test-basic ADDR=0x3ed62137c5DB927cb137c26455969116BF0c23Cb
make test-packed ADDR=0xeAB4eEBa1FF8504c124D031F6844AD98d07C318f
- Seeing the following results indicates that the test was successful.
0x0000000000000000000000000000000000000000000000000000000000000001
local% docker run -it --name my_container ghcr.io/darwinia-network/apk-verifier:v0.1.1 "./bin/darwinia --chain pangolin-dev --alice --tmp --rpc-external --rpc-cors all --execution=native"
Enter the running my_container
:
local% docker exec -it my_container bash
In my_container
:
root@097f7b4f10da:/usr/src/app# make deploy-basic
root@097f7b4f10da:/usr/src/app# make deploy-packed
In my_container
:
root@097f7b4f10da:/usr/src/app# make test-basic ADDR=0x3ed62137c5DB927cb137c26455969116BF0c23Cb
root@097f7b4f10da:/usr/src/app# make test-packed ADDR=0xeAB4eEBa1FF8504c124D031F6844AD98d07C318f
Seeing the following results indicates that the test was successful:
0x0000000000000000000000000000000000000000000000000000000000000001
Apache License v2.0