docs: contrast leo run and leo execute in the Executing guide#29546
Open
mvanhorn wants to merge 1 commit into
Open
docs: contrast leo run and leo execute in the Executing guide#29546mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
mohammadfawaz
left a comment
Collaborator
There was a problem hiding this comment.
Thanks! Just two suggestions.
| A typical development loop is to iterate with `leo run` until the function | ||
| behaves as expected, then switch to `leo execute` to produce the proof and | ||
| transaction. | ||
|
|
Collaborator
There was a problem hiding this comment.
Maybe worth adding a Running leo run` section here since we're now mentioning both commands in this file.
| execution proof, and produces a broadcastable [`Transaction`](https://docs.aleo.org/learn/core-concepts/transactions/index.html). | ||
| Pass `--broadcast` to send that transaction to the network. | ||
|
|
||
| A typical development loop is to iterate with `leo run` until the function |
Collaborator
There was a problem hiding this comment.
This flow is mostly correct for functions that don't have a final block. We should somehow make it clear that leo run is really only useful for iterating over the off-chain (i.e. circuit) part of the code.
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.
Motivation
The Executing guide (
documentation/guides/executing.md) walks throughleo executebut never mentionsleo run, so new developers are not told how the two commands differ or when to use each. This adds a short "leo runvsleo execute" section near the top of the guide that contrasts the two:leo runevaluates the function and prints outputs locally with no proof and no transaction, whileleo executecompiles, synthesizes the circuit, generates a proof, and produces a broadcastableTransaction. It also notes the typical dev loop of iterating withleo runfirst, then switching toleo executeonce the function behaves.The contrast matches the existing
documentation/cli/run.mdanddocumentation/cli/execute.mddescriptions of each command.Fixes #29379
Test Plan
Documentation-only change. Verified
markdownlint --config .markdownlint.yaml documentation/guides/executing.mdpasses (exit 0) and that the new headings render with balanced fenced code blocks.Related PRs
None.
AI was used for assistance.