refactor(feeder): use the new includeSignature flag in the get_state_update feeder endpoint#3601
refactor(feeder): use the new includeSignature flag in the get_state_update feeder endpoint#3601thiagodeev wants to merge 16 commits into
includeSignature flag in the get_state_update feeder endpoint#3601Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (51.67%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3601 +/- ##
==========================================
+ Coverage 76.16% 76.20% +0.03%
==========================================
Files 396 397 +1
Lines 36585 36541 -44
==========================================
- Hits 27865 27846 -19
+ Misses 6743 6726 -17
+ Partials 1977 1969 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
77f8e8a to
f5fbdf0
Compare
includeSignature flag in the get_state_update feeder endpoint
b9faf76 to
b730843
Compare
d71d865 to
9401d3e
Compare
a5252de to
4501be1
Compare
|
Not approving yet, only because I'd like to run this against my own Juno node first. Code-wise looks fine. |
RafaelGranza
left a comment
There was a problem hiding this comment.
After testing locally, sepolia-integration works as expected, and I would have
approved based on the approach we'd originally agreed on.
But since you'll be adding the capability-detection on top of this so it stays
compatible with all Starknet versions, I'd rather wait and re-test once that
lands before approving.
1afc808 to
d6ebb1b
Compare
|
Holding off on approval. I know the capability detection is coming in a follow-up, but I'd rather see the optimization and the detection land as a single PR. Otherwise the node sits in a half-broken state in between, working on Happy to approve as soon as the two are combined. |
… and adjust related tests + new includeSignature for stateUpdateWithBlock feeder inner func
…ate update with block json to include signature
…ion test data, and make tests use it
…dateWithBlockAndSignature methods
…sponse decoding into a single doRequest function
34e9a6e to
4457b3c
Compare
Combine
get_state_update+get_signatureinto a single feeder call by passing the newincludeSignature=trueparameter toget_state_update. Removes the redundantf.client.Signature(ctx, blockID)call instarknetdata/feeder.stateUpdateWithBlock.clients/feeder.Client.StateUpdateWithBlockinto two methods:StateUpdateWithBlock(ctx, blockID)— unchanged behaviour, no signature.StateUpdateWithBlockAndSignature(ctx, blockID)— single request, returns state update + block + signature.starknet.StateUpdateWithBlockAndSignaturetype carryingSignature []*felt.Felt.adapters/sn2core.AdaptBlocknow takes[]*felt.Feltinstead of*starknet.Signature.clients/feeder/testdata/**/state_update_with_block/*.jsonfixtures to include thesignaturefield (values pulled from the matchingsignature/*.json)Reference: https://demerzelsolutions.slack.com/archives/C03090TS3TK/p1777375140952279
Extra:
clients/feeder/feeder.go, per-methodc.get+json.NewDecoder(body).Decode(&x)boilerplate was replaced by a single genericdoRequest[T any](ctx, client, queryURL) (*T, error)helper. Methods in the file are now sorted alphabetically. No behavioural change, just style.Note:
TODO