-
Notifications
You must be signed in to change notification settings - Fork 7
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
point-in-time, interactive state examination at epoch N via progressive HTML #3
Comments
Sounds super cool (and useful) to me! The name "diff" implies to me that I can actually input two different epochs and compare where the state changed - is that right? If so, it'd be useful as well for documenting to the community what parts of state are being updated in a network upgrade. |
Thanks! So just confirming some possible use cases:
|
Yeah! We originally devised this tool to perform a three-way diff when a test vector fails, between the expected state, actual state, and initial state. See how it's used here: https://github.com/filecoin-project/lotus/blob/master/conformance/runner_test.go#L222-L232. But the core of this tool is the recursion down the state tree and the interpretation of each node. So the goal of this issue is to repurpose/repackage that logic. Just had a chat with @willscott. After digesting the great exchange of ideas, my understanding is that this tool needs to:
Both features should support two output modes:
In order to make the HTML performant and usable, we desire to:
@willscott does this capture the most salient points of our discussion? |
Yep, agree with the write up of the design space.
|
If we plan to use things like Typescript, PostCSS, CSS-in-JS, fancy languages (e.g. JSX), etc. we will need to use a bundler and build tool. But if all we're using Vue for is to handle DOM changes and events (we don't need anything more than that), this will never be a shortcoming for us. Vue is designed to be imported at runtime as a library. You can use its compiler for fancier things, but we don't need them. It's very different to React and Svelte, which DO require using compilers.
If we serve it from filecoin.io, it will be cacheable and gzipped. It won't evolve very frequently, so the cache hit rate will be large.
I don't think we will encounter this issue if we embed the CAR in the HTML, in a <script /> section.
Which other state tree binding libraries exist? I honestly don't see a way around using Go for this. There may be some js IPLD libs for foundational pieces, but they are not as nearly as tested as the Go counterparts. And the specs-actors specific data structures are not implemented, AFAIK. It's a huge risk, effort and maintenance burden to duplicate all this logic in JS. |
This all sounds great, thanks. |
statediff already spiders down the state tree, dives into ADT data structures, and binds them to high-level objects. This allows us to go from a IPLD state tree, into a big typed struct that represents the state in a way that's inspectable (and diffable).
It uses a read-through CBORStore that falls back to RPC calls to fetch objects from a client.
The goal is to use these mechanics to enable point-in-time, interactive state examination at a given epoch.
The experience/flow we planned is:
The text was updated successfully, but these errors were encountered: