Potential long-range attack: block not in finalized chain

Issue Report

Environment

  • Operating System: Ubuntu 20.04
  • CPU Architecture: amd64 (4 core)
  • RAM: 8G
  • Storage: 200G
  • Plot Size: 100G
  • Subspace Deployment Method: CLI

Problem

I started sync from scratch but suddenly this error occured and sync process stucked @Support-L2

2023-04-19T11:57:20.838798Z  INFO substrate: ⚙️  Syncing  0.0 bps, target=#295185 (48 peers), best: #5056 (0xdad9…b3bc), finalized #4956 (0xe381…b721), ⬇ 18.4MiB/s ⬆ 60.1kiB/s
2023-04-19T11:57:25.840501Z  INFO substrate: ⚙️  Syncing  0.0 bps, target=#295185 (48 peers), best: #5056 (0xdad9…b3bc), finalized #4956 (0xe381…b721), ⬇ 23.6MiB/s ⬆ 17.0kiB/s
2023-04-19T11:57:28.965763Z  WARN sc_service::client::client: Block import error: Potential long-range attack: block not in finalized chain.
2023-04-19T11:57:28.970842Z  WARN sync: 💔 Error importing block 0x724b3117ccdddaad1ff06c97d4d4565ad3d5d9e2148e58f4c8b4e178b0a6a16d: consensus error: Import failed: Potential long-range attack: block not in finalized chain.
possible Instant clock skew detected: a poll's end timestamp was before its start timestamp
start = Instant { tv_sec: 818721, tv_nsec: 813215351 }
  end = Instant { tv_sec: 818721, tv_nsec: 813215011 }
2023-04-19T11:57:29.422692Z  WARN sc_service::client::client: Block import error: Potential long-range attack: block not in finalized chain.
2023-04-19T11:57:29.423461Z  WARN sync: 💔 Error importing block 0x724b3117ccdddaad1ff06c97d4d4565ad3d5d9e2148e58f4c8b4e178b0a6a16d: consensus error: Import failed: Potential long-range attack: block not in finalized chain.
2023-04-19T11:57:30.841641Z  INFO substrate: ⚙️  Syncing  0.0 bps, target=#295195 (48 peers), best: #5056 (0xdad9…b3bc), finalized #4956 (0xe381…b721), ⬇ 18.4MiB/s ⬆ 47.5kiB/s
2023-04-19T11:57:35.843154Z  INFO substrate: ⚙️  Syncing  0.0 bps, target=#295195 (49 peers), best: #5056 (0xdad9…b3bc), finalized #4956 (0xe381…b721), ⬇ 23.7MiB/s ⬆ 15.3kiB/s
2023-04-19T11:57:38.354322Z  WARN sc_service::client::client: Block import error: Potential long-range attack: block not in finalized chain.
2023-04-19T11:57:38.361918Z  WARN sync: 💔 Error importing block 0x724b3117ccdddaad1ff06c97d4d4565ad3d5d9e2148e58f4c8b4e178b0a6a16d: consensus error: Import failed: Potential long-range attack: block not in finalized chain.
2023-04-19T11:57:38.805557Z  WARN sc_service::client::client: Block import error: Potential long-range attack: block not in finalized chain.
2023-04-19T11:57:38.808045Z  WARN sync: 💔 Error importing block 0x724b3117ccdddaad1ff06c97d4d4565ad3d5d9e2148e58f4c8b4e178b0a6a16d: consensus error: Import failed: Potential long-range attack: block not in finalized chain.
2 Likes

@nazar-pc Havent seen this one prior, wanted to bring to your attention.

The node somehow ended up being on a fork. Anything special about the way you set it up?

No ser I wiped and start over because of some reasons. I used wipe command and wiped everything. CLI version is 0.3.3

If you check your best block 5056 in explorer, you’ll see that canonical hash is different from what you see there.
Let’s monitor if this happens more often for users. And if you have complete logs since node started, please send them to me.

https://transfer.sh/9JMxK7/fork_cli_logs.tar.gz

Another user described a similar error @ImmaZoni @nazar-pc

Environment

Another Screenshot:

Thanks for the report Ryan, though the main issue on this one is not the time clock skew, but rather the long range attack error

2023-04-19T11:57:29.422692Z  WARN sc_service::client::client: Block import error: Potential long-range attack: block not in finalized chain.
2023-04-19T11:57:29.423461Z  WARN sync: 💔 Error importing block 0x724b3117ccdddaad1ff06c97d4d4565ad3d5d9e2148e58f4c8b4e178b0a6a16d: consensus error: Import failed: Potential long-range attack: block not in finalized chain.

The time skew error, is more of a warning that shouldn’t necessarily indicate an issue.

I would get more detailed logs from the user in question.

1 Like

Unfortunately those logs do not contain the start of the issue, I’d need to see initial sync before it got stuck.

Interesting thats all I got I directly compressed the whole logs folder cuz of that I did not checked