Skip to content

Improve indexer with block events #2305

@baktun14

Description

@baktun14

Why

We currently index with messages and transaction events. Sometimes, events happen on the block level and we miss them entirely. For example, when the latest upgrade happened: https://www.mintscan.io/akash/block/24332547?sector=events

What

Instead of indexing transaction events, we need to switch to block events:

for (const [index, event] of blockResults.txs_results[txIndex].events.entries()) {

Block with a lot of events (chain upgrade closing deployments): https://consolerpc.akashnet.net/block_results?height=24247750
https://www.mintscan.io/akash/block/24332547?sector=events

DbSchema: https://github.com/akash-network/console/blob/f269ffd79243c57ff90fbacabdb9a0e14cf2cda2/packages/database/dbSchemas/base/transaction.ts

Possible akash events: https://github.com/akash-network/chain-sdk/blob/aa1c1e92/go/util/events/publish.go#L161-L174

Possible cosmos events: https://deepwiki.com/search/are-the-block-events-docurment_5ffc41d3-d99b-49ed-b31c-9a1f446c2735?mode=fast

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions