Skip to content

Design and migrate time-series schema for soroban contract metrics #46

Description

@christabel888

Context: Schema work backing the Soroban Dashboard endpoints (#21-#24). Distinct from the already-existing contract_events table (migration 022) -- this is aggregated/rolled-up data, not raw events.

Where:

  • New migrations/032_create_soroban_metrics_timeseries.sql

What to do:

  • Daily rollup table(s): active-contract-count, call-count, gas-usage per day, sourced from contract_events.

Suggested approach:

  1. This is a rollup of contract_events (raw) into daily aggregates -- don't duplicate raw event data, compute from it.
  2. Design for the specific queries Add /api/v1/soroban/active-contracts endpoint #21-Add /api/v1/soroban/top-contracts and /new-deployments endpoints #24 need: active-contract-count, call-count, gas-usage per day.

Watch out for:

Definition of done:

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