0

If the code used to run your crypto coin node needs updating, how is it done? Is the code sent as a patch as a transaction? Does the node code know how to receive and apply this patch? Or does someone just say "Hey, update your code."

Jiminion
  • 145
  • 4

2 Answers2

4

Bitcoin node operators will either

  1. Make it a habit to keep a look out for new versions of the software they are using and update their software (after reversible testing if they are sensible) or

  2. Hear from someone about new features that interest them or bugs that concern them and decide to update their software.

In the case of Bitcoin Core, you can download and install the new version in a fairly straightforward way so long as you havent made extensive configurations changes.


The Bitcoin network protocol doesn't have explicit support for software distribution.

Any network protocol used for automated distribution and automated installation of financially critical software would probably have to handle digital signatures of code, out of band key distribution, key revocation and a large number of other things that are difficult to get right and catastrophic if you don't.

Murch
  • 75,206
  • 34
  • 186
  • 622
RedGrittyBrick
  • 26,841
  • 3
  • 25
  • 51
1

If the code used to run your crypto coin node needs updating, how is it done?

There is no such thing as "needs updating", or at least no entity that can decide this. While protocol updates happen, it is up to individual users to decide whether to adopt the code changes for it. For invasive changes ("hardforks"), non-adoption does result in old and new nodes to effectively operate on different networks with different currencies, but Bitcoin hasn't had any such changes since 2013 (and even that one was by accident, see BIP50; the last deliberate hard fork was very early in its history in 2010). For normal protocol changes, most users can upgrade at their leisure - or not at all, due to backward compatibility.

Is the code sent as a patch as a transaction?

Who would get to decide to send such a patch? Wouldn't that person or entity not effectively decide what transactions are valid? That would run entirely counter to the problem the system is designed to solve.

Does the node code know how to receive and apply this patch? Or does someone just say "Hey, update your code."

This happens through normal software upgrading practices. Developer teams for node software will release a new version, and users can decide to install the update or not. The vast majority of all changes to node software is entirely unrelated to protocol changes, but as explained above, even the ones that do include protocol changes are generally not mandatory.

Pieter Wuille
  • 105,497
  • 9
  • 194
  • 308