This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
Launching the Miner Technical
themandalore edited this page Oct 18, 2019
·
19 revisions
Grab the latest Binary:
wget https://github.com/tellor-io/TellorMiner/releases/latest/download/TellorMiner
Create and update the following three variables within the config.json file:
- node_url: (enter your own infura / node address)
- publicAddress: (note no “0x” prefix)
- privateKey: (note no “0x” prefix)
https://github.com/tellor-io/TellorMiner/blob/master/config.json
- Download the most recent PSR.json file:
https://github.com/tellor-io/TellorMiner/blob/master/psr.json
Now you can run the miner:
./TellorMiner -miner -dataServer -psrPath=./psr.json -config=./config.json -logConfig=./loggingconfig.json
- -psrPath (path to your PSR file)
- -config (path to your config file)
- -miner (indicates to run the miner)
- -dataServer (indicates to run the dataServer)
- -transfer -toAddress -amount (do not run these with miner/dataServer)(indicates transfer, toAddress is Ethereum address and amount is number of Tributes (note 18 decimals))
- -deposit (do not run these with miner/dataServer)(indicates to deposit 1000 tokens in the contract (note you must have 1000 Tributes in your account))
- -logConfig (path to loggingConfig file if you want to save log output)
* contractAddress (required) - address of TellorContract
* nodeURL(required) - node URL (e.g https://mainnet.infura.io/bbbb or https://localhost:8545 if own node)
* privateKey(required) - privateKey for your address (note, no 0x)
* databaseURL(required) - where you are reading from for the server database (if hosted)
* publicAddress(required) - public address for your miner (note, no 0x)
* ethClientTimeout(required) - timeout for making requests from your node
* trackerSleepCycle(required) - how often your database updates
* trackers(required) - which pieces of the database you update
* dbFile(required) - where you want to store your local database (if self-hosting)
* serverHost(required) - location to host server
* serverPort(required) - port to host server
* fetchTimeout- timeout for requesting data from an API
* requestData- Will your miner request Data if challenge is 0. If yes, then you will addTip() to this number. Enter a uint number representing request id to be requested (e.g. 2)
* gasMultiplier - Multiplies the submitted gasPrice (e.g. 2 (will double gas costs))
* gasMax - a max for the gas price in gwei (note: this max comes BEFORE the gas multiplier. So a max gas cost of 10 gwei, can have gas prices up to 20 if gasMultiplier is 2)
* deposit() - deposit your initial stake
* transfer(_to,_amount) - transfer tokens from
* approve(_spender,_amount) - approve a party to spend your tokens
* dispute(_requestId,_timestamp,_minerIndex) - dispute a requestID, blocktimestamp (unix time), minerIndex (sorted miners)
* vote(_disputeId, _supportsDispute) - vote on a given dispute
* requestStakingWithdrwaw() - request Staking withdraw (you cannot mine after you run this)
* withdraw() - run this 7 days after requesting a withdraw. Your 1000 tokens will be unlocked for transferring
example commands:
./TellorMiner -deposit -config=./config.json -psrPath=./psr.json -logConfig=./loggingConfig.json
./TellorMiner -transfer -to=0x538d278e05a35c96bcdca1039e92c65b994256a0 -amount=1 -config=./config.json -psrPath=./psr.json -logConfig=./loggingConfig.json
./TellorMiner -approve -to=0x538d278e05a35c96bcdca1039e92c65b994256a0 -amount=1 -config=./config.json -psrPath=./psr.json -logConfig=./loggingConfig.json
./TellorMiner -vote -disputeId=2 -supportsDispute=false -config=./config.json -psrPath=./psr.json -logConfig=./loggingConfig.json
./TellorMiner -dispute -requestId=14 -timestamp=1568779500 -minerIndex=2 -config=./config.json -psrPath=./psr.json -logConfig=./loggingConfig.json
./TellorMiner -requestStakingWithdraw -config=./config.json -psrPath=./psr.json -logConfig=./loggingConfig.json
./TellorMiner -withdrawStake -config=./config.json -psrPath=./psr.json -logConfig=./loggingConfig.json
- To update Tellor miner run:
wget https://github.com/tellor-io/TellorMiner/releases/latest/download/TellorMiner