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

Basic NIPST construction flow #714

Merged
merged 4 commits into from Mar 26, 2019
Merged

Basic NIPST construction flow #714

merged 4 commits into from Mar 26, 2019

Conversation

moshababo
Copy link
Contributor

I implemented the basic flow, but was mainly focused on the documentation.
I tried to follow the terminology presented in the papers.

The test is very basic, and is used merely to verify that the package is getting compiled (it won't fail the build since no other package is consuming it yet).

@moshababo
Copy link
Contributor Author

I used the serialized format ([]byte) for most of the proof types, to allow easy hashing, but that will be changed later.

round, err := nb.poetProver.submitChallenge(poetChallenge, nb.duration)
if err != nil {
nb.errChan <- fmt.Errorf("failed to submit challenge to poet service: %v", err)
return
Copy link
Contributor

Choose a reason for hiding this comment

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

should we stop trying to submit a challenge if it fails once? this means that the NipstBuilder will stop all activity and someone will need to manage and restart it, is this the desired behaviour?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We obviously need a different retry mechanisms for different phases, and might introduce also manual actions, but that’s out of scope for this function. It will need to be handled by NIPSTBuilder client.
Now i’m focused mainly on the happy flow, but i’ll add the error handling once we’ll get the persistency and p2p integration working.

nipst/nipst.go Outdated Show resolved Hide resolved
nipst/nipst.go Outdated
type Space uint64

// PostProver provides proving functionality for PoST.
type PostProver interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these APIs should be exported eventually when we integrate this into the actual node flow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since they are already public, do you mean to move them to a separate package?

@moshababo moshababo merged commit f738efa into develop Mar 26, 2019
@moshababo moshababo deleted the nipst branch March 26, 2019 16:39
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.

None yet

2 participants