基于区块链的毕业设计Eth Relayer – Eth继电器

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Eth Relayer – Eth继电器 是一篇很好的国外资料

Eth Relayer

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

Build From Source

Prerequisites

  • Golang version 1.14 or later

Build

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

After building the source code successfully, you should see the executable program eth_relayer.

Run Relayer

Before you can run the relayer you will need to create a wallet file of PolyNetwork. After creation, you need to register it as a Relayer to Poly net and get consensus nodes approving your registeration. And then you can send transaction to Poly net and start relaying.

Before running, you need feed the configuration file config.json.

{   "MultiChainConfig":{     "RestURL":"http://poly_ip:20336", // address of Poly     "EntranceContractAddress":"0300000000000000000000000000000000000000", // CrossChainManagerContractAddress on Poly. No need to change     "WalletFile":"./wallet.dat", // your poly wallet     "WalletPwd":"pwd" //password   },   "ETHConfig":{     "RestURL":"http://etheruem:port", // your ethereum node      "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...54ccacf91ca364d": "pwd1", // password for address "0xd12e...54ccacf91ca364d"       "0xabb4...0aba7cf3ee3b953": "pwd2" // password for address "0xabb4...0aba7cf3ee3b953"     },     "BlockConfig": 12 // blocks to confirm a ethereum tx   },   "BoltDbPath": "./db" // DB path } 

After that, make sure you already have a ethereum wallet with ETH. The wallet file is like UTC--2020-08-17T03-44-00.191825735Z--0xd12e...54ccacf91ca364d and you can use geth to create one( ./geth accounts add ). Put it under KeyStorePath. You can create more than one wallet for relayer. Relayer will send transactions concurrently by different accounts.

Now, you can start relayer as follow:

./eth_relayer --cliconfig=./config.json 

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


Eth Relayer

Eth中继层是多跨链交互协议的一个重要特征,负责跨链事务在以太坊eth之间的中继。

从源代码构建

Prerequisites

  • Golang version 1.14 or later

Build

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

成功构建源代码后,您应该会看到可执行程序eth_relayer。

Run Relayer

在运行中继层之前,您需要创建一个PolyNetwork的钱包文件。创建之后,您需要将其注册为Poly-net的中继层,并获得一致同意节点批准您的注册。然后你可以发送事务到保利网,开始中继。

在运行之前,您需要提供配置文件配置.json.

{   "MultiChainConfig":{     "RestURL":"http://poly_ip:20336", // address of Poly     "EntranceContractAddress":"0300000000000000000000000000000000000000", // CrossChainManagerContractAddress on Poly. No need to change     "WalletFile":"./wallet.dat", // your poly wallet     "WalletPwd":"pwd" //password   },   "ETHConfig":{     "RestURL":"http://etheruem:port", // your ethereum node      "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...54ccacf91ca364d": "pwd1", // password for address "0xd12e...54ccacf91ca364d"       "0xabb4...0aba7cf3ee3b953": "pwd2" // password for address "0xabb4...0aba7cf3ee3b953"     },     "BlockConfig": 12 // blocks to confirm a ethereum tx   },   "BoltDbPath": "./db" // DB path } 

之后,确保您已经有一个以太坊eth钱包和以太币。钱包文件类似于UTC–2020-08-17T03-44-00.191825735Z–0xd12e…54ccacf91ca364d,您可以使用geth创建一个(/geth accounts add)。把它放在KeyStorePath下。您可以为relayer创建多个钱包。中继将按不同帐户并发发送事务。

现在,您可以按如下方式启动relayer:

./eth_relayer --cliconfig=./config.json 

它将在./Log下生成日志,并通过查看日志文件检查relayer的状态。

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/17580.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Eth Relayer – Eth继电器

提供最优质的资源集合

立即查看 了解详情