Skip to content

Instantly share code, notes, and snippets.

@sigrlami
Last active August 13, 2020 22:45
Show Gist options
  • Save sigrlami/9a1f7b53f38a9fb6578ee88ae9a98ef5 to your computer and use it in GitHub Desktop.
Save sigrlami/9a1f7b53f38a9fb6578ee88ae9a98ef5 to your computer and use it in GitHub Desktop.
PegNet TestNet Guide

Running PegNet v2 on a Factom Testnet

  1. Download preview binaries with suffix _testnet
  2. Activation height set to 142000
  3. Run pegnet as usual using configs provided below 3.1 the only differences, network type and path to db 3.2 data stored into separate file, so your mainnet will be safe
  4. Acquire test assets from https://faucet.pegnet.info
[Database]
# $PEGNETHOME defaults to ~/.pegnet
MinerDatabase=$PEGNETHOME/data_testnet/miner.ldb
MinerDatabaseType=ldb
# Location of the `pegnet node` sqlite db
NodeDatabase=$PEGNETHOME/data_testnet/node.sqlite
[Debug]
# Randomize adds a random factor +/- the give percent. 3.1 for 3.1%
Randomize=0.0
# Turns on logging so the user can see the OPRs and mining balances as they update
Logging=true
# Puts the logs in a file. If not specified, logs are written to stdout
LogFile=
[Miner]
# Factom Connection Options
FactomdLocation="localhost:8088"
WalletdLocation="localhost:8089"
# Options to setup a networked miner to a coordinator
MiningCoordinatorHost=localhost:7777
MiningCoordinatorPort=:7777
# This is used to authenticate via challenge + response to the coordinator.
# If the coordinator and miner have different secrets, they will not connect to each
# other.
CoordinatorSecret="blablabla"
UseCoordinatorAuthentication=true
NumberOfMiners=2
# The number of records to submit per block. The top N records are chosen, where N is the config value
RecordsPerBlock=3
# The targeted cutoff. If our difficulty will land us in the top 300 (estimated), we will submit our OPR.
# <=0 will disable this check.
SubmissionCutOff=200
Protocol=PegNet
Network=MainNet
ECAddress=ECxxxx
CoinbaseAddress=FA2xxx
IdentityChain=your-name
[Staker]
# Factom Connection Options (if using Docker, use values below)
# FactomdLocation="localhost:8088"
# WalletdLocation="localhost:8089"
# If Walletd is configured to use RPC Username and Password, add the credentials here
WalletdUser=""
WalletdPass=""
# Docker container connection options
FactomdLocation="factomd:8088"
WalletdLocation="walletd:8089"
Protocol=PegNet
Network=TestNet
# For LOCAL network testing, EC private key is
# Es2XXXX.. EC3xxxx
# Replace with your EC address with TestNet
ECAddress=EC3TsJHUs8bzbbVnratBafub6toRYdgzgbR7kWwCW4tqbmyySRmg
# This is your address. Generate a FCT address and put it here, so if you win, you will be rewarded!
CoinbaseAddress=CHANGEME
# This section must ONLY include data sources and their priorities. Any configuration
# related to a source should be specified in the [Oracle] section.
# -1 == disabled
[OracleDataSources]
# Always rank this the highest at 0. It pegs USD at 1USD = 1USD.
# This is not a website, this is a hardcoded '1'. Don't change this
FixedUSD=0
# ----------------
# Paid Sources
APILayer=-1
1Forge=1
# ----------------
# Free sources, signup required
CoinMarketCap=3
# Hourly data for the commodities
OpenExchangeRates=9
# ----------------
# Free sources, no signup required
FreeForexAPI=4
AlternativeMe=5
CoinCap=6
PegnetMarketcap=2
# Web scraping, rank it low
Kitco=-1
# Insert keys for any data source you ahve specified above where the priority is > -1
[Oracle]
# Must get a key from here https://apilayer.com/
APILayerKey=CHANGEME
# Must get an api key here https://openexchangerates.org/
OpenExchangeRatesKey=CHANGEME
# Must get an api key here https://coinmarketcap.com/api/
CoinMarketCapKey=CHANGEME
# Must get an api key here https://1forge.com/forex-data-api
1ForgeKey=CHANGEME
# This section should be done with caution. There is no error handling
# if you put in a bad order or use datasources that you did not enable.
[OracleAssetDataSourcesPriority]
# Example to overrride BTC order
# XBT=CoinMarketCap,OpenExchangeRates,CoinCap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment