Skip to content

Conversation

@morcos
Copy link
Contributor

@morcos morcos commented Feb 16, 2016

@laanwj laanwj added the P2P label Feb 17, 2016
src/main.cpp Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: indent.

Copy link
Member

Choose a reason for hiding this comment

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

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.

@jonasschnelli
Copy link
Contributor

Nice Work!
IMO relatively important PR to reduce p2p "noise".
Concept ACK. Short code review.

src/main.cpp Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

To unlock the thread-lock for the LogPrint at L5174.

@paveljanik
Copy link
Contributor

Any volunteer to write some test cases?

src/protocol.h Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

@luke-jr Can you please assign a BIP number?

Copy link
Member

Choose a reason for hiding this comment

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

@morcos needs to request this.

@paveljanik
Copy link
Contributor

What will we do when we sent feefilter to the peer and the peer sends us zero fee invs?

In the DIP draft, you wrote:

Upon receipt of a "feefilter" message, the node will be permitted, but not required, to filter transaction invs for transactions that fall below the feerate provided in the feefilter message interpreted as satoshis per kilobyte.

Is this what we want? Why should a protocol 70013 peer relay such invs to us?

@morcos
Copy link
Contributor Author

morcos commented Feb 25, 2016

Addressed the cleanup comments
This has been submited as a PR for BIP 133.

@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
Copy link
Contributor

Choose a reason for hiding this comment

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

its -> it is/it's

@morcos
Copy link
Contributor Author

morcos commented Mar 4, 2016

Squashed and rebased

@maflcko
Copy link
Member

maflcko commented Mar 4, 2016

Please mention the bip number in the github subject line. Also you'd need to update /doc/bips.md prior to merge.

Copy link
Member

Choose a reason for hiding this comment

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

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.

@maflcko
Copy link
Member

maflcko commented Mar 6, 2016

Concept ACK ef3b850

@morcos
Copy link
Contributor Author

morcos commented Mar 7, 2016

@MarcoFalke OK I made your suggested change

src/main.h Outdated
Copy link
Member

Choose a reason for hiding this comment

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

tiny nit: Add missing ampersand to CAmount nAbsurdFee?

@sdaftuar
Copy link
Member

ACK

1 similar comment
@paveljanik
Copy link
Contributor

ACK

src/main.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Needs merge conflict resolved.

morcos added 4 commits March 21, 2016 10:46
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.
@morcos
Copy link
Contributor Author

morcos commented Mar 21, 2016

Squashed 1 commit and rebased to address merge conflict (trivial)

@laanwj
Copy link
Member

laanwj commented Mar 21, 2016

utACK 0371797

@laanwj laanwj merged commit 0371797 into bitcoin:master Mar 21, 2016
laanwj added a commit that referenced this pull request Mar 21, 2016
0371797 modify release-notes.md and bips.md (Alex Morcos)
b536a6f Add p2p test for feefilter (Alex Morcos)
5fa66e4 Create SingleNodeConnCB class for RPC tests (Alex Morcos)
9e072a6 Implement "feefilter" P2P message. (Alex Morcos)
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();
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use nNow variable which is also set to GetTimeMicros() earlier in this function?

codablock pushed a commit to codablock/dash that referenced this pull request Dec 19, 2017
0371797 modify release-notes.md and bips.md (Alex Morcos)
b536a6f Add p2p test for feefilter (Alex Morcos)
5fa66e4 Create SingleNodeConnCB class for RPC tests (Alex Morcos)
9e072a6 Implement "feefilter" P2P message. (Alex Morcos)
codablock added a commit to codablock/dash that referenced this pull request Apr 11, 2018
UdjinM6 pushed a commit to dashpay/dash that referenced this pull request Apr 11, 2018
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Mar 1, 2019
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants