greenfield-relayer

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

greenfield-relayer

Greenfield Relayer is a bidirectional relaying tool serving communication requirement between Greenfield and BSC. It is a standalone process that can only be run by Greenfield validators. The relayer watches cross chain events happen on BSC and Greenfield independently and persist them into the database, after a few blocks confirmation to reach finality, the relayer will sign a message by the BLS private key to confirm the event, and broadcast the signed event which called "the vote" through the p2p network on Greenfield network. Once enough votes from the Greenfield relayer are collected, the relayer will assemble a cross chain package transaction and submit it to the BSC or Greenfield network

Requirement

Go version above 1.19

Build

Build binary:

$ make build

Build docker image:

$ make build_docker

Run

Run locally:

$ ./build/greenfield-relayer --config-type [local or aws] --config-path config_file_path  --aws-region [aws region or omit] --aws-secret-key [aws secret key for config or omit]

Run docker:

$ docker run -it -v /your/data/path:/greenfield-relayer -e CONFIG_TYPE="local" -e CONFIG_FILE_PATH=/your/config/file/path/in/container -d greenfield-relayer

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL