Package Relay Proposal



Summary:

The proposal for Package Relay has been discussed for several years. It involves the concept of {announcing, requesting, downloading} packages between nodes on the p2p network. The primary use cases are fee-bumping otherwise-too-low-fee transactions and reducing the amount of orphans. Child-with-unconfirmed-parents packages have properties that make many things easier to reason about. A package containing a child with all of its unconfirmed parents would be sufficient for their use case, according to discussions with various developers of contracting protocols.The proposal consists of two components: a “generic” package relay protocol and an extension of it, child-with-unconfirmed-parents packages, as version 1 package relay. Another version of packages, “tx-with-unconfirmed-ancestors” can be created to extend package relay for eliminating orphans. Nodes may not receive all of the information needed to validate a transaction at once due to the asynchronous nature of a distributed transaction relay network. In such scenarios where a node is aware that it is missing information, a ''receiver-initiated'' dialogue is appropriate.To solve this issue, a set of policies for safe package validation and fee assessment for packages of this restricted topology have been proposed. Bitcoin Core has used ancestor packages instead of individual transactions since v0.13 to evaluate the incentive compatibility of transactions in the mempool and select them for inclusion in blocks. The package relay protocol involves sending a package of transactions, identified by their witness transaction IDs (wtxids), and providing relevant information such as total fees and size. Three new protocol messages are added for use in any version of package relay: sendpackages, getpckgtxns, and pckgtxns. A new inv type, "MSG_PCKG1," and new protocol message, "PCKGINFO1," are added for version 1 packages consisting of one transaction and all of its unconfirmed parents, enabling a child to pay for its otherwise-too-low-fee parents and their mempool conflict(s). A ''child-with-unconfirmed-parents'' package must be sorted topologically, consist of only one transaction and its unconfirmed parents, include all unconfirmed parents, and have no conflicts. Gloria Zhao, a Bitcoin Core developer, has proposed a new package relay protocol for transaction relay in the Bitcoin network. The proposal aims to improve efficiency and reduce bandwidth requirements in transaction relay by allowing for the transmission of multiple transactions as a single package. According to Zhao, the package relay protocol is an extension of the existing transaction relay protocol (BIP 152) and builds upon years of work by many others, including Suhas Daftuar and Antoine Riard. The protocol specifies a set of P2P messages that can be used to announce, request, and transmit packages of transactions. The package relay protocol is backward compatible with older clients, and clients implementing this protocol will only attempt to send and request packages if agreed upon during the version handshake. Clients using BIP330 reconciliation-based transaction relay (Erlay) are also able to use package relay without interference. Zhao hopes that the proposal will improve transaction relay efficiency and reduce bandwidth requirements in the Bitcoin network. She acknowledges the contributions of many others in the development of the proposal, including Suhas Daftuar and Antoine Riard.


Updated on: 2023-06-15T20:51:48.493561+00:00