input-output-hk / implementation-decisions

A repository for all concrete decisions made about how to implement the formal specs
Other
5 stars 5 forks source link

Revise bech32 discrimination length? #17

Closed SebastienGllmt closed 5 years ago

SebastienGllmt commented 5 years ago

I noticed in the bech32 spec that the discrimination between testnet and production is just a single bit. That doesn't seem flexible enough when you consider for example the fact that Ethereum has over 10 networks. Maybe this should be revised? It increases the amount of data on chain by 1 byte/address to do this but maybe it's worth it to avoid headaches down the line?

It may even get worse for us if we have multiple sidechains was originally planned in the future since every sidechain would need their own id.

SebastienGllmt commented 5 years ago

Ah nevermind. Re-reading through the spec I noticed

There is also no need to have more than 1 bit of address discrimination on the blockchain: the signature protocol takes into account the protocol magic (the blockchain discriminant).