Skip to content

Add article about smart contract source code verification. - #2522

Draft
fnando wants to merge 3 commits into
mainfrom
sep-58
Draft

Add article about smart contract source code verification.#2522
fnando wants to merge 3 commits into
mainfrom
sep-58

Conversation

@fnando

@fnando fnando commented Jun 18, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 18, 2026 23:21
@fnando
fnando marked this pull request as draft June 18, 2026 23:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Creating Verifiable Contracts” getting-started lesson that introduces SEP-58 and walks readers through producing reproducible Soroban contract builds with embedded verification metadata.

Changes:

  • Introduces a new tutorial explaining verifiable contracts and SEP-58 metadata fields.
  • Documents a container-pinned build flow that embeds bldimg, bldopt, source_uri, and source_sha256 into the contract Wasm.
  • Provides a verification walkthrough showing how third parties reproduce and compare builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/build/smart-contracts/getting-started/creating-verifiable-contracts.mdx Outdated
Comment thread docs/build/smart-contracts/getting-started/creating-verifiable-contracts.mdx Outdated
Comment thread docs/build/smart-contracts/getting-started/creating-verifiable-contracts.mdx Outdated
Comment thread docs/build/smart-contracts/getting-started/creating-verifiable-contracts.mdx Outdated
@stellar-jenkins-ci

Copy link
Copy Markdown

@stellar-jenkins-ci

Copy link
Copy Markdown

@stellar-jenkins-ci

Copy link
Copy Markdown

@ElliotFriend

Copy link
Copy Markdown
Contributor

Thanks for this — the SEP-58 walkthrough reads great, and I see all the review feedback (env export, PowerShell env var, git archive --output, shasum) is already addressed. One thing before merge: is anything still blocking, or can you mark it ready for review? Happy to give it a final pass and merge once it's out of draft.

@fnando fnando self-assigned this Jul 14, 2026
@fnando

fnando commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@leighmcculloch could you please review this new article on SEP-58?

@ElliotFriend I'll get back to it asap. I need to follow it through from start to end and see if everything is working as described.

@leighmcculloch

Copy link
Copy Markdown
Member

It seems the PR preview isn't working.

@leighmcculloch leighmcculloch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, but definitely reads like it's been written with AI with a decent amount of filler. I suggested some rewords for the first couple paragraphs that do two things:

  • Shift the speaking style so it isn't repeating "you" a lot, we don't need to refer to the reader because the article is not about the reader.
  • Remove the filler, which in the two examples shifts from talking about what's being said, just saying what's the content.

And suggest doing a pass over the rest to do similar.

Everything otherwise looks right though so approving.

import TabItem from "@theme/TabItem";
import { getPlatform } from "@site/src/helpers/getPlatform";

When you deploy a contract, only its compiled Wasm bytecode lives on-chain. Anyone can read that bytecode, but it tells them nothing about _which source code_ produced it. A **verifiable contract** closes that gap: it embeds enough information for an independent third party to take the published source, rebuild it, and confirm that the result is byte-for-byte identical to what's deployed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"closes that gap" sounds like AI filler.

Suggest rewording:

Suggested change
When you deploy a contract, only its compiled Wasm bytecode lives on-chain. Anyone can read that bytecode, but it tells them nothing about _which source code_ produced it. A **verifiable contract** closes that gap: it embeds enough information for an independent third party to take the published source, rebuild it, and confirm that the result is byte-for-byte identical to what's deployed.
When a contract is deployed, anyone can read that bytecode, but it tells them nothing about _the original source code_ that produced it. A **verifiable contract** embeds enough information for an independent third party to discover the published source, rebuild it, and confirm that the result is byte-for-byte identical to what's deployed.


When you deploy a contract, only its compiled Wasm bytecode lives on-chain. Anyone can read that bytecode, but it tells them nothing about _which source code_ produced it. A **verifiable contract** closes that gap: it embeds enough information for an independent third party to take the published source, rebuild it, and confirm that the result is byte-for-byte identical to what's deployed.

This is what [SEP-58](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0058.md) standardizes. It defines a shared vocabulary for the build environment information needed to **reproduce a contract's Wasm bytes from source**, so that independent tools can interoperate without prescribing a single workflow.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
This is what [SEP-58](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0058.md) standardizes. It defines a shared vocabulary for the build environment information needed to **reproduce a contract's Wasm bytes from source**, so that independent tools can interoperate without prescribing a single workflow.
[SEP-58](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0058.md) standardizes the build information required to be able to reproduce a contract's Wasm bytes from source and a set of meta fields for when that data is embedded in a contract.

Comment on lines +85 to +94
```sh
export RUSTUP_TOOLCHAIN=$(docker run --rm --entrypoint rustup "$IMAGE" default | cut -d' ' -f1)
```

</TabItem>

<TabItem value="windows" label="Windows (PowerShell)">

```powershell
$env:RUSTUP_TOOLCHAIN = (docker run --rm --entrypoint rustup $IMAGE default).Split(" ")[0]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this happen inside the image automatically?

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.

4 participants