parent
0facc10286
commit
0279074e00
@ -1,3 +1,86 @@ |
|||||||
# Node-Install |
# Node-Install |
||||||
|
|
||||||
Instructions for Exchanges and Developers on how to run a KalyChain node. |
Instructions for Exchanges and Developers on how to run a KalyChain node. |
||||||
|
|
||||||
|
Developers please see Server Setup before proceding. |
||||||
|
|
||||||
|
# Install OpenJDK-17 Dependency |
||||||
|
|
||||||
|
'sudo apt install openjdk-17-jre-headless -y' |
||||||
|
|
||||||
|
# Download The Binary |
||||||
|
|
||||||
|
'wget https://github.com/KalyCoinProject/kalychain/releases/download/22.10.3/kaly-22.10.3.zip |
||||||
|
sudo apt install unzip -y && unzip kaly-22.10.3.zip |
||||||
|
sudo mv kaly-22.10.3 kaly && rm kaly-22.10.3.zip' |
||||||
|
|
||||||
|
# Download The Genesis File |
||||||
|
|
||||||
|
Clone this repo |
||||||
|
|
||||||
|
'git clone https://git.cipherlabs.org/KalyChain/Node-Install' |
||||||
|
|
||||||
|
Make a Data Directory |
||||||
|
'mkdir node && mkdir node/data' |
||||||
|
|
||||||
|
*Note |
||||||
|
In this example the node/data directories are where the blockchain and genesis file will be stored. You can choose to store these files in other locations based on your setup. If you change the location of these files then you will need to update the paths when starting the node. |
||||||
|
|
||||||
|
Copy the genesis file to the new node directory *do not use sudo, for testnet replace genesis.json with genesis_Testnet.json |
||||||
|
'cp Node-Install/genesis/genesis.json node/genesis.json' |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Start KalyChain Mainnet |
||||||
|
|
||||||
|
This repo cantains a bash script that will |
||||||
|
*Create a KalyChain systemd Service File |
||||||
|
*Start the KalyChain systemd Service |
||||||
|
*Enable KalyChain to start on system start |
||||||
|
|
||||||
|
After cloning this repo edit 'node/../kaly/bin/besu --data-path=data --genesis-file=./genesis.json' on line 17 of 'start_node.sh' if you have change the paths to the binary, data file or genesis locations. |
||||||
|
|
||||||
|
The make the file exicutable with |
||||||
|
'chmod +x start_node.sh' |
||||||
|
|
||||||
|
Run this command to exicute the script and start the node. |
||||||
|
'./start_node.sh' |
||||||
|
|
||||||
|
Verify the node is running with 'sudo systemctl status kaly.service' |
||||||
|
|
||||||
|
If you do not wish to stup a systemd service for KalyChain use this command to start the node |
||||||
|
|
||||||
|
'../kaly/bin/besu --data-path=data --genesis-file=./genesis.json --bootnodes=enode://bd1782617ae151ba6da627a35a1babc0a40ae127a718cdc13322acb357411f095d56db6141c99d7f8b63b7ce896ffffbadea34a4471bca297c916a94e1d9b818@169.197.143.193:30303 enode://3ea0e690890c824cb39867c9da0e201764ecd2960c2609ecceb40b3e48d374424f791d32d87eaf7430249649b5c45673178454455b22b133458afc5ddf126c3a@169.197.143.209:30303 --p2p-port=30303 --rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-ws-host=0.0.0.0 --revert-reason-enabled=true' |
||||||
|
|
||||||
|
The above comand assumes you want to run an RPC node with WebSockets enabled. The available API options are: ADMIN, DEBUG, EEA, ETH, NET, QBFT, TRACE, TXPOOL, and WEB3. The default is: ETH, NET, WEB3. |
||||||
|
|
||||||
|
Update '--rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL' to fit your use case, for example you can remove '--rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL' if you are not using WebSockets in your appliaction. |
||||||
|
|
||||||
|
Validators and or nodes who do not wish to provide RPC services can run |
||||||
|
|
||||||
|
'../kaly/bin/besu --data-path=data --genesis-file=./genesis.json --bootnodes=enode://bd1782617ae151ba6da627a35a1babc0a40ae127a718cdc13322acb357411f095d56db6141c99d7f8b63b7ce896ffffbadea34a4471bca297c916a94e1d9b818@169.197.143.193:30303 enode://3ea0e690890c824cb39867c9da0e201764ecd2960c2609ecceb40b3e48d374424f791d32d87eaf7430249649b5c45673178454455b22b133458afc5ddf126c3a@169.197.143.209:30303 --p2p-port=30303 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all"' |
||||||
|
|
||||||
|
Update '--host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-host=0.0.0.0 --rpc-ws-host=0.0.0.0' accourdingly for your setup. |
||||||
|
|
||||||
|
# Start KalyChain In Development or Testnet |
||||||
|
|
||||||
|
In development or testnet you can use Tmux |
||||||
|
|
||||||
|
Install Tmux |
||||||
|
sudo apt install tmux |
||||||
|
|
||||||
|
Creat Named Tmux Session |
||||||
|
tmux new -s kaly_chain |
||||||
|
|
||||||
|
Start the KalyChain Node |
||||||
|
cd node |
||||||
|
|
||||||
|
Use this command to start the KalyChain Testnet Node |
||||||
|
|
||||||
|
'../kaly/bin/besu --data-path=data --genesis-file=./genesis.json --bootnodes=enode://4a8d940d8e2100b04923d0b0a3fb4fb7075e239185593e52d0df7f9549c555b433b3118ca60a4012cde841b451c8b10bb934dd6fdc98e612a18baf13dacbe922@38.91.102.7:30303 enode://efff0692ee2c0cad9e1ddbd6e2c2143577c681827f4424a9ebf0aea315ca690c59a95a8b2de0088e652687f10d28f72b4c1eb5ccaefdf77c2e98984c3786c39d@169.197.143.143:30303 --p2p-port=30303 --rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-ws-host=0.0.0.0 --revert-reason-enabled=true' |
||||||
|
|
||||||
|
You should now see the besu clinet start and connect to the KalyChain Blockchain. While running in the tmux window you can safely logout of your server and the besu clinet will continue to run. To bring up the Kalychain window again run this command |
||||||
|
|
||||||
|
'tmux attach-session -t kaly_chain' |
||||||
|
|
||||||
|
See [Getting started with Tmux](https://linuxize.com/post/getting-started-with-tmux/) for more tmux command options. |
@ -0,0 +1,127 @@ |
|||||||
|
{ |
||||||
|
"config" : { |
||||||
|
"chainId" : 3888, |
||||||
|
"homesteadBlock" : 0, |
||||||
|
"eip150Block" : 0, |
||||||
|
"eip155Block" : 0, |
||||||
|
"eip158Block" : 0, |
||||||
|
"byzantiumBlock" : 0, |
||||||
|
"constantinopleBlock" : 0, |
||||||
|
"petersburgBlock" : 0, |
||||||
|
"istanbulBlock" : 0, |
||||||
|
"berlinBlock" : 0, |
||||||
|
"londonBlock" : 0, |
||||||
|
"qbft" : { |
||||||
|
"blockperiodseconds" : 2, |
||||||
|
"epochlength" : 28800, |
||||||
|
"requesttimeoutseconds" : 4, |
||||||
|
"blockreward" : "3000000000000000000", |
||||||
|
"baseFeePerGas" : "0x834" |
||||||
|
} |
||||||
|
}, |
||||||
|
"transitions" : { |
||||||
|
"qbft" : [ { |
||||||
|
"block" : 4576000, |
||||||
|
"blockreward" : "1500000000000000000" |
||||||
|
}, { |
||||||
|
"block" : 9152000, |
||||||
|
"blockreward" : "750000000000000000" |
||||||
|
}, { |
||||||
|
"block" : 13728000, |
||||||
|
"blockreward" : "375000000000000000" |
||||||
|
}, { |
||||||
|
"block" : 18304000, |
||||||
|
"blockreward" : "187500000000000000" |
||||||
|
}, { |
||||||
|
"block" : 22880000, |
||||||
|
"blockreward" : "93750000000000000" |
||||||
|
}, { |
||||||
|
"block" : 27456000, |
||||||
|
"blockreward" : "46875000000000000" |
||||||
|
}, { |
||||||
|
"block" : 32032000, |
||||||
|
"blockreward" : "23437500000000000" |
||||||
|
}, { |
||||||
|
"block" : 36608000, |
||||||
|
"blockreward" : "11718750000000000" |
||||||
|
}, { |
||||||
|
"block" : 41184000, |
||||||
|
"blockreward" : "5859375000000000" |
||||||
|
}, { |
||||||
|
"block" : 45760000, |
||||||
|
"blockreward" : "2929687500000000" |
||||||
|
}, { |
||||||
|
"block" : 50336000, |
||||||
|
"blockreward" : "1464843750000000" |
||||||
|
}, { |
||||||
|
"block" : 54912000, |
||||||
|
"blockreward" : "732421875000000" |
||||||
|
}, { |
||||||
|
"block" : 59488000, |
||||||
|
"blockreward" : "366210937500000" |
||||||
|
}, { |
||||||
|
"block" : 64064000, |
||||||
|
"blockreward" : "183105468750000" |
||||||
|
}, { |
||||||
|
"block" : 68640000, |
||||||
|
"blockreward" : "91552734375000" |
||||||
|
}, { |
||||||
|
"block" : 73216000, |
||||||
|
"blockreward" : "45776367187500" |
||||||
|
}, { |
||||||
|
"block" : 77792000, |
||||||
|
"blockreward" : "22888183593750" |
||||||
|
}, { |
||||||
|
"block" : 82368000, |
||||||
|
"blockreward" : "11444091796875" |
||||||
|
}, { |
||||||
|
"block" : 86944000, |
||||||
|
"blockreward" : "57220458984375" |
||||||
|
}, { |
||||||
|
"block" : 91520000, |
||||||
|
"blockreward" : "28610229492187" |
||||||
|
}, { |
||||||
|
"block" : 96096000, |
||||||
|
"blockreward" : "14305114746093" |
||||||
|
}, { |
||||||
|
"block" : 100672000, |
||||||
|
"blockreward" : "7152557373046" |
||||||
|
}, { |
||||||
|
"block" : 105248000, |
||||||
|
"blockreward" : "3576278686523" |
||||||
|
}, { |
||||||
|
"block" : 109824000, |
||||||
|
"blockreward" : "1788139343261" |
||||||
|
}, { |
||||||
|
"block" : 114400000, |
||||||
|
"blockreward" : "894069671630" |
||||||
|
}, { |
||||||
|
"block" : 118976000, |
||||||
|
"blockreward" : "447034835815" |
||||||
|
}, { |
||||||
|
"block" : 123552000, |
||||||
|
"blockreward" : "223517417907" |
||||||
|
}, { |
||||||
|
"block" : 128128000, |
||||||
|
"blockreward" : "111758708953" |
||||||
|
}, { |
||||||
|
"block" : 132704000, |
||||||
|
"blockreward" : "55879354476" |
||||||
|
}, { |
||||||
|
"block" : 137280000, |
||||||
|
"blockreward" : "0" |
||||||
|
} ] |
||||||
|
}, |
||||||
|
"nonce" : "0x0", |
||||||
|
"timestamp" : "0x0", |
||||||
|
"gasLimit" : "0x1fffffffffffff", |
||||||
|
"difficulty" : "0x1", |
||||||
|
"mixHash" : "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365", |
||||||
|
"coinbase" : "0x0000000000000000000000000000000000000000", |
||||||
|
"alloc" : { |
||||||
|
"0xaE51f2EfE70e57b994BE8F7f97C4dC824c51802a" : { |
||||||
|
"balance" : "3570000000000000000000000000" |
||||||
|
} |
||||||
|
}, |
||||||
|
"extraData" : "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f85494ad4ea9b483fb8a4ed177186174ba44a41c2f36c3943e5fee8e8cb007611d6e8bab73b1368a1098674094018f86e22cc26e0318e7c00c3a738df1e5f183ac947366f751aa0fcf4d457dc52bdc9d5cd750533943c080c0" |
||||||
|
} |
@ -0,0 +1,127 @@ |
|||||||
|
{ |
||||||
|
"config" : { |
||||||
|
"chainId" : 3889, |
||||||
|
"homesteadBlock" : 0, |
||||||
|
"eip150Block" : 0, |
||||||
|
"eip155Block" : 0, |
||||||
|
"eip158Block" : 0, |
||||||
|
"byzantiumBlock" : 0, |
||||||
|
"constantinopleBlock" : 0, |
||||||
|
"petersburgBlock" : 0, |
||||||
|
"istanbulBlock" : 0, |
||||||
|
"berlinBlock" : 0, |
||||||
|
"londonBlock" : 0, |
||||||
|
"qbft" : { |
||||||
|
"blockperiodseconds" : 2, |
||||||
|
"epochlength" : 28800, |
||||||
|
"requesttimeoutseconds" : 4, |
||||||
|
"blockreward" : "3000000000000000000", |
||||||
|
"baseFeePerGas" : "0x834" |
||||||
|
} |
||||||
|
}, |
||||||
|
"transitions" : { |
||||||
|
"qbft" : [ { |
||||||
|
"block" : 4576000, |
||||||
|
"blockreward" : "1500000000000000000" |
||||||
|
}, { |
||||||
|
"block" : 9152000, |
||||||
|
"blockreward" : "750000000000000000" |
||||||
|
}, { |
||||||
|
"block" : 13728000, |
||||||
|
"blockreward" : "375000000000000000" |
||||||
|
}, { |
||||||
|
"block" : 18304000, |
||||||
|
"blockreward" : "187500000000000000" |
||||||
|
}, { |
||||||
|
"block" : 22880000, |
||||||
|
"blockreward" : "93750000000000000" |
||||||
|
}, { |
||||||
|
"block" : 27456000, |
||||||
|
"blockreward" : "46875000000000000" |
||||||
|
}, { |
||||||
|
"block" : 32032000, |
||||||
|
"blockreward" : "23437500000000000" |
||||||
|
}, { |
||||||
|
"block" : 36608000, |
||||||
|
"blockreward" : "11718750000000000" |
||||||
|
}, { |
||||||
|
"block" : 41184000, |
||||||
|
"blockreward" : "5859375000000000" |
||||||
|
}, { |
||||||
|
"block" : 45760000, |
||||||
|
"blockreward" : "2929687500000000" |
||||||
|
}, { |
||||||
|
"block" : 50336000, |
||||||
|
"blockreward" : "1464843750000000" |
||||||
|
}, { |
||||||
|
"block" : 54912000, |
||||||
|
"blockreward" : "732421875000000" |
||||||
|
}, { |
||||||
|
"block" : 59488000, |
||||||
|
"blockreward" : "366210937500000" |
||||||
|
}, { |
||||||
|
"block" : 64064000, |
||||||
|
"blockreward" : "183105468750000" |
||||||
|
}, { |
||||||
|
"block" : 68640000, |
||||||
|
"blockreward" : "91552734375000" |
||||||
|
}, { |
||||||
|
"block" : 73216000, |
||||||
|
"blockreward" : "45776367187500" |
||||||
|
}, { |
||||||
|
"block" : 77792000, |
||||||
|
"blockreward" : "22888183593750" |
||||||
|
}, { |
||||||
|
"block" : 82368000, |
||||||
|
"blockreward" : "11444091796875" |
||||||
|
}, { |
||||||
|
"block" : 86944000, |
||||||
|
"blockreward" : "57220458984375" |
||||||
|
}, { |
||||||
|
"block" : 91520000, |
||||||
|
"blockreward" : "28610229492187" |
||||||
|
}, { |
||||||
|
"block" : 96096000, |
||||||
|
"blockreward" : "14305114746093" |
||||||
|
}, { |
||||||
|
"block" : 100672000, |
||||||
|
"blockreward" : "7152557373046" |
||||||
|
}, { |
||||||
|
"block" : 105248000, |
||||||
|
"blockreward" : "3576278686523" |
||||||
|
}, { |
||||||
|
"block" : 109824000, |
||||||
|
"blockreward" : "1788139343261" |
||||||
|
}, { |
||||||
|
"block" : 114400000, |
||||||
|
"blockreward" : "894069671630" |
||||||
|
}, { |
||||||
|
"block" : 118976000, |
||||||
|
"blockreward" : "447034835815" |
||||||
|
}, { |
||||||
|
"block" : 123552000, |
||||||
|
"blockreward" : "223517417907" |
||||||
|
}, { |
||||||
|
"block" : 128128000, |
||||||
|
"blockreward" : "111758708953" |
||||||
|
}, { |
||||||
|
"block" : 132704000, |
||||||
|
"blockreward" : "55879354476" |
||||||
|
}, { |
||||||
|
"block" : 137280000, |
||||||
|
"blockreward" : "0" |
||||||
|
} ] |
||||||
|
}, |
||||||
|
"nonce" : "0x0", |
||||||
|
"timestamp" : "0x0", |
||||||
|
"gasLimit" : "0x1fffffffffffff", |
||||||
|
"difficulty" : "0x1", |
||||||
|
"mixHash" : "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365", |
||||||
|
"coinbase" : "0x0000000000000000000000000000000000000000", |
||||||
|
"alloc" : { |
||||||
|
"0xaE51f2EfE70e57b994BE8F7f97C4dC824c51802a" : { |
||||||
|
"balance" : "3570000000000000000000000000" |
||||||
|
} |
||||||
|
}, |
||||||
|
"extraData" : "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f854947fa47fed34dd63bd76060a5dd63ef3c2b5b23de0942f5e068935deb3eb2c8210b7dfc8d9c96806c68f942aac52c8405a80b20944ae92c85c477412b4a6ed94c5d01f2fa32d12f5b25cb395a557cd74c86241a5c080c0" |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
# Create systemd Service File |
||||||
|
cd /etc/systemd/system |
||||||
|
echo "Starting KalyChain..." |
||||||
|
echo " |
||||||
|
[Unit] |
||||||
|
Description=Kaly Node Service |
||||||
|
[Service] |
||||||
|
Type=simple |
||||||
|
Restart=always |
||||||
|
RestartSec=1 |
||||||
|
User=$USER |
||||||
|
Group=$USER |
||||||
|
LimitNOFILE=4096 |
||||||
|
WorkingDirectory=/home/$USER/node/ |
||||||
|
ExecStart=/home/$USER/node/../besu/bin/besu --data-path=data --genesis-file=./genesis.json --bootnodes=enode://bd1782617ae151ba6da627a35a1babc0a40ae127a718cdc13322acb357411f095d56db6141c99d7f8b63b7ce896ffffbadea34a4471bca297c916a94e1d9b818@169.197.143.193:30303 enode://3ea0e690890c824cb39867c9da0e201764ecd2960c2609ecceb40b3e48d374424f791d32d87eaf7430249649b5c45673178454455b22b133458afc5ddf126c3a@169.197.143.209:30303 --p2p-port=30303 --rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-ws-host=0.0.0.0 --revert-reason-enabled=true |
||||||
|
[Install] |
||||||
|
WantedBy=multi-user.target |
||||||
|
" | sudo tee kaly.service |
||||||
|
|
||||||
|
if grep -q ForwardToSyslog=yes "/etc/systemd/journald.conf"; then |
||||||
|
sudo sed -i '/#ForwardToSyslog=yes/c\ForwardToSyslog=no' /etc/systemd/journald.conf |
||||||
|
sudo sed -i '/ForwardToSyslog=yes/c\ForwardToSyslog=no' /etc/systemd/journald.conf |
||||||
|
elif ! grep -q ForwardToSyslog=no "/etc/systemd/journald.conf"; then |
||||||
|
echo "ForwardToSyslog=no" | sudo tee -a /etc/systemd/journald.conf |
||||||
|
fi |
||||||
|
cd - |
||||||
|
echo |
||||||
|
|
||||||
|
# Start systemd Service |
||||||
|
sudo systemctl force-reload systemd-journald |
||||||
|
sudo systemctl daemon-reload |
||||||
|
sudo systemctl start kaly.service |
||||||
|
sudo systemctl enable kaly.service |
||||||
|
|
||||||
|
read -n 1 -s -r -p "Service successfully started! Press any key to continue..." |
||||||
|
echo |
Loading…
Reference in new issue