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

Multiple post services per node - multiple ATX #261

Closed pigmej closed 3 weeks ago

pigmej commented 7 months ago

Motivation

To support:

We need to support multiple post services per node.

This epic describes the state with supporting multiple keys in single go-spacemesh instance, there is separate discussion with research how we could make protocol changes to use single consensus key, single atx but multiple niposts.

Tasks

After https://github.com/spacemeshos/pm/issues/259 is completed (or in an acceptable enough state) we will need the following:

Details are in the tasks already.

HVNC1 commented 7 months ago

a single ath carries the risk of losing rewards for all post files in case of failure, while an ath for everyone seems safer at first glance

HVNC1 commented 7 months ago

it would also be good to consider the balance of processor power if the files are of different sizes and for example start the phase using the CPU first for the largest files so that they have the most time to read proofs

Stizerg commented 7 months ago

I will add my entire suggestion from https://discord.com/channels/623195163510046732/1151465823710494740

  1. Configurable delay for k2pow stage. If we know for how long the CPU will be busy by another node we can set it in config. e.g. "pow_delay": 3600 ~
  2. We need each node to indicate what it's doing atm, it can be done a similar way as --filelock. For example, if we have 3 nodes: node1: 5TiB on e:\ node2: 4TiB on f:\ node3: 1TiB on e:\ ~ node1 starts it poet gap's routine, it sets "_pow_locknode1" node2 and node3 are waiting (considering they have "_powdelay" set) node1 starts to read POS, releases "_pow_locknode1" and sets "_read_locknode1" node2 detects it and starts it's routine, setting up "_pow_locknode2" node3 is waiting node2 starts to read POS, releases "_pow_locknode2" and sets "_read_locknode2" node3 detects it and starts it's routine, setting up "_pow_locknode3" when node3 is ready to start reading POS it will wait for "_read_locknode1" to be released

Depending on configuration the logic can be different.

So, the target is to use resources of computer the most effective way.

pigmej commented 3 weeks ago

This feature debuted with the 1.4 series.

There is a demo available at: https://github.com/spacemeshos/multiple_post_services_demo and docs at https://docs.spacemesh.io/docs/start/smesher/post_1n

The remaining functionality would be to dynamically reconfigure the identities: https://github.com/spacemeshos/go-spacemesh/issues/5090