Network settings config upgrade in start script is brittle
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Leggi la funzione upgrade_soroban_config in start intorno alle righe 393–437 e il flusso di aggiornamento della rete intorno alle righe 672–718, quindi esamina il problema collegato e le issue correlate #906 e #555. Riproduci il percorso di aggiornamento e traccia come interagiscono l'output di get-settings-upgrade-txs, l'invio tramite curl e il polling delle metriche. Il lavoro è completato quando il flusso conferma ogni transazione prevista e non dipende più da contatori globali, conteggi di righe fissi o dal parsing di stdout tramite pipe.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Shell
- Stelle
- 222
- Fork
- 236
- Merge medio
- 1g 12h
- PR unite (30g)
- 12
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stellar/quickstart
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
stellar/quickstart#932 · 16 commenti · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
stellar/quickstart#923 · 2 commenti ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
stellar/quickstart#911 · 2 commenti ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
stellar/quickstart#906 · 3 commenti ·
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
stellar/quickstart#900 · 2 commenti ·
Tutte le issue di stellar/quickstart
Issue simili
-
out-of-date
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CachyOS/CachyOS-PKGBUILDS#1908 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
align on terminology Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CycloneDX/transparency-exchange-api#393 · 1 commento ·
-
area:build bug good first issue sev:papercut
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Agent-Field/CodeAF#1446 ·
-
module/agent platform/macos type/bug/regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100