Comments (5)
@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 git log
command:
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?
from hackerspace.
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.
from hackerspace.
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
Field Name | Type | Value Example |
---|---|---|
package | string | gno.land/r/my/package |
height | number | 23 |
name | string | Render |
params | json | {"name":"Render", "type":"string"} |
results | json | {"name": "_", "type": "string"} |
State Table
Field Name | Type | Value Example |
---|---|---|
package | string | gno.land/r/my/package |
height | number | 23 |
var_name | string | gBoards |
var_type | string | avl.Tree |
var_id | string | 7f83b1657ff1fc53b92dc18148a1daddd200126d9069:21 |
value | blob | [Content of the variable if any] |
refs_names | json | ["var.name"] |
refs_ids | json | ["7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1:43"] |
Query examples
Get last state for a specific var
SELECT
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 variable
SELECT
package,
value
FROM
states
WHERE
package='this.is/r/my/realm' and
var_name='avl.Tree';
Compare last two states of a variable
SELECT
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 package
SELECT
name
FROM
functions
WHERE
package='this.is/r/my/realm' and
height=last_height();
Get all packages using the Render function
SELECT
package
FROM
functions
WHERE
name='Render' and
JSON_LENGTH(params) == 1 and
JSON_LENGTH(results) == 1 and
height=last_height();
from hackerspace.
Cc @ajnavarro
from hackerspace.
cc @ilgooz do you have something similar in mind for Gno Studio?
from hackerspace.
Related Issues (20)
- Chain activity visualizer HOT 3
- Gno code coverage and plan improve it. HOT 4
- Reentrancy
- Gno Account Abstraction HOT 3
- Zone01 - Student Program Journey HOT 27
- Utilize `gno get` Command and Create Gno Package Center
- Onbloc x Gno Core Workshop
- WorxDAO Design HOT 1
- Zentasktic Builder Journey HOT 1
- Digital Audio Workstation
- Proposal for support Fully Onchain Games (FOCG) HOT 1
- Scalability of avl.Tree and Gas Limit R&D Findings & Recommendations from the dSocial Grant
- PoC Innovation - Student Program Journey HOT 11
- Testnet 4 Validator Initiative Discussion HOT 2
- Adapting Go security tools to the Gno ecosystem HOT 1
- Gno incubator with security audit grant
- Proposal: Developing Gno Name Service (GNS) HOT 1
- `pkg.gno.dev` - a gno package registry HOT 4
- `gnocrux` - a threshold TM2 signer
- META - Gno Live Coding Sessions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hackerspace.