Skip to content

Conversation

@leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jan 30, 2026

What

Fix several issues that prevent the quickstart container from restarting cleanly in --local mode with persistent data, either data saved in a volume or a stopped and restarted container.

Changes:

  1. Skip Soroban config upgrades if already applied - Add sentinel file check (.upgrade-config-initialized) to upgrade_local() to skip config upgrades on restart
  2. Skip friendbot init if already initialized - Add sentinel file check (.quickstart-initialized) to init_friendbot() to prevent re-initialization on restart

Why

When the container restarts with --local and a persistent ledger:

  • Soroban config upgrades fail because the root account has sourced prior transactions and the hardcoded account sequence is out-of-date
  • Friendbot init was running on every start and isn't idempotent, overwriting configuration on each restart corrupting the config file

These failures would trigger service shutdown, making the container non-restartable without removal.

Close #896

@leighmcculloch leighmcculloch requested a review from a team January 30, 2026 02:56
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Jan 30, 2026
@leighmcculloch leighmcculloch marked this pull request as ready for review January 30, 2026 02:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds idempotency to Soroban config upgrades in the quickstart container's --local mode by introducing a sentinel file check. The change prevents upgrade transactions from re-running on container restart, which was causing failures because these upgrades can only succeed when the root account has no prior transactions.

Changes:

  • Added a sentinel file check (.upgrade-config-initialized) to skip Soroban config upgrades if they've already been applied
  • Wrapped the upgrade logic in an if/else block that checks for the sentinel file before running upgrades

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@leighmcculloch leighmcculloch changed the title Skip Soroban config upgrade if already applied Fix container restart issues in local mode Jan 30, 2026
@leighmcculloch leighmcculloch enabled auto-merge (squash) January 30, 2026 05:12
@leighmcculloch leighmcculloch merged commit 8436c18 into main Jan 30, 2026
97 checks passed
@leighmcculloch leighmcculloch deleted the skip-soroban-config-if-applied branch January 30, 2026 05:25
@github-project-automation github-project-automation bot moved this from Backlog (Not Ready) to Done in DevX Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Container fails to restart with --local due to non-idempotent Soroban config upgrade

3 participants