Skip to content

Conversation

@stevenroose
Copy link

I'm not sure if those stability tests etc are ran in CI. I'll let CI run and please let me know if manual testing is advised. It won't work with versions before 28.0-rc anyway.

Is there a common practice here for what to do when an api endpoint requires a certain daemon version? I guess now the node will throw an error and it will just be propagated upwards to the user.

@tnull
Copy link

tnull commented Oct 28, 2024

I highly appreciate the effort to add submitpackage support to the Esplora protocol, as we Lightning devs want to lean on it being available soon. Given that there are multiple forks, should there be some coordination across projects to make sure the endpoints remain interoperable and usable by the same clients, e.g., rust-esplora-client?

See for example mempool/electrs#105 which seems to use another endpoint (txs/package) that would be incompatible to the one chosen here, IIUC?

@stevenroose
Copy link
Author

Hey, I agree with your proposed endpoints in mempool/electrs#105 and will happily adapt mine to that :) I might even adopt your implementation :)

@wiz
Copy link

wiz commented Nov 1, 2024

based on the comments by @stevenroose to adopt mempool/electrs#105 we will go ahead and merge that cc @moneyball

@tnull
Copy link

tnull commented Nov 1, 2024

Hey, I agree with your proposed endpoints in mempool/electrs#105 and will happily adapt mine to that :) I might even adopt your implementation :)

Sounds like we're aligned on an API then. Thanks for resolving this! :)

@stevenroose stevenroose force-pushed the submit-tx-package branch 2 times, most recently from e5aa76c to a9a39b1 Compare January 21, 2025 15:53
@stevenroose
Copy link
Author

Hi all, I (finally, my apologies) adapted this PR to resemble the same REST endpoint and response as what @wiz added for mempool.

@shesek is it ok if the internal mempool handling is done in a separate PR? It's seems to require a little bit of a non-trivial refactor and I don't really have the time. I would prefer that to not block having this endpoint added.

Also rebased to resolve some conflict.

@stevenroose stevenroose changed the title Add /txs endpoint to submit tx packages Add /txs/package endpoint to submit tx packages Jan 22, 2025
@stevenroose
Copy link
Author

@shesek any update on this??

@RobinLinus
Copy link

Any updates on this?

@tnull
Copy link

tnull commented Jul 31, 2025

Any update on this?

@RCasatta
Copy link
Collaborator

ACK 9a4175d

added test in #159

@RCasatta
Copy link
Collaborator

merged via #159

@RCasatta RCasatta closed this Aug 19, 2025
oleonardolima added a commit to bitcoindevkit/rust-esplora-client that referenced this pull request Jan 5, 2026
…ync client

cf64f97 feat(client): add new `submit_package` API (acidbunny21)

Pull request description:

  ### Description

  Add new `submit_package` method to both `BlockingClient` and `AsyncClient`, as it's now supported by Esplora API, see: Blockstream/electrs#119, Blockstream/electrs#159. Also, adds new `SubmitPackageResult`, `TxResult`, and `MempoolFeesSubmitPackage` API structures.

  It updates the internal `post_request_hex` method to `post_request_bytes`, now handling `query_params` and having `Response` as return type. Additionally, updates the internals of `broadcast` to utilize the new `post_request` and `post_request_bytes` without breaking its API.

  ### Notes to the reviewers

  As mentioned in the PR comments, I updated the original commit by `@acidbunny21` by:
  - (i) adding `@ValuedMammal`'s suggested fixes;
  - (ii) removing the breaking change on the `broadcast` API, it's now a follow-up in #151.

  ### Changelog notice

  ```
  ### Added

  - feat(client): add new `submit_package` API to `BlockingClient` and `AsyncClient`
  - feat(api): add new `SubmitPackageResult`, `TxResult`, and `MempoolFeesSubmitPackage` API structures

  ### Changed

  - feat(client): update the `post_request_hex` method to `post_request_bytes`, now handling `query_params` and having `Response` as return type.
  - feat(client): update the internals of the  `broadcast` method to use new `post_request` and `post_request_bytes`, with no breaking change.
  ```

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `just p` before pushing

  #### New Features:

  * [ ] I've added tests for the new feature
  > The PR does not add new tests for the `submit_package` API, as it's not yet supported by `electrsd`, it's tracked by: #152
  * [x] I've added docs for the new feature

ACKs for top commit:
  ValuedMammal:
    ACK cf64f97; used `git range-diff`
  luisschwab:
    re-ACK cf64f97

Tree-SHA512: cfc0a4ad3d119f52e503facbfcb3666c9fa521707d76016cb506bc4ad5261e0a9d1e9fdfcfcaa6de329b44535bc428c76d7dba47e437a0877a828786420ac1a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants