chia_rs icon indicating copy to clipboard operation
chia_rs copied to clipboard

Only pass coin spends to get_conditions_from_spendbundle

Open Rigidity opened this issue 1 year ago • 2 comments

Rigidity avatar Aug 05 '24 17:08 Rigidity

The only reason I can think of to not do this is if we're planning to make get_conditions_from_spendbundle() validate the signature in the future

Personally it's preferable to keep them separate since you often want to validate transactions, compute the cost, or unit test them without actually having valid signatures

Maybe it could be a flag though

Rigidity avatar Aug 06 '24 04:08 Rigidity

Personally it's preferable to keep them separate since you often want to validate transactions, compute the cost, or unit test them without actually having valid signatures

Yeah, there are quite a lot of places where we trust the block to be valid (e.g. if we find it in our DB) but we just want to run it to get at the conditions. Then we don't want to also validate the signatures.

(this needs a rebase now btw)

arvidn avatar Aug 09 '24 06:08 arvidn

Closing for now

Rigidity avatar Aug 21 '24 05:08 Rigidity