Environment setup
Go github
to download the source code, preferably a version later than 2.0, otherwise there will be many problems
git clone https://github.com/EOSIO/eos -b v2.0.3 --recursive
Compile
cd eos/scripts/
./eosio_build.sh
This process takes several hours, and the following content will appear after completion
[100%] Built target print_floats
_______ _______ _______ _________ _______
( ____ \( ___ )( ____ \\__ __/( ___ )
| ( \/| ( ) || ( \/ ) ( | ( ) |
| (__ | | | || (_____ | | | | | |
| __) | | | |(_____ ) | | | | | |
| ( | | | | ) | | | | | | |
| (____/\| (___) |/\____) |___) (___| (___) |
(_______/(_______)\_______)\_______/(_______)
EOSIO has been successfully built. 00:38:51
To verify your installation run the following commands:
export PATH=${HOME}/opt/mongodb/bin:$PATH
/home/jian/opt/mongodb/bin/mongod -f /home/jian/opt/mongodb/mongod.conf &
cd /home/jian/eos/build; make test
For more information:
EOSIO website: https://eos.io
EOSIO Telegram channel @ https://t.me/EOSProject
EOSIO resources: https://eos.io/resources/
EOSIO Stack Exchange: https://eosio.stackexchange.com
EOSIO wiki: https://github.com/EOSIO/eos/wiki
installation
./eosio_install.sh
After execution, all executable programs will be in the /root/eosio/2.0/bin
directory
Set up soft connection
ln -fs /root/eosio/2.0/bin/nodeos /usr/local/bin/nodeos
ln -fs /root/eosio/2.0/bin/cleos /usr/local/bin/cleos
View version
nodeos -v
v1.8.11
Sync block
EOS
The main network block data is very large, and it takes more than ten days to synchronize the data of all blocks. Here are snapshots
the specific steps to synchronize the full node and the snapshot ( ) synchronization
Full node synchronization
Ready to work
Prepare at least 1TB hard drive, preferably SSD
Edit configuration file
- Note: If the
filter-on = *
parameters in the configuration file are turned on, the node program may exit due to too much memory data, so it is best to filter other data and keep only the data of the specified account. The format isfilter-on = eosio.token:transfer:
, justeosio.token
replace it with your account name, pay attention to the following There is a colon.
You can edit the default configuration file vi ~/.local/share/eosio/nodeos/config/config.ini
, or customize the configuration file directory, here I customize it in the /root
directory, copy and save the following configuration
#producer-name = !!!!YOUR_BP_NAME!!!!!!!!
#signature-provider = YOUR_BLOCK_SIGN_PUB_KEY=KEY:YOUR_BLOCK_SIGN_PRIV_KEY
agent-name = AgentName
#blocks-dir = "blocks"
chain-state-db-size-mb = 65536
reversible-blocks-db-size-mb = 2048
contracts-console = false
http-server-address = 0.0.0.0:8888
p2p-listen-endpoint = 0.0.0.0:9876
p2p-server-address = !!YOUR_ENDPOINT_IP_ADDRESS!!:9876
http-validate-host = false
verbose-http-errors = true
abi-serializer-max-time-ms = 2000
chain-threads = 8
http-threads = 6
access-control-allow-origin = *
access-control-allow-headers = Origin, X-Requested-With, Content-Type, Accept
# access-control-max-age =
# access-control-allow-credentials = false
# wasm-runtime = wabt
wasm-runtime = eos-vm-jit
eos-vm-oc-enable = true
#produce-time-offset-us = 250000
last-block-time-offset-us = -300000
# Safely shut down node when free space remaining in the chain state database drops below this size (in MiB). (eosio::chain_plugin)
chain-state-db-guard-size-mb = 128
# Safely shut down node when free space remaining in the reverseible blocks database drops below this size (in MiB). (eosio::chain_plugin)
reversible-blocks-db-guard-size-mb = 2
p2p-max-nodes-per-host = 150
# actor-whitelist =
# actor-blacklist =
# contract-whitelist =
# contract-blacklist =
# filter-on =
# SSL
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-server-address =
# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)
# https-certificate-chain-file =
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-private-key-file =
allowed-connection = any
max-clients = 150
connection-cleanup-period = 30
network-version-match = 0
sync-fetch-span = 2000
enable-stale-production = false
pause-on-startup = false
max-transaction-time = 30
max-irreversible-block-age = -1
txn-reference-block-lag = 0
plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
plugin = eosio::chain_plugin
filter-on = *
#plugin = net_plugin
#plugin = net_api_plugin
#p2p-peer-address =
#p2p-peer-address =
#p2p-peer-address =
#p2p-peer-address = 172.2.0.100:9876
#p2p-peer-address = 172.2.0.200:9876
#Other Pub BP nodes
#p2p-peer-address =
#p2p-peer-address =
p2p-peer-address = bp.cryptolions.io:9876
p2p-peer-address = p2p.mainnet.eospace.io:88
p2p-peer-address = eu-west-nl.eosamsterdam.net:9876
p2p-peer-address = p2p.mainnet.eosgermany.online:9876
p2p-peer-address = 35.197.190.234:19878
p2p-peer-address = mainnet.genereos.io:9876
p2p-peer-address = mainnet.eospay.host:19876
p2p-peer-address = 130.211.59.178:9876
p2p-peer-address = 54.153.59.31:9999
p2p-peer-address = 94.130.250.22:9806
p2p-peer-address = peer.main.alohaeos.com:9876
p2p-peer-address = peer.eosn.io:9876
p2p-peer-address = prod.mainnet.eos.cybex.io:9888
p2p-peer-address = p2p-1.eosnetwork.io:9876
p2p-peer-address = p.jeda.one:3322
p2p-peer-address = eosbattles.com:9877
p2p-peer-address = 34.226.76.22:9876
p2p-peer-address = mainnet.eosoasis.io:9876
p2p-peer-address = node.eosflare.io:1883
p2p-peer-address = mainnet.eoscalgary.io:5222
p2p-peer-address = eos-p2p.worbli.io:33981
p2p-peer-address = 18.188.38.175:9876
p2p-peer-address = 18.221.255.38:9876
p2p-peer-address = eos.staked.us:9870
p2p-peer-address = peering.dutcheos.io:9876
p2p-peer-address = 18.188.4.97:9876
p2p-peer-address = 18.191.125.105:9876
p2p-peer-address = boot.eostitan.com:9876
p2p-peer-address = eosboot.chainrift.com:9876
p2p-peer-address = dc1.eosemerge.io:9876
p2p-peer-address = m.eosvibes.io:9876
p2p-peer-address = node1.eosphere.io:9876
p2p-peer-address = node2.eosphere.io:9876
p2p-peer-address = 45.33.60.65:9820
p2p-peer-address = peering.eosio.cr:1976
p2p-peer-address = peering.eosio.cr:5418
p2p-peer-address = 54.203.121.17:19866
p2p-peer-address = eosnode.fi:9888
p2p-peer-address = api.eosuk.io:12000
p2p-peer-address = fullnode.eoslaomao.com:443
p2p-peer-address = new.eoshenzhen.io:10034
p2p-peer-address = peer.eosio.sg:9876
p2p-peer-address = eos.nodepacific.com:9876
p2p-peer-address = 18.234.6.119:80
p2p-peer-address = eu1.eosdac.io:49876
p2p-peer-address = br.eosrio.io:9876
p2p-peer-address = p2p-public.hkeos.com:19875
p2p-peer-address = node.eosmeso.io:9876
p2p-peer-address = pub1.eostheworld.io:9876
p2p-peer-address = 807534da.eosnodeone.io:19872
p2p-peer-address = mainnet.eoseco.com:10010
actor-blacklist = blacklistmee
#https://eoscorearbitration.io/wp-content/uploads/2018/07/ECAF_Arbitrator_Order_2018-06-19-AO-001.pdf
actor-blacklist = ge2dmmrqgene
actor-blacklist = gu2timbsguge
actor-blacklist = ge4tsmzvgege
actor-blacklist = gezdonzygage
actor-blacklist = ha4tkobrgqge
actor-blacklist = ha4tamjtguge
actor-blacklist = gq4dkmzzhege
#https://eoscorearbitration.io/wp-content/uploads/2018/07/ECAF_Arbitrator_Order_2018-06-22-AO-002.pdf
actor-blacklist = gu2teobyg4ge
actor-blacklist = gq4demryhage
actor-blacklist = q4dfv32fxfkx
actor-blacklist = ktl2qk5h4bor
actor-blacklist = haydqnbtgene
actor-blacklist = g44dsojygyge
actor-blacklist = guzdonzugmge
actor-blacklist = ha4doojzgyge
actor-blacklist = gu4damztgyge
actor-blacklist = haytanjtgige
actor-blacklist = exchangegdax
actor-blacklist = cmod44jlp14k
actor-blacklist = 2fxfvlvkil4e
actor-blacklist = yxbdknr3hcxt
actor-blacklist = yqjltendhyjp
actor-blacklist = pm241porzybu
actor-blacklist = xkc2gnxfiswe
actor-blacklist = ic433gs42nky
actor-blacklist = fueaji11lhzg
actor-blacklist = w1ewnn4xufob
actor-blacklist = ugunxsrux2a3
actor-blacklist = gz3q24tq3r21
actor-blacklist = u5rlltjtjoeo
actor-blacklist = k5thoceysinj
actor-blacklist = ebhck31fnxbi
actor-blacklist = pvxbvdkces1x
actor-blacklist = oucjrjjvkrom
#https://eoscorearbitration.io/wp-content/uploads/2018/07/ECAF-Temporary-Freeze-Order-2018-07-13-AO-003.pdf
actor-blacklist = neverlandwal
actor-blacklist = tseol5n52kmo
actor-blacklist = potus1111111
#https://eoscorearbitration.io/wp-content/uploads/2018/07/ECAF-Order-of-Emergency-Protection-2018-07-19-AO-004.pdf
actor-blacklist = craigspys211
#https://eoscorearbitration.io/wp-content/uploads/2018/08/ECAF-Order-of-Emergency-Protection-2018-08-07-AO-005.pdf
actor-blacklist = eosfomoplay1
#https://eoscorearbitration.io/wp-content/uploads/2018/08/ECAF-Order-of-Emergency-Protection-2018-08-28-AO-006.pdf
actor-blacklist = wangfuhuahua
#https://eoscorearbitration.io/wp-content/uploads/2018/09/ECAF-Order-of-Emergency-Protection-2018-09-07-AO-008.pdf
#https://eoscorearbitration.io/wp-content/uploads/2018/09/ECAF-Order-of-Emergency-Protection-2018-09-24-AO-010.pdf
#actor-blacklist = ha4timrzguge
actor-blacklist = guytqmbuhege
#https://eoscorearbitration.io/wp-content/uploads/2018/09/ECAF-Order-of-Emergency-Protection-2018-09-09-AO-009.pdf
actor-blacklist = huobldeposit
#https://eoscorearbitration.io/wp-content/uploads/2018/09/ECAF-Order-of-Emergency-Protection-2018-09-25-AO-011.pdf
actor-blacklist = gm3dcnqgenes
actor-blacklist = gm34qnqrepqt
actor-blacklist = gt3ftnqrrpqp
actor-blacklist = gtwvtqptrpqp
actor-blacklist = gm31qndrspqr
actor-blacklist = lxl2atucpyos
#https://eoscorearbitration.io/wp-content/uploads/2018/10/ECAF-Order-of-Emergency-Protection-2018-10-05-AO-012.pdf
actor-blacklist = g4ytenbxgqge
actor-blacklist = jinwen121212
actor-blacklist = ha4tomztgage
actor-blacklist = my1steosobag
actor-blacklist = iloveyouplay
actor-blacklist = eoschinaeos2
actor-blacklist = eosholderkev
actor-blacklist = dreams12true
actor-blacklist = imarichman55
#https://eoscorearbitration.io/wp-content/uploads/2018/10/ECAF-Order-of-Emergency-Protection-2018-10-05-AO-013.pdf
actor-blacklist = gizdcnjyg4ge
#https://eoscorearbitration.io/wp-content/uploads/2018/10/ECAF-Order-of-Emergency-Protection-2018-10-12-AO-014.pdf
actor-blacklist = gyzdmmjsgige
#https://eoscorearbitration.io/wp-content/uploads/2018/10/ECAF-Order-of-Emergency-Protection-2018-10-13-AO-015.pdf
actor-blacklist = guzdanrugene
actor-blacklist = earthsop1sys
#https://eoscorearbitration.io/wp-content/uploads/2018/10/ECAF-Order-of-Emergency-Protection-2018-10-31-AO-017.pdf
actor-blacklist = refundwallet
actor-blacklist = jhonnywalker
actor-blacklist = alibabaioeos
actor-blacklist = whitegroupes
actor-blacklist = 24cryptoshop
actor-blacklist = minedtradeos
#Manual at 2019.02.22 (MainNet gropup)
actor-blacklist = newdexmobapp
actor-blacklist = ftsqfgjoscma
actor-blacklist = hpbcc4k42nxy
actor-blacklist = 3qyty1khhkhv
actor-blacklist = xzr2fbvxwtgt
actor-blacklist = myqdqdj4qbge
actor-blacklist = shprzailrazt
actor-blacklist = qkwrmqowelyu
actor-blacklist = lhjuy3gdkpq4
actor-blacklist = lmfsopxpr324
actor-blacklist = lcxunh51a1gt
actor-blacklist = geydddsfkk5e
actor-blacklist = pnsdiia1pcuy
actor-blacklist = kwmvzswquqpb
actor-blacklist = guagddoefdqu
editgenesis.json
Copy and save the following configuration
vi genesis.json
{
"initial_timestamp": "2018-06-08T08:08:08.888",
"initial_key": "EOS7EarnUhcyYqmdnPon8rm7mBCTnBoot6o7fE2WzjvEX2TdggbL3",
"initial_configuration": {
"max_block_net_usage": 1048576,
"target_block_net_usage_pct": 1000,
"max_transaction_net_usage": 524288,
"base_per_transaction_net_usage": 12,
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 200000,
"target_block_cpu_usage_pct": 1000,
"max_transaction_cpu_usage": 150000,
"min_transaction_cpu_usage": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
"max_transaction_delay": 3888000,
"max_inline_action_size": 4096,
"max_inline_action_depth": 4,
"max_authority_depth": 6
}
}
First start
The default port is 8888
nodeos --config-dir . --data-dir /mnt/omnidata --genesis-json genesis.json --delete-all-blocks
--config-dir
:The directory where the configuration file config.ini is located
--data-dir
:The block data storage directory
--genesis-json
:File Directory
--delete-all-blocks
: Delete all old block data
Start again
No need --genesis-json
and --delete-all-blocks
order
nodeos --config-dir . --data-dir /mnt/omnidata
Stop node
If it is forced to close nodeos
, an error will be reported the next time it is starteddatabase dirty flag set (likely due to unclean shutdown): replay required
So to safely exit, use the following command
pkill nodeos
If the above error occurs, you need to add parameters to --hard-replay-blockchain
replay the block at startup , which will take a long time
snapshot synchronization
Snapshot, which is snapshot synchronization, is applicable when you need to quickly build a node and do not need the historical data of the previous block. Snapshot synchronization does not require genesis.json
files. When the snapshot is initialized, the block will start to synchronize data from the block backed up by the snapshot, including transaction and block data.
Edit configuration file
Same as full node synchronization.
Download the snapshot backup file
Snapshot backup files can be downloaded from the following two websites
- https://proxy.eosnode.tools [by date]
- http://snapshots.eossweden.org 【By number of blocks】
After the download is complete, unzip, unzip to get a .bin
file
tar -xzvf snapshot-106753286.bin.tar.gz
Initialize the snapshot
Just add the startup command --snapshot
, followed by the bin
path of the unzipped file
nodeos --config-dir . --data-dir /mnt/omnidata --snapshot /mnt/omnidata/snapshot-106753286.bin
Initialization can be completed in about 10 minutes, occupying about 12GB of hard disk
Start again
Start normally
nodeos --config-dir . --data-dir /mnt/omnidata
Stop node
pkill nodeos