bitcoin/src/rpc
W. J. van der Laan 2b45cf0bcd
Merge bitcoin/bitcoin#19521: Coinstats Index
5f96d7d22d rpc: gettxoutsetinfo rejects hash_serialized_2 for specific height (Fabian Jahr)
23fe50436b test: Add test for coinstatsindex behavior in reorgs (Fabian Jahr)
90c966b0f3 rpc: Allow gettxoutsetinfo and getblockstats for stale blocks (Fabian Jahr)
b9362392ae index, rpc: Add use_index option for gettxoutsetinfo (Fabian Jahr)
bb7788b121 test: Test coinstatsindex robustness across restarts (Fabian Jahr)
e0938c2909 test: Add tests for block_info in gettxoutsetinfo (Fabian Jahr)
2501576ecc rpc, index: Add verbose amounts tracking to Coinstats index (Fabian Jahr)
655d929836 test: add coinstatsindex getindexinfo coverage, improve current tests (Jon Atack)
ca01bb8d68 rpc: Add Coinstats index to getindexinfo (Fabian Jahr)
57a026c30f test: Add unit test for Coinstats index (Fabian Jahr)
6a4c0c09ab test: Add functional test for Coinstats index (Fabian Jahr)
3f166ecc12 rpc: gettxoutsetinfo can be requested for specific blockheights (Fabian Jahr)
3c914d58ff index: Coinstats index can be activated with command line flag (Fabian Jahr)
dd58a4de21 index: Add Coinstats index (Fabian Jahr)
a8a46c4b3c refactor: Simplify ApplyStats and ApplyHash (Fabian Jahr)
9c8a265fd2 refactor: Pass hash_type to CoinsStats in stats object (Fabian Jahr)
2e2648a902 crypto: Make MuHash Remove method efficient (Fabian Jahr)

Pull request description:

  This is part of the coinstats index project tracked in #18000

  While the review of the new UTXO set hash algorithm (MuHash) takes longer recently #19328 was merged which added the possibility to run `gettxoutsetinfo` with a specific hash type. As the first type it added `hash_type=none` which skips the hashing of the UTXO set altogether. This alone did not make `gettxoutsetinfo` much faster but it allows the use of an index for the remaining coin statistics even before a new hashing algorithm has been added. Credit to Sjors for the idea to take this intermediate step.

  Features summary:
  - Users can start their node with the option `-coinstatsindex` which syncs the index in the background
  - After the index is synced the user can  use `gettxoutsetinfo` with `hash_type=none` or `hash_type=muhash` and will get the response instantly out of the index
  - The user can specify a height or block hash when calling `gettxoutsetinfo` to see coin statistics at a specific block height

ACKs for top commit:
  Sjors:
    re-tACK 5f96d7d22d
  jonatack:
    Code review re-ACK 5f96d7d22d per `git range-diff 13d27b4 07201d3 5f96d7d`
  promag:
    Tested ACK 5f96d7d22d. Light code review ACK 5f96d7d22d.

Tree-SHA512: cbca78bee8e9605c19da4fbcd184625fb280200718396c694a56c7daab6f44ad23ca9fb5456d09f245d8b8d9659fdc2b3f3ce5e953c1c6cf4003dbc74c0463c2
2021-04-30 17:27:19 +02:00
..
blockchain.cpp Merge bitcoin/bitcoin#19521: Coinstats Index 2021-04-30 17:27:19 +02:00
blockchain.h rest/rpc: Remove now-unused old Ensure functions 2021-04-14 11:10:08 -04:00
client.cpp index, rpc: Add use_index option for gettxoutsetinfo 2021-04-19 21:11:33 +02:00
client.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
external_signer.cpp external_signer: remove ExternalSignerException 2021-04-13 20:09:34 +08:00
mining.cpp Merge bitcoin/bitcoin#21719: refactor: Add and use EnsureConnman in rpc code 2021-04-21 07:23:34 +02:00
mining.h rpc: create rpc/mining.h, hoist default max tries values to constant 2020-06-01 15:08:36 +02:00
misc.cpp Merge bitcoin/bitcoin#19521: Coinstats Index 2021-04-30 17:27:19 +02:00
net.cpp Merge bitcoin/bitcoin#21719: refactor: Add and use EnsureConnman in rpc code 2021-04-21 07:23:34 +02:00
net.h refactor: Add and use EnsureConnman in rpc code 2021-04-19 13:04:23 +02:00
protocol.h rpc: Add specific error code for "wallet already loaded" 2021-01-25 07:55:35 +01:00
rawtransaction.cpp Merge #21679: rpc: Keep default argument value in correct type 2021-04-19 09:04:31 +02:00
rawtransaction_util.cpp Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
rawtransaction_util.h Don't make "in" parameters look like "out"/"in-out" parameters: pass by ref to const instead of ref to non-const 2020-12-06 00:22:40 +00:00
register.h Move external signer out of wallet module 2021-04-08 17:56:00 +02:00
request.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
request.h Drop JSONRPCRequest constructors after #21366 2021-04-07 04:53:26 -04:00
server.cpp rpc: Keep default argument value in correct type 2021-04-17 00:22:53 +01:00
server.h Remove pointer cast in CRPCTable::dumpArgMap 2021-01-29 18:15:48 -05:00
util.cpp rpc: Check default value type againts argument type 2021-04-17 00:22:53 +01:00
util.h rpc: Keep default argument value in correct type 2021-04-17 00:22:53 +01:00