基于区块链的毕业设计props-eth-sync – 道具eth同步

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计props-eth-sync – 道具eth同步 是一篇很好的国外资料

props-eth-sync

props-eth-sync - 道具eth同步

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

  • Git – Download & Install Git. OSX and Linux machines typically have this already installed.
  • Node.js – Download & Install Node.js and the npm package manager. If you encounter any problems, you can also use this [GitHub Gist]
  • gcc – On redhat based systems use yum groupinstall "Development Tools" on debian based systems use apt-get install build-essential (For OSX use xcode)

Install and Build

npm install npm run build

The tools in this repo are provide functionalites for validator nodes to perform the following operations:

Validator Setup

npm run setup-validator -- {validatorName} {rewardsAddress} {sidechainAddress}

validator_setup

validatorName – name to represent your validator rewardsAddress – address where validator rewards should be minted to sidechainAddress – address to be used to confirm validator transactions to the sidechain

After setting up your validator, you need to provide us with the sidechainAddress so we can add you as a valid validator.

Calculate and Submit Daily Rewards

npm run submit-rewards daily_rewards Once a day calculate activity for the active apps and submit to the PropsToken contract on Ethereum the rewards that each application shuold get

Setup: Setup as a cronjob to run at the begining of each day (UTC)

Synching

npm run sync-latest sync

Listening to events of the PropsToken contract on Ethereum and submitting the data to the Props Sidechain.

Setup: Setup as a cronjob to run every minute

Events Transfer (Event) Each props token transfer triggers this event. The balances of the sender and receiver are calculated for that block and are submitted to the sidechain so sidechain can store on-chain balance for all users to be used by applications in the props eco-system


props eth sync

props-eth-sync - 道具eth同步

先决条件

确保在开发计算机上安装了以下所有先决条件:

  • Git-下载并安装Git。OSX和Linux机器通常已经安装了这个。
  • 节点.js-下载和安装节点.js还有npm包经理。如果遇到任何问题,也可以使用这个[GitHub Gist]
  • gcc-在基于redhat的系统上使用yum groupinstall“Development Tools”,在基于debian的系统上使用apt get install build essential(对于OSX使用xcode)

安装和构建

npm install npm run build

此repo中的工具为验证程序节点提供了执行以下操作的功能:

验证器设置

npm run setup validator–{validatorName}{rewardsAddress}{sidechainAddress}

验证器设置

validator name-代表您的验证程序的名称rewardsAddress-验证程序奖励应存入sidechainAddress-用于向侧链确认验证器交易的地址

设置验证器后,您需要向我们提供sidechainAddress,以便我们可以将您添加为有效的验证器。

计算和提交每日奖励

npm run submit rewards dailyu rewards每天一次计算活动应用程序的活动并将每个应用程序获得的奖励提交到以太坊eth上的PropsToken合同中

设置:设置为一个cronjob,在每天开始时运行(UTC)

同步

npm运行sync最新同步

监听以太坊eth上的PropsToken合同,并将数据提交给Props侧链。

设置:设置为每分钟运行一次的cronjob

事件传输(Event)每个道具令牌传输都会触发此事件。发送方和接收方的余额是针对该块计算的,并提交给侧链,这样侧链就可以存储链上余额,供props生态系统中的应用程序使用。

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情