Skip to content
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

Package Relay Draft 1 (Single In-Flight Approach) #8

Closed
wants to merge 57 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
43fd360
-- Part 0: Mempool Logic for Arbitrary Packages--
glozow Feb 20, 2023
f154c34
[test util] mock mempool minimum feerate
glozow Jan 17, 2023
5d09d97
[test] package cpfp bumps parents <mempoolminfee but >=minrelaytxfee
glozow Jan 17, 2023
64fc0da
[policy] disallow transactions under min relay fee, even in packages
glozow Jan 17, 2023
1f40f8c
[validation] set PackageValidationState when mempool full
glozow Jan 24, 2023
3639ad0
[validation] call AcceptSingleTransaction when only 1 package tx left
glozow Dec 15, 2022
a781945
[mempool] evict everything below min relay fee in TrimToSize()
glozow Jan 17, 2023
daf6b81
[test framework] return txhex from create_lots_of_big_transactions
glozow Jan 19, 2023
569c284
[test] raise wallet_abandonconflict -minrelaytxfee settings
glozow Jan 19, 2023
faf8b23
[mempool] persist packages across restart
glozow Jan 19, 2023
f9b1993
MOVEONLY: move package checks into helper functions
glozow Sep 16, 2022
2d0d4c0
scripted-diff: rename CheckPackage to IsPackageWellFormed
glozow Jan 19, 2023
9bfb4a1
[packages] Packageifier for arbitrary transaction lists
glozow Sep 16, 2022
87e43a5
[test util] multi-input multi-output CreateValidMempoolTransaction
glozow Oct 3, 2022
2109d36
[validation] pre-fill missing inputs for txns depending on invalid
glozow Dec 14, 2022
9bcefd6
[validation] validate packages by submitting each tx's ancestor sub-p…
glozow Dec 15, 2022
0c011bc
[policy] allow any ancestor package, not just child-with-unconfirmed-…
glozow Feb 17, 2023
e42d8d9
-- Part 1: Orphan Resolution Module --
glozow Feb 20, 2023
0821236
[p2p] add tx package tracker
glozow May 1, 2022
bcb33bb
[refactor] wrap TxOrphanage inside TxPackageTracker
glozow Oct 6, 2022
718ce4a
[txorphange] GetTx by wtxid
glozow Jan 24, 2023
60566f4
[txorphanage] EraseTx by wtxid
glozow Feb 20, 2023
dce6d8b
[txorphanage] return erased wtxids from EraseForBlock
glozow Feb 20, 2023
2e72630
[log] add category TXPACKAGES for orphanage and package relay
glozow Mar 6, 2023
49aa386
[txorphanage] impose a maximum total size of orphans
glozow Mar 31, 2023
9a65983
[txorphanage] track bytes provided per peer
glozow Apr 18, 2023
2861927
[txorphanage] when peers are overloaded, favor their orphans for evic…
glozow Apr 18, 2023
3df9a46
[txorphanage] handle AddTx(nullptr)
glozow Apr 18, 2023
8325214
[txpackagetracker] add orphan resolution tracker
glozow Jan 24, 2023
c24c133
[refactor] use txpackagetracker for orphan resolution
glozow Oct 6, 2022
44c3725
[txpackagetracker] delete unused OrphanageAddTx
glozow Apr 18, 2023
e4d7b44
[txrequest] GetCandidatePeers and ResetRequestTimeout
glozow Mar 20, 2023
b46bafb
[txorphanage] support multiple announcers
glozow Apr 18, 2023
26d7bdc
[unit test] orphanage: multiple announcers, eviction
glozow Apr 18, 2023
6023be6
[p2p] use all orphan announcers as potential parent sources
glozow Oct 6, 2022
f5b00f3
-- Part 2: Signal SENDPACKAGES --
glozow Feb 20, 2023
5c7331b
[txpackagetracker] negotiation logic
glozow Feb 20, 2023
945814c
[unit test] txpackagetracker tests
glozow Feb 20, 2023
3c0e90c
[p2p] signal support for package relay
glozow Oct 7, 2022
424eb15
[rpc] expose package relay on rpc
glozow Sep 6, 2022
25d3fe4
-- Part 3: Request Ancestor Package Info For Orphans --
glozow Feb 20, 2023
797ed82
[packages] hash multiple transactions
glozow Jan 9, 2023
f7d6fea
[validation/p2p] separate TxValidationResult and rejects filter for l…
glozow Sep 12, 2022
8164ad2
[p2p] respond to getdata(ancpkginfo) requests with ancpkginfo
glozow Sep 6, 2022
e6656a9
[txpackagetracker] create ancpkginfo requests using orphan resolution…
glozow Jan 24, 2023
0389892
[unit test] txpackagetracker orphan tracking
glozow Feb 20, 2023
21acc89
[p2p] Resolve orphans by requesting ancpkginfo and requesting txdata
glozow Oct 6, 2022
cc800b3
-- Part 4: Download and Validate Packages --
glozow Feb 20, 2023
ba5e401
[p2p] respond to getpkgtxns with pkgtxns or notfound MSG_PKGTXNS
glozow Oct 3, 2022
852da8e
[txpackagetracker] track packages to download
glozow Jan 5, 2023
fbe58b5
[p2p] use ancpkginfo to make getpkgtxns requests
glozow Jan 6, 2023
8859429
[txpackagetracker] handle pkgtxns/notfound, return validation work items
glozow Jan 9, 2023
252ff5a
[unit test] PkgInfoAllowed, ReceivedAncPkgInfo, ReceivedPkgTxns
glozow Feb 20, 2023
54c4fbe
[p2p] handle pkgtxns and validate packages
glozow Jan 9, 2023
efa53b7
[p2p] don't inv fee-bumping children to non-pkgrelay peers
glozow Apr 4, 2023
d682a10
[rpc] allow submitpackage to be called outside of regtest
glozow Apr 11, 2023
b647166
[functional test] package relay e2e
glozow Oct 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@ bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector<Workspace>&
} else {
all_submitted = false;
ws.m_state.Invalid(TxValidationResult::TX_MEMPOOL_POLICY, "mempool full");
package_state.Invalid(PackageValidationResult::PCKG_TX, "transaction failed");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it’s a bit confusing that a PackageValidationResult’s reject_reason says transaction failed. A more indicative error message could be whole package submission failed - individual transaction mempool inclusion failed. It’s more verbose though at least make easier to debug that the package integrity has been respected by our mempool logic.

results.emplace(ws.m_ptx->GetWitnessHash(), MempoolAcceptResult::Failure(ws.m_state));
}
}
Expand Down