Algod: Add experimental endpoint for simulating transactions against a real block evaluator#4436
Merged
Algod: Add experimental endpoint for simulating transactions against a real block evaluator#4436
Conversation
Dynamic budget checks in the evaluator complicate the gatekeeping. This functionality will be easier to add in the future after the `DebuggerHook` interface has been extended.
This test confirms an error spotted by @jannotti where `errors.As(…)` was always true. #4322 (comment)
jasonpaulos
reviewed
Dec 17, 2022
Comment on lines
+4206
to
+4213
| "failure-message": { | ||
| "description": "\\[fm\\] Failure message, if the transaction would have failed during a live broadcast.", | ||
| "type": "string" | ||
| }, | ||
| "missing-signatures": { | ||
| "description": "\\[ms\\] Whether any transactions would have failed during a live broadcast because they were missing signatures.", | ||
| "type": "boolean" | ||
| } |
Contributor
There was a problem hiding this comment.
This is just a placeholder for the actual information that will eventually be returned. It's intentionally minimal for the time being, and unless there's a serious concern, I'd rather leave this as is and focus on enriching this response in later PRs
jannotti
previously approved these changes
Dec 19, 2022
| ], | ||
| "summary": "Simulates a raw transaction as it would be evaluated on the network.", | ||
| "operationId": "SimulateTransaction", | ||
| "parameters": [ |
Contributor
There was a problem hiding this comment.
I agree, we need some sort of "envelope" to contain the transaction(s) and metadata. I find myself wanting this in the protocol itself often as well.
jannotti
approved these changes
Dec 19, 2022
This was referenced Jan 23, 2023
This was referenced Jan 30, 2023
tmc
pushed a commit
to tmc/go-algorand
that referenced
this pull request
Mar 7, 2025
…a real block evaluator (algorand#4436) Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds an initial implementation of the simulate endpoint.
This early implementation should be mostly functional, but its results are intentionally narrow for the time being. Following PRs will expand on the work here to add more useful information to the results.
The new endpoint can be used by sending a POST request to
/v2/transactions/simulate. This endpoint is tagged as experimental, which means it will not be enabled by unless theEnableExperimentalAPInode config flag is set to true.Test Plan
New tests added.
Follow up PRs