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

Fix default post-dir: add genesis id into default post-dir path (required as a default location of key.bin) #1216

Merged
merged 3 commits into from
Apr 14, 2023

Conversation

brusherru
Copy link
Member

No issue.

Currently Node panics in case ~/post already has a stale key.bin inside, left from another network.
Currently, it will put it into a subdirectory named with 8 first chars from genesis id.
E.g. ~/post/12345678

@brusherru brusherru self-assigned this Apr 11, 2023
@brusherru brusherru marked this pull request as ready for review April 11, 2023 23:16
@github-actions

This comment was marked as outdated.

monikasmolarek
monikasmolarek previously approved these changes Apr 12, 2023
@brusherru brusherru force-pushed the fix-default-post-dir branch from bca0a8d to be8995b Compare April 12, 2023 17:16
@github-actions
Copy link

Compiled Binaries

@brusherru
Copy link
Member Author

Updates since the first push:

  • proper copy-paste of ~/post/gen-id/key.bin into /user/specified/custom/pos-dir/key.bin
  • fixes for Pause/Resume smeshing and Edit/Delete PoS data: there was a bug in GUI (selectors)

@monikasmolarek
Copy link
Collaborator

monikasmolarek commented Apr 12, 2023

@brusherru is it supposed to put the ~post/gen-id as default directory in POS setup process?
I submitted my review at the same time you posted your comment, so double checking now and saw this
image

@monikasmolarek
Copy link
Collaborator

monikasmolarek commented Apr 12, 2023

+ once the POS set up on Windows, the node got down for a while. Logs attached
app-log.0.3.0-pr.1216.txt
spacemesh-log-eeb970d3.txt

@monikasmolarek monikasmolarek self-requested a review April 12, 2023 18:11
Copy link
Collaborator

@monikasmolarek monikasmolarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the POS screen buttons still don't respond

@brusherru
Copy link
Member Author

is it supposed to put the ~post/gen-id as default directory in POS setup process?

Initially, it was supposed to not have any "default" there, but since Smapp provides the proper default — it's appeared here. But I don't think it is a problem, maybe it is even good to propose a default (especially since it is already used by go-spacemesh), and it is definitely better than adding some new kludges to hide such "default" :)

  • once the POS set up on Windows, the node got down for a while. Logs attached

Interesting stuff, I see that node crashed with panic, and seems the reason is in MeshService/sqlite 🤔
I will ask someone from the core team to check it out. Thanks!

the POS screen buttons still don't respond

It might be the consequence of crashing Node 🤔
Regarding Pause/Delete — going to move code that updates configs before of calling GRPC API to avoid getting stuck in case something wrong with the Node
Resume / edit POS — won't work without working Node

@monikasmolarek
Copy link
Collaborator

@brusherru
yes, I agree, I actually think it's cool to have this path as the default directory, it works perfectly well, so cool - as long as using this directory to create POS and then deleting it doesn't cause any trouble (i.e. when we want to delete and reinit POS)

the POS screen buttons don't work even on the reinstalled smapp (that didn't crash at any point). - noticed on Windows only, I still cannot use POS screen on mac because of this log file permissions modal

@brusherru
Copy link
Member Author

Regarding the "permission error" popup and not responding buttons there are some issues on the go-spacemesh side :(
I've opened two issues related to these problems, check 'em out:

@brusherru brusherru force-pushed the fix-default-post-dir branch from 2c73819 to 83b31fe Compare April 13, 2023 02:18
@github-actions
Copy link

Compiled Binaries

@brusherru
Copy link
Member Author

@monikasmolarek To avoid blocking this PR by existing other bugs in Smapp or go-spacemesh — let's focus on the stuff that this PR fixes. :)

Specifically this PR fixes:

  1. Default directory for key.bin now is ~/post/GEN_ID (where GEN_ID is 8 first chars of genesis id) instead of ~/post/data
  2. As a consequence, key.bin files should not collide between different networks
  3. And therefore, should be no more crashes related to "invalid NodeID/SmesherID"

So, if there are no more problems related to key.bin file — let's merge it and move on ;)

@brusherru brusherru merged commit 669fff7 into develop Apr 14, 2023
@brusherru brusherru deleted the fix-default-post-dir branch April 14, 2023 02:56
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

Successfully merging this pull request may close these issues.

3 participants