espresso-sequencer icon indicating copy to clipboard operation
espresso-sequencer copied to clipboard

Add Block Explorer to Demos

Open Ayiga opened this issue 9 months ago • 0 comments

Closes #1276

This PR:

Adds the Explorer API to Sequencer nodes that are backed by SQL Storage.

This is necessary in order for the block-explorer to be added to the project when running the demo.

Add Block Explorer to process-compose and docker-compose

This adds the block-explorer as a docker deployable to the process-compose and docker-compose files so that the Block Explorer can be accessed for demo purposes.

This PR does not:

Build the Docker image for the Block Explorer, as that is already done in the block-explorer repo: https://github.com/EspressoSystems/espresso-block-explorer

Populate statistics or summary data for Rollup information. This is due to this information not being stored in a way that is easily queryable. It is a next implementation detail for the Explorer API in the HotShot Query Service.

Key places to review:

sequencer/src/state.rs:893 This implements conversion between FeeAmount to MonetaryValue. At the moment MonetaryValue is backed by an i128 whereas FeeAmount is backed by a U256. It is very possible for truncation / overflow here. It is desired to update MonetaryValue to allow for a larger precision in the future, but at the moment nothing gets large enough for this to matter yet.

How to test this PR:

just demo-native

Once up and everything's settled, you should be able to navigate to http://localhost:3000/ in order to check that the Block Explorer is reflecting the current state of Sequencer 1.

Things tested

I have manually tested the landing explorer page, search functionality, and the links between the different pages.

Ayiga avatar May 06 '24 15:05 Ayiga