spacemeshos / go-spacemesh

Go Implementation of the Spacemesh protocol full node. 💾⏰💪
https://spacemesh.io
MIT License
752 stars 212 forks source link

ATX: handle different phase shifts from poet servers #3816

Open countvonzero opened 1 year ago

countvonzero commented 1 year ago

Description

see https://github.com/spacemeshos/go-spacemesh/issues/3773 for context

countvonzero commented 1 year ago

a summary of discussions so far

from @poszu image (1)

It seems that having poet A and B with different phase shift allows for registering in poet later, 
possibly giving more time for POST proof. BUT once you are on B it's hard to switch back to 
an earlier poet A.

So naturally nodes would fall behind and accumulate in the latest poet (like always the last bus 
at night is filled up with ppl :P)

Unless the poet B had a longer cycle gap, which would probably allow for switching back to A

from @noamnelke image (2)

you’re absolutely right, Bartosz, but it’s slightly more complex. This will indeed create an incentive 
to slowly drift towards the end of the epoch which is bad for us, but slow smeshers will also be able 
to skip an epoch to switch back to A

I think we should avoid phased PoETs until we can: (1) incentivize temporally distributing ATXs and 
(2) have a good mechanism in the node for selecting which PoETs to register with 
(or even better: have a PoET service that decides for the node).

you’re supposed to finish your post proof within the cycle gap, like the green squares
but if you’re too slow you can do what the red does.
you’ll have to skip an epoch from time to time and only be eligible 2 out of every 3 epochs.

important to note that the more phases are available, the fewer epochs slow smeshers will need to 
skip (up to a certain number). but since there’s no incentive to stay in the same phase until you skip 
an epoch,  we can expect the later phases to be more full and that’s not too great for the network. 

The problem is that if everyone (or almost everyone) posts their ATX in the last phase then we only 
have the time from that point to the end of the epoch to gossip and validate all those ATXs.

that’s why I think that incentivizing smeshers to each pick a different phase and stick with it is 
important before having phased PoETs