FuelLabs / fuel-indexer

*Archived* 🗃 The Fuel indexer is a standalone service that can be used to index various components of the Fuel blockchain.
140 stars 67 forks source link

enhancement: forc index status: report indexer status and errors #1412

Closed lostman closed 1 year ago

lostman commented 1 year ago

Description

Closes #1316.

This PR adds information about active indexers to forc index status.

Testing steps

Start Fuel Indexer Service:

cargo run -p fuel-indexer -- run --fuel-node-host beta-4.fuel.network --fuel-node-port 80 --replace-indexer

Modify fuel-explorer to trigger a panic:

    fn index_block(block_data: BlockData) {
        let _x: Option<usize> = None.unwrap();
        ...
    }

Deploy:

forc-index deploy --path examples/fuel-explorer/fuel-explorer

Deploy another indexer:

forc-index deploy --path examples/hello-world/hello-world/

Check the status

cargo run -p forc-index -- status

Screenshot 2023-10-17 at 5 09 32 PM

fuel-explorer's status should be an error while the other indexer's status should be running, and the status message should show an increasing block count.

Changelog