Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKB node sync pauses because connected peers’ heights are not the latest #4714

Open
sunchengzhu opened this issue Nov 14, 2024 · 0 comments
Labels
m:sync module: ckb-sync t:bug Type: This doesn't seem right.

Comments

@sunchengzhu
Copy link

sunchengzhu commented Nov 14, 2024

Bug Report

Current Behavior

I am a Neuron wallet user and have been maintaining a CKB full node for a long time, meaning I regularly start the CKB node via Neuron to sync the block height. I’ve noticed that the block height stays at the latest height of the connected peers, but their heights are not the most recent. Restarting does not resolve this issue. Does CKB have a mechanism to ensure I connect to nodes with the latest heights for syncing data?

curl -s -X POST 127.0.0.1:8114  -H 'Content-Type: application/json' -d '{ "id": 42, "jsonrpc": "2.0", "method": "sync_state", "params": [] }' | jq
curl -s -X POST 127.0.0.1:8114  -H 'Content-Type: application/json' -d '{ "id": 42, "jsonrpc": "2.0", "method": "get_peers", "params": [] }' | jq | grep last_common_header_number
{
  "jsonrpc": "2.0",
  "result": {
    "assume_valid_target": "0xca44ae8f7bc12ba8eab3224cbe3156c913e2284693e36dc1d01e4d30f362f3c2",
    "assume_valid_target_reached": true,
    "best_known_block_number": "0xde240b",
    "best_known_block_timestamp": "0x19329cd04a1",
    "fast_time": "0x3e8",
    "ibd": true,
    "inflight_blocks_count": "0x0",
    "low_time": "0x5dc",
    "min_chain_work": "0x3314412053c82802a7",
    "min_chain_work_reached": true,
    "normal_time": "0x4e2",
    "orphan_blocks_count": "0x1f",
    "orphan_blocks_size": "0x15d22"
  },
  "id": 42
}
        "last_common_header_number": "0xdba471",
        "last_common_header_number": "0xdba49e",
        "last_common_header_number": "0xdba471",
        "last_common_header_number": "0xdba471",
        "last_common_header_number": "0xdba471",
        "last_common_header_number": "0xdba471",
        "last_common_header_number": "0xdba471",
        "last_common_header_number": "0xdba471",
./ckb-cli rpc get_tip_header --output-format json | jq -r '.number'
14394526

14394526 = 0xdba49e

Expected Behavior

CKB node syncs to the latest, thus making Neuron usable.

Environment

  • CKB version:ckb 0.117.0 (4920ecf 2024-07-29)
  • Chain: mainnet
  • Operating system: macOS 15.0.1
  • Arch: aarch64
  • Installation: GitHub Release

Additional context/Screenshots

addr_manager.txt

The DB file could not be uploaded to the issue, so it was renamed with a .txt suffix.

@sunchengzhu sunchengzhu added the t:bug Type: This doesn't seem right. label Nov 14, 2024
@eval-exec eval-exec added the m:sync module: ckb-sync label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
m:sync module: ckb-sync t:bug Type: This doesn't seem right.
Projects
None yet
Development

No branches or pull requests

2 participants