[bitcoin-dev] Inherited IDs - A safer, more powerful alternative to BIP-118 (ANYPREVOUT) for scaling Bitcoin
jlrubin at mit.edu
Fri Sep 17 16:58:45 UTC 2021
Bitcoin & LN Devs,
The below is a message that was shared to me by an anon account on Telegram
(nym: John Law). You can chat with them directly in the https://t.me/op_ctv
or https://t.me/bips_activation group. I'm reproducing it here at their
request as they were unsure of how to post to the mailing list without
compromising their identity (perhaps we should publish a guideline on how
to do so?).
I'd like to propose an alternative to BIP-118  that is both safer and
powerful. The proposal is called Inherited IDs (IIDs) and is described in a
paper that can be found here . The paper presents IIDs and Layer 2
using IIDs that are far more scalable and usable than those proposed for
(including eltoo ).
Like BIP-118, IIDs are a proposal for a softfork that changes the rules for
calculating certain signatures. BIP-118 supports signatures that do not
commit to the transaction ID of the parent transaction, thus allowing
transactions". In contrast, the IID proposal does not allow floating
transactions, but it does allow an output to specify that child transaction
signatures commit to the parent transaction's IID, rather than its
* If T is a transaction, TXID(T) is the transaction ID of T.
* An output is an "IID output" if it is a native SegWit output with version
and a 32-byte witness program, and is a "non-IID output" otherwise.
* A transaction is an "IID transaction" if it has at least one IID output.
* If T is a non-IID transaction, or a coinbase transaction, IID(T) =
* If T is a non-coinbase IID transaction, first_parent(T) = F is the
referenced by the OutPoint in T's input 0, and IID(T) = hash(IID(F) ||
where F_idx is the index field in the OutPoint in T's input 0 (that is,
input 0 spends F's output F_idx).
IID Signature Validation
* Signatures that spend IID outputs commit to signature messages in which
replace transaction IDs in all OutPoints of the child transaction that
Note that IID(T) can be calculated from T (if it is a non-IID or a coinbase
transaction) or from T and F (otherwise). Therefore, as long as nodes store
calculate) the IID of each transaction in the UTXO set, they can validate
signatures of transactions that spend IID outputs. Thus, the IID proposal
Bitcoin's existing UTXO model, at the small cost of adding a 32-byte IID
for certain unspent outputs. Also, note that the IID of a transaction may
commit to the exact contents of the transaction, but it does commit to how
transaction is related to some exactly-specified transaction (such as being
first child of the second child of a specific transaction). As a result, a
transaction that is signed using IIDs cannot be used more than once or in an
unanticipated location, thus making it much safer than a floating
2-Party Channel Protocols
BIP-118 supports the eltoo protocol  for 2-party channels, which improves
upon the Lightning protocol for 2-party channels  by:
1) simplifying the protocol,
2) eliminating penalty transactions, and
3) supporting late determination of transaction fees [1, Sec. 4.1.5].
The IID proposal does not support the eltoo protocol. However, the IID
does support a 2-party channel protocol, called 2Stage [2, Sec. 3.3], that
arguably better than eltoo. Specifically, 2Stage achieves eltoo's 3
listed above, plus it:
4) eliminates the need for watchtowers [2, Sec. 3.6], and
5) has constant (rather than linear) worst-case on-chain costs [2, Sec.
In general, an on-chain transaction is required to create or close a 2-party
channel. Multi-party channel factories have been proposed in order to allow
fixed set of parties to create and close numerous 2-party channels between
thus amortizing the on-channel costs of those channels . BIP-118 also
supports simple and efficient multi-party channel factories via the eltoo
protocol [1, Sec. 5.2] (which are called "multi-party channels" in that
While the IID proposal does not support the eltoo protocol, it does support
channel factories that are far more scalable and powerful than any
proposed channel factories (including eltoo factories). Specifically, IIDs
support a simple factory protocol in which not all parties need to sign the
factory's funding transaction [2, Sec. 5.3], thus greatly improving the
of the factory (at the expense of requiring an on-chain transaction to
the set of channels created by the factory). These channel factories can be
combined with the 2Stage protocol to create trust-free and watchtower-free
channels including very large numbers of casual users.
Furthermore, IIDs support channel factories with an unbounded number of
that allow all of the channels in the factory to be bought and sold by
(including parties not originally in the factory) with a single on-chain
transaction in a trust-free manner [2, Secs. 6 and 7]. As a result, a single
on-chain transaction can be used in place of thousands, or even millions, of
Lightning or eltoo on-chain transactions. These channel factory protocols
critical use of IIDs and do not appear to be possible with BIP-118.
If IIDs sounds interesting, please take a look at the IID paper . It
many results not listed above, including rules for SVP nodes, protocols for
off-chain channel networks, Layer 2 protocol extensions, support for
(including vaults), and nearly matching lower and upper bounds on
The paper also includes 3 options for how IIDs could be added to Bitcoin
softfork [2, Appendix A]. I'm new to Bitcoin and am not sure which of these
options is best. If anyone finds the IID proposal valuable, I would greatly
appreciate it if they were willing to pick the best option (or invent an
better option) for adding IIDs to Bitcoin and create a BIP for that option.
Hopefully, IIDs will provide a safe way to dramatically scale Bitcoin while
improving its usability.
 BIP-118: https://anyprevout.xyz and
 Scaling Bitcoing with Inherited IDs, by John Law:
iids13.pdf at https://github.com/JohnLaw2/btc-iids
 eltoo: A Simple Layer2 Protocol for Bitcoin, by Decker, Russell &
 The Bitcoin Lightning Network, by Poon & Dryja:
 Scalable Funding of Bitcoin Micropayment Channel Networks, by Burchert,
Decker & Wattenhofer: http://dx.doi.org/10.1098/rsos.180089
Thanks to Ruben Somsen and Jeremy Rubin for their helpful comments.
Also, thanks to Bob McElrath for his original brainstorm that led to the
creation of the IID concept:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bitcoin-dev