github.com/aidoskuneen/adk-node@v0.0.0-20220315131952-2e32567cb7f4/README.md (about) 1 # ADKGo SmartNode (MAINNET v2.1) 2 3 Official Golang implementation of the ADK protocol with Smart Contract funtionality and Client PoW 4 5 Note: This version retires the AZ9 address system entirely, and only allows 0x transactions going forward. You can still migrate old AZ9 (v1) balances to 0x addresses. 6 7 The node accepts two kind of transactions: 8 <ul> 9 <li>FREE PoW Transactions (0 GAS Fee): User has performed client-side Proof of Work (requires ADK v2.1 Wallet) 10 <ul> 11 <li>Requires ADK v2.1 Wallet (Option: SEND with PoW)</li> 12 </ul> 13 </li> 14 <li>PAID Instant Transactions (1000 uADK/Gwei GAS fee) - approx. 0.021 ADK fee per standard ADK transfer 15 <ul> 16 <li>Metamask, other standard Clients</li> 17 <li>ADK v2.1 Wallet (Option: SEND with GAS)</li> 18 </ul> 19 </li> 20 </ul> 21 22 ## BASE NODE SETUP STEPS (on clean UBUNTU server) 23 24 ### Install prerequisites (git. build-essentials, go) 25 ``` 26 apt-get update 27 apt-get install git 28 29 sudo apt install build-essential 30 31 wget https://dl.google.com/go/go1.16.7.linux-amd64.tar.gz 32 tar -xvf go1.16.7.linux-amd64.tar.gz 33 mv go /usr/local 34 mkdir $HOME/goprojects 35 ``` 36 37 ### add the following lines to ~/.profile for future logins 38 ``` 39 export GOROOT=/usr/local/go 40 export GOPATH=$HOME/goprojects 41 export PATH=$GOPATH/bin:$GOROOT/bin:$PATH 42 ``` 43 44 ### reload . ~/.profile (or log out and back in) 45 ``` 46 . ~/.profile 47 ``` 48 49 ### adding new user (re will run the node under a user, not root, for added security) 50 ``` 51 adduser adkgo 52 usermod -aG sudo adkgo 53 su - adkgo 54 mkdir $HOME/goprojects 55 ``` 56 57 ### add the following lines to ~/.profile for future logins 58 ``` 59 export GOROOT=/usr/local/go 60 export GOPATH=$HOME/goprojects 61 export PATH=$GOPATH/bin:$GOROOT/bin:$PATH 62 ``` 63 64 ### reload . ~/.profile (or log out and back in) 65 ``` 66 . ~/.profile 67 ``` 68 69 ### build adkgo-node (the main node): 70 ``` 71 cd goprojects 72 git clone https://github.com/AidosKuneen/adk-node.git 73 74 cd ~/goprojects/adk-node 75 76 go get github.com/AidosKuneen/gadk 77 go run build/ci.go install ./adkgo-node 78 79 mkdir $GOPATH/bin 80 cp ~/goprojects/adk-node/build/bin/* $GOPATH/bin/ 81 ``` 82 ### configuring the adkgo network (genesis block/setup), initialize the network from the genesis json 83 ``` 84 cd ~ 85 mkdir -p adkgo-mainnet/node1 86 adkgo-node --datadir adkgo-mainnet/node1 init ~/goprojects/adk-node/adkgo-GENESIS/adkmainnet-genesis.json 87 ``` 88 89 ### prepare the node with connection details 90 ``` 91 cd ~/adkgo-mainnet/node1/adkgo-node 92 ``` 93 ### create file static-nodes.json in ~/adkgo-mainnet/node1/adkgo-node with the enode of an existing node to connect to 94 ``` 95 [ "enode:// [TBD] @ [TBD] .aidoskuneen.com:40310" ] 96 ``` 97 Note: this is just an example enode. Please reach out in the telegram group https://t.me/joinchat/6S4CUWRDeQk2NDAy for the latest enode of an operational node 98 (A permanent bootnode will be configured for the mainnet, stay tuned.) 99 100 DONE. THATS THE NODE FULLY PREPARED. The steps up to here only need to be performed once. Now you can just start the node: 101 102 # START THE NODE 103 ``` 104 cd ~/adkgo-mainnet/node1 105 nohup adkgo-node --datadir= --syncmode full --port 40310 --rpc.gascap 550000000 --rpc.txfeecap 0 --http.addr 0.0.0.0 --http --http.api eth,net,web3 --http.port 9545 --rpccorsdomain "*" > stdout.txt 2> log.txt & 106 ``` 107 ### to view output 'live' you can use: 108 ``` 109 tail -f log.txt log2.txt 110 ``` 111 ### Additional info: How to connect your running node to additional other nodes manually, if you dont use static-nodes.json 112 113 1) Connect via IPC to the adkgo-node console: 114 ``` 115 cd ~/adkgo-mainnet/node1 116 adkgo-node attach geth.ipc 117 ``` 118 2) add the enode (this is only stored for the local session. use static-nodes.json to store permanently): 119 ``` 120 admin.addPeer("enode:// [TBD] @ [TBD] .aidoskuneen.com:40310") 121 ``` 122 Note: this is just an example enode. Please reach out in the telegram group https://t.me/joinchat/6S4CUWRDeQk2NDAy for the latest enode of an operational mainnet node