Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

soroban-docs: Update simulateTransaction Docs With New resourceConfig Parameter #683

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

stellarsaur
Copy link
Contributor

This PR adds documentation for the new simulateTransaction parameter added in this PR.

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Nice!! Is it true that we don't need manual updates to the copy anymore, @ElliotFriend?? :o \o/ (e.g. here for this page)

@stellar-jenkins
Copy link

@ElliotFriend
Copy link
Contributor

@Shaptic That is correct!! Just updating the openrpc.json file is enough for all the changes to show up where necessary.

Currently, the "source" files that I use to generate the complete specfile live in my own dinky repo, but will soon(-ish) live alongside this repo here for convenience.

@stellarsaur If it's alright with you, I'd love to add some examples and stuff to go along with this before we merge?

@ElliotFriend
Copy link
Contributor

@stellarsaur Is instructionLeeway actually a string type in the JSON request? It looks (to my, uneducated eye) like it would be a number since its JSON "tag" (probably not the right word) in the source doesn't convert to a string? https://github.com/stellar/soroban-tools/blob/9ea424dc1046c9b2a76044d428a18a227b29e737/cmd/soroban-rpc/internal/preflight/preflight.go#L79

@Shaptic
Copy link
Contributor

Shaptic commented Dec 19, 2023

Oof, nice catch @ElliotFriend - it is in fact a number

"required": false,
"schema": {
"title": "resourceConfig",
"description": "(optional) Configuration for how resources will be calculated",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to say (optional) because it will be rendered as such if "required": false

"instructionLeeway": {
"title": "instructionLeeway",
"description": "Stringified number - Allow this many extra instructions when budgeting resources",
"type": "string"
Copy link
Contributor

Choose a reason for hiding this comment

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

@ElliotFriend is right: it's unfortunately just a number

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for confirming! 😁

@ElliotFriend
Copy link
Contributor

@Shaptic @stellarsaur What would be a "usual" value that I might add as an instructionLeeway in the examples? 10? 1,000? etc?

@ElliotFriend
Copy link
Contributor

And, did this make it into v20.0.2? Or, will it be in a future release?

@Shaptic
Copy link
Contributor

Shaptic commented Dec 19, 2023

@ElliotFriend this will be released as part of 20.1.0, I think! And the default value is something like 3 million?

(@stellarsaur to confirm on both)

@stellar-jenkins
Copy link

Copy link
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

Thanks for helping to get this ready!

@ElliotFriend ElliotFriend merged commit e5d0239 into main Dec 21, 2023
2 checks passed
@ElliotFriend ElliotFriend deleted the rpc-resource-config branch December 21, 2023 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants