Skip to content

gonative-cc/relayer

Repository files navigation

NATIVE Relayer

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GoDoc Go Report Card Version License: MPL-2.0 Contributor Covenant

Summary

A software that monitors and relayers:

  • CometBFT blocks to update Native light client on Ika
  • Bitcoin blocks to update Bitcoin light client on Native
  • Bitcoin SPV proofs to verify dWallet holdings
  • Native -> Bitcoin transaction relayer

Status

Status scheme:

Mock -> WIP -> alpha -> beta -> production
Service status
Native->Ika WIP
Native->Bitcoin WIP
Native->Bitcoin
Bitcoin SPV

Documentation

  1. Database
  2. Flow diagram

Contributing

Participating in open source is often a highly collaborative experience. We’re encouraged to create in public view, and we’re incentivized to welcome contributions of all kinds from people around the world.

Check out contributing repo for our guidelines & policies for how to contribute. Note: we require DCO! Thank you to all those who have contributed!

After cloning the repository, make sure to run make setup-hooks.

Security

Check out SECURITY.md for security concerns.

Setup

  1. Make sure you have go, make installed
  2. Copy and update your env file: cp .env.example .env
  3. Build the project: make build

To build and start you can run: make build start

In order to run Native -> Bitcoin relayer PoC:

  1. Copy and update .env.example file to .env cp env.example .env
  2. Run script with path of transaction file as command line argument: go run main.go transaction.txt

Development

  1. Run make setup (will setup git hooks)

  2. Install and make sure it is in your PATH:

Coding notes

  1. Use env.Init() to setup logger and load ENV variables.

  2. Use zerolog.log logger, eg:

    import "github.com/rs/zerolog/log"
    //...
    log.Info().Int("block", minimumBlockHeight).Msg("Start relaying msgs")

Talk to us

About

Relayer for Native <-> Pera <-> Bitcoin

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published