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

PoS directory not working + Node Restart Error | After update #1701

Open
Lucas749 opened this issue Mar 22, 2024 · 8 comments
Open

PoS directory not working + Node Restart Error | After update #1701

Lucas749 opened this issue Mar 22, 2024 · 8 comments

Comments

@Lucas749
Copy link

Lucas749 commented Mar 22, 2024

Environment

  • Smapp version: 1.4.2
  • OS: Windows 10

Describe the bug

After updating the app lost the reference to the PoS directory. Adding it manually back and also linking it via creating a PoS with the same settings linked to the directory did not work. Getting a node restart error that is not happening if not linked to the old PoS directory.

Steps to reproduce

Unclear - potentially deleting config files and relinking old PoS directory.

Expected behavior

Smeshing should start with previously generated PoS.

Actual behavior

Node restart error (see screenshot and logs below) and not able to relink old PoS directory.

Logs

[app-log.1.4.2.txt](http
spacemesh-log-7c8cef2b.txt
s://github.com/spacemeshos/smapp/files/14729134/app-log.1.4.2.txt)
config.json
node-config.json
node-config.7c8cef2b.json
image

@brusherru
Copy link
Member

You have such an error in the logs:

2024-03-22T22:40:03.112Z	INFO	node	Looking for legacy identity file at `E:\smh\key.bin`
Error: migrating existing identity: file already exists: both C:\Users\lucas\AppData\Roaming\Spacemesh\node-data\7c8cef2b\identities\local.key and E:\smh\key.bin exist

I guess you did upgrade and then downgrade and upgrade again...
So it causes that you have a migrated key and a legacy one, which confuses the node.
So please try to rename E:\smh\key.bin into E:\smh\key.bin.bak and run Smapp again

@Lucas749
Copy link
Author

Thanks for the help. I changed the filename and the error still persists unfortunately.

I did not upgrade and downgrade - sometimes after upgrades the app loses the reference to the PoS data directory when there are issues with the config file (sometimes it's empty).

If I am not linking the PoS directory and let the app create a new one the app works fine. However, I would like to reuse my PoS data as the computation took ages. I guess I have to change the smeshing-opts-datadir variable in the config files for this?

spacemesh-log-7c8cef2b.txt
app-log.1.4.2.txt

@brusherru
Copy link
Member

OK, now your log file contains:

2024-03-23T14:16:22.442Z	FATAL	node	preparing POST initializer failed	{"error": "new initializer: `NodeId` config mismatch; expected: 217f81ff7cf370ed14aab65eb615af53e1f564088d0262b664366feba20f66ad, found: c44f80273d261e429e713a551375a65b4a02f1a94848654b731090e6329a4212, datadir: E:\\smh"}

This means that your local.key contains the wrong key.

Hopefully your E:\smh\key.bin.bak still contains a valid key. Let's try it out:

  1. Rename E:\smh\key.bin.bak back into E:\smh\key.bin
  2. Delete C:\Users\lucas\AppData\Roaming\Spacemesh\node-data\7c8cef2b\identities\local.key
  3. Run Smapp

Hopefully, it will help.
Otherwise, it would mean that you have lost the keys from PoS data somehow and you have to regenerate it.

p.s.
Btw, how did you install an update? Smapp should not lose the reference to the PoS dir.

@Lucas749
Copy link
Author

I changed the keys but now I am stuck on the boot screen. I did not delete any keys so they should still be there and working. Is there anything I need to change in the config files?

image

config.json
node-config.7c8cef2b - Copy.json
node-config - Copy.json

On the update, I updated it in the app but then run into the error with the empty config files again that results into a stuck booting screen.

@Lucas749
Copy link
Author

app-log.1.4.2.txt

@brusherru
Copy link
Member

Could you share spacemesh-logs from the session that Smapp got stuck on this spinning logo?

@Lucas749
Copy link
Author

Lucas749 commented Mar 25, 2024

spacemesh-log-7c8cef2b.txt

No updates on the file

@Lucas749
Copy link
Author

@brusherru:

Could you guide me through where I would need to save which key?

There is a key in the PoS directory which was created with the PoS. Do I maybe have to add this one to a different directory. In general, the architecture of the key retrieval would be helpful so that I can try a few things to fix it.

Generating a new PoS would take 3 weeks ...

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

No branches or pull requests

2 participants