Skip to content

Instantly share code, notes, and snippets.

View jimmysong's full-sized avatar

Jimmy Song jimmysong

View GitHub Profile
@jimmysong
jimmysong / gist:46fc6ddce20b4f99072e939f1566b8ca
Created January 11, 2021 05:28
Verifying Jimmy's Identity on Mastadon
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My Mastadon username is @jimmysong@bitcoinhackers.org
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEwdeXvn0QUpEijNcM+qYX4yZ55FUFAl/74YQACgkQ+qYX4yZ5
5FVmAAf+O4fFMmT9Hpi+xZ3jFfr6fvc9TXCvfG+dwn5Jh8wCAuha1xtzF1mgbJjC
8WRVkFkGPDbKZbMnl+h6s/QxL0NV24Vri6z5u6EnEwjJ+vivTuvQ/8sCIT+wB/wC
xGAxUmu/knbowhrwvUEJd+gI2Lq8ghelDL48uAIiWdduN5ZLb4XezIor9owrcklz
@jimmysong
jimmysong / gist:4c72d098255b217b4c8c
Last active March 22, 2017 04:12
How to test bitcoin alerts

How to test bitcoin alerts

Motivation

Programming for bitcoin can be a bit of a pain at times. There's a lot of esoteric knowledge required and not everything is documented that well, though with some of the newer documentation projects like the [bitcoin developer documentation][devdocs], it's getting easier.

One thing I ran into recently is the existence of bitcoin alerts. These are alerts that are sent by the core developers onto the entire bitcoin network to warn of serious security events. They don't come up very often (there's [only been 8][alertlist] in the entire history of bitcoin as of this writing), but if your application is built on top of it, you'd better handle it.

The problem, though, is that the alerts are actually signed by a key controlled by the core developers. You can't just create new alerts for testnet, for example, as every other bitcoin client, including your own, will ignore them. So how do you test them?