Skip to content

Remove alert system#6260

Closed
laanwj wants to merge 1 commit intobitcoin:masterfrom
laanwj:2015_05_remove_alert_mechanism
Closed

Remove alert system#6260
laanwj wants to merge 1 commit intobitcoin:masterfrom
laanwj:2015_05_remove_alert_mechanism

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Jun 9, 2015

This completely removes the P2P network alert system.

Internal "alerts", such as fork warnings, along with the -alertnotify option are kept.

Removes the last vestiges of centralization, and puts an end to discussions such as #5160.

This completely removes the P2P network alert system.

Internal "alerts", such as fork warnings, along with the `-alertnotify`
option are kept.
@laanwj laanwj added the P2P label Jun 9, 2015
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to keep the alert text sanitization?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so. It's just belt and suspenders, prudent in case a) some external string leaks into the warning b) some message from inside the program accidentally results in a shell escape.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds like a reasonable explanation to me.

@petertodd
Copy link
Contributor

utACK

@jgarzik
Copy link
Contributor

jgarzik commented Jun 10, 2015

hmmmm. I agree w/ the theory.

To be practical, some sites either implicitly or explicitly rely on this to save their pants in some cases, like it or not.

Yanking it without replacement or user communication negatively impacts current users and leaves them less protected versus today.

To proceed, something like an optional PGP-based alert network should be in place, with an initial membership list similar to bitcoin-security. With that in place, I could ACK this change.

@petertodd
Copy link
Contributor

@jgarzik I suggested awhile back that we use transactions themselves as the broadcast medium for alerts; authenticate via scriptPubKey and put the message in an OP_RETURN. If miners are censoring the txs, not a big deal, if they aren't you have strong guarantees that you haven't missed any. Finally, spam is handled by fees, so you don't need need whitelists of who's allowed to make an alert.

@laanwj
Copy link
Member Author

laanwj commented Jun 10, 2015

@jgarzik An alternative notification system would be useful; as you say, it could just be a mailing list people can subscribe to. The transaction-based system could be useful too, although it would need to be external to the core client. No hardcoded whitelist anymore.

There is a pressing reasons why this centralized broadcast system should be removed from the core network and core client, though. There is no longer consensus (neither within nor outside the development team) as to what is the way forward for Bitcoin, making such a system a liability.

Copy link
Member Author

Choose a reason for hiding this comment

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

This test is unrelated to the P2P alert system and should be kept

@jgarzik
Copy link
Contributor

jgarzik commented Jun 10, 2015

Either way it is only right to assess the impact from the point of view of current users and current field needs and expectations, regardless of where a moving-forward consensus may lie...

@wtogami
Copy link
Contributor

wtogami commented Jun 10, 2015

As much as I agree with the good reasons to remove the alert system, I wonder if we should first discuss alternatives.

https://en.bitcoin.it/wiki/Alerts
theymos mentioned major drawbacks that we would have if the alert system were to be completely removed. Alerts have been historically useful in times of emergency to warn users about bugs. Would we be able to inform everyone quickly enough in the next emergency?

https://github.com/ElementsProject/elementsproject.github.io/
I am curious if we would be better off with some kind of improved alert system like n-of-m multisig. For example, the development demo Alpha sidechain currently is deployed with a simple 2-of-3 multisig alert system. Multisig alerts would be an improvement over the current alert system in at least two ways:

  • No single signer can abuse the alert system.
  • Signer identities would be known to the community, so it could improve accountability.

petertodd's idea of using valid transactions to relay alerts may also be an improvement. Multisig alert transactions would relay over the existing network, be DoS limited by fees, and be superior to the current alerts in that they become known to nodes from both the blockchain and tx relaying into the mempool.

Yes, it is a good question as to who does the community trust with the signing keys, and what n-of-m multisig threshold is needed. I am only saying maybe we should think about this harder before simple removal?

@petertodd
Copy link
Contributor

The problem isn't having a alert system; the problem is we don't have a good way of having more than one alert system. n-of-m multisig helps this, but it's not a huge improvement.

Anyway, I don't see any technical downsides to using valid transactions as alerts; I'd be happy to code this up.

@wtogami
Copy link
Contributor

wtogami commented Jun 10, 2015

It could be valid n-of-m multisig transactions that become alert carriers?

(I don't know if this is a good idea, just mentioning it.)

@petertodd
Copy link
Contributor

@wtogami Yes exactly. Basically that provides a flood-fill mechanism with anti-spam protections, removing the need to have a whitelist of allowed alert signers. You'd just specify a P2SH address allowed to send alerts and put the alert itself in an 80-byte OP_RETURN.

Actually authenticating the alerts is easy for full nodes. For P2SH nodes, a neat trick is to take advantage of the fact that the P2SH redeemScript is in the scriptSig, which lets them both match it via bloom filters, and then re-run the script validation to validate the alert.

@gmaxwell
Copy link
Contributor

I've been suggesting this be removed periodically for some time now. It's a point of centralization we don't need, and don't benefit from-- one which creates other confusion and discord. Multisig is nice but doesn't really address the fundamental problems with it.

If we wanted to have something to alert people that they were potentially on the "wrong" fork, something that caused a message upon burning 500 fork-BTC would be a lot more equitable.

@petertodd
Copy link
Contributor

If we wanted to have something to alert people that they were potentially on the "wrong" fork, something that caused a message upon burning 500 fork-BTC would be a lot more equitable.

That's a brilliant idea.

Though to do it well we really need a OP_GETBLOCKHASHVERIFY all all the fuss that entails. (possible too with spending recently mined coins, but kinda a pain to arrange)

@gmaxwell
Copy link
Contributor

well you just move them first on the other chain. Best to do when you're really sure that that other chain isn't going to lose. :)

@petertodd
Copy link
Contributor

@gmaxwell Indeed! Beng able to guarantee you won't lose unless it wins it much easier. :)

@theymos
Copy link

theymos commented Jun 11, 2015

IMO alerts should still exist in some form for serious software bugs. For example, it seemed possible that heartbleed could have been used to steal bitcoins from users of Bitcoin-Qt in some cases (though apparently this was later learned to be unlikely). Users should be warned about this kind of thing, especially on Windows where there is no package manager and users expect their programs to auto-update themselves.

If there's any concern about alerts being misused, they could be restricted to a limited set of codes that the client expands into full warning messages (which can also be localized). For example, an alert with text "crit_vuln" might expand to "URGENT: This version may contain a critical security vulnerability. Shut it down right away and watch your favorite Bitcoin sites for news about updates. Be sure to verify the signatures of any new version before you run it."

@laanwj
Copy link
Member Author

laanwj commented Jun 11, 2015

OK, closing this, too controversial.

If anyone is interested in this, I'll maintain a patch set separtely.

@laanwj laanwj closed this Jun 11, 2015
@jtimon
Copy link
Contributor

jtimon commented Jun 12, 2015

If there's any concern about alerts being misused, they could be restricted to a limited set of codes that the client expands into full warning messages (which can also be localized). For example, an alert with text "crit_vuln" might expand to "URGENT: This version may contain a critical security vulnerability. Shut it down right away and watch your favorite Bitcoin sites for news about updates. Be sure to verify the signatures of any new version before you run it."

I think this (limit the alert messages that can be send) combined with bitcoin scripting for the signatures (to get multisig) would be a minimum to move to in case we wan't to maintain a centralized alert system for non-fork alerts.
Implementing @gmaxwell 's mechanism for fork alerts in parallel would be interesting too, of course.
In fact all 3 things can be implemented in parallel if there's interest on them. The later seems a minimum requirement for completely eliminating the centralized alerts.

@laanwj
Copy link
Member Author

laanwj commented Jun 12, 2015

Continued in #6274.

laanwj added a commit to laanwj/bitcoin that referenced this pull request Jun 15, 2015
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of bitcoin#6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.
laanwj added a commit that referenced this pull request Jun 15, 2015
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.

Conflicts:
	src/init.cpp
	src/main.cpp

Github-Pull: #6274
Rebased-From: 02a6702
laanwj added a commit that referenced this pull request Jun 15, 2015
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.

Github-Pull: #6274
Rebased-From: 02a6702
@laanwj laanwj mentioned this pull request Mar 15, 2016
reddink pushed a commit to reddcoin-project/reddcoin-3.10 that referenced this pull request May 27, 2020
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of bitcoin#6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.

Conflicts:
	src/init.cpp
	src/main.cpp

Github-Pull: bitcoin#6274
Rebased-From: 02a6702
(cherry picked from commit be64204)

# Conflicts:
#	src/main.cpp
#	src/main.h
@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.

7 participants