Why does submitpackage require at least two transactions #31085

issue TheBlueMatt openend this issue on October 14, 2024
  1. TheBlueMatt commented at 2:07 pm on October 14, 2024: contributor

    Please describe the feature you’d like to see added.

    I want to call submitpackage and I don’t want to have to check if I have more than one transaction to do it. I’m lazy but that restriction seems arbitrary.

    No response

    Describe the solution you’d like

    No response

    Describe any alternatives you’ve considered

    No response

    Please leave any additional context

    No response

  2. TheBlueMatt added the label Feature on Oct 14, 2024
  3. maflcko added the label RPC/REST/ZMQ on Oct 14, 2024
  4. ismaelsadeeq commented at 9:37 pm on October 14, 2024: member

    It won’t hurt to broadcast a single transaction if it passes consensus and policy checks via submitpackage RPC.

    From the package relay BIP and the policy documentation, I see that a package is defined as a child transaction with its unconfirmed ancestors, topologically sorted.

    I think the intent of the check is to be strict and ensure that what’s being broadcast is a package. As such RPC behavior is correct, as an individual transaction doesn’t qualify as a package based on this definition.

  5. TheBlueMatt commented at 11:03 pm on October 14, 2024: contributor
    From a Bitcoin Core perspective, sure. From the users’ perspective I have a bundle of transactions and I want to get them relayed. They may be a package, they may not, I want Bitcoin Core to figure that out, not me.
  6. stickies-v commented at 10:05 am on October 15, 2024: contributor

    I want to call submitpackage and I don’t want to have to check if I have more than one transaction to do it. I’m lazy but that restriction seems arbitrary.

    I had similar thoughts when reviewing submitpackage a while ago. Forcing the user to use different RPCs based on the number of transactions in a package feels arbitrary and not ergonomic to me. A package with size 1 should be a valid package and accepted as such in the relevant RPCs (slowly obsoleting their single-tx alternatives over time, but that’s a different discussion).

    I see that a package is defined as a child transaction with its unconfirmed ancestors, topologically sorted.

    A tx without unconfirmed ancestors would make for a valid package according to that definition, though.

    Concept ACK.

  7. instagibbs commented at 9:09 am on October 16, 2024: member
    I think it’s reasonable to support. I’ll take a look.
  8. instagibbs commented at 9:39 am on October 16, 2024: member
    Opened #31096

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me