Closed segfault-magnet closed 1 month ago
Regarding the naming: with_variable_output_policy
is good. However, determine_missing_contracts
could be misleading because we will determine
them and add them to the outputs. So maybe something like fix_missing_contracts
or determine_and_update_missing_contracts
...
Regarding the naming:
with_variable_output_policy
is good. However,determine_missing_contracts
could be misleading because we willdetermine
them and add them to the outputs. So maybe something likefix_missing_contracts
ordetermine_and_update_missing_contracts
...
Yeah, I was (and maybe still am) on the fence about determine_missing_contracts
. Maybe just update_missing_contracts
? update
indicates it will mutate the inner stuff and also does some magic underneath.
Thing is previously it was called "estimate_tx_dependencies" that also didn't have anything claiming mutability.
I share the concern but have no satisfactory name that isn't a kilometer long.
maybe discover_missing_contract_inputs
?
closes: #1380 The number of variable outputs is now determined by filling the dry-run tx with as much variable outputs as the node will allow (
consensus_params.tx_params.max_ouputs
-whatever other outputs are already present
) and counting the number ofTransferOut
receipts made by the dry run.I've checked with the core devs, ideally we'd be looking at the
tx
outputs themselves but since the dry run endpoint doesn't return atx
this is the next best thing since onlyTRO
instructions require a variable output attow.Breaking changes
.append_variable_outputs(n)
is replaced by.with_variable_output_policy(VariableOutputPolicy::Exactly(n))
..estimate_tx_dependencies(max_attempts)
has been replaced with.determine_missing_contracts(max_attempts)
and will only add the missing contract inputs and no longer estimate variable outputs. To estimate variable outputs you should now add.with_variable_output_policy(VariableOutputPolicy::EstimateMinimum)
Checklist