Skip to content
 
 

Repository files navigation

Wisp Relayer

NPM Version Package License

Description

Wisp Relayer node that:

  • Handles Light Client Optimistic/Finality updates, requests ZKPs from a Wisp-Prover API and updates the on-chain LightClient contract
  • Watches Outbox contracts for Cross-Rollup Messages and relays them to Inbox contracts once Light Client state is updated

Installation

$ npm install

Development

Prerequisite

Copy and example yaml and populate the ENV variables:

cp ./config/example.yaml ./config/config.yaml

Docker

Execute the following script

bash ./start.sh

From Source

Scripts

# development
$ npm run start

# watch mode
$ npm run start:dev

Note

In order for the relayer to receive light client finality updates, LimeChain's forked lodestar must be started:

  1. Get the current checkpointRoot by executing:
    curl https://lodestar-goerli.chainsafe.io/eth/v1/beacon/states/finalized/finality_checkpoints | jq ".data.finalized.root" | tr -d '"'
  2. Start the lodestar-wisp1:0 image, populating the returned `checkpointRoot:
     docker run limechain/lodestar-wisp:1.0 lightclient --network goerli --beaconApiUrl=https://lodestar-goerli.chainsafe.io --checkpointRoot=${CHECKPOINT_ROOT} --crcApiUrl=http://relayer:8080

License

The code in this project is free software under the MIT License.

About

Wisp Protocol Relayer implementation in TypeScript (NestJS)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages