0xPolygonMiden / miden-node

Reference implementation of the node for the Polygon Miden rollup
MIT License
50 stars 30 forks source link

[Task]: Miden Block Explorer #299

Closed 0xs34n closed 1 week ago

0xs34n commented 3 months ago

Node's components affected by this task

What should be done?

Hi team, my name is Sean and our team will help build the Miden block explorer. We are the team behind Starkscan.

To help get started, we'll need data from the RPC node.

Based on my limited knowledge of Miden, we could retrieve the following data:

Blocks

Accounts

Notes

Transactions

Nullfiiers

How should it be done?

When is this task done?

Additional context

Here is a high-level overview of the design of the block explorer

Screenshot_2024-04-05_at_3 09 28_PM

Data from the Miden node will be indexed into a database for analysis, retrieval, filtering, sorting, and searching purposes. The indexed data is exposed to the frontend app via GraphQL and REST APIs.

bobbinth commented 3 months ago

@0xs34n thank you for such a detailed description! A few comments below:

Based on my limited knowledge of Miden, we could retrieve the following data:

A few comments on what's currently available:

As can be seen from above, we are missing quite a few endpoints that would be useful to you. I think there are a couple of approaches to remedy this:

  1. We could create individual endpoints to retrieve some of the missing data (e.g., GetNotesForBlock).
  2. We could create an endpoint to retrieve full block data (this could be something like GetBlockById or maybe a streaming service returning something similar to ApplyBlockRequest messages).

Each of these has pros and cons - though, I think in the longer term, the second approach is probably the right one.

Do you guys have any preferences?

0xs34n commented 3 months ago

Either of the endpoints are fine, don't think we'll need a streaming service at this time. Thanks!

bobbinth commented 2 months ago

GetBlockByNumber endpoint was implemented in #340 and we'll include it into the next release (which is planned to be done in the next week or so).

0xs34n commented 2 months ago

Congrats on the alpha launch!

Let us know when the GetBlockByNumber endpoint is available so we can start indexing.

bobbinth commented 2 months ago

Congrats on the alpha launch!

Let us know when the GetBlockByNumber endpoint is available so we can start indexing.

Thank you! We've deployed the v0.3.0 node (with GetBlockByNumber) to our testnet (18.203.155.106) recently. Take a look and let us know if you run into any issues/questions.

Dominik1999 commented 1 month ago

Requested

https://github.com/0xPolygonMiden/miden-node/issues/374 https://github.com/0xPolygonMiden/miden-node/issues/375

bobbinth commented 1 week ago

Closing this as most (all?) functionality should not be available in the block struct return from the GetBlockByNumber endpoint. @0xs34n - if anything is still outstanding, could you create issue(s) for that?