-
Notifications
You must be signed in to change notification settings - Fork 8
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
State / merkle tree visualizer #11
Comments
Cc @ajnavarro |
@moul I think you might be referring to https://dag.ipfs.tech/ , right? I love CLIs too, and the best Merkle tree visualizer I know is the Also, Merkle trees can be represented in a lot of different ways, ones are better for specific use cases. What do we want to show on that Merkle tree representation? |
Not sure, but maybe visualizing the state evolution at the end of execution or through an indexer could greatly aid in contract debugging and discovering new usages. |
cc @ilgooz do you have something similar in mind for Gno Studio? |
Maybe a crazy idea, but we can represent the realm states as a table and make queries filling a lot of different use cases: These are some of the possible tables that we can have: Functions Table
State Table
Query examplesGet last state for a specific varSELECT
package,
value
FROM
states
WHERE
package='this.is/r/my/realm' and
height=last_height() and
var_name='avl.Tree'; Get all the states of a variableSELECT
package,
value
FROM
states
WHERE
package='this.is/r/my/realm' and
var_name='avl.Tree'; Compare last two states of a variableSELECT
value as 'previous',
(
SELECT
value
FROM
states
WHERE
package='this.is/r/my/realm' and
height=last_height() and
var_name='avl.Tree'
) as 'actual'
FROM
states
WHERE
package='this.is/r/my/realm' and
height=last_height()-1 and
var_name='avl.Tree'; List all functions from a specific packageSELECT
name
FROM
functions
WHERE
package='this.is/r/my/realm' and
height=last_height(); Get all packages using the Render functionSELECT
package
FROM
functions
WHERE
name='Render' and
JSON_LENGTH(params) == 1 and
JSON_LENGTH(results) == 1 and
height=last_height(); |
I remember such amazing tools developed in the IPFS ecosystem to visualize merkle trees and CIDs in general. It was both useful for educational purpose but also for debugging.
Feel free to share existing projects that we could potentially adapt for our case.
Personally, I’d love something working in CLIs.
The text was updated successfully, but these errors were encountered: