quorum-relayer

command module
v0.0.0-...-c6caad8 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: GPL-3.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Quorum-relayer

Quorum Relayer is an important character of Poly cross-chain interactive protocol which is responsible for relaying cross-chain transaction from and to Quorum.

Build From Source

Prerequisites

  • Golang version 1.15 or later

Build

git clone https://github.com/polynetwork/quorum-relayer.git
cd quorum-relayer
go build -o relayer main.go

Configuration

configuration as follow:

{
  "MultiChainConfig":{
    "RestURL":"http://poly_ip:20336", // address of Poly
    "EntranceContractAddress":"0300000000000000000000000000000000000000", // CrossChainManagerContractAddress on Poly. No need to change
    "WalletFile":"./wallet.dat", // your poly wallet file
    "WalletPwd":"pwd" //password
  },
  "QuorumConfig":{
    "SideChainId": 101, // quorum side chain ID in poly network
    "RestURL":"http://yourhost:port", // your quorum node rpc url 
    "ECCMContractAddress":"ethereum_cross_chain_contract", 
    "ECCDContractAddress":"ethereum_cross_chain_data_contract",
    "KeyStorePath": "./keystore", // path to store your ethereum wallet
    "KeyStorePwdSet": { // password to protect your ethereum wallet
      "0xd12e...4d": "pwd1", // password for address "0xd12e...4d"
      "0xabb4...53": "pwd2" // password for address "0xabb4...53"
    },
    "BlockConfig": 6, // blocks to confirm a tx
    "HeadersPerBatch": 500 // number of poly headers commited to ECCM in one transaction at most
  },
  "BoltDbPath": "boltdb", // DB path
  "RoutineNum": 64,
  "TargetContracts": [
    {
      "0xCeE9****744": { // your lock proxy address
        "inbound": [101],  // src/dst side chain id 
        "outbound": [101], // dst/src side chain id
      }
    }
  ]
}

Run Relayer

There are serveral steps before running relayer:

  • create an wallet file of polynetwork.
  • register side chain on poly.
  • approve side chain on poly.
  • deploy eccd contract on quorum chain.
  • deploy eccm contract on quorum chain.
  • deploy ccmp contract on quorum chain.
  • deploy lock proxy contract on quorum chain.
  • bind proxy to destination proxy.
  • bind asset to destination asset.

Now, you can start relayer as follow:

./relayer --help

./relayer --cliconfig=./config.json 

It will generate logs under ./Log and check relayer status by view log file.

Documentation

Overview

* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
go_abi
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
utils
keystore
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
nonce
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
poly
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
quorum
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
rest
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library.

Jump to

Keyboard shortcuts

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