signup-sequencer 仓库
Sign-up Sequencer does sequencing of data (identities) that are committed in a batch to an Ethereum Smart Contract.
Install pre-requisites on the dev machine
| Os | Command |
|---|---|
| MacOs | brew install protobuf pkg-config |
| Ubuntu/Debian | sudo apt-get install -y protobuf-compiler pkg-config |
Install Docker - Docker is used to setup the database for testing
Fetch the postgres docker image before running tests.
docker pull postgresYou'll need to run a local node like geth or ganache. Start up a new chain and take note of the dev addresses. You can follow instructions here.
Worldcoin id contracts are ethereum smart contracts that are used by the sequencer
Clone contracts-deployer and follow the steps in the readme there.
Semaphore-mtb is a service for batch processing of Merkle tree updates.
Clone semaphore-mtb and execute go build . (you will need a golang
compiler)
Go build will create an executable named gnark-mbu. If you went through the contracts-deployer, you will have a generated a keys file that is used by semaphore-mtb. If your deployment contains more than one prover, then you must run this command for each one and configure them to listen on different ports.
./gnark-mbu start --keys-file path/to/contracts-deployer//.cache/keys/ --mode docker run --rm -ti -p 5432:5432 -e POSTGRES_PASSWORD=password postgresTX sitter is a service providing API for signup-sequencer to submit transactions on blockchain.
Clone tx-sitter-monolith and follow build instructions
Now you need to create a config.toml file for signup-sequencer:
…The daemon will try to create temporary files in /data. If your machine does not have it you could create it:
mkdir signup_sequencer_data
sudo ln -sf `pwd`/signup_sequencer_data /dataAnd then run the daemon:
cargo run config.tomlDocker compose from E2E tests can also be used for local development. To run it first export alchemy API key for anvil fork to work:
export ALCHEMY_API_KEY=Then you can run docker compose (without signup sequencer):
cd e2e_tests/docker-compose
docker compose upLint, build, test
First ensure you have the docker daemon up and running, then:
cargo fmt && cargo clippy --all-targets && cargo build --all-targets && cargo test --all-targetsBefore running please make sure to build signup-sequencer image.
docker build -t signup-sequencer .Then run tests. You need alchemy API key to run docker compose which is used by E2E tests.
export ALCHEMY_API_KEY=
cd e2e_tests/scenarios && cargo testWe welcome your pull requests! But also consider the following:
main branch.cargo vetWhen you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using github issues.
暂无开放 Issues,或尚未同步最近议题。