Skip to content

Remove p2p alert system#7692

Merged
laanwj merged 7 commits intobitcoin:masterfrom
btcdrak:remove_alert
Mar 21, 2016
Merged

Remove p2p alert system#7692
laanwj merged 7 commits intobitcoin:masterfrom
btcdrak:remove_alert

Conversation

@btcdrak
Copy link
Contributor

@btcdrak btcdrak commented Mar 15, 2016

This completely removes the p2p network alert messaging system; however, internal alerts, partition detection warnings and the -alertnotify option features remain.

The purpose of the p2p alert messaging system is to communicate severe network issues which can be achieved using a variety of traditional means rather than the Bitcoin p2p messaging layer. A decentralised system should not have privileged users able to send alert messages on the Bitcoin network.

From the perspective of the Bitcoin Core project, if we need to communicate with Core specific users, it can be done using existing public channels (website, twitter, reddit, Slack) as well as an opt-in Bitcoin Core announce only mailing list.

@jonasschnelli
Copy link
Contributor

Concept ACK.
Needs rebase.

@maflcko
Copy link
Member

maflcko commented Mar 15, 2016

Concept ACK

@btcdrak
Copy link
Contributor Author

btcdrak commented Mar 15, 2016

@jonasschnelli rebased

@laanwj
Copy link
Member

laanwj commented Mar 15, 2016

Concept ACK. I had an earlier try at this with #6260, but tt's good that there is an alternative in the form of a mailing list now - that was pretty much the only concern.

Copy link
Contributor

Choose a reason for hiding this comment

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

New line deleted.

@paveljanik
Copy link
Contributor

Concept ACK.

@btcdrak btcdrak force-pushed the remove_alert branch 3 times, most recently from 946e128 to 93f23bc Compare March 16, 2016 09:18
@maaku
Copy link
Contributor

maaku commented Mar 16, 2016

This code is actually very useful for other projects that build off of bitcoin code base, and could be useful within the context of bitcoin if reconfigured. Perhaps just disable the code, not remove it entirely?

@laanwj
Copy link
Member

laanwj commented Mar 16, 2016

This code is actually very useful for other projects that build off of bitcoin code base

Sorry, but I don't think that's a valid reason to maintain code that we shouldn't have anymore. And I'm sure there's much better ways of doing this in derived projects as well, which don't rely on one network-wide secret key.

@rebroad
Copy link
Contributor

rebroad commented Mar 17, 2016

concept ACK

@achow101
Copy link
Member

So what has changed between now and several months ago when this was last attempted? Aren't the same reasons for not removing the alerts then still applicable today?

@laanwj
Copy link
Member

laanwj commented Mar 17, 2016

Aren't the same reasons for not removing the alerts then still applicable today?

Just read #6260 and the OP.
A few months ago pretty much everyone was in favor of this, but there was no alternative notification system yet. There is now a mailing list for alerts instead.

The alert system suffers from many problems:

  • Philosophically, there should not be a key with special meaning on the P2P network, this has always been a sore point with other node implementations. Like the checkpoints, it is seen as a centralized point of control, thus should go. If there is to be a network-wide alert system, that would also need a network-wide bureaucracy for managing it.
  • The alert system is hardly tested and maintained. It opens an attack surface to people possessing a certain private key, even though it is a fairly small one, there may be some bug in the alert system that would turn it into a full blown backdoor.
  • It is not clear what kind of emergencies qualify for using it (there was no agreement on using it to warn of the UPnP issue, even though it was a local network code execution exploit).
  • It's possible that this guy has or had access to it:
 gpg: encrypted with 4096-bit RSA key, ID EACB3C76, created 2010-07-22
       "Mark Karpelès <[email protected]>"

(and Satoshi, and possibly others who shouldn't really be able to)

A notification mailing list doesn't have any of these problems - it will be about announcements and alerts about this specific software, and we can directly control who has post access.

Note that I'm in no way against a 'better' alert system later on, such as one that doesn't rely on a special P2P message. There are some suggestions in #6260. But this one should go, and soon.

@achow101
Copy link
Member

A mailing list would work for this specific client, but what about network wide issues like a blockchain fork like the fourth of July fork?

Also, since the alert system is network wide, what will be done about other clients that still implement the alerts?

@laanwj
Copy link
Member

laanwj commented Mar 17, 2016

A mailing list would work for this specific client, but what about network wide issues like a blockchain fork like the fourth of July fork?

Network wide issues will also be posted to the mailing list. Also, other software can have their own mailing lists. Decentralization, you know. No one should be trusted with central responsibility to send alerts over the network.

what will be done about other clients that still implement the alerts?

They'll likely remove the code as well. Or not. In any case it will never be triggered again. It was never very useful for other clients, as they couldn't send messages of themselves (see #5160).

@btcdrak
Copy link
Contributor Author

btcdrak commented Mar 17, 2016

@achow101 Please note the alert system was not even used for the "July fork".

If Mark Karpeles has the key, how do we know he wasn't forced to hand it over to the Japanese police or that they have obtained it from accessing his computers? At this stage the key should be considered compromised at the very least, but in any case, a network wide, privileged messaging system is pretty outrageous for Bitcoin. It might have been a reasonable compromise in the early days, but we've definitely outgrown the need now.

@jl2012
Copy link
Contributor

jl2012 commented Mar 17, 2016

Concept ACK

1 similar comment
@NicolasDorier
Copy link
Contributor

Concept ACK

@achow101
Copy link
Member

@btcdrak Wait, it wasn't used in that fork? I thought it was.

Anyways, since it looks like there are better alternatives which allow for more decentralization, I agree with removing this.
Concept ACK.

Although, if/when this is merged, all of the other wallet developers should be informed so that they remove the code for processing alerts.

Also, maybe the community should be made aware of this decision since this is a protocol rule. I think that if this was merged without letting other people "vote" or debate this, it would probably result in a shitstorm about "The core developers are taking too much power by forcing protocol rules".

@instagibbs
Copy link
Member

Concept ACK

@laanwj
Copy link
Member

laanwj commented Mar 17, 2016

"The core developers are taking too much power by forcing protocol rules".

We're removing our own privileged position from the P2P protocol (note: not consensus) rules. Oh no! Taking so much power.

@achow101
Copy link
Member

We're removing our own privileged position from the P2P protocol (note: not consensus) rules. Oh no!

Yeah, and people can be irrational and there are also shills and conspiracy theorists trying to find every reason to discredit the Core devs

@btcdrak
Copy link
Contributor Author

btcdrak commented Mar 17, 2016

@achow101 This is not a consensus rule. We are choosing to remove centralisation from the Bitcoin Core distribution.

@laanwj
Copy link
Member

laanwj commented Mar 17, 2016

Yeah, and people can be irrational and there are also shills and conspiracy theorists trying to find every reason to discredit the Core devs

This is going very far off-topic. Let's keep it at this.

@achow101
Copy link
Member

@btcdrak Yes, I know. I am just saying that the reaction to this will probably be that even though it is a protocol rule.

@laanwj sorry (I've been hanging out at bitcointalk too long)

@luke-jr
Copy link
Member

luke-jr commented Mar 17, 2016

I'd prefer to see an equivalent alert system replacement first, but the risks to the current one are probably significant enough to warrant its early removal.

@whatisgravity
Copy link

The fact that this introduces a greater attack surface for an unknown group of people should be enough to remove it immediately.

Edit: Also isn't there clear conflict of interest issues with anyone who holds a key from arguing/voting on the existence of this feature?

This code is actually very useful for other projects that build off of bitcoin code base

They can look at previous commits, thats the point of version control.

@gmaxwell
Copy link
Contributor

@whatisgravity It's removed now-- it's worth noting that the main contributors to Bitcoin Core have been trying to remove it for a couple years now, but have (and continue to) suffered pushback from some parties... it took a while to overcome that.

@maaku
Copy link
Contributor

maaku commented Mar 24, 2016

Sorry, but I don't think that's a valid reason to maintain code that we shouldn't have anymore. And I'm sure there's much better ways of doing this in derived projects as well, which don't rely on one network-wide secret key.

That's the wonder of open source -- having code in a repository doesn't mean that you or the other core committers are required to personally support it, other than make sure that your own merged patches don't break automated unit tests.

If the features of the bitcoin core repository are limited to those which some subset of developers are specifically interested in supporting, it makes bitcoin core a rather uninteresting project to the wider community.

@laanwj
Copy link
Member

laanwj commented Mar 25, 2016

That's the wonder of open source -- having code in a repository doesn't mean that you or the other core committers are required to personally support it, other than make sure that your own merged patches don't break automated unit tests.

No, I disagree - at least how our project is structured - trying hard to handle issues and fix bugs that come up, for example - there is at least a little responsibility to the maintainers for what is in the repository.

Only passing the automated tests is short-sighted. At least as long as the automated tests don't cover everything on every scenario on every platform (and some things, like people that act in unpredictable ways, can hardly be covered by automated tests).

I do agree that you could structure an open source project that way. We're hampered also by the monolithic structure of the code. E.g. if the alert system was an external plugin, people who care about it could still maintain it, and we'd only have to make sure that our side of the API does what is advertised. But for better or worse, we have this bottleneck.

it makes bitcoin core a rather uninteresting project to the wider community.

Possibly. But on the other hand, what we do support we try to keep working as well as possible. It's a bit of a compromise, where on one side you have a heap of barely-third-party-maintained hacks and on the other side you have a cathedral. I try to keep to a sensible middle, as said above, as far as the code structure allows.

chjj added a commit to bcoin-org/bcoin that referenced this pull request Aug 25, 2016
@btcdrak btcdrak deleted the remove_alert branch December 3, 2016 10:54
sickpig referenced this pull request in sickpig/BitcoinUnlimited Mar 31, 2017
cfd519e Add release note documentation (BtcDrak)
6601ce5 protocol.h/cpp: Removes NetMsgType::ALERT (Thomas Kerin)
ad72104 Formatting (BtcDrak)
1b77471 Remove alert keys (BtcDrak)
01fdfef Remove `-alerts` option (BtcDrak)
9206634 Update alert notification and GUI (BtcDrak)
bbb9d1d Remove p2p alert handling (BtcDrak)
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
cfd519e Add release note documentation (BtcDrak)
6601ce5 protocol.h/cpp: Removes NetMsgType::ALERT (Thomas Kerin)
ad72104 Formatting (BtcDrak)
1b77471 Remove alert keys (BtcDrak)
01fdfef Remove `-alerts` option (BtcDrak)
9206634 Update alert notification and GUI (BtcDrak)
bbb9d1d Remove p2p alert handling (BtcDrak)

manual fixes

Signed-off-by: Pasta <[email protected]>

remove sendalert.cpp

Signed-off-by: Pasta <[email protected]>

CAlertNotify -> AlertNotify

Signed-off-by: Pasta <[email protected]>

remove alert.h

Signed-off-by: Pasta <[email protected]>

remove vAlertPubKey for DevNet

Signed-off-by: Pasta <[email protected]>

remove src/main.cpp
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request Mar 13, 2020
ce8ff4b [Doc] Document removal of p2p alert system (random-zebra)
a296c6f [Trivial] Fix NotifyAlertChanged comment (cs_mapAlerts not required) (random-zebra)
06fdc6a [Build] CMake: remove alert.cpp (random-zebra)
39c412a Remove alert keys (random-zebra)
936ca82 Remove p2p alert handling (random-zebra)
d06eceb Remove `-alerts` option (random-zebra)
2ebd863 Update alert notification and GUI (random-zebra)

Pull request description:

  This completely removes the p2p network alert messaging system.
  Based on upstream bitcoin#7692

  Patches CVE-2016-10724 / CVE-2016-10725

ACKs for top commit:
  Fuzzbawls:
    utACK ce8ff4b
  furszy:
    utACK ce8ff4b

Tree-SHA512: 40b2a023a53af880388337d52680fa100265ff704da8d51e889ca12cf97293cc0914ef3c4a57052ed342682fda08457f8f0fd8c0184d2aa408647ea6a0e5078d
akshaynexus added a commit to ZENZO-Ecosystem/ZENZO-Core that referenced this pull request Mar 15, 2020
ce8ff4b [Doc] Document removal of p2p alert system (random-zebra)
a296c6f [Trivial] Fix NotifyAlertChanged comment (cs_mapAlerts not required) (random-zebra)
06fdc6a [Build] CMake: remove alert.cpp (random-zebra)
39c412a Remove alert keys (random-zebra)
936ca82 Remove p2p alert handling (random-zebra)
d06eceb Remove `-alerts` option (random-zebra)
2ebd863 Update alert notification and GUI (random-zebra)

Pull request description:

  This completely removes the p2p network alert messaging system.
  Based on upstream bitcoin#7692

  Patches CVE-2016-10724 / CVE-2016-10725

ACKs for top commit:
  Fuzzbawls:
    utACK ce8ff4b
  furszy:
    utACK ce8ff4b

Tree-SHA512: 40b2a023a53af880388337d52680fa100265ff704da8d51e889ca12cf97293cc0914ef3c4a57052ed342682fda08457f8f0fd8c0184d2aa408647ea6a0e5078d
@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.