Consensus at batch level #193
Replies: 3 comments
-
If the above is done, there is also not much of an incentive to cycle leadership over the federation, because every node is being paid fees for the batches. So leadership could be cycled slowly, and instead, what is cycled are slices of address ranges, basically sharding the ID space to each node in the federation. This also resolves issues with conflict transactions in the same batch. Things are quite simple for the locally proven transactions, but they get a bit harder with on-chain transactions, my first gut feeling is that the leader should do the network transactions, and the shards should be exclusively for the locally proven transactions. And perhaps leadership should be rotated to prevent censorship on on-chain transactions. This needs more thought though. |
Beta Was this translation helpful? Give feedback.
-
Decentralized proving of batches is something that super beneficial - but I've been putting off this for now as design space is very wide and we'll probably need to spend a lot of time on thinking it through and experimenting. One other interesting aspect of it is that distributed batching may significantly reduce amount of data that goes over the network. Specifically, each proven transaction would be somewhere in the range between 50KB - 100KB - vast majority of this being a STARK proof. However, if there is away to aggregate transactions into batches before they are fully propagated through the network, we can get rid of all the proof, except for the batch proof itself. So, a single batch containing 100 transactions would also be roughly 100KB. How to do this correctly is still an open question though. |
Beta Was this translation helpful? Give feedback.
-
I would actually say that we should place a limit (and probably not a big one) on the number of batches that can go into a block. The leader still build one final proof that verifies all included batches and also needs to update account and nullifier databases, and build the note tree for the block. This could be quite a lot of works - and even this may need to be distributed across multiple machines. There are some strategies we can use to simplify this work:
All of these starts to matter when we get to over 100 TPS though - so, we have some time. |
Beta Was this translation helpful? Give feedback.
-
One interesting design choice of miden, is that transactions proofs are aggregated into batches, and later on added to blocks. This allows for parallel batching, which increases throughput and decreases latency. Another interesting design choice, is that sequencers are a cluster of nodes, instead of a single machine. And the batch proving can be delegated to separated machines.
Keeping those two observations in mind, means that once we federate the network, and have multiple sequencers, there will be many machines available for proving, operated by different parties. Ideally these machines should not sit idle because of the consensus protocol. That is to say, we shouldn't really adopt a system were sequencers are elected to seal a single block, and not be able to do work while they are not the leader.
If we agree that every sequencer in the federation should be allowed to use their hardware to proof batches, instead of siting idle, then we have some interesting carry-on effects:
Beta Was this translation helpful? Give feedback.
All reactions