spacemeshos / pm

Project management. Meta-tasks related to research, dev, and specs for the Spacemesh protocol and infrastructure.
http://spacemesh.io/
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Design POST service #260

Closed poszu closed 1 month ago

poszu commented 7 months ago

This ticket describes the design of the PoST Service. Requirements for the building blocks and a high level description of the API are defined here. The goal is to operate a PoST service independently of the node and phase the functionality out from the node to this new service. This will be done in multiple steps:

Migrate proof generation to dedicated PoST service

The goal of this step is to move proof generation into the new service. This allows operators to run a dedicated PoST service for proof generation that connects to a non smeshing go-spacemesh node. The node would then use the PoST service for proof generation.

Both the go-spacemesh node and the PoST node share the same smeshing identity; although the PoST node only needs the NodeID / Public Key of the identity.

Requirements

PoST Service:

go-spacemesh:

Run a go-spacemesh node with multiple identities

After proof generation via a dedicated PoST service is implemented, the node shall be extended to allow connections from multiple PoST services. Every of these services represents their own identity and the node needs to check when connection is established which service belongs to which identity they manage

Port initialisation to dedicated PoST service

WiP - lower priority; bullet points:

poszu commented 7 months ago

@fasmat

  • Configuration can specify initialisation parameters: NodeID, Commitment ATX ID, size of PoST, max file size and relevant network parameters (labels per unit, scrypt parameters, etc.)
  • Initialisation parameters do not override existing data, i.e. if initialisation already started postdata_metadata.json takes precedence (and operator is informed about deviations from config via logs)

How about making the initialization parameters optional and:

fasmat commented 7 months ago

How about making the initialization parameters optional and:

  • read them from postdata_metadata.json if not provided,
  • fail if not provided and postdata_metadata.json doesn't exist,
  • fail if provided and doesn't match postdata_metadata.json (quit with an error instead of printing a warning)

Sounds like a reasonable implementation to me 👍