You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#19145: Add hash_type MUHASH for gettxoutsetinfo
e987ae5 test: Add test for deterministic UTXO set hash results (Fabian Jahr)
6ccc8fc test: Add test for gettxoutsetinfo RPC with MuHash (Fabian Jahr)
0d3b2f6 rpc: Add hash_type MUHASH to gettxoutsetinfo (Fabian Jahr)
2474645 refactor: Separate hash and stats calculation in coinstats (Fabian Jahr)
a1fccea refactor: Improve encapsulation between MuHash3072 and Num3072 (Fabian Jahr)
Pull request description:
This is another Pr in the series PRs for Coinstatsindex (see overview in bitcoin#18000). This PR adds the `hash_type` option `muhash` to `gettxoutsetinfo` through which the user can calculate the serialized muhash of the utxo set. This PR does not use the index yet.
ACKs for top commit:
Sjors:
tACK e987ae5
achow101:
ACK e987ae5
jonatack:
Tested re-ACK e987ae5 per `git diff 3506d90 e987ae5`, reviewed diff, debug built, ran gettxoutsetinfo -signet and help on this branch vs master, at height 23127 both returned `hash_serialized_2` of `2b72d65f3b6efb2311f58374ea2b939abf49684d44f4bafda45faa3b5452a454` and this branch returned `muhash` of `c9f1ff12d345ccf9939c6bbf087e6f7399b6115adee1569287e9c5c43dbb475c`
ryanofsky:
Code review ACK e987ae5. Looks very good. I left one suggestion to simplify code, but feel free to ignore it here and maybe consider it for later since PR has already had a lot of review.
Tree-SHA512: 9a739ce375e73749fa69a467262b60d3e5314ef384e2d7150b3bbc8e4125cd9fd1db95306623bb9a632fcbaf5d9d2bf2f5cc43bf717d4ff5e2c9c4b52dd9296c
throwJSONRPCError(RPC_INVALID_PARAMETER, strprintf("%s is not a valid hash_type", hash_type_input));
1039
+
}
1040
+
}
1041
+
1029
1042
static RPCHelpMan gettxoutsetinfo()
1030
1043
{
1031
1044
return RPCHelpMan{"gettxoutsetinfo",
1032
1045
"\nReturns statistics about the unspent transaction output set.\n"
1033
1046
"Note this call may take some time.\n",
1034
1047
{
1035
-
{"hash_type", RPCArg::Type::STR, /* default */"hash_serialized_2", "Which UTXO set hash should be calculated. Options: 'hash_serialized_2' (the legacy algorithm), 'none'."},
1048
+
{"hash_type", RPCArg::Type::STR, /* default */"hash_serialized_2", "Which UTXO set hash should be calculated. Options: 'hash_serialized_2' (the legacy algorithm), 'muhash', 'none'."},
0 commit comments