You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #356: fix: get_padding for larger costs and padding lengths
7871509 fix: get_padding for larger costs and padding lengths (Byron Hambly)
Pull request description:
`Cost::get_padding` previously always assumed only 1 byte for compactsize encoding when calculating required padding size.
For larger differences in cost/budget, this incorrectly resulted in an additional 1 or 2 bytes of padding depending on the difference.
I found this when calculating padding for the SimplicityHL hash loop example, where rust-simplicity was calculating a 7426 byte annex padding while libsimplicity required a 7424 byte padding, since the compactsize encoding requires 2 additional bytes.
See ElementsProject/elements#1539
ACKs for top commit:
ivanlele:
ACK. Ran tests at 7871509
apoelstra:
ACK 7871509; successfully ran local tests
Tree-SHA512: 518d7ba03519c751721f79bae2517e239858c21cac38e6e2b847285653e02bf6d7557dc3e4e68c8b386477314e19c590f7ae50de606c5a8905a630002a00db2e
0 commit comments