Pay budget payments in one block
Motivation
When miners don't agree which nodes to pay it might end up with different miners pay using different finalized budgets. In this case we may have missed budgets and double paid budgets. Another issue here is that during the superblock payments miners don't pay MNs and SNs so we'll have just one block missing MNs and SNs.
Proposal
Implement superblock payments in one block. In general atomic operation is more stable and predictable.
Development plan
-
Try to create unit test for
CBudgetManager::FillBlockPayee()
-
Modify
CBudgetManager::FillBlockPayee()
andCFinalziedBudget::IsTransactionValid()
to make payments in a single block
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information