Posted by AntoineP
Apr 9, 2025/16:06 UTC
The email provides a thoughtful critique and suggestions for enhancements to a proposed Bitcoin Improvement Proposal (BIP) draft, specifically addressing concerns related to the implementation of spillover effects across transaction inputs. The sender acknowledges the elegance and potential utility of the CCV
mechanism but raises concerns about introducing additional spillover effects through input amount checks. They note that while spillover effects already exist via CLTV
, increasing their presence might not be advisable. Instead, they propose an alternative approach that involves using a form of indirection similar to CSV
, whereby constraints on output amounts would be enforced through a new field in each transaction input, possibly within the annex section. This field would list constraints (either to sweep or deduct amounts) for each input, specifying constraint types, output indexes, and optional amounts.
The suggestion includes implementing a validator to examine the transaction inputs before script execution, akin to how relative timelocks function. This validator would determine the required value for each referenced output based on the constraints specified in the annex. For instance, the "deduct" constraint type would indicate the amount to be deducted from a specific output. Additionally, the email suggests that this functionality should be distinct from the CCV
opcode to enhance its utility by allowing it to be combined with other features.
To illustrate these concepts, the sender has created a proof of concept (PoC) on a branch of the Bitcoin Core v29.0 repository, available at here. Although described as a quick and dirty PoC rather than a formal proposal, it serves to demonstrate the practical application of the suggested changes. The implementation covers various transaction semantics such as "1-to-1", "many-to-1", and "send partial amount and aggregate", which are demonstrated through a unit test. Instructions for cloning the repository, building the project, and running the test are provided, offering a hands-on way to evaluate the proposal's feasibility and effectiveness.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback