theta-protocol-ledger
theta-protocol-ledger copied to clipboard
Connect to testnet
I am on vagrant machine. Using these steps
Testnet Setup
To connect to the testnet, open a terminal, and follow the steps below.
Preparation
sudo apt-get update sudo apt-get install build-essential sudo apt-get install gcc sudo apt-get install make sudo apt-get install git sudo apt-get install -y bzr sudo apt-get install jq
sudo wget https://dl.google.com/go/go1.13.15.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.13.15.linux-amd64.tar.gz
OR
sudo wget https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.12.1.linux-amd64.tar.gz
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc echo 'export GOPATH=$HOME/go' >> ~/.bashrc echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc echo 'export THETA_HOME=$GOPATH/src/github.com/thetatoken/theta' >> ~/.bashrc source ~/.bashrc
Next, clone the release branch of the Theta Ledger repo https://github.com/thetatoken/theta-protocol-ledger into your $GOPATH with the following command. The path should look like this: $GOPATH/src/github.com/thetatoken/theta
git clone --branch release https://github.com/thetatoken/theta-protocol-ledger.git $GOPATH/src/github.com/thetatoken/theta
Build and Install
export GO111MODULE=on cd $THETA_HOME make install go version
Testing
make test_unit
Launch a Local Private Net
Open a terminal to launch the private net. For the first time, follow the setup steps below.
cd $THETA_HOME cp -r ./integration/privatenet ../privatenet mkdir ~/.thetacli cp -r ./integration/privatenet/thetacli/* ~/.thetacli/ chmod 700 ~/.thetacli/keys/encrypted
And then, use the following commands to launch a private net with a single validator node.
theta start --config=../privatenet/node
When the prompt asks for password, simply enter qwertyuiop
Launch and connect to the testnet
cd $THETA_HOME mkdir ../testnet cp -r ./integration/testnet/walletnode ../testnet
theta start --config=../testnet/walletnode
Now I am getting this error:
[2021-06-25 20:09:40] INFO [snapshot] Importing Snapshot, 100% done. [2021-06-25 20:09:40] INFO [snapshot] Snapshot loaded successfully. [2021-06-25 20:09:40] INFO [p2p] Connecting to seed and persisted peers... [2021-06-25 20:09:40] WARN [p2p] Failed to retrieve previously persisted peers [2021-06-25 20:09:40] INFO [p2p] InboundPeerListener listen routine started, seedPeerOnly set to false [2021-06-25 20:09:40] INFO [rpc] RPC server started address=0.0.0.0 port=16888 [2021-06-25 20:09:51] WARN [p2p] Failed to connect to seed peer 54.219.137.110:15872: dial tcp 54.219.137.110:15872: i/o timeout [2021-06-25 20:10:10] INFO [p2p] Connecting to seed and persisted peers... [2021-06-25 20:10:10] WARN [p2p] Failed to retrieve previously persisted peers [2021-06-25 20:10:40] INFO [p2p] Connecting to seed and persisted peers... [2021-06-25 20:10:40] WARN [p2p] Failed to retrieve previously persisted peers [2021-06-25 20:10:40] ERROR [reporter] Reporter failed to create request: Post http://guardian-metrics.thetatoken.org:9000/peers/set: dial tcp 34.220.181.170:9000: connect: connection refused
genesis:
hash: "0xa58cb754a23975c872ef06d8b54baf16eec88ad60f966368b950a6c16ae52ed9"
storage:
statePruningRetainedBlocks: 2048
p2p:
port: 16000
seeds: 34.220.181.170:9000,54.151.72.227:15872,54.219.137.110:15872
rpc:
enabled: true
log:
levels: "*:info"