Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: batch RPC requests linked to storage queries #940

Closed
greged93 opened this issue Apr 9, 2024 · 11 comments · Fixed by #1491
Closed

dev: batch RPC requests linked to storage queries #940

greged93 opened this issue Apr 9, 2024 · 11 comments · Fixed by #1491
Labels
enhancement Enhancement of the code, not introducing new features. timebox-1day Exploratory issue: Do not spend more than a day on it to assess doability.

Comments

@greged93
Copy link
Contributor

greged93 commented Apr 9, 2024

Describe the enhancement request
The json RPC standard allows to send a batch of request (see link and link). This would allow us to batch the requests to the node for storage requests in the context of a call for example.

Describe Preferred Solution

  • Verify batch request is available on Juno.
  • Verify it is possible to build and send a batch request in Rust.
  • Explore the different hotpoints on our code where batching would improve the latency.
  • Implement a wrapper type in order to perform batch requests to a starknet json rpc.
  • Batch calls where possible

Links

@greged93 greged93 added the enhancement Enhancement of the code, not introducing new features. label Apr 9, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Backlog in Kakarot on Starknet Apr 9, 2024
@greged93 greged93 added the timebox-1day Exploratory issue: Do not spend more than a day on it to assess doability. label Apr 9, 2024
@hhamud
Copy link
Contributor

hhamud commented Jun 28, 2024

can I take this one? @greged93 @tcoratger

@greged93 greged93 added the blocked Blocked right now for external reasons label Jun 28, 2024
@greged93
Copy link
Contributor Author

greged93 commented Jun 28, 2024

hey @hhamud this is quite a complicated issue so probably better not if you don't have a lot of experience with our stack. This is actually still blocked for now anyway, waiting for this xJonathanLEI/starknet-rs#600 PR on starknet-rs.

anukkrit149 pushed a commit to karnotxyz/kakarot-rpc that referenced this issue Aug 9, 2024
Time spent on this PR: 0.5

## Pull request type

Please check the type of change your PR introduces:

- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

Not possible to return `model.EVM` from a test

Resolves kkrt-labs#940 

## What is the new behavior?

Serialize model.EVM + included struct + fix when returning struct and
not struct*

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/kkrt-labs/kakarot/995)
<!-- Reviewable:end -->
@Eikix
Copy link
Member

Eikix commented Oct 2, 2024

What is the status of this one @greged93

@greged93
Copy link
Contributor Author

greged93 commented Oct 2, 2024

I think batch calls were merged in starknet-rs 3 weeks ago so this is unblocked and open for contribution

@greged93 greged93 removed the blocked Blocked right now for external reasons label Oct 2, 2024
@greged93
Copy link
Contributor Author

greged93 commented Oct 2, 2024

Might need to check if this is supported on the release we are using for starknet-rs

@adrienlacombe
Copy link

done here

@Eikix
Copy link
Member

Eikix commented Oct 22, 2024

as I understand this, we are now able to move forward with this issue? cc @greged93

@greged93
Copy link
Contributor Author

I looked into this but actually there isn't really a place where we need this now, we could have used this before when we were querying two storage slots or two nonces but we don't anymore

@Eikix
Copy link
Member

Eikix commented Oct 23, 2024

I looked into this but actually there isn't really a place where we need this now, we could have used this before when we were querying two storage slots or two nonces but we don't anymore

how do we query storage slots? we don't need to query them two by two?

@greged93
Copy link
Contributor Author

No via the storage from the account contracts.

@greged93
Copy link
Contributor Author

We could actually use this in the retrieval of all the nonces for the relayers.

@github-project-automation github-project-automation bot moved this from 🆕 Backlog to ✅ Done in Kakarot on Starknet Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of the code, not introducing new features. timebox-1day Exploratory issue: Do not spend more than a day on it to assess doability.
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants