Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

These days I generally advise that you interpret the version number as odd and even bits: odd means it's compatible with readers, even means it isn't.


That sounds interesting. Can you say a little more about how this works?


It's a trick I stole from ext2, and simplified. In that filesystem there are three bitsets: one for reading, one for writing, one for fsck. If you don't understand a bit you can't do that action.

For most protocols there's only reading and writing, so you can use odd bits to mean "backwards compatible features, you can read even if you don't understand" and even for "stop, we broke compat".


That's a good idea for filesystems. But OpenTimestamps Proofs aren't really "written to". They're created, and then later validated. Also, being cryptographic proofs, my philosophy is the validator should almost always understand them 100%, or not at all, to avoid any false proofs.

That's also why I picked a binary encoding: it's difficult to parse an OTS proof incorrectly. An incorrect implementation will almost always fail to parse the proof at all, with a clear error, rather than silently parse the proof incorrectly.


We use the same for Lightning: even bits for incompatible changes, odd for backwards compatible changes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: