Page MenuHomePhabricator

Add scantxoutset RPC method
ClosedPublic

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

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC11ca044a129f: Add scantxoutset RPC method
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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Sun, Nov 3, 14:44
Herald added a reviewer: Restricted Project. · View Herald TranscriptSun, Nov 3, 14:44
deadalnix updated this revision to Diff 13878.Sun, Nov 3, 17:26

Make the method static

Fabien requested changes to this revision.Mon, Nov 4, 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.Mon, Nov 4, 13:58
Fabien added a comment.Mon, Nov 4, 14:05

Also the release notes are missing.

deadalnix updated this revision to Diff 13958.Wed, Nov 6, 00:08

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.

Fabien added a comment.Wed, Nov 6, 07:30

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).

Fabien added inline comments.Wed, Nov 6, 07:33
test/functional/rpc_scantxoutset.py
6 ↗(On Diff #13958)

Missing sort :)

Fabien requested changes to this revision.Wed, Nov 6, 07:43
This revision now requires changes to proceed.Wed, Nov 6, 07:43
deadalnix updated this revision to Diff 13967.Wed, Nov 6, 16:05

Add release notes, sort imports

Fabien requested changes to this revision.Thu, Nov 7, 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.Thu, Nov 7, 07:00
deadalnix added inline comments.Sat, Nov 9, 22:22
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.

deadalnix updated this revision to Diff 14032.Sat, Nov 9, 22:32

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

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