Improving manager transaction batches

This is a very simple protocol change but with nice, visible, improvements:

Currently, a manager operation is actually a list of manager operations which can be transactions, originations, delegations, and key reveals. Every sub-operation includes a gas limit, a storage limit and a fee. The total fee for the operation is the sum of the fees, the total gas for the operation is the sum of the gas etc.

This can be improved in two ways:

  1. gas limits and storage per operation should either be removed, or be made optional, defaulting to the global limit. That way, if I want to send two operations, and I only expect one of them to take up a lot of gas, I can set a limit for the sum of the two whitout knowning which one will consumme the gas. Also, there is absolutely no reason for fees to be defined per sub-operation as opposed to being defined for the batch.

  2. It should be possible for multiple managers to sign a single batch. A bunch of manager operations from Alice and from Bob could form a valid batch, so long as both Alice and Bob sign the batch. Both Alice and Bob would specify their own fee and storage limit which would be added up in the batch. This offers at least two benefits:

a. Makes protocols like coinjoin very easy (though they are already possible using smart-contracts)
b. Makes it super easy to have a different party pay for the fee than the one making the transaction. This is already possible using smart-contracts, but this makes it way easier.

9 Likes

Most batches contain a lot of repetitions of data. Using some form of run-length encoding could improve the compression in many situations. The source can for example be optional (except for in the first sub-operation). If it is not defined, it would just symbolize a repeat of the last defined source in the batch.

Optimizing the way transactions are transmitted and stored on disk doesn’t require a change in the protocol. The only time the size of tx interacts with the protocol is in the maximum blocksize. If that becomes the constraint, optimizing encodings can become worthwhile. I’ve suggested ways to do so in another topic.

1 Like