Page MenuHomePhabricator

Add scantxoutset RPC method
ClosedPublic

Authored by deadalnix on Nov 3 2019, 14:44.

Details

Summary
  • Add FindScriptPubKey() to search the UTXO set
  • Blockchain/RPC: Add scantxoutset method to scan UTXO set
  • scantxoutset: add support for scripts
  • scantxoutset: support legacy P2PK script type
  • [QA] Add scantxoutset test
  • scantxoutset: mention that scanning by address will miss P2PK txouts

This is a backport fo Core PR12196

Test Plan
make check
./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr12196
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8048
Build 14091: Bitcoin ABC Buildbot (legacy)
Build 14090: arc lint + arc unit

Event Timeline

Fabien requested changes to this revision.Nov 4 2019, 13:58
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/rpc/blockchain.cpp
2217 ↗(On Diff #13878)

Can be static ?

test/functional/rpc_scantxoutset.py
10 ↗(On Diff #13878)

Nit: move above and sort

This revision now requires changes to proceed.Nov 4 2019, 13:58

Also the release notes are missing.

make static and reorder imports

This PR doesn't contain any change to the release notes. I'm not sure why we would want to warn people about this, it's not breaking any existing behavior, or fixing any bug they'd waiting on, and is not a very major change.

My understanding is that we add to the release notes everything that is user facing, and adding a new RPC is part of it.
BTW it's part of the release notes for core as well (see 0.17.0: https://github.com/bitcoin/bitcoin/blame/master/doc/release-notes/release-notes-0.17.0.md#L271).

test/functional/rpc_scantxoutset.py
6 ↗(On Diff #13958)

Missing sort :)

This revision now requires changes to proceed.Nov 6 2019, 07:43

Add release notes, sort imports

Fabien requested changes to this revision.Nov 7 2019, 07:00
Fabien added inline comments.
doc/release-notes.md
15 ↗(On Diff #13967)

This files doesn't exist (yet) in our codebase, I think you can simply remove the sentence.

This revision now requires changes to proceed.Nov 7 2019, 07:00
doc/release-notes.md
15 ↗(On Diff #13967)

So I dug into it, the release note was added in another patch and there are some patches in between. IMO the best course of action is to either leave it there and add the descriptor later, and accept the state will be jenky for a handful of commits.

Remove release notes. Will add them back when backporting PR13697 and PR14096

This revision is now accepted and ready to land.Nov 11 2019, 11:27
This revision was automatically updated to reflect the committed changes.