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

post init rerun #504

Closed
lrettig opened this issue May 1, 2020 · 12 comments
Closed

post init rerun #504

lrettig opened this issue May 1, 2020 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@lrettig
Copy link
Member

lrettig commented May 1, 2020

Describe the bug

My app lost its peer connections. I restarted it, and after I restarted it, it performed post initialization again (automatically, it didn't ask me to choose a directory again). It appears to have gotten a new node ID.

To Reproduce
Steps to reproduce the behavior:

  1. Install 0.0.7 on windows
  2. Init smeshing
  3. Let node run overnight.
  4. It loses peer connections.
  5. Close the app and click Quit.
  6. Restart the app.

Expected behavior
No need to init post again.

Desktop (please complete the following information):

  • OS: Windows

Additional context

Here you can see the two ID folders in the allocated folder for post data:

image

Full logs here

@avive
Copy link
Contributor

avive commented May 2, 2020

Please share url to access zipped logs - it is very hard to investigate these kind of issues w/o access to the full node logs...

@lrettig
Copy link
Member Author

lrettig commented May 2, 2020

@avive there's a link to the logs at the bottom of my first post ;)

@avive
Copy link
Contributor

avive commented May 2, 2020

Sorry I somehow missed it. Ignore my comment.

@avive avive assigned antonlerner and unassigned IlyaVi May 3, 2020
@avive
Copy link
Contributor

avive commented May 3, 2020

This is a kind of bug that requires an initial investigation by looking at the log and deciding if it is likely an app issue or a go-spacemesh issue or both as it is not clear.

@lrettig
Copy link
Member Author

lrettig commented May 3, 2020

Agree, it might be a go-spacemesh issue

@avive avive added the bug Something isn't working label May 4, 2020
@avive
Copy link
Contributor

avive commented May 4, 2020

@antonlerner

@IlyaVi
Copy link
Contributor

IlyaVi commented May 17, 2020

not related to app

@IlyaVi IlyaVi closed this as completed May 17, 2020
@lrettig
Copy link
Member Author

lrettig commented May 17, 2020

Instead of closing can we transfer this issue to go-spacemesh, if we're sure the issue is on that side? Unless an issue was already opened?

@lrettig lrettig reopened this May 17, 2020
@avive
Copy link
Contributor

avive commented May 17, 2020

We should. It is a potentially a serious issue. I suspect there's logic in go-spacemesh to re-create post with a new smesher id if there's some issue with the existing one as it intercepts the post setup flags passed to it when it starts as 'Please start mining'. It should remember if it has setup post in a previous session (was started or was completed), the smesher id used and report and error if it can't verify the post commitment. The new proposed smesher API assumes this kind of behavior to report issue back to client users so they can decide what to do - e.g. attempt to delete the old commitment and setup a new one. In general, this is also part of separating via the api the smeshing part (mining) and the post commitment management (setting up a commitment).

So, the node should not attempt to start smeshing unless it has a valid commitment setup and when it does it should use it. If user attempts to start the node via flags or api calls to smesh when commitment is not set - the operation should fail. Right now, the node attempts to handle the commitment automatically when it is asked to start smeshing and it hides the commitment status from the api. It should not do that once the new api is implemented.

@avive
Copy link
Contributor

avive commented Jun 21, 2020

@noamnelke @moshababo FYI. I was not able to reproduce this on my nodes. There may be some condition that triggers this bug. Not sure how to progress on addressing this issue.

@noamnelke
Copy link
Member

I think that there's no logic for not using an existing miner id. The miner id should be stored with the private key in the node's datadir. If it's not found a new identity is created. Maybe the datadir changed? @moshababo any other idea?

@brusherru
Copy link
Member

Outdated.
Check out #823 and spacemeshos/go-spacemesh#2858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants