Repository navigation
Functions for retrieving AssetId and Amount - #61
aritkulova wants to merge 7 commits into
Conversation
1c55501 to
50b3c84
Compare
LesterEvSe
left a comment
There was a problem hiding this comment.
Let's start with the is_input_index: bool parameter in amount.simf, asset_id.simf and asset_id_with_amount.simf.
We don't need it. Let's implement these getters the same way as in the price-oracle helper file: one function per jet, with jet::input_* / jet::output_* called directly.
The main reason is that we don't want users to pay for the match and extra is_input_index: bool argument. Pruning doesn't help: the unused branch is replaced by a 32-byte hash, which is bigger than the branch itself. In my measurement, a single input getter is 140 bytes with the match and 91 bytes without it, and each call costs about 1,500 mWU more to run.
So, please, remove the is_input_index helpers from all three files (get_explicit_* and get_confidential_*: six functions in total), and write the input and output variants directly.
renamed get_current to get_explicit and get_confidential for consistency
8dcf09c to
7762fc9
Compare
added negative tests; added witness for parity bit; utxo order in a tx is now deterministic; small cleanups
7762fc9 to
cb2761a
Compare
Resolves #32.
Since currently enums are not supported in multi-file programs, enum
IndexTypeis replaced with theis_input_index: boolparameter.