-
Notifications
You must be signed in to change notification settings - Fork 38.7k
rpc: Add importmempool RPC #27460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: Add importmempool RPC #27460
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Hi @MarcoFalke More than 5 tests are failing |
846ff37 to
d31a87f
Compare
|
I changed the approach to force named RPC options, compatible with #26485 |
|
Concept ACK 846ff37fe7ac2a5b4f855faaadb3434158ed6364 (need to check latest commit) tested by doing the following in regtest
shutdown bitcoind Saw this in the logs Might test again and check the exact values Checking diff of mempool.dat filesdid |
ajtowns
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach ACK
|
concept ACK, will review |
d31a87f to
1ef7f7a
Compare
glozow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
dad18a4 to
fab8b37
Compare
|
Why is |
|
Also while we're sneaking PR review club questions on here what do people here use this for? I'm assuming it is useful for mempool dev work (specific details would be interesting) but I can't imagine it is common for a user to want this. Concept ACK (the RPC approach seems superior assuming people are currently importing mempools without a RPC being available) |
|
The use case would be wanting to sync both the chain and the mempool to include everything/most known by the network or one of your other nodes. This is trivially possible for the chain, however for the mempool it is not. One option would be to use the Another option would be to use a new RPC to import a mempool. In light of people potentially loading untrusted mempool data, I opted to use the same mempool acceptance defaults that would be picked as if the transactions were synced/submitted over P2P. |
|
Concept ACK |
5d18c30 to
fa60af6
Compare
|
Concept ACK |
test_importmempool_union contributed by glozow Co-authored-by: glozow <[email protected]>
fad4eaf to
fa776e6
Compare
|
utACK fa776e6 |
glozow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reACK fa776e6
|
ACK fa776e6 |
fa776e6 Add importmempool RPC (MarcoFalke) fa20d73 refactor: Add and use kernel::ImportMempoolOptions (MarcoFalke) fa88669 doc: Clarify the getmempoolinfo.loaded RPC field documentation (MarcoFalke) 6888886 Remove Chainstate::LoadMempool (MarcoFalke) Pull request description: Currently it is possible to import a mempool by placing it in the datadir and starting the node. However this has many issues: * Users aren't expected to fiddle with the datadir, possibly corrupting it * An existing mempool file in the datadir may be overwritten * The node needs to be restarted * Importing an untrusted file this way is dangerous, because it can corrupt the mempool Fix all issues by adding a new RPC. ACKs for top commit: ajtowns: utACK fa776e6 achow101: ACK fa776e6 glozow: reACK fa776e6 Tree-SHA512: fcb1a92d6460839283c546c47a2d930c363ac1013c4c50dc5215ddf9fe5e51921d23fe0abfae0a5a7631983cfc7e2fff3788b70f95937d0a989a203be4d67546
This fixes a silent conflict betwen bitcoin#28123 and bitcoin#27460
…ng oneline description 2394314 rpc: remove one more quote from non-string oneline description (Martin Zumsande) Pull request description: This fixes a silent conflict between bitcoin/bitcoin#28123 (which removed all `\"options\"`) and bitcoin/bitcoin#27460 (which added a new one). It should fix the current CI failures. ACKs for top commit: ajtowns: utACK 2394314 MarcoFalke: lgtm ACK 2394314 jonatack: ACK 2394314 hebasto: ACK 2394314 Tree-SHA512: feb0c2b936a77be45d9c65aa7d738277b2266b5153665fee3b1413045de521195dc7d5efa2fc8b37b22f16e9b8d0ee8de25bfd151a428666122b31f64056557a
…ne description 2394314 rpc: remove one more quote from non-string oneline description (Martin Zumsande) Pull request description: This fixes a silent conflict between bitcoin#28123 (which removed all `\"options\"`) and bitcoin#27460 (which added a new one). It should fix the current CI failures. ACKs for top commit: ajtowns: utACK 2394314 MarcoFalke: lgtm ACK 2394314 jonatack: ACK 2394314 hebasto: ACK 2394314 Tree-SHA512: feb0c2b936a77be45d9c65aa7d738277b2266b5153665fee3b1413045de521195dc7d5efa2fc8b37b22f16e9b8d0ee8de25bfd151a428666122b31f64056557a
|
Release notes added in #28637. |
Co-authored-by: glozow <[email protected]>
1b672eb doc: add release note for #27460 (new `importmempool` RPC) (Sebastian Falbesoner) Pull request description: This PR adds a missing release note for #27460. ACKs for top commit: glozow: ACK 1b672eb Tree-SHA512: 89deadbfd6779e6eb19801c9fe7459a9876b920d44e09df102774c1eb8b3c0716462613dc99d1711eda4bd959ea61595b33f4528424ac02cf1af6cb4e5f1f0e9
…portmempool` RPC) 1b672eb doc: add release note for bitcoin#27460 (new `importmempool` RPC) (Sebastian Falbesoner) Pull request description: This PR adds a missing release note for bitcoin#27460. ACKs for top commit: glozow: ACK 1b672eb Tree-SHA512: 89deadbfd6779e6eb19801c9fe7459a9876b920d44e09df102774c1eb8b3c0716462613dc99d1711eda4bd959ea61595b33f4528424ac02cf1af6cb4e5f1f0e9
Currently it is possible to import a mempool by placing it in the datadir and starting the node. However this has many issues:
Fix all issues by adding a new RPC.