Created
January 2, 2019 05:44
-
-
Save 26rahulsingh/69fbe04e5f36b40fbf856fd2e1124965 to your computer and use it in GitHub Desktop.
EOS Single and Multi Node Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================== Local Single Node Setup ============= | |
1. cd eos | |
2. Build eos -> eosio_build.sh | |
3. Install eos -> eosio_install.sh | |
4. cd eos/build/programs/nodeos | |
5. ./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin | |
./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --access-control-allow-origin "*" --access-control-allow-headers "*" --access-control-allow-credentials true | |
If the above command not work (The problem can be fixed by running your normal nodeos command with the additional --delete-all-blocks option) | |
./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --delete-all-blocks | |
=================== Multi Node Setup ==================== | |
1. keosd --http-server-address 127.0.0.1:8899 | |
2. cleos --wallet-url="http://127.0.0.1:8899" wallet list | |
3. cleos --wallet-url="http://127.0.0.1:8899" wallet open -n default | |
4. cleos --wallet-url="http://127.0.0.1:8899" wallet unlock -n default | |
5. cleos --wallet-url http://127.0.0.1:8899 wallet import --private-key 5KVEwtnG2BnXcharYKkxg82KPHrdREMH8QJUJrFYg4gmAWS23gJ | |
6. nodeos --enable-stale-production --producer-name eosio --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin | |
7. cleos --wallet-url http://127.0.0.1:8899 set contract eosio build/contracts/eosio.bios/ | |
8. cleos create key --to-console | |
9. cleos --wallet-url http://127.0.0.1:8899 wallet import --private-key 5JUAN8Z8PSbjg8pwbwrryLadyChMwzYVpBJtYRAV3HJSrvTqksm | |
10. cleos --wallet-url http://127.0.0.1:8899 create account eosio inita EOS7awV9cLYmChWZy5Q1PKmhYcNTrC5BbK41b8UgGaqcKZDcXDvXu EOS7awV9cLYmChWZy5Q1PKmhYcNTrC5BbK41b8UgGaqcKZDcXDvXu | |
11. nodeos --producer-name inita --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin --http-server-address 127.0.0.1:8889 --p2p-listen-endpoint 127.0.0.1:9877 --p2p-peer-address 127.0.0.1:9876 --config-dir node2 --data-dir node2 --private-key [\"EOS6hMjoWRF2L8x9YpeqtUEcsDKAyxSuM1APicxgRU1E3oyV5sDEg\",\"5JgbL2ZnoEAhTudReWH1RnMuQS6DBeLZt4ucV6t8aymVEuYg7sr\"] | |
12. cleos --wallet-url http://127.0.0.1:8899 push action eosio setprods "{ \"schedule\": [{\"producer_name\": \"inita\",\"block_signing_key\": \"EOS6hMjoWRF2L8x9YpeqtUEcsDKAyxSuM1APicxgRU1E3oyV5sDEg\"}]}" -p eosio@active | |
13. cleos get info | |
14. cleos --url http://127.0.0.1:8889 get info | |
=================== Start Multi Node ==================== | |
1. cd eos/build/programs/nodeos | |
./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --access-control-allow-origin "*" --access-control-allow-headers "*" --access-control-allow-credentials true | |
2. In other terminal run command | |
./nodeos --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin --data-dir /home/rahul/multinode/node2 --config-dir /home/rahul/multinode/node2 --p2p-listen-endpoint 192.168.4.172:9877 --p2p-peer-address 192.168.4.172:9876 | |
========================================================= | |
Unlock wallet | |
------------- | |
cleos wallet unlock -n default --password PW5JQV73T3WfT67bqnJWmT6j9DnyD2ens9YcPD4EVtMRf27Sgwy8y | |
List wallet | |
----------- | |
cleos wallet list | |
Create keys | |
----------- | |
cleos create key --to-console | |
Private key: 5JRns9cMDyxhiE6oxxBgcDr3ivBMsjWJXti8vZqNVqQPitP67zV | |
Public key: EOS855DS5xHDm2v7nTucqdP4hymQ4Gg5tpm7AynTt8ExTn8PBvgxn | |
Import keys into wallet | |
----------------------- | |
cleos wallet import -n default --private-key 5JRns9cMDyxhiE6oxxBgcDr3ivBMsjWJXti8vZqNVqQPitP67zV | |
Import EOS node key from config.ini | |
----------------------------------- | |
cleos wallet import -n default --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 | |
Create Account | |
-------------- | |
cleos create account eosio (account_name) (owner_public_key) (active_public_key) | |
Example -> cleos create account eosio account1 EOS855DS5xHDm2v7nTucqdP4hymQ4Gg5tpm7AynTt8ExTn8PBvgxn EOS855DS5xHDm2v7nTucqdP4hymQ4Gg5tpm7AynTt8ExTn8PBvgxn | |
Set Contract into account | |
------------------------- | |
Go to -> eos/build/contracts folder | |
cleos set contract account1 . hello.wasm hello.abi | |
Call Action | |
----------- | |
cleos push action (account_name) (action_name) '["(account_name)", "Rahul"]' -p (account_name) | |
Example -> cleos push action account1 hi '["account1", "Rahul"]' -p account1 | |
JungleTestNet | |
------------- | |
wget http://jungle.cryptolions.io/launchers/installJungle-jetexchange1.sh | |
chmod u+x installJungle-jetexchange1.sh | |
Register EOS key | |
Description EOS Token Sale Claim Key | |
Public key EOS7zzZZ9eYNYwJk45qcDp1qEwuuNrTCjyg2V4KpqfmoSVqL9zPjd | |
Private key 5Ka8Q1k17ayrBWCVrowmwfqXfNMGMLivnhG4LZkDNVL8iYkTmCF | |
sudo wget http://jungle.cryptolions.io/launchers/installJungle-jetexchange2.sh && \ | |
sudo chmod u+x installJungle-jetexchange2.sh | |
Cryptokylin | |
=========== | |
Create Account | |
-------------- | |
1. http://faucet.cryptokylin.io/create_account?jetexchange1 | |
{ | |
"msg": "succeeded", | |
"keys": | |
{ | |
"active_key": | |
{ | |
"public": "EOS86jhngDAUDGAdpSAASCBDWeqcezurhJk4yHE158PaQLkTYQVAX", | |
"private": "5J1uxf8JH8CtE6N3TZsXBYTNt5cVtd9tK3JNMoXFcESePKGfkuA" | |
}, | |
"owner_key": | |
{ | |
"public": "EOS6UjBRxyBz85egQ4cFq8nDQfp8PVGkb8J7AUrCoCATugJntMEYb", | |
"private": "5JQhWzU3kraPtNR7KqvqaMsnNnsExS3PJRY8QBssAK5spJydb3e" | |
} | |
}, | |
"account": "jetexchange1" | |
} | |
Get Faucet | |
---------- | |
2. http://faucet.cryptokylin.io/get_token?jetexchange1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment