Skip to content

feat(chainstate): Indexer api#2497

Open
iquidus wants to merge 1 commit intoindexer-logicfrom
indexer-api
Open

feat(chainstate): Indexer api#2497
iquidus wants to merge 1 commit intoindexer-logicfrom
indexer-api

Conversation

@iquidus
Copy link
Contributor

@iquidus iquidus commented Feb 6, 2026

Adds the api server for the chainstate indexer

Adds the api server for the chainstate indexer
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 0% with 226 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.60%. Comparing base (84c2080) to head (0704122).

Files with missing lines Patch % Lines
chainstate/api/server.go 0.00% 226 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                Coverage Diff                @@
##           indexer-logic    #2497      +/-   ##
=================================================
+ Coverage          39.02%   39.60%   +0.57%     
=================================================
  Files                557      511      -46     
  Lines              51655    45941    -5714     
=================================================
- Hits               20160    18196    -1964     
+ Misses             28950    25587    -3363     
+ Partials            2545     2158     -387     
Flag Coverage Δ
litt-tests ?
unit-tests 39.60% <0.00%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +203 to +220
// handleListQuorumAPKs returns a list of quorum APK snapshots.
func (s *Server) handleListQuorumAPKs(c *gin.Context) {
quorumID := parseUint8Or(c.Query("quorum_id"), 0)
blockNumber := parseUint64Or(c.Query("block_number"), 0)
minBlock := parseUint64Or(c.Query("min_block"), 0)
maxBlock := parseUint64Or(c.Query("max_block"), 0)

filter := types.QuorumAPKFilter{
QuorumID: core.QuorumID(quorumID),
BlockNumber: blockNumber,
MinBlock: minBlock,
MaxBlock: maxBlock,
}

apks, err := s.store.ListQuorumAPKs(c.Request.Context(), filter)
if err != nil {
s.logger.Error("Failed to list quorum APKs", "error", err)
c.JSON(http.StatusInternalServerError, gin.H{"error": "failed to list quorum APKs"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any reason for using REST over GRPC? iiuc most of backend DA interactions are done over GRPC transport

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants