A vertical slice of P2SH in ElectrumSV

The node: Bitcoin SV

What do nodes do with transactions that include P2SH scripts?

The indexing server: ElectrumX

At this time, ElectrumX mostly deals with the needs of Bitcoin Core. This means that the blockchain isn’t intended for more than superficial use, and so the indexing is limited to complete script contents. There’s no nuances of analysing what is in the script. As long as it is spendable, ElectrumX hashes it and indexes all references to scripts that match the hash.

The wallet: ElectrumSV

A wallet knows the addresses it will have incoming payments on, and currently it registers for a designated number of these. It does so by constructing the output scripts these addresses are expected to feature in, and passes the hashes of these to ElectrumX as the things it should be notified about.

Final thoughts

It should be obvious at this point that bare multisig support should in theory be just a superficial change to the non-UI parts of ElectrumSV. ElectrumSV can make a script hash of each bare multisig script. ElectrumX already deals in script hashes, so it can notify ElectrumSV about these. The node is already doing the node things with bare multisig scripts.

Useful links

--

--

ElectrumSV developer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store