Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

Commit

Permalink
src/init.cpp: Add -advertise2x option, for NODE_xxx optionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarzik committed Sep 27, 2017
1 parent 44af0aa commit 28ebbdb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static const bool DEFAULT_REST_ENABLE = false;
static const bool DEFAULT_DISABLE_SAFEMODE = false;
static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false;
static const bool DEFAULT_PREFPEERING = true;
static const bool DEFAULT_ADVERTISE_2X = true;

std::unique_ptr<CConnman> g_connman;
std::unique_ptr<PeerLogicValidation> peerLogic;
Expand Down Expand Up @@ -488,6 +489,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER));
strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY));
strUsage += HelpMessageOpt("-prefpeering", strprintf(_("Preferential peering with segwit2x (and segwit) nodes (default: %u)"), DEFAULT_PREFPEERING));
strUsage += HelpMessageOpt("-advertise2x", strprintf(_("Advertise on network as a segwit2x-compatible node (default: %u)"), DEFAULT_ADVERTISE_2X));
strUsage += HelpMessageOpt("-mempoolreplacement", strprintf(_("Enable transaction replacement in the memory pool (default: %u)"), DEFAULT_ENABLE_REPLACEMENT));
strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)"),
CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE)));
Expand Down Expand Up @@ -1079,7 +1081,8 @@ bool AppInitParameterInteraction()
nMaxDatacarrierBytes = gArgs.GetArg("-datacarriersize", nMaxDatacarrierBytes);

// Advertise as segwit2x node
nLocalServices = ServiceFlags(nLocalServices | NODE_SEGWIT2X);
if (gArgs.GetBoolArg("-advertise2x", DEFAULT_ADVERTISE_2X))
nLocalServices = ServiceFlags(nLocalServices | NODE_SEGWIT2X);

// Prefer peers with compatible rulesets
if (gArgs.GetBoolArg("-prefpeering", DEFAULT_PREFPEERING)) {
Expand Down

11 comments on commit 28ebbdb

@lra
Copy link

@lra lra commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

This commit officially makes segwit2x a trojan horse as it allows anyone to run 2x nodes in disguise. Now core needs to find a new way to detect and ban your nodes.

@dooglus
Copy link

@dooglus dooglus commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

What have you done with the old jgarzik and how much will it cost us to buy him back?

@h0jeZvgoxFepBQ2C
Copy link

@h0jeZvgoxFepBQ2C h0jeZvgoxFepBQ2C commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

@jgarzik

This commit is a pure shame for 2X and for all 2x supporting companies.
Intentionally trying to disrupt the bitcoin network will have consequences and in a lot of states you will be held accountable by law for this attack.

I can only encourage every single B2X supporter to drop the support of B2X right now, before you will be part of a crime and have to face legal actions against you and everyone who is involved in this attack.

@arisAlexis
Copy link

@arisAlexis arisAlexis commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

@jgarzik this is tragic. bitcoin is about consensus not covert war tactics. this is open source software and masking clients to trick other open source software is just not OK by any community standards.

@neelamnaveen86
Copy link

Choose a reason for hiding this comment

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

is anyone planning on reverting this commit back to the way it was so that all can go back and sleep in peace.

@Gaspa79
Copy link

@Gaspa79 Gaspa79 commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

Anyone with an educated opinion knows this is 100% unethical and is aware that the excuse "we want to download the blockchain from high-bandwidth core clients before and after the fork" is not true at all.

If you needed to download the blockchain from core clients then that means that 2X has already failed due to a lack of adoption at that point, and disguising it won't change that. If there's adoption then you don't need this anyway.

This might cause things to get messy until the first >1MB block (non-witness data) gets mined as well. Up till now I thought the 2X fork was trying to be ethical and had good intentions in mind even with no replay protection, but this is the straw that broke the camel's back for me.

@monxas
Copy link

@monxas monxas commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

That's how you can tell there is consensus for their hard-fork; Because they have to hide their nodes.

@Logerfo
Copy link

@Logerfo Logerfo commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

I didn't realize the hate on 2X until this commit. Thanks for spoiling it!

@monxas
Copy link

@monxas monxas commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

@Logerfo Thing is, this updates is to hide segwit2x support. it's just full on attack to BTC. Why hide your intentions if you're legit?

@Logerfo
Copy link

@Logerfo Logerfo commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

@monxas I think I was not clear: I didn't realize the reason for the hate. You're right, now I do.

@jgarzik
Copy link
Author

@jgarzik jgarzik commented on 28ebbdb Oct 4, 2017

Choose a reason for hiding this comment

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

This is a privacy feature. See discussion at PR #109 for more.

This feature defaults to advertise (privacy=off).

Users may optionally disable advertising (privacy=on).

There is historical precedent with Internet browsers: https://stackoverflow.com/questions/7975996/why-does-internet-explorer-9-report-mozilla-in-useragent

Users also rightly requested privacy features like this due to past attacks:

Bitcoin Core violated the Robustness Principle as described in RFC 1122 and elsewhere. https://tools.ietf.org/html/rfc1122

Please sign in to comment.