Sdk Upgrade To Latest Dev
Prepare sdk-upgrade branch and port SDK changes to the starter repo, so acceptance tests can promote the dev branch.
# SDK Upgrade to Latest Dev
Prepare `sdk-upgrade` branch and port SDK changes to the starter repo, so acceptance tests can promote the dev branch.
SDK repo: https://github.com/Sovereign-Labs/sovereign-sdk
## Steps
### 1. Prepare git state
1. Check that the working directory is clean (no uncommitted changes). If not clean, abort and inform the user.
2. Fetch latest from origin and sync local main branch.
3. Checkout the `main` branch.
4. Check if the `sdk-upgrade` branch (local OR remote) has unmerged commits ahead of main. Ask the user whether to proceed if it does.
5. Delete the `sdk-upgrade` branch if it exists and all changes are merged (both local and remote tracking).
6. Create a new `sdk-upgrade` branch from `main`.
### 2. Get SDK revisions
1. **Current revision**: Read `Cargo.toml` and extract the `rev` from any `sov-*` dependency using `https://github.com/Sovereign-Labs/sovereign-sdk.git`. This is the "prev" revision.
2. **Latest dev revision**: Fetch the latest commit SHA from the `dev` branch of sovereign-sdk using `gh api repos/Sovereign-Labs/sovereign-sdk/commits/dev --jq '.sha'`. This is the "new" revision.
Store both revisions — they're needed throughout.
### 3. Review SDK changes (before building)
Before making changes, understand what's new in the SDK:
1. **Fetch CHANGELOG**: Review `CHANGELOG.md` from the SDK repo between prev and new revisions for breaking changes.
2. **Check demo-rollup diff**: This is the reference implementation — changes here usually need to be ported.
```bash
gh api repos/Sovereign-Labs/sovereign-sdk/compare/{prev}...{new} --jq '.files[] | select(.filename | startswith("examples/demo-rollup/")) | .filename'
- Check for new constants: Look for changes to the SDK's constants files that might require new entries in our
constants.toml.
Report findings to the user before proceeding.
4. Update SDK revision
Run ./scripts/upgrade_rev.sh <NEW_REV> to update all relevant Cargo.toml files.
5. Verify configs and constants
Before building, check that configs and constants are up to date with the SDK changes identified in step 3.
constants.toml: Compare against SDK's demo-rollup constants. Add any new constants with appropriate values and comments.configs/.*/rollup.toml: Verify fields still match the SDK's config struct definitions. Add/remove fields as needed.
6. Build, fix, repeat
Run these in order. If any step fails, investigate and fix before moving on. Loop until all pass.
make lint— Runscargo fmt --check,cargo check,cargo clippy, andzepter. Fixes formatting, compilation, and lint issues.make check— Updates the rootCargo.lock.cargo nextest run— Run the full test suite.
How to fix breaking changes
- Use the SDK diff from step 3 to understand the new API.
- Look at
examples/demo-rollupin the SDK for the reference implementation. - Port the equivalent changes to our codebase.
- Re-run the failing step and repeat until clean.
7. Review READMEs
Check if any README files need updating to reflect SDK changes (new configuration options, changed commands, updated examples), especially those:
README.mdGETTING_STARTED_WITH_CELESTIA.mdGETTING_STARTED_WITH_HYPERLANE.md
8. Commit and push
If all steps succeed:
- Commit with this message format:
Update to the latest dev YYYY-MM-DD Upgrading to latest dev on YYYY-MM-DD NEW_REV [List specific breaking changes and how they were resolved, if any] - Ask the user whether to push and create a PR.
Maintain Sdk Upgrade To Latest Dev?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Sdk Upgrade To Latest Dev on getagentictools](https://getagentictools.com/loops/arturr55-sdk-upgrade-to-latest-dev?ref=badge) npx agentictools info loops/arturr55-sdk-upgrade-to-latest-dev The second line is the CLI lookup for this page — handy in READMEs and docs.