Comment

Comment by sunshowers

Thanks for the comment. To the best of my knowledge, Piper is not Merkle DAG based, and instead uses a (completely linear?) sequence number similar to Subversion. I believe they ended up faking those hashes for Fig. I'm not actually sure what they do for Jujutsu compatibility, maybe they've added a Merkle layer since.

We were compelled to model things as a DAG to be able to handle the occasional merge commit (this makes the algorithms a lot harder), and we wanted the Merkleness for its desirable properties such as being easily cacheable and straightforward to do integrity checks on. We wrote a bidirectional conversion layer between the Mercurial and Bonsai data models, with great attention paid to complete reversibility. (That's how I got into property-based testing, by the way! My coworker also used Alloy to formally verify the data model.)

The closest equivalent is probably Monotone, actually, though it only had one tree/manifest format which was baked into the changeset, while Mononoke got rid of that and _only_ relied on the changes, flipped the pointer directions, and generalized that to arbitrary kinds of derived data. (This was at the cost of having to maintain mapping layers in a database.)

parent sunshowers 16 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton