-
Notifications
You must be signed in to change notification settings - Fork 41
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
Workaround for StartSmeshing and NodeID #823
Comments
@noamnelke also note that we have another client - smrepl and users must use it in upcoming devnets until we can ship smapp 0.2. We need to fix post in the node so smeshing will work after restart in smrepl where user updated the node config file. Smrepl is a 100% stateless client so it doesn't keep any post related state or any other user data. |
@avive I don't think this issue applies to |
That's unfortunately not how currently smrepl works. User sets up smeshing via a repl command and is given the code snippet to update the config file and instructions to edit the config file. On next session node takes post data from the config file it is given in startup. |
See my comment here: spacemeshos/smrepl#56 (comment) |
@brusherru one point I just noticed: when you mention the default location, that could work for the common case, but not always. Ideally, the location you copy If it considerably complicates the kludge, we can consider just doing what you wrote, but it will break badly if the user changes from one non-default location to another. Not very common, but nasty behaviour. |
@noamnelke thanks for the attention to detail. I got the same idea when implementing it, so I've already done it using this approach. I'm getting the "previous" You can check out PR, I have written quite detailed comments there: https://github.com/spacemeshos/smapp/pull/824/files#diff-0e9c78b6209a81be37df60ca8f7b90f25717ad80685e4de9c5f5337a64758205R98 |
Right now calling
SmesherService.StartSmeshing
starts creating PoST data usingkey.bin
created on the Node start. On the second App session, Node will try to findkey.bin
file in the PoST data directory and use it. It causes a bug, when the User specifies a custom directory (non default~/post/data
) — it does not containkey.bin
and Node will create a new one there and created PoST data files mismatches the newly created ID. The Node exits with panic:ID mismatch
.Details: spacemeshos/go-spacemesh#2858
In the issue mentioned above, we decided to make a workaround in Smapp until we have implemented big changes in
go-spacemesh
. See spacemeshos/go-spacemesh#2858 (comment)So we need to implement a temporary workaround in the Smapp:
SmesherService.StartSmeshing
) Smapp should check for the existence of thekey.bin
file in the selected directory:StartSmeshing
.~/post/data/key.bin
is not found — update the config and restart the node as wellThe text was updated successfully, but these errors were encountered: