You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
if [ "$OUTPUT"=="Error setting configUpgradeSet" ];then
echo"!!!!! Unable to upgrade Soroban Config Settings. Stopping all services. !!!!!"
kill_supervisor
fi
}
echo"upgrades: soroban config done"
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:
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 of stellar-core get-settings-upgrade-txs which can change between versions.
Pipe-based parsing of stdout: The entire flow reads tx blobs and tx IDs via read from 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:
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 /tx endpoint 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-cli with quickstart and use it for transaction submission. Downside is that stellar-cli is further downstream and harder to keep in sync with unreleased stellar-core changes.
What problem does your feature solve?
The network settings config upgrade logic in the
startscript is brittle. Theupgrade_soroban_configfunction usesstellar-core get-settings-upgrade-txsto generate transactions, submits them viacurlto core's HTTP endpoint, and confirms they were applied by polling the globalledger.transaction.countmetric.For example:
quickstart/start
Lines 672 to 718 in 6357b28
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:This is brittle in several ways:
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.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?
/txendpoint response, and make the output parsing more resilient. This improves reliability but still leaves the fundamental brittleness of doing this in bash.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.