Repository navigation
Document that the network rejects contracts built for a newer protocol - #3149
Open
stellar-doxie[bot] wants to merge 2 commits into
Open
stellar-doxie[bot] wants to merge 2 commits into
stellar-doxie[bot] wants to merge 2 commits into
Conversation
The Environment Meta sections said the interface version "should match" the host. State the rule the host enforces and the error a reader sees, and point readers at Software Versions for the SDK that matches their network.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
Author
|
🤖 Automated message from the Stellar Triage Bot. Reviewing because this is my own PR for #3145. Verified: the host rule and the error text match rs-soroban-env v30.0.0, and the preview renders all three pages. Ready to merge. What I checked
|
This branch was successfully deployed
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.
🤖 Automated message from the Stellar Triage Bot.
Closes #3145
Working this because it is a Raven-filed issue (raven label, finding sd-107). The Environment Meta sections said the interface version "should match" the host. This PR states the rule the host enforces and the error a reader sees.
Why this matters
Protocol 30 is on Testnet and Mainnet still runs 29. A contract built with a Protocol 30 SDK uploads on Testnet and fails on Mainnet with an error no page explains.
Changes
docs/learn/fundamentals/contract-development/overview.mdx: the rule, the error, the Testnet-first case, and a link to Software Versions.docs/tools/sdks/build-your-own.mdx: the full rule for SDK authors, including the pre-release number checks.docs/networks/software-versions.mdx: one paragraph in the intro warning. It names no version, so it does not go stale.build-your-own.mdx: the Contract Spec section said "To view the Contract Meta". Fixed to "Contract Spec". Fixed two typos ("proceeding", "mappins").Sweep
docs/,snippets/,openapi/,openrpc/and.mintlify/skills/for: "interface version", "should match the version", "newer than host", "newer protocol", "pre-release", "protocol number", "contractenvmetav0", "env-meta", "built for a newer/older".docs/tools/cli/stellar-cli.mdx:766describes env-meta. It is a committed copy of the CLI help and makes no claim about the rule. Left as is..mintlify/skills/: no hit.Verified
Verified against stellar-cli 30.0.1 and rs-soroban-env v30.0.0 (newest releases). The issue cited rs-soroban-env main at 5fdf6e6. The pages pin no version.
stellar/rs-soroban-env@v30.0.0 soroban-env-host/src/vm/parsed_module.rs:308-387(check_contract_interface_version). Older protocol needs pre-release 0. Current protocol needs a matching pre-release. Newer protocol fails with "contract protocol number is newer than host".soroban-env-host/src/host/lifecycle.rs:338-351builds a throwaway VM, which parses the env meta.soroban-env-common/src/meta.rs:16-20("a host will only run contracts built for same-or-older protocol versions").getLatestLedgerreturnedprotocolVersion: 29. I built thestellar contract inithello-world contract with soroban-sdk=30.0.0-rc.1(stellar contract info env-metashows Protocol v30).stellar contract upload --build-only --ignore-checks | stellar tx simulateon Mainnet failed withError(WasmVm, InvalidInput)and the diagnostic"contract protocol number is newer than host", 30.pnpm install --frozen-lockfile,pnpm format:mdx,pnpm check(includescheck:links): all passed. The OpenAPI warnings in the output are pre-existing.Not verified
--ignore-checks. The pages do not mention that check. I left it out because it covers only release candidates.Overlaps
docs/networks/software-versions.mdxin other hunks. Expect a clean merge in any order.Raven handoff (after merge)
/docs/learn/fundamentals/contract-development/overview,/docs/tools/sdks/build-your-own,/docs/networks/software-versions.contract protocol number is newer than hoston the first two pages, and "Mainnet upgrades to a new protocol after Testnet" on Software Versions.