Skip to content

Commit 5013348

Browse files
authored
feat: upgrade to stellar protocol 27 (#549)
- Upgrade entire stack to Protocol 27: stellar-cli v27, soroban-sdk 27.0.0-rc.1, stellar-xdr 27.0.0, stellar-rpc-client 27.0.0 - Fix CI: update stellar/stellar-cli action to v27.0.0 in both build and test jobs - Remove admin-sep dependency for test fixtures; rewrite hello_v1/hello_v2 fixtures with minimal inline upgrade logic - Fix soroban-cli v27 breaking API changes
1 parent b6e0654 commit 5013348

53 files changed

Lines changed: 732 additions & 7513 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ updates:
2020
- minor
2121
- patch
2222

23-
- package-ecosystem: "npm"
24-
directory: "/npm"
25-
schedule:
26-
interval: "weekly"
27-
groups:
28-
npm-minor:
29-
update-types:
30-
- minor
31-
- patch
32-
3323
- package-ecosystem: "cargo"
3424
directory: "/"
3525
schedule:

.github/workflows/tests.yml

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- uses: taiki-e/install-action@just
3737
- uses: taiki-e/install-action@nextest
3838
- uses: cargo-bins/cargo-binstall@main
39-
- uses: stellar/stellar-cli@v26.0.0
39+
- uses: stellar/stellar-cli@v27.0.0
4040
- uses: mozilla-actions/sccache-action@v0.0.10
4141
- run: just build
4242
- run: just build-cli-test-contracts
@@ -85,25 +85,42 @@ jobs:
8585
STELLAR_NETWORK_PASSPHRASE: "Standalone Network ; February 2017"
8686
STELLAR_ACCOUNT: default
8787
STELLAR_CONTRACT_ID: core
88-
services:
89-
rpc:
90-
image: stellar/quickstart:testing
91-
ports:
92-
- 8000:8000
93-
env:
94-
ENABLE_LOGS: true
95-
NETWORK: local
96-
ENABLE_SOROBAN_RPC: true
97-
options: >-
98-
--health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'"
99-
--health-interval 2s
100-
--health-timeout 5s
101-
--health-retries 50
10288
steps:
10389
- uses: actions/checkout@v6
10490
- uses: taiki-e/install-action@just
10591
- uses: taiki-e/install-action@nextest
106-
- uses: stellar/stellar-cli@v26.0.0
92+
- uses: stellar/stellar-cli@v27.0.0
93+
# Start the local network through the CLI itself — the same path
94+
# `stellar scaffold build` drives for users — so the suite validates the
95+
# real plumbing. Without an explicit protocol, quickstart's local network
96+
# arms its baked-in default (p25) and p27 contracts fail transaction
97+
# simulation on deploy.
98+
- name: Start local Stellar network
99+
run: |
100+
# Single source of truth: derive the protocol from the stellar-cli pin
101+
# in Cargo.toml — the same value build.rs bakes into the CLI binary.
102+
PROTOCOL_VERSION=$(sed -n 's/.*stellar-cli = .*version = "\([0-9]*\).*/\1/p' Cargo.toml | head -1)
103+
if [ -z "$PROTOCOL_VERSION" ]; then
104+
echo "Could not derive protocol version from stellar-cli pin in Cargo.toml" >&2
105+
exit 1
106+
fi
107+
echo "Starting local network at protocol $PROTOCOL_VERSION"
108+
stellar container start local --protocol-version "$PROTOCOL_VERSION"
109+
echo "Waiting for RPC + friendbot to become healthy..."
110+
for _ in $(seq 1 50); do
111+
if curl --no-progress-meter --fail-with-body -X POST "http://localhost:8000/soroban/rpc" \
112+
-H 'Content-Type: application/json' \
113+
-d '{"jsonrpc":"2.0","id":8675309,"method":"getNetwork"}' >/dev/null 2>&1 \
114+
&& curl --no-progress-meter "http://localhost:8000/friendbot" 2>/dev/null \
115+
| grep -q '"invalid_field": "addr"'; then
116+
echo "Local network healthy."
117+
exit 0
118+
fi
119+
sleep 2
120+
done
121+
echo "Local network failed to become healthy in time." >&2
122+
docker logs stellar --tail 100 || true
123+
exit 1
107124
- name: Download nextest archive
108125
uses: actions/download-artifact@v8
109126
with:

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Clippy and warning flags are configured in `.cargo/config.toml` `rustflags` and
5757

5858
### Other directories
5959

60-
- `npm/` — npm wrapper that installs the prebuilt CLI binary
6160
- `docs/site/` — Docusaurus documentation site (published to scaffoldstellar.com)
6261
- `crates/stellar-scaffold-test/fixtures/` — fixture contracts and a boilerplate project for CLI integration tests
6362

0 commit comments

Comments
 (0)