Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Smesher api implementation #23

Merged
merged 68 commits into from
Aug 1, 2021
Merged

Smesher api implementation #23

merged 68 commits into from
Aug 1, 2021

Conversation

avive
Copy link
Contributor

@avive avive commented Apr 25, 2021

Please don't merge yet - WIP

@avive
Copy link
Contributor Author

avive commented May 30, 2021

Trying to subscribe to the PostDataCreationProgress stream from a client results in this error:

$ pos-stream-progress
ERRO 002 13:53:42.368 repl.printPostDataCreationProgress ▶ error reading from post data creation stream: rpc error: code = FailedPrecondition desc = no post data creation session is in progress

Looks like node returns this wrongly. Clients should be able to subscribe to this stream at any time, including before starting to create pos data and node should not return an error on that stream - it should only return pos progress messages on it.

@moshababo
Copy link
Contributor

Looks like node returns this wrongly. Clients should be able to subscribe to this stream at any time, including before starting to create pos data and node should not return an error on that stream - it should only return pos progress messages on it.

As discussed, this protection was removed in the latest implementation. The stream now hangs until session starts.

@moshababo
Copy link
Contributor

c3d85d5 changes:

  • /common/storage.go: os.WriteFile / os.ReadFile -> ioutil.WriteFile / ioutil.ReadFile.
    I’m not sure how it previously passed compilation.
  • Support spacemeshos/api@81ae866 changes, specified here: New Smesher API api#145 (comment)
  • In printPostStatus, remove the reliance on the "pos-data.json" file. The returned status now returns this data, so clients won't need to maintain it for this purpose.

@avive avive changed the title Smesher api implementation (WIP) Smesher api implementation Jul 28, 2021
@avive avive requested a review from moshababo July 28, 2021 16:41
@avive
Copy link
Contributor Author

avive commented Jul 28, 2021

@moshababo - this PR is ready for review

@avive avive merged commit e8f5522 into master Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants