rust-esplora-client icon indicating copy to clipboard operation
rust-esplora-client copied to clipboard

feat(client): add async and blocking clients to submit txs package

Open acidbunny21 opened this issue 11 months ago • 12 comments

Counterpart PR for https://github.com/Blockstream/electrs/pull/119 to enable submitpackage API

acidbunny21 avatar Jan 22 '25 08:01 acidbunny21

Pull Request Test Coverage Report for Build 19651633198

Details

  • 33 of 107 (30.84%) changed or added relevant lines in 3 files are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-5.1%) to 82.238%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/api.rs 0 12 0.0%
src/async.rs 14 44 31.82%
src/blocking.rs 19 51 37.25%
<!-- Total: 33 107
Files with Coverage Reduction New Missed Lines %
src/async.rs 1 72.24%
src/blocking.rs 7 71.58%
<!-- Total: 8
Totals Coverage Status
Change from base Build 19620365463: -5.1%
Covered Lines: 1051
Relevant Lines: 1278

💛 - Coveralls

coveralls avatar Jan 27 '25 14:01 coveralls

It could use a test with mempool/electrs implementation, while it's not available in blockstream/electrs and electrsd, as I've looked on the other PR and looks like it's following the same API.

I'm okay with adding a test, but then we need to bump electrsd to 0.30 which introduce some breaking changes on bitcoind. Might be good to first bump it in a separated PR

acidbunny21 avatar Feb 03 '25 15:02 acidbunny21

It could use a test with mempool/electrs implementation, while it's not available in blockstream/electrs and electrsd, as I've looked on the other PR and looks like it's following the same API.

I'm okay with adding a test, but then we need to bump electrsd to 0.30 which introduce some breaking changes on bitcoind. Might be good to first bump it in a separated PR

Yes, agree that it can be done in another PR. Another way that I thought was adding a test (under #[ignore]) that uses live mempool.space to test it, so we could run locally and in another step on CI while we don't have a new release on electrsd with the blockstream's esplora changes. However I think it's better to just wait until blockstream/electrs#119 is release and just bump everything.

oleonardolima avatar Feb 10 '25 16:02 oleonardolima

@oleonardolima it looks like the pipeline failures are caused by something unrelated with the PR, could you help please? :)

acidbunny21 avatar Feb 21 '25 17:02 acidbunny21

@oleonardolima it looks like the pipeline failures are caused by something unrelated with the PR, could you help please? :)

It's caused due to recent native-tls release which bumped their MSRV to 1.80.0, it should be fine after #116 lands and a rebase should fix it.

oleonardolima avatar Feb 26 '25 18:02 oleonardolima

I think we uncovered a bug in here:

Reqwest(reqwest::Error { kind: Decode, source: Error("invalid type: floating point `0.0`, expected u64", line: 1, column: 230) })

I suspect it's in this field: pub base: Amount,. You should never use Amount's default deserialization. It has several options, but bitcoind does amounts as floating points:

#[serde(with = "amount::serde::as_btc")]
pub base: Amount,

the above should work

stevenroose avatar Mar 18 '25 11:03 stevenroose

@acidbunny21 Could you rebase and sign the commits on this one?

oleonardolima avatar Aug 20 '25 19:08 oleonardolima

just ran cargo fmt and addressed your comments. Sorry for the delay

acidbunny21 avatar Sep 11 '25 15:09 acidbunny21

Not sure why CI is being flaky.

ValuedMammal avatar Sep 11 '25 17:09 ValuedMammal

It's weird, running locally CI works just fine on master. I've tried to re-run CI steps without success.

oleonardolima avatar Sep 12 '25 01:09 oleonardolima

Any update here?

@ValuedMammal can we add this to the summit tag?

tnull avatar Oct 13 '25 13:10 tnull

@tnull @ValuedMammal let me know if i can be of any help to have this merged

acidbunny21 avatar Oct 16 '25 17:10 acidbunny21

@acidbunny21 Is it okay if I take over this one? I want to move forward with this one and cut a release for rust-esplora-client, as I know @tnull has been looking forward to this.

oleonardolima avatar Nov 19 '25 18:11 oleonardolima

@acidbunny21 Is it okay if I take over this one? I want to move forward with this one and cut a release for rust-esplora-client, as I know @tnull has been looking forward to this.

Yeah sure

acidbunny21 avatar Nov 20 '25 15:11 acidbunny21