Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

State sync not working on mainnet #161

Closed
Sotatek-SinhVu opened this issue Nov 22, 2019 · 4 comments
Closed

State sync not working on mainnet #161

Sotatek-SinhVu opened this issue Nov 22, 2019 · 4 comments

Comments

@Sotatek-SinhVu
Copy link

Sotatek-SinhVu commented Nov 22, 2019

Here is my config.toml:

# If this node is many blocks behind the tip of the chain, FastSync
# allows them to catchup quickly by downloading blocks in parallel
# and verifying their commits
fast_sync = true

# As state sync is an experimental feature, this switch can totally disable it on core network nodes (validator, witness)
state_sync_reactor = true

# If this node is many days behind the tip of the chain, StateSyncHeight
# allows them to catchup quickly by downloading app state (without historical blocks)
# in parallel and start syncing block afterwards
# <0 - turn off state sync
# =0 - sync from peer's latest height
# >0 - sync from that height
state_sync_height = 50000000

# Only take effect when HotSyncReactor is true.
# If true, will sync blocks use hot sync protocol
# If false, still use tendermint consensus protocol, but can still handle other peers sync request.
hot_sync = false

# The max wait time for subscribe a block.
# Only take effect when hot_sync is true
hot_sync_timeout = "3s"

# It will benefit fullnode and witness who do not need consensus by saving network and cpu resources.
# Recommend the node that is not validator to turn on.
hot_sync_reactor = false

But, when I checked node status, it told me that:

"sync_info": {
    "latest_block_hash": "1CE3F85C0C9E97BE34D8D2825CA662E0CAFAE0DBE314B05F5C4B66019A528640",
    "latest_app_hash": "C3220ED358B68E4AC2DBF652E6DA5F4B06FF12ABFB703C077425204C17C8EE71",
    "latest_block_height": "23485",
    "latest_block_time": "2019-04-18T08:34:44.57135746Z",
    "catching_up": true,
    "index_height": "23484"
},

So, how can I start my node from any block?

@chainwhisper
Copy link
Contributor

hello, @Sotatek-SinhVu

Please set state_sync_height = 0.

@Sotatek-SinhVu
Copy link
Author

hello, @Sotatek-SinhVu

Please set state_sync_height = 0.

@huangsuyu oh yes, it is working now.
But, if I want to specify the starting block height, the current is 50,000,000. Is it possible?
Thank you.

@chainwhisper
Copy link
Contributor

hello, @Sotatek-SinhVu
Please set state_sync_height = 0.

@huangsuyu oh yes, it is working now.
But, if I want to specify the starting block height, the current is 50,000,000. Is it possible?
Thank you.

I'm afraid it's not possible. you can only state-sync from heights with snapshots.

@Sotatek-SinhVu
Copy link
Author

@huangsuyu yes, thank you so much.
I thought I had the answer to my question. So, I will close this issue.
Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants