Network settings config upgrade in start script is brittle
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Read the upgrade_soroban_config function in start around lines 393-437 and the network-upgrade flow around lines 672-718, then inspect the linked failure and related issues #906 and #555. Reproduce the upgrade path and trace how get-settings-upgrade-txs output, curl submission, and metrics polling interact. Done means the flow confirms each intended transaction and no longer depends on global counters, fixed line counts, or piped stdout parsing.
Written by the indexing model from the issue text.
Description
What problem does your feature solve?
The network settings config upgrade logic in the start script is brittle. The upgrade_soroban_config function uses stellar-core get-settings-upgrade-txs to generate transactions, submits them via curl to core's HTTP endpoint, and confirms they were applied by polling the global ledger.transaction.count metric.
For example:
https://github.com/stellar/quickstart/blob/6357b286e43c856c68b2b6b7690f8a520d1b7f5d/start#L672-L718
The script reads transactions and transaction IDs from stdout line-by-line, submits each via curl, then waits for the global transaction count metric to increment:
while [ "`curl -s http://localhost:11626/metrics | jq -r '.metrics."ledger.transaction.count".count'`" != "$TX_COUNT" ]; do sleep 1; done
This is brittle in several ways:
- Transaction confirmation by global counter: It does not verify that the specific transaction succeeded, only that the total transaction count increased. If any other transaction occurs, or if a transaction fails but is still counted, the logic breaks.
- Output format coupling: The script checks
if [ $line_count = 9 ]vs 7 lines to detect whether a restore operation is included in the output, coupling it tightly to the exact output format ofstellar-core get-settings-upgrade-txswhich can change between versions. - Pipe-based parsing of stdout: The entire flow reads tx blobs and tx IDs via
readfrom a piped subshell, which is fragile and hard to debug when something goes wrong.
@sisuresh and I have noticed some recent flaky build failures that may be related to this brittleness:
Related: #906, #555
What would you like to see?
Replace the brittle shell-based transaction submission and confirmation logic with something more robust. This could be part of a small Rust CLI tool (#906) that handles transaction submission and confirmation directly, or another approach that avoids relying on polling global metrics and parsing stdout line counts.
What alternatives are there?
- Improve the shell script: Add retries, check transaction results directly via the
/txendpoint response, and make the output parsing more resilient. This improves reliability but still leaves the fundamental brittleness of doing this in bash. - Use stellar-cli: Ship
stellar-cliwith quickstart and use it for transaction submission. Downside is thatstellar-cliis further downstream and harder to keep in sync with unreleased stellar-core changes. - Build into a small Rust CLI: As proposed in #906, a minimal Rust tool could handle this logic more robustly with proper error handling and transaction result checking.
- Dominant language
- Shell
- Stars
- 222
- Forks
- 236
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/quickstart
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stellar/quickstart#932 · 16 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
stellar/quickstart#923 · 2 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
stellar/quickstart#911 · 2 comments ·
-
feature request
Difficulty 5/5 Over a week Newbie friendliness 35/100
stellar/quickstart#906 · 3 comments ·
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 48/100
stellar/quickstart#900 · 2 comments ·
All issues in stellar/quickstart
Similar issues
-
Update Vish to 1.1.5 Openpackage-update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comment ·
-
help wanted new command
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tldr-pages/tldr#24151 ·
-
PacReq: Rune IDE Openpackage request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pacstall/pacstall-programs#9402 ·
-
[BUG] ci: the first prefetch-images.sh call runs before shard.txt exists, so it is always a no-op Openbug github-actions
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
update-request
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
msys2/MINGW-packages#31768 ·