Can a customized or non-bitcoin node be made to talk to a bitcoin node?


Is it possible to create a node with some different code from the bitcoin nodes but still able to talk to the bitcoin nodes? Is it possible for someone to customize their own node to add some functionality but still connect to bitcoin network and talk to other nodes?


Posted 2021-02-03T03:44:34.650

Reputation: 131



Of course.

Bitcoin nodes are just software that implements the Bitcoin P2P protocol. There are many software packages out there that do so (including full nodes, standalone wallets, indexing software, ...). There is no magic sauce that somehow blesses a particular piece of software into the realm of nodes - anything that speaks the protocol will do.

Furthermore, most of these (and probably all the ones you should care about) are open source, so making modifications to add functionality yourself is very much possible.

Pieter Wuille

Posted 2021-02-03T03:44:34.650

Reputation: 64 874

Can someone create a group of nodes that have smart contracts while other bitcoin nodes don't have smart contracts. Can it work like that? – YulePale – 2021-02-03T11:48:34.140

@YulePale Yes, it can. It might be tricky, but it is possible. – wizzwizz4 – 2021-02-03T12:14:56.753

Kindly explain, why might it be tricky? – YulePale – 2021-02-03T13:48:31.917

A subset of smart contracts are already supported by Script. If you extend the op-code language to support more op-codes, you'd need to do it such a way that the smart contracts would still be considered valid transactions by the rest of the network.

– Prunus Persica – 2021-02-03T15:02:53.520

I think I understand. Can a smart contract in another block-chain let us say ethereum be made such that it only executes when a certain transaction is made on the bitcoin network? Will it be secure? – YulePale – 2021-02-03T15:09:54.873

@YulePale Adding/changing scripting functionality requires a protocol change, and convincing ~everyone to adopt it. There are ways to do this in backwards compatible ways (search for "soft fork"), but it is nontrivial. – Pieter Wuille – 2021-02-03T18:29:34.223

@YulePale There are ways to let chains observe transactions in other chains, in theory, but it's not actually a connection between the two. It relies on creating a proof that tx A in chain B occurred, and publishing that proof in a transaction in chain C. It is complex (if poasible at all), and cannot deal with reorganizations well (as the other chain can't actually see the blocks on the first chain, only that a version of history in that chain ever existed that included said transaction). The details are probably off topic on this site. – Pieter Wuille – 2021-02-03T18:32:30.853

@PieterWuille what I am really asking is can two independent blockchains be designed to have a two way peg between each other? I asking if they can be designed form scratch because you just noted that changing scripting functionality requires a protocol change, and convincing ~everyone. I have seen there a few side chains like Bitcoin RSK doing this. Can you do the same with two independent blockchains? – YulePale – 2021-02-19T08:03:04.130