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

Support for storage size increment / decrement #253

Open pigmej opened 9 months ago

pigmej commented 9 months ago

There are a few cases when storage size can be changed. https://github.com/spacemeshos/pm/issues/209 added support for PoST size changes on the protocol level. This ticket outlines the requirements to the implementation of PoST size changes.

When implementing PoST size changes the upcoming changes to PoET (phased PoET) should be considered: https://github.com/spacemeshos/pm/issues/215

Manual Resizing

Decrease

The user should be able to decrease their reported storage on request. It should become effective with the publication of the next ATX, i.e. if the user decreases their PoST in epoch N it shall become effective in epoch N+1.

see also: https://github.com/spacemeshos/go-spacemesh/issues/3773#issuecomment-1339597893

Increase

PoST increases will go into effect in epoch N+2 (where epoch N is the epoch where the initialization of the additional PoST finished). The ATX published in epoch N will "announce" the size increase while the ATX in epoch N+1 proves it. This means by epoch N+2 a smesher is first able to receive rewards for the increased size. This similar to how in epoch 0 all Smeshers initialize their post and in epoch 2 they are first eligible for rewards.

see also: https://github.com/spacemeshos/go-spacemesh/issues/3773#issuecomment-1374781236

Automatic resizing

(mafa: should be its own ticket)

Detecting data corruption

The PoST module and postcli need to be extended to be able to assess the health of PoST data. This that includes, but is not limited to:

Manual decrease and increase of PoST should be implemented before data corruption detection, but the implementation for resizing should already consider the impacts of it.

Automatic decrease when not enough time is left with cycle-gap

That requires coordination with POET and plausible https://github.com/spacemeshos/pm/issues/215 It is also possible that the user started the node too late etc. There are two ways:

For simplicity, we should focus on that as the last one.

fasmat commented 9 months ago

Updated description. I think we should split this into 2 (maybe 3) epics:

robandfender commented 9 months ago

A very anticipated feature, I hope Smapp Ver1.1.0 will launch this feature