Repository navigation
Closed
Description
Bitcoin Core has a number of hidden RPC calls that are excluded from the documentation by default. However, being able to interact with them using corepc would still be good for testing and power usage. Some of these are clearly for testing only (e.g. mocktime), while others can be useful for node operators too: invalidateblock, while some others expose partially implementation specific data, where the response format might change at some point (i.e. they aren't super stable, like getrawaddrman and getorphantxs).
Some hidden RPCs I think would be good to implement:
- sendmsgtopeer:
Send a p2p message to a peer specified by id. The message type and body must be provided, the message header will be generated. This RPC is for testing only. - echo/echojson:
Simply echo back the input arguments. This command is for testing. - reconsiderblock:
Removes invalidity status of a block, its ancestors and its descendants, reconsider them for activation. This can be used to undo the effects of invalidateblock. - invalidateblock:
Permanently marks a block as invalid, as if it violated a consensus rule. - generatetoaddress:
Mine to a specified address and return the block hashes. - generatetodescriptor
Mine to a specified descriptor and return the block hashes. - getrawaddrman:
Returns information on all address manager entries for the new and tried tables.I've been using this in addrman-observer for a while now. Add hidden RPCgetrawaddrman#439 - getorphantxs:
Shows transactions in the tx orphanage.add hidden RPCgetorphantxs#435 - addconnection:
Open an outbound connection to a specified node. This RPC is for testing only.Implement hidden RPCaddconnection#433 - estimaterawfee:
Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible. Uses virtual transaction size as defined in BIP 141 (witness data is discounted)Implement hidden RPCestimaterawfee#432 - addpeeraddress:
Add the address of a potential peer to an address manager table. This RPC is for testing only.See alsogetnodeaddressesreturns an empty list #320 Fixgetnodeaddressestest #334 - waitforblock/waitforblockheight/waitfornewblock Support Bitcoin Core v30.0 #384 and Add
waitforblock,waitforblockheightandwaitfornewblock#388
Metadata
Metadata
Assignees
Labels
No labels
Activity
tcharding commentedon Aug 19, 2025
+1 from me. Thanks for the heads up!
jamillambert commentedon Aug 19, 2025
I agree these should be implemented, and thanks again for the info.
I scraped core and got the below list of RPCs that are not listed in
bitcoin-cli help. There are also the ones in theGeneratingsection that are already implemented, but were dropped from the documentation from v23 upwards (Issue #211).Updated Jan 14, 2026
Updated (tcharding) Jan 16, 2026
jamillambert commentedon Aug 19, 2025
In #334 I added
addpeeraddressthat was needed for the test. It's in a new modulehidden. It's still documented and searchable in the rustdocs, but I didn't putHiddenas a section in theMethod name and implementation statustables of thecorepc_typesrustdocs.If a different way of documenting/organizing them is preferred let me know and I'll change it.
0xB10C commentedon Oct 10, 2025
fwiw from the v30 release notes:
deadmanoz commentedon Dec 16, 2025
Is the pattern used by @jamillambert the preferred way to introduce hidden RPC calls? I am looking to add, for example,
getrawaddrman.hiddenmodule etc?0xB10C commentedon Dec 16, 2025
My understanding is that this would be the way to go, yes!
jamillambert commentedon Dec 16, 2025
Yeah I agree, I think that's the best way to go.
NB. I had been working on adding the hidden RPCs but was low priority, I'll have another look tomorrow. Let me know if you have already, or want to start on
getrawaddrmanand if so I'll focus on the others.deadmanoz commentedon Dec 16, 2025
I've made a start on
getrawaddrmanand would be happy to pickup others if you want me too!jamillambert commentedon Dec 16, 2025
Great, thanks!
I'll push up what I was working on tomorrow and update here what is left to do.
jamillambert commentedon Dec 17, 2025
I updated the table in my previous comment to give the current status. All the RPCs that say returns none don't need to be added to
types. I'll add a client macro and test for these to catch if they do return something in future versions.0xB10C commentedon Dec 18, 2025
Nice, this should include
setmocktimewhich I've been using this hack to call: https://github.com/peer-observer/peer-observer/blob/311426b21f406345606b6673fd4c0158061b1100/extractors/p2p/tests/integration.rs#L261-L268I'll pick up
getorphantxs!0xB10C commentedon Dec 18, 2025
Once these hidden ones are all implemented, I think it should in theory be possible to write a small proxy or client and hack the Bitcoin Core functional tests to use it for running the full test suite through corepc..
tcharding commentedon Dec 29, 2025
Siiiick, I would love that.
deadmanoz commentedon Dec 30, 2025
@0xB10C can update your list for
getrawaddrman: #439Merge #435: add hidden RPC `getorphantxs`
satsfy commentedon Jan 13, 2026
Hi! I'm preparing
mockscheduler,reconsiderblockandsyncwithvalidationinterfacequeue.I'll send them all in a single PR for ease of review.
Merge #456: Add hidden RPCs `syncwithvalidationinterfacequeue`, `mock…
jamillambert commentedon Sep 1, 2026
Issue moved to Forgejo: https://gitea.bitcoin.ninja/rust-bitcoin/corepc/issues/333