Skip to content

A script for doing ethereum based synching to/from the sidechain

Notifications You must be signed in to change notification settings

propsproject/props-ethsync

Repository files navigation

props-eth-sync

Props Token

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

About

A script for doing ethereum based synching to/from the sidechain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •