EOS is becoming a popular platform for blockchain application development. Its high scalability enables it to process a large number of transactions quickly. Moreover, these transactions are validated by EOS nodes. These nodes produce blocks containing valid transactions. This blog is a guide to setting up EOS Node in simple steps.
EOS is a blockchain (and a coin) used to build 'smart' smart contracts like Ethereum but it's much faster than it.
Any user who wants to use the EOS platform for creating an account, transferring a token, and issuing a token must have an EOS token to successfully perform the aforementioned actions.
Furthermore, every user on the EOS blockchain platform holds an amount (in EOS ) for stake network bandwidth, net usage, and RAM.
So, only an existing user could create a new user as they purchase above- defined asset and gives them to new users (for independent EOS wallet).
Explore More: EOS Blockchain | A Beginner’s Guide to DApp Development
Here's a guide that has steps for setting up the EOS Node jungle2 testnet.
create and folder mkdir /opt/EOSIO cd /opt/EOSIO git clone https://github.com/eosio/eos --recursive cd eos git checkout v1.5.2 git submodule update --init --recursive ./eosio_build.sh -s EOS ./eosio_install.sh
This may take a while so don't panic.
Now, copy the old version.
mkdir /opt/bin mkdir /opt/bin/v1.5.2 cp /opt/EOSIO/eos/build/programs/nodeos/nodeos /opt/bin/v1.5.2/ cp /opt/EOSIO/eos/build/programs/cleos/cleos /opt/bin/v1.5.2/ cp /opt/EOSIO/eos/build/programs/keosd/keosd /opt/bin/v1.5.2/ ln -sf /opt/bin/v1.5.2 /opt/bin/bin
Now, update the source version.
cd /opt/EOSIO/eos git checkout -f git branch -f git pull git checkout v1.5.2 git submodule update --init --recursive ./eosio_build.sh -s EOS ./eosio_uninstall.sh ./eosio_install.sh mkdir /opt/bin/v1.5.2 cp /opt/EOSIO/eos/build/programs/nodeos/nodeos /opt/bin/v1.5.2/ cp /opt/EOSIO/eos/build/programs/cleos/cleos /opt/bin/v1.5.2/ cp /opt/EOSIO/eos/build/programs/keosd/keosd /opt/bin/v1.5.2/ ln -sf /opt/bin/v1.5.2 /opt/bin/bin
The environment of EOS has been set up successfully.
Now, we will set up the EOS jungle testnet.
mkdir /opt/Jungle2Testnet cd /opt/Jungle2Testnet git clone https://github.com/EOS-Jungle-Testnet/Node-Manual-Installation.git ./
Suggested Post: Why is EOS blockchain the Best Platform for Commercial-Grade DApps
For setting up the EOS Node, we need an EOS account. We can create an EOS account from here and click Create account.
The above link needs an account name and public key. You can find a unique account name and private key from this link.
Now, edit config.ini file that is present in the folder
/opt/Jungle2Testnet
And update that file following these details.
# update here your producer name and that key
producer-name = oodlestest24
signature-provider = pub-key=priv-key
http-server-address = 0.0.0.0:8888 # your node address
p2p-listen-endpoint = 0.0.0.0:9876
p2p-server-address = *************:9876 # your public ip
chain-state-db-size-mb = 16384
reversible-blocks-db-size-mb = 1024
contracts-console = true
p2p-max-nodes-per-host = 100
wasm-runtime = wabt
http-validate-host = false
verbose-http-errors = true
abi-serializer-max-time-ms = 2000
access-control-allow-origin = *
# access-control-allow-headers =
# access-control-max-age =
# access-control-allow-credentials = false
# https-private-key-file =
allowed-connection = any
# allowed-connection = specified
# peer-private-key = ["!!NEW_KEY_PUB!!","!!NEW_KEY_PRIV!!"] #create new key for private peers
# peer-key = "!![PUBKEY]!!"
max-clients = 150
connection-cleanup-period = 30
network-version-match = 0
sync-fetch-span = 2000
enable-stale-production = false
max-implicit-request = 1500
pause-on-startup = false
max-irreversible-block-age = -1
txn-reference-block-lag = 0
mongodb-queue-size = 256
# mongodb-uri =
plugin = eosio::producer_plugin
#plugin = eosio::producer_api_plugin
plugin = eosio::chain_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
max-transaction-time=1000
#EXAMPLE peers please check last one on http://monitor.jungletestnet.io/#p2p
p2p-peer-address = jungle2.cryptolions.io:9876
p2p-peer-address = jungle2.cryptolions.io:19876
p2p-peer-address = jungle-p2p.eosio.cr:2086
p2p-peer-address = peer.jungle.alohaeos.com:9876
p2p-peer-address = 145.239.133.201:9876
p2p-peer-address = 35.165.133.251:8888
p2p-peer-address = jungle.eosgen.io:9876
p2p-peer-address = jungle.eosn.io:9876
p2p-peer-address = 18.223.252.15:9876
p2p-peer-address = 49.236.137.37:9990
p2p-peer-address = jungle.eosmetal.io:19876
p2p-peer-address = jungle2-eos.blckchnd.com:9876
Now, save the above file. Then, you need to use two port:
1- 8888 for eos blockchain-communication
2- 3000 for your eos wallet
For starting the wallet port, type the following commands:
cd /opt/Jungle2Testnet
./Wallet/start_wallet.sh
For starting the node, type the following command:
./start.sh --delete-all-blocks --genesis-json genesis.json //
This command will fire only once. If you use this command another time
then it will delete all downloaded blocks.
Now, you can check your node information by cleos command or use this link that is running your local system.
You will get the following response by command ./cleos.sh get info :
{
"server_version": "3fddb727",
"chain_id": "e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473",
"head_block_num": 11365262,
"last_irreversible_block_num": 11364934,
"last_irreversible_block_id": "00ad6a4636dacefa87c2aa086c9aa361b6c9899b02ed0e4435682f5d7a1c3d69",
"head_block_id": "00ad6b8e5c191fd7ea0c97106779ba56b4eb176cecc85e712d369b4049b736c3",
"head_block_time": "2019-01-30T06:03:17.500",
"head_block_producer": "mosquitometa",
"virtual_block_cpu_limit": 200000000,
"virtual_block_net_limit": 1048576000,
"block_cpu_limit": 192625,
"block_net_limit": 1048352,
"server_version_string": "v1.6.0"
}
By browser
http://localhost:8888/v1/chain/get_info
This will return the node info.
Now, the setup is complete and it will take time for syncing all blocks that depend on block height.
Now, you need to import your EOS account that is present in the EOS blockchain. Firstly, you need to create a default wallet.
cleos Wallet Create
It will generate a default wallet and give you a password. Store that password securely.
Now, import your existing wallet into this wallet. Use the following command:
cleos wallet import ********* (paste here your private key)
cleos Wallet Keys
It will show wallet keys.
For another cleos command, you can check this link
https://developers.eos.io/keosd/v1.3.0/reference
For integrating EOS in java you can use this link
https://github.com/EOSEssentials/eos-java-rpc-wrapper
Also, Read | EOS Blockchain: Is It a Better Investment for DApp Development
Firstly, set up the environment from the main-net EOS by following this link. Sometimes it is difficult to set up the main net because of its syncing issue. So, there is a shortcut to set up the EOS main net.
But, there are some limitations in it because here we are going to use the snapshot for the current date. So, it will start syncing from the current data. It means that we haven't held the old data block (it means we don’t have any record of previous-date).
If you don't need the previous transaction info, use this process to set up the mainnet:
cd /opt/EOSmainNet rm -rf state # Download the latest snapshot wget $(wget --quiet "https://eosnode.tools/api/snapshots?limit=1" -O- | jq -r '.data[0].s3') -O snapshot.tar.gz # Uncompress tar xvzf snapshot.tar.gz # Start the chain and sync from the provided snapshot ./start.sh --snapshot "$(ls -t snapshots/*.bin | head -n1)" # Tail the logs to watch the sync in all its glory tail -f log.txt
Furthermore, you can check other date snapshots from this link.
You can set up the EOS blockchain node following the above steps. If you are looking for assistance in developing EOS-based applications, then avail our services. Contact our blockchain developers to develop a range of fast, secure, and efficient solutions.