aptos-labs / aptos-ait3

6 stars 9 forks source link

Full node can't sync state with peer #54

Closed hyeongjun-dev closed 2 years ago

hyeongjun-dev commented 2 years ago

After resolved recent network stuck issue, full node revision has been updated to testnet_392dbd870a5dfc8e02503f8b2537903dc259baf1. But after updated to the version, I guess through logs that full node can't sync state.

Attached logs:

{
    "level": "ERROR",
    "source": {
        "package": "state_sync_driver",
        "file": "state-sync/state-sync-v2/state-sync-driver/src/driver.rs:602"
    },
    "thread_name": "state-sync-driver",
    "hostname": "12e1ad392a4b",
    "timestamp": "2022-09-06T02:08:21.092100Z",
    "data": {
        "error": {
            "UnexpectedError": "The requested data is unavailable and cannot be found in the network! Error: Unable to satisfy stream engine: TransactionStreamEngine(TransactionStreamEngine { request: GetAllTransactionOutputs(GetAllTransactionOutputsRequest { start_version: 1, end_version: 3, proof_version: 219812709 }), next_stream_version: 1, next_request_version: 1, stream_is_complete: false }), with advertised data: epoch_ending_ledger_infos: [CompleteDataRange { lowest: 0, highest: 124 }, CompleteDataRange { lowest: 0, highest: 122 }, CompleteDataRange { lowest: 0, highest: 124 }, CompleteDataRange { lowest: 0, highest: 124 }], states: [CompleteDataRange { lowest: 221932194, highest: 222032193 }, CompleteDataRange { lowest: 212470718, highest: 212570717 }, CompleteDataRange { lowest: 221932194, highest: 222032193 }, CompleteDataRange { lowest: 221932196, highest: 222032195 }], synced_ledger_infos: [(Version: 222032193, Epoch: 125, Ends epoch: false), (Version: 212570717, Epoch: 122, Ends epoch: true), (Version: 222032193, Epoch: 125, Ends epoch: false), (Version: 222032195, Epoch: 125, Ends epoch: false)], transactions: [CompleteDataRange { lowest: 72031909, highest: 222032193 }, CompleteDataRange { lowest: 45041156, highest: 212570717 }, CompleteDataRange { lowest: 72031699, highest: 222032193 }, CompleteDataRange { lowest: 72031699, highest: 222032195 }], transaction_outputs: [CompleteDataRange { lowest: 72031909, highest: 222032193 }, CompleteDataRange { lowest: 45041156, highest: 212570717 }, CompleteDataRange { lowest: 72031699, highest: 222032193 }, CompleteDataRange { lowest: 72031699, highest: 222032195 }]"
        },
        "message": "Error found when checking the bootstrapper progress!",
        "name": "driver"
    }
}
JoshLind commented 2 years ago

@devgang-eth, it looks like you wiped all your node data and are starting again? If so, the issue is that the data you're looking for has already been pruned by the rest of the network. To avoid this issue, you'll need to run state sync in fast sync mode (which skips the history). Add the following to your config and restart your node and it should sync:

 state_sync:
     state_sync_driver:
         bootstrapping_mode: DownloadLatestStates

Note: it may take up to 2 hours before you start seeing any increases in synced versions (as it needs to download the latest state first) 😄

hyeongjun-dev commented 2 years ago

@JoshLind Many thanks for your detailed guide :) I wiped all my node's data and restarted with updated to above configuration of fast mode. After updated, It works well now ! I will close the issue