Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MST implementation with support for operation inversion #914

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

bnewbold
Copy link
Collaborator

This is fairly similar to indigo/mst, but written from scratch in a more go-idiomatic style, with the intent of supporting record op inversion (for the "inductive firehose" proposal).

Goal is to have something that passes full interop tests with TypeScript codebase, and can validate commits on the firehose. Would take more perf work after that, and probably review, to get this in a state where it could be in the hot path in prod.

@bnewbold
Copy link
Collaborator Author

bnewbold commented Jan 21, 2025

Interesting: tests are passing for me locally (including clearing test caches), but failing in CI. Will need to dig in to that.

An open design question is how to split "repo" code from "MST" code. Most of this comes down to managing records to/from CAR slices, repo exports, blockstores, etc. And concept of "record operations": is that an MST concept, or a repo concept? Is testing inversion of ops something that happens as a batch from repo code, or by MST code?

Having helpers which "walk" the MST in various situations could help: when parsing blocks into a tree (visiting each node in-order); when serializing blocks to CBOR (either all blocks as repo export, or just "dirty" blocks); or just generally walking a subset or the entire tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant