In an application, I'd like users to be able to declare, through a signed 32 byte number, the bitcoin protocol rules and data formats they will adhere to.

Presently, I'm envisaging this being the hash value of an annotated schema description document (e.g. JSON Schema). The schema will describe the construction of block header, coinbase tx and other transactions together with annotations to describe the nature of each component. It does not need to include the peer to peer message passing conventions.

I'm expecting the schema document to have many "synonyms". For example, changing a full-stop in the schema annotations will likely result in a wholly compatible schema, but with a different hash-value.

Does anything like this already exist?

Or, is there something else I could hash to achieve the same thing (the bitcoin core source code, compilers, and white paper for example)?

1 Answer 1


There isn't a formal specification. The nearest thing to that is probably one of

I believe none of these would have the properties you seem to be seeking. They do not have canonical forms that are insensitive to, for example, minor punctuation changes that are either meaningless or within non-functional commentary etc.

  • Thanks, I'm not asking for that insensitivity though; I see it as inevitable (yet tolerable). Concatenating and hashing the sources you suggest seems like a valid answer. The measure of usefulness for me, however, is "how easy is it to tell if (&where) there is a critical deviation between different schemas." Perhaps there's a way to improve by that measure so I'll leave the answer unaccepted for now.
    – Lee
    Apr 2 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.