Conversation
Making room for a seprate set of Bitcoin object files.
|
@apoelstra The C code here involves a lot of code to review, and it does take a little while. I found the best way to review the code is to compare each new file to the associated elements version of the file (I used |
|
In 647ff0b: The Maybe we want to change the spec to just abort on overflow here? |
|
Coinbase transactions are not allowed to have extra inputs. Regardless the specification states the fee is taken modulo 2^64, which is well-defined. There is plenty of room in 64 bits to consider values in the range [-money_range, +money_range] if users need to interpret the result as a signed 64 bit value. Edit: In the C implementation we specifically must use unsigned values here since they are the only integer types that have well defined overflow behaviour, even if we want to interpret the result as an signed value. |
Yep, I am familiar with this (and checked your code to make sure there was no signed overflow, which would have been UB).
...well-defined, but could be a footgun. But if there's no way you can get a valid on-chain transaction with overflowing fees, I think it's fine. |
Implement our set of jets for the Bitcoin application of Simplicity.
This also includes defining the transaction environment for the Bitcoin application of Simplicity.