Skip to content

docs: contrast leo run and leo execute in the Executing guide#29546

Open
mvanhorn wants to merge 1 commit into
ProvableHQ:masterfrom
mvanhorn:docs/29379-run-vs-execute-executing-guide
Open

docs: contrast leo run and leo execute in the Executing guide#29546
mvanhorn wants to merge 1 commit into
ProvableHQ:masterfrom
mvanhorn:docs/29379-run-vs-execute-executing-guide

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Motivation

The Executing guide (documentation/guides/executing.md) walks through leo execute but never mentions leo run, so new developers are not told how the two commands differ or when to use each. This adds a short "leo run vs leo execute" section near the top of the guide that contrasts the two: leo run evaluates the function and prints outputs locally with no proof and no transaction, while leo execute compiles, synthesizes the circuit, generates a proof, and produces a broadcastable Transaction. It also notes the typical dev loop of iterating with leo run first, then switching to leo execute once the function behaves.

The contrast matches the existing documentation/cli/run.md and documentation/cli/execute.md descriptions of each command.

Fixes #29379

Test Plan

Documentation-only change. Verified markdownlint --config .markdownlint.yaml documentation/guides/executing.md passes (exit 0) and that the new headings render with balanced fenced code blocks.

Related PRs

None.

AI was used for assistance.

@mohammadfawaz mohammadfawaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

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.

Document the difference between leo execute and leo run in the Executing guide

2 participants