consider if/how to support syntax for zero-padding bytes to buy contract compute budget
in the docs we suggest zero-byte padding but offer no native way to do this
Buying compute budget
Since longer input scripts allow for a larger compute budget, some contracts use zero-padding (adding non-functional bytes) to "buy" more computation power without changing logic. You can find the exact op-cost per operation in the op-cost-table.
we could do it with an unused modifier for function args as proposed in #125
contract Example() {
function spend(int a, int b, bytes unused zeroPadding) {
require(verify(a, b));
}
}
nice thing is that it is flexible per function and uses a generally requested keyword, not something "buy compute padding" specific
also it fits nicely into the current artifact and SDK structure
consider if/how to support syntax for zero-padding bytes to buy contract compute budget
in the docs we suggest zero-byte padding but offer no native way to do this
we could do it with an
unusedmodifier for function args as proposed in #125nice thing is that it is flexible per function and uses a generally requested keyword, not something "buy compute padding" specific
also it fits nicely into the current artifact and SDK structure