Implement "feefilter" P2P message#7542
Conversation
src/main.cpp
Outdated
There was a problem hiding this comment.
I remember adding the clang-format script some time ago. Something like git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v should do all of this.
|
Nice Work! |
src/main.cpp
Outdated
There was a problem hiding this comment.
To unlock the thread-lock for the LogPrint at L5174.
|
Any volunteer to write some test cases? |
src/protocol.h
Outdated
|
What will we do when we sent In the DIP draft, you wrote:
Is this what we want? Why should a protocol 70013 peer relay such |
|
Addressed the cleanup comments @paveljanik It's impossible to be sure there aren't invs or txs in flight with fee rates below the cut off. Also in general we don't have a good system for responding to p2p misbehavior. I think this could be extended later with that ability, but as of now it does not appear to open up any additional DoS attacks if you don't abide by the message. |
src/main.cpp
Outdated
|
Squashed and rebased |
|
Please mention the bip number in the github subject line. Also you'd need to update |
doc/release-notes.md
Outdated
There was a problem hiding this comment.
Nit: I am pretty sure this goes up to "Notable changes" (Example item) as this place down here is usually used for the detailed change log only.
|
Concept ACK ef3b850 |
|
@MarcoFalke OK I made your suggested change |
src/main.h
Outdated
There was a problem hiding this comment.
tiny nit: Add missing ampersand to CAmount nAbsurdFee?
|
ACK |
1 similar comment
|
ACK |
src/main.cpp
Outdated
The "feefilter" p2p message is used to inform other nodes of your mempool min fee which is the feerate that any new transaction must meet to be accepted to your mempool. This will allow them to filter invs to you according to this feerate.
|
Squashed 1 commit and rebased to address merge conflict (trivial) |
|
utACK 0371797 |
| if (pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) && | ||
| !(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) { | ||
| CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(); | ||
| int64_t timeNow = GetTimeMicros(); |
There was a problem hiding this comment.
why not use nNow variable which is also set to GetTimeMicros() earlier in this function?
This reverts commit 11ac70a.
This reverts commit 11ac70a.
Please see mailing list discussion
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/012449.html