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

soroban-rpc: Validate xdr payloads in soroban-rpc requests #957

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

tamirms
Copy link
Contributor

@tamirms tamirms commented Sep 13, 2023

What

Validate xdr payloads in soroban-rpc requests.

Known limitations

[N/A]

@tamirms tamirms requested a review from a team September 13, 2023 12:45
@tamirms tamirms force-pushed the validate-xdr-requests branch from 0f68f0e to 90c9dae Compare September 13, 2023 12:50
@tamirms tamirms enabled auto-merge (squash) September 13, 2023 13:28
@tamirms tamirms merged commit 1ee4113 into main Sep 13, 2023
20 of 22 checks passed
@tamirms tamirms deleted the validate-xdr-requests branch September 13, 2023 14:30
Infof("could not validate ledgerKey at index %d from getLedgerEntries request", i)
return GetLedgerEntriesResponse{}, &jrpc2.Error{
Code: jrpc2.InvalidParams,
Message: fmt.Sprintf("cannot unmarshal key value %s at index %d", requestKey, i),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that we should duplicate the ledger key in the response. The caller should know what's the "third" or "fifth" ledger key they sent in the request.

Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

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

one comment - but looks good otherwise.

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.

3 participants