Skip to content

CartesiScan Third Iteration #353

@brunomenezes

Description

@brunomenezes

📄 Context

The node-rollups v2 introduces the json-rpc endpoint and initiates the deprecation of the graphQL API. It could be a matter of simply replacing the GraphQL parts we implemented with the new json-rpc, but that would not be a significant future-proof change. Mainly with the addition of DAs (e.g., Espresso Sequencer), it became clear to me last year (2024) that it would create holes, and the L1 would not have enough information, as some pieces of data would go to another place, even though deposits would still pass through the InputBox.

This new iteration requires a clean mindset without comparing or trying to adapt how we do things today in terms of architecture, i.e. Indexing L1 pieces together with a UI offering off-chain reads. We would be more integrated and trusting in the interface provided by the Cartesi Rollups Node API.

At a high-level view, in terms of reads, we would solely consume data from the node to provide information about applications, inputs, outputs, etc. (i.e., we would not have an indexer). That means the entry point is the user providing the URL to that API, which allows the user to explore what is available in the node they have or trust. Providing all supported networks in one place.

For the writing (Send Transaction), minor changes would be required, as this is the usual communication with the blockchain directly.

I was inspecting the OpenRPC Playground pointing to node-rollups (v2.0.0-alpha.6) and there are a few information pieces not available.

Following that line, I need to exchange information with whatever node the user decides to plug before even start operations.

Here is the information I would request:

  1. What is the chain ID the node is configured with?
  2. What is the rollups-contracts version the node is using?

Could we have an RPC method to exchange information about the node? e.g. cartesi_getRollupNodeConfig (whatever the name is, as far as I can have the information above).

For the point 1. I noticed that cartesi_getInput or cartesi_listInputs contains the chain_id in the decoded_data, but this assumes there is already at least one input; it may not have, and it is not the complete picture for our case.

This information gives me the power to vet the node at the very start, with enough information and solid ground to decide whether it is supported or not.

For a visual, the diagram below illustrates our current position and my desired destination.

Details

 

High-level Diagram (Click to Expand)

Image

Metadata

Metadata

Assignees

Labels

Status: DiscussionCollaboratively refine some idea / featureStatus: RefiningDefinition of the issue content is in-progressType: InitiativeA broader goal involving more teams.

Type

No type

Projects

Status

📌 Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions