elements icon indicating copy to clipboard operation
elements copied to clipboard

Node crashes when calling "blindrawtransaction" on a 0-valued non-OP_RETURN output

Open apoelstra opened this issue 1 year ago • 3 comments

elementsd: blind.cpp:621: int BlindTransaction(std::vector<uint256>&, const std::vector<uint256>&, const std::vector<CAsset>&, const std::vector<long int>&, std::vector<uint256>&, std::vector<uint256>&, const std::vector<CPubKey>&, const std::vector<CKey>&, const std::vector<CKey>&, CMutableTransaction&, std::vector<std::vector<unsigned char> >*): Assertion `rangeresult' failed.

We don't really care about blindrawtransaction but we probably shouldn't crash.

apoelstra avatar Apr 24 '23 03:04 apoelstra

Is it fine to return an error, or should it be possible to blind the 0-valued non-OP_RETURN output ?

delta1 avatar May 03 '23 13:05 delta1

@delta1 fine to return an error. Consensus rules forbid having a blinded 0-valued non-RETURN output.

apoelstra avatar May 03 '23 13:05 apoelstra

Cool, I'll put in a PR for that when I have a spare cycle

delta1 avatar May 03 '23 14:05 delta1