spacemeshos / go-spacemesh

Go Implementation of the Spacemesh protocol full node. 💾⏰💪
https://spacemesh.io
MIT License
749 stars 212 forks source link

Failure to load p2p id from store on node start #1890

Closed avive closed 2 years ago

avive commented 4 years ago

Platform: OS X. Node: v0.1.3. App: v0.0.4 RC.

  1. Clean install app (no local data) and run it - let is start syncing.
  2. Observe the created p2p id in store.
  3. Quit the app and wait for node to cleanup and shut down.
  4. Start app again and observe the logs.

Result: Node looks for the p2p id in the wrong dir (observer .DS_Store in the path. Fails to find it and creates a new p2p id.

Expected: Node to find persisted p2p id and use it.

020-03-11T08:40:22.262+0200 WARN 628de.p2p failed to load p2p identity from disk at /Users/avive/Library/Application Support/Spacemesh/spacemeshtestdata. creating a new identity, err:tried to read node from non-existing path (/Users/avive/Library/Application Support/Spacemesh/spacemeshtestdata/p2p/nodes/.DS_Store/id.json)

avive commented 4 years ago

@barakshani @y0sher @IlyaVi

avive commented 4 years ago

If this is not reproducible w app 0.0.3 then try the 0.0.4 RC from here: https://storage.googleapis.com/smapp/0.0.4/Spacemesh-0.0.4_rc.dmg

y0sher commented 4 years ago

interesting, we read all sub-directories under data-dir/p2p/nodes and take the first one. probably we should ignore .DSStore or any other . hidden dir