Skip to content

refactor(feeder): use the new includeSignature flag in the get_state_update feeder endpoint#3601

Draft
thiagodeev wants to merge 8 commits intomainfrom
thiagodeev/feeder-optimizations
Draft

refactor(feeder): use the new includeSignature flag in the get_state_update feeder endpoint#3601
thiagodeev wants to merge 8 commits intomainfrom
thiagodeev/feeder-optimizations

Conversation

@thiagodeev
Copy link
Copy Markdown
Contributor

@thiagodeev thiagodeev commented May 4, 2026

  • Combine get_state_update + get_signature feeder calls into a single request by passing includeSignature=true to the get_state_update endpoint.
  • Update clients/feeder.Client.StateUpdateWithBlock to accept an includeSignature flag and decode the signature directly from the response.
  • Refactor adapters/sn2core.AdaptBlock to take []*felt.Felt instead of *starknet.Signature.
  • Extend starknet.StateUpdateWithBlock with an optional Signature []*felt.Felt field, populated when includeSignature=true.
  • Drop the now-redundant f.client.Signature(ctx, blockID) call in starknetdata/feeder.stateUpdateWithBlock.
  • Reformat clients/feeder/testdata/**/state_update_with_block/*.json fixtures by adding the signature field to it. The signature values were taken from the signature folder

Reference: https://demerzelsolutions.slack.com/archives/C03090TS3TK/p1777375140952279

Note:

  • this PR can only be merged after the feeder implements this new feature

@thiagodeev thiagodeev added the disable-deploy-test We don't want to run deploy tests with this PR because it might affect our development environment. label May 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 75.88%. Comparing base (af1fe00) to head (b730843).

Files with missing lines Patch % Lines
starknetdata/feeder/feeder.go 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3601      +/-   ##
==========================================
+ Coverage   75.87%   75.88%   +0.01%     
==========================================
  Files         387      387              
  Lines       34918    34914       -4     
==========================================
+ Hits        26493    26494       +1     
+ Misses       6556     6553       -3     
+ Partials     1869     1867       -2     

☔ 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.

@thiagodeev thiagodeev force-pushed the thiagodeev/feeder-optimizations branch from 77f8e8a to f5fbdf0 Compare May 5, 2026 12:37
@thiagodeev thiagodeev changed the title Thiagodeev/feeder-optimizations refactor(feeder): use the new includeSignature flag in the get_state_update feeder endpoint May 5, 2026
@thiagodeev thiagodeev force-pushed the thiagodeev/feeder-optimizations branch from d1a4412 to b9faf76 Compare May 5, 2026 16:30
@thiagodeev thiagodeev force-pushed the thiagodeev/feeder-optimizations branch from b9faf76 to b730843 Compare May 8, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disable-deploy-test We don't want to run deploy tests with this PR because it might affect our development environment.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant