EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.28k stars 3.6k forks source link

Main network synchronization delay #8366

Closed zhengerkui closed 4 years ago

zhengerkui commented 4 years ago

Since the 17th, my node and the main network block have been delayed for four minutes, and can't be synchronized,Who has the same problem as me

matthewdarwin commented 4 years ago

You need a faster CPU.
Maybe try to reduce number of peers and increase number of net threads.

taokayan commented 4 years ago

@zhengerkui can you provide your CPU model/usage, and network throughput?

lambda2003 commented 4 years ago

@matthewdarwin @taokayan Mine is slow too. My node may not catch up the latest block. :( Below is my system info and config.in). Any help/suggestion??

EOS Version: 2.0.3

AWS EC2 CPU: 8 Memory: 32GB HDD: 2T IOPS : 1500

=========================== config.ini

wasm-runtime = eos-vm-jit eos-vm-oc-cache-size-mb = 340 eos-vm-oc-compile-threads = 2 eos-vm-oc-enable = true sync-fetch-span = 200

chain-state-db-size-mb = 1229200 reversible-blocks-db-size-mb = 3400

read-mode = read-only validation-mode = light filter-on = http-server-address = 0.0.0.0:8888 access-control-allow-origin = access-control-allow-headers = * http-validate-host = false p2p-listen-endpoint = 0.0.0.0:9876

p2p-peer-address = p2p.eoseoul.io:9876 p2p-peer-address = p2p-seoul.mainnet.eosnodeone.io:9976 p2p-peer-address = p2p-eos.whaleex.com:9876 p2p-peer-address = bp.antpool.com:443 p2p-peer-address = fullnode.eoslaomao.com:443 p2p-peer-address = p2p.eos.bitspace.no:9876 p2p-peer-address = p2p.genereos.io:9876 p2p-peer-address = peer.eosn.io:9876 p2p-peer-address = peering.mainnet.eoscanada.com:9876 # Montreal, Canada p2p-peer-address = publicnode.cypherglass.com:9876

p2p-peer-address = p2p.bitmars.one:8080 p2p-peer-address = seed.eoscleaner.com:19876 p2p-peer-address = eos.unlimitedeos.com:15555 p2p-peer-address = mainnet.eosamsterdam.net:9876

p2p-max-nodes-per-host = 150 allowed-connection = any max-clients = 200 connection-cleanup-period=30 max-cleanup-time-msec=10 max-transaction-time = 3200

plugin = eosio::http_plugin plugin = eosio::chain_api_plugin plugin = eosio::history_plugin plugin = eosio::history_api_plugin plugin = eosio::net_api_plugin plugin = eosio::net_plugin

Question 2: I know history_plugin is deprecated. If I remove history plugin, which plugin is used?? Actually I need transaction history data. It may be "state_history_plugin"

Question 3: I'm not using mongoDB currently. If I set MongoDB, then do I need to get all blocks again?

Thank you for your help.

heifner commented 4 years ago

With filter-on = * you will not be able to sync up to current with this configuration. At this point, maybe with any configuration as you would need TBs of ram.

mongo_db_plugin is an alternative to history_plugin for storing transaction traces. mongo_db_plugin & history_plugin are both deprecated and are not recommended for use.

Depending on your needs I would look into the state_history_plugin and the new trace_api_plugin. What history information do you require?

lambda2003 commented 4 years ago

@heifner Thank you for your advice and suggestion.

In my case, I need transaction history data.

I changed my setting little bit. remove history plugin and added state_history_plugin. Also add mongo_db_plugin. remove "filter-on = *".

wasm-runtime = eos-vm-jit eos-vm-oc-cache-size-mb = 340 eos-vm-oc-compile-threads = 2 eos-vm-oc-enable = true sync-fetch-span = 500 abi-serializer-max-time-ms = 15000

chain-state-db-size-mb = 1229200 reversible-blocks-db-size-mb = 340

*mongodb-uri = mongodb://127.0.0.1:27017 mongodb-queue-size = 2048 mongodb-abi-cache-size = 2048 mongodb-block-start = 1 mongodb-store-transactions = 1 mongodb-store-transaction-traces = 1 mongodb-filter-on = mongodb-store-action-traces = 1**

read-mode = read-only validation-mode = light

http-server-address = 0.0.0.0:8888 access-control-allow-origin = access-control-allow-headers =

http-validate-host = false p2p-listen-endpoint = 0.0.0.0:9876

p2p-peer-address = p2p.eoseoul.io:9876 p2p-peer-address = p2p-seoul.mainnet.eosnodeone.io:9976 p2p-peer-address = p2p-eos.whaleex.com:9876 p2p-peer-address = bp.antpool.com:443 p2p-peer-address = fullnode.eoslaomao.com:443 p2p-peer-address = mars.fnp2p.eosbixin.com:443 p2p-peer-address = p2p.eos.bitspace.no:9876 p2p-peer-address = p2p.genereos.io:9876 p2p-peer-address = peer.eosn.io:9876 p2p-peer-address = peer.main.alohaeos.com:9876 p2p-peer-address = peering.mainnet.eoscanada.com:9876 # Montreal, Canada p2p-peer-address = publicnode.cypherglass.com:9876 p2p-peer-address = mainnet.bepal.io:8866 p2p-peer-address = mainnet.eos.ren:9376 p2p-peer-address = mainnet.eosarabia.org:3571 p2p-peer-address = mainnet.eoscalgary.io:5222 p2p-peer-address = mainnet.eoseco.com:10010 p2p-peer-address = mainnet.eosoasis.io:9876 p2p-peer-address = api-full1.eoseoul.io:9876 p2p-peer-address = api-full2.eoseoul.io:9876

p2p-max-nodes-per-host = 5 allowed-connection = any max-clients = 50 connection-cleanup-period=30 max-cleanup-time-msec=10 max-transaction-time = 3200

plugin = eosio::http_plugin plugin = eosio::chain_api_plugin plugin = eosio::net_api_plugin plugin = eosio::net_plugin plugin = eosio::mongo_db_plugin plugin = eosio::state_history_plugin

heifner commented 4 years ago

The state_history_plugin is a replacement for the deprecated mongo_db_plugin. If you need all transaction data I would run the state_history_plugin or the trace_api_plugin. You will need way more than 2 TB of disk space. The block_log itself is around 1 TB and the state_history_plugin storage is greater than that. I have no idea what mongo storage requirements are at these days. Back when we were running one it was up to 8 TB and that was months ago.

lambda2003 commented 4 years ago

@heifner Thank you. OK. I turn off mongo_db_plugin. If I turn off state_history_plugin, do you think my sync speed may go up?? - I may get transaction history throughout eosnation hapi.

My another EOS core is just using the latest snapshot from eossweden. But it seems slow too. :(

heifner commented 4 years ago

It will be faster without state_history_plugin.

lambda2003 commented 4 years ago

@heifner Thank you very much for your advice and comment. 👍

I just removed deprecated plugins and then sync speed seems going well. :) I'm 1,000,000 block behind now. I will keep posting my result here. Thank you.

lambda2003 commented 4 years ago

FYI. Mine is 200,000 block behind now. (3/23). Sync is going well.