Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The existing transaction weights were placeholder values.
This PR updates the weights to be more representative of their cost in
disk and bandwidth usage.
A single input is 57 bytes, and output is 737 B and a kernel is 147 B.
Normalising an input weight to one, an output would be 12.9 and a kernel 2.6.
There is one kernel per transaction; and one header per block. We can't
know what the header contribution is per transaction, but by rounding
the kernel weight to 3, each transaction can "pay" for a little part of
the header.
Rounding the output weight to 13 makes very little difference to
the overall arithmetic.
Overall, this makes every transaction, regardless of number of in- or
outputs roughly the same weight per byte; around 57 ± bytes/weight.
Several tests were updated that used fees in theor assertions to account
for the new weights; typically by reducing the fee per gram specified in
the test transactions.