LayerTwo-Labs / bip300301_enforcer

CUSF software enforcing BIP300 and BIP301 rules.
1 stars 4 forks source link

Use borsh instead of bincode for serialization #39

Closed nchashch closed 2 weeks ago

nchashch commented 2 weeks ago

https://borsh.io/

It is better for hashing.

nchashch commented 2 weeks ago

There are no cases where serialized data is hashed at the moment.

And bincode is fine for storing data in the database.

It would make sense to use borsh for hashing the serialized structured sidechain data for M1 after we implement it, but right now sidechain data is just a byte array.