Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Defer inserting into maprelay until just before relaying. #8082
Conversation
sipa
and 1 other
commented on an outdated diff
May 21, 2016
| pto->filterInventoryKnown.insert(hash); | ||
| vInv.push_back(inv); | ||
| + { | ||
| + LOCK(cs_mapRelay); | ||
| + if (mapRelay.find(inv.hash) == mapRelay.end()) { |
sipa
Owner
|
|
Looks like comparison tool triggers a |
laanwj
added the
P2P
label
May 21, 2016
|
@MarcoFalke Yep. It was an actual inversion with the vSend lock, it's fixed. |
|
Concept ACK Nit: After this mapRelay is no longer used in net at all. It could become local to main. |
|
@laanwj good catch with the nit, I've removed it from net.cpp/net.h. |
|
utACK d9d1f2e |
|
ut ACK d9d1f2e |
|
@gmaxwell Can you please be more explicit in the commit message? In "This reduces the rate of not founds", "This" means "this PR" or you mean the 15-> 16 minutes change (why not separate commit, BTW)? What is the logic behind 15 -> 16 anyway? |
|
@paveljanik "better matching far end expectations"-- the far end retries on a two minute interval; 15 minutes is dead between counts-- starting the counter before the transaction has been offered to anyone also makes it more likely to time out first. |
|
Can one of the admins verify this patch? |
|
@gmaxwell I guess that can use some comment in the code? |
|
I changed it back to 15 minutes, -- I think the time there should be adjusted but it can be done in another pull that reworks the mapaskfor handling a bit. |
|
Rebased. |
|
Lightly tested ACK. Setup: two mainnet full nodes with this patch (A publicly reachable, B -connect'ed to A) and a lightweight node C (connected to the public network). Tested block synchronization/relay of B from A, relay of transactions to from A to B, relay of newly created transactions by B and C through A. Nothing unusual. |
sipa
referenced
this pull request
May 31, 2016
Merged
std::shared_ptr based CTransaction storage in mempool #8126
sipa
merged commit 4d8993b
into bitcoin:master
Jun 1, 2016
1 check passed
sipa
added a commit
that referenced
this pull request
Jun 1, 2016
|
|
sipa |
01d8359
|
gmaxwell commentedMay 21, 2016
•
edited
This reduces the rate of not founds by better matching the far
end expectations, it also improves privacy by removing the
ability to use getdata to probe for a node having a txn before
it has been relayed.