Related to my recently submitted PR #22 that tries to build docker images to verify many existing mainnet contracts
What version are you using?
I am using the branch on that PR, which only extended the allowed set in builds.json to match the versions found "in the wild" of deployed contracts on Soroban mainnet.
What did you do?
./scripts/build_image.py --stellar-cli-version 23.2.1 --rust-version 1.86.0-slim-bookworm --rust-image-digest sha256:57d
415bbd61ce11e2d5f73de068103c7bd9f3188dc132c97cef4a8f62989e944
What did you expect to see?
I expected this to build, as there are multiple contracts using this combination of stellar-cli and rustc
What did you see instead?
I got a build error:
3.288 error: cannot install package `stellar-cli 23.2.1`, it requires rustc 1.89.0 or newer, while the currently active rustc version is 1.86.0
This proves that the rustc used to compile the contract is in many cases not the same rustc used to compile stellar-cli. This doesn't have to match as any stellar-cli from the same commit (on any compiler) must have the same actions/output. Apparently many people are using pre-compiled binaries from Github rather than compiling from source locally.
Proposal
I would propose either:
- Downloading pre-built stellar binary from github releases or anywhere else that is hosted OR
- Using a different rustc to compile stellar from that in the final image. This means 2 different rustc versions (for build and for the final runtime).
Especially if you are going with 2, I think we need to stop providing so many knobs and hardcode one rustc for each stellar version for the build stage in builds.json and always use that rather than passing in some choice in the build_image.py script
Related to my recently submitted PR #22 that tries to build docker images to verify many existing mainnet contracts
What version are you using?
I am using the branch on that PR, which only extended the allowed set in
builds.jsonto match the versions found "in the wild" of deployed contracts on Soroban mainnet.What did you do?
What did you expect to see?
I expected this to build, as there are multiple contracts using this combination of stellar-cli and rustc
What did you see instead?
I got a build error:
This proves that the
rustcused to compile the contract is in many cases not the samerustcused to compilestellar-cli. This doesn't have to match as anystellar-clifrom the same commit (on any compiler) must have the same actions/output. Apparently many people are using pre-compiled binaries from Github rather than compiling from source locally.Proposal
I would propose either:
Especially if you are going with 2, I think we need to stop providing so many knobs and hardcode one rustc for each stellar version for the build stage in builds.json and always use that rather than passing in some choice in the
build_image.pyscript