comit-network / RFCs

Request for Comments (RFCs) for the COMIT network
9 stars 3 forks source link

Bitcoin ledger definition should use "magic bytes" to identify the network #101

Open bonomat opened 5 years ago

bonomat commented 5 years ago

Currently we are using testnet and mainnet when talking about the different networks of Bitcoin. Every message between bitcoin nodes is prefixed with 4 bytes identifying the network the message is for.

We want to use those 4 bytes to identify the network in our swap messages. Hints:

DoD:

among others, this will need to be updated in the registry

Once this is done:

Related: https://github.com/comit-network/comit-rs/pull/1127

D4nte commented 5 years ago

I think testnet and mainnet are valid qualifications for the bitcoin networks. IMHO, the way bitcoind JSON RPC express these networks should not change the way we express them in our SWAP messages.

D4nte commented 5 years ago

After much debate with @thomaseizinger, my current proposal is to hold this back until we know more about client behaviour.

What we really need to do is see how the network parameter is used by the clients.

Hence the first step would be to add network verification for bitcoin on our client and see if we always do the same mapping.