Switching back to Mining from MiningStopping in same round

Why resuming mining (startMiningIntention) while having state MiningStopping is currently disabled?
Imagine this scenerio:

  • I have miner with UPS (which will hold miner for even longer than mining round).
  • Power wents down.
  • Automatically submit transaction stopMiningIntention()
  • Before mining round ends (I still have MiningStopping state) power is back
  • I would like to ā€œcancelā€ stopping mining with startMiningIntention() but currently it is not allowed

Could that be changed? Or there are some reasons why it canā€™t be done?

EDIT:
@DEVs
If I may suggest something - you could add endBlock or roundSize to phala.round. Currently it is 600 but it may vary in future, right?

1 Like

I donā€™t want to admit but actually we would add the support of this if we have solved a problem. The state ā€œMiningStoppingā€ doesnā€™t contain the starting height. So whenever we switch to the stopping state, the starting height is dropped in the blockchain state. We cannot recover to ā€œMining(startHeight)ā€ later.

This is not so hard to fix, but we see some very basic problems in the overall round design. And it turned out itā€™s very likely that we may abandone the round design completely. In other words, there may not be ā€œmining roundā€ in the future.

The problem of round design is that, itā€™s inevitable that we will have some pending changes accumulating within a round, and bring the computing pressure of the update logic in the first block of the next round. This is acceptable in our testnet, but if we got more miners (like 10k) in the mainnet, the wavefront will be problematic for our blockchain. This is especially a problem in parachain runtime, because it only gives the validators 0.5s to execute the runtime logic.

In the roundless design, we will allow miners to join and leave on-the-fly. But when a miner wants to exit, a cooling down period applies. This will also affect the staking, because we donā€™t want to give the stakers or the miners the opportunity to hurt each other by playing with the protocol.

The new design will come when we announce a big update to the tokenomics design. It should happen in this month.

1 Like

Thx for describing in details. I canā€™t wait for update :wink:

1 Like

领取ēš„굋čƕphaåø1000äøŖļ¼ŒęŒ–ēŸæꌖäŗ†äø€äøŖꘟꜟļ¼Œę˜¾ē¤ŗ仍ē„¶ę˜Æ1000äøŖpha,å¦‚ä½•ę‰čƒ½ēŸ„道ę˜Æå¦ęŒ–ēŸæęˆåŠŸå‘¢