-
Notifications
You must be signed in to change notification settings - Fork 48
Description
In the rawElementsInput struct we have an annex field whose type is const rawElementsBuffer*. But rawElementsBuffer is already a pointer type. Every other instance of rawElementsBuffer is used directly, rather than through a const pointer.
In Elements interpreter.cpp this requires allocating a separate vector simplicityRawAnnex. In Elements we have some assurance that none of the data structures passed to Simplicity will outlive this vector, but it's hard to make this assurance in the general-purpose Rust library. (Our current code has had a TODO for years to support the annex field, which is how we didn't notice this awkwardness.)
I propose replacing the pointer with an inline buffer, as is done for scriptPubKey,the rangeproof and surjection proof, etc.