Skip to content

Instantly share code, notes, and snippets.

@brishtiteveja
Last active March 8, 2021 12:38
Show Gist options
  • Save brishtiteveja/f83e2de177d9409f9600c8d66dea09c2 to your computer and use it in GitHub Desktop.
Save brishtiteveja/f83e2de177d9409f9600c8d66dea09c2 to your computer and use it in GitHub Desktop.
Script to start dtube testnet on different port
#!/bin/bash⏎
# Repo to be used currently
# git clone https://github.com/techcoderx/avalon
# Checkout to branch tipped-vote-testnet
# git checkout tipped-vote-testnet
# Instruction 1: Run on a different http_port and p2p port if you are running mainnet on the same machine
# Ports configuration⏎
export HTTP_PORT=3010⏎
export P2P_PORT=6010⏎
# MongoDB configuration⏎
# Instruction 2: Give a different database name other than "avalon" if you are running mainnet and using same mongodb
export DB_NAME=avalon_testnet⏎
#export DB_URL=mongodb://localhost:27017⏎
# Peering configuration⏎
#export OFFLINE=1⏎
#export NO_DISCOVERY=1⏎
#export DISCOVERY_EXCLUDE=dtube⏎
# Enable more modules⏎
#export NOTIFICATIONS=1⏎
#export RANKINGS=1⏎
#export CONTENTS=1⏎
# Cache warmup option⏎
export WARMUP_ACCOUNTS=100000⏎
export WARMUP_CONTENTS=0⏎
# Warn when a transactions takes more than X ms⏎
export WARN_SLOW_VALID=5⏎
export WARN_SLOW_EXEC=5⏎
# trace / perf / econ / cons / debug / info / warn⏎
export LOG_LEVEL=debug⏎
# groups blocks during replay output to lower screen spam⏎
export REPLAY_OUTPUT=10000⏎
# Rebuild chain state from dump, verifying every block and transactions⏎
# Do not forget to comment this out after rebuild⏎
#export REBUILD_STATE=1⏎
#export REBUILD_WRITE_INTERVAL=10000⏎
#export REBUILD_RESUME_BLK=⏎
# default peers to connect with on startup⏎
# Instruction 3: Ask other test node leaders for PEER URL
export PEERS=ws://dseed.techcoderx.com:6002⏎
export MAX_PEERS=20⏎
# your user and keys (only useful for active node owners)
# Instruction 4: To Run as observer, comment these out
# If you want to mine, enable node as miner then
# For you to be a miner, you already need to have an account registered on test blockchain, currently the test chain have all the accounts from mainnet, so you can use the mainnet account, but then you will be using same public/private key which may not be desired
# Ask techcoderx or brishtiteveja0595, if you want to create a new account
# Account creation procedure
# node src/cli.js account account_name -F master_key.json -F master(dtube)
# Node needs to be enabled
# node src/cli.js enable-node test_leader_node_name -F test_leader_node_key.json -F test_leader_node_name
# You need to be voted using node src/cli.js vote-leader
# 4-1 Get keypair
# export API_PORT=3010 (or whatever you are using)
# node src/cli.js keypair
# 4-2 Set NODE_OWNER_PUB and NODE_OWNER_PRIV
#.
# 4-3 Ask for other leader nodes to get bandwidth and test faucet coins
#export NODE_OWNER=dtube⏎
#export NODE_OWNER_PUB=dTuBhkU6SUx9JEx1f4YEt34X9sC7QGso2dSrqE8eJyfz⏎
#export NODE_OWNER_PRIV=34EpMEDFJwKbxaF7FhhLyEe3AhpM4dwHMLVfs4JyRto5⏎
# Memory limit for in-memory rebuild (in MB)⏎
#export NODE_OPTIONS=--max_old_space_size=8192⏎
node --stack-size=65500 src/main⏎
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment