First sketch of InvokeHostFunctionOp preflight endpoint. #3500
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements a new
preflight?blob=<InvokeHostFunctionOp>
HTTP endpoint which then runs the requested op synchronously against the current ledger in preflight / footprint-recording mode, and reports backIt also adds a new
getledgerentry?key=<LedgerKey>
HTTP endpoint, which returns a status, encoded ledger entry, and ledger number (for consistency validation on the caller), because there's some ongoing discussion about doing preflight in the CLI client / in an RPC host / closer to the operator and it's harmless to include at this point (it's short and not part of release builds or anything, easy to remove later).I also very slightly cleaned up the
tx?blob=
endpoint because it kinda looks like nobody has touched it in 7 years and it's a little messy. And I slightly cleaned up the existing call path forinvoke_host_function
.Addresses #3484 and stellar/stellar-cli#63