Skip to content

Add indexes to structLogs objects #285

Description

@maledorak

To improve performance, we need to add indexes in structLogs objects on backend side (currently we are adding them on frontend during loading structLogs in analyzer saga)

In file: packages/transaction-trace-provider/src/sqsConsumer.ts function: processTx
We need to have add map which add index for every structLog object in array traceResult.structLogs

In file: packages/frontend/src/store/analyzer/analyzer.providers.ts class TransactionTraceFetcher function getStructLog Remove map for adding index to structLogs

Add TRawTransactionTraceResult as a type for updated traceResult object

Main issue - you have to update every single json file stored in:

  • transaction-trace-storage-prod.rumblefish.dev/trace/*
  • transaction-trace-storage-stage.rumblefish.dev/trace/*

Because there will be already traceResoults stored in files without index.
You need to update it (around 200 files on prd) or delete it all (it may be costly, because lambdas need to reprocess them all, but it will be with indexes)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions