[ARCHITECTURE] Soroban contracts are immutable - no upgrade mechanism #302
Open
Menjay7 wants to merge 1 commit into
Open
[ARCHITECTURE] Soroban contracts are immutable - no upgrade mechanism #302Menjay7 wants to merge 1 commit into
Menjay7 wants to merge 1 commit into
Conversation
Xuccessor
requested changes
Jun 21, 2026
Xuccessor
requested changes
Jun 21, 2026
Contributor
|
I'd like to work on this issue. I have background in contracts and will submit a PR ASAP. |
Contributor
|
I'd like to work on this. Approach:
Estimated effort: ~1-2 hours. PR incoming shortly. |
Contributor
|
Thanks for the work here. Unfortunately, this branch has real merge conflicts with main right now and can't be merged as-is. Could you rebase against the current main and push? Happy to merge once it lands cleanly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR formalizes the architectural decision that Soroban contracts are deployed as immutable artifacts and will not implement an on-chain upgrade mechanism. The objective is to maintain simplicity, predictability, and trust by ensuring that deployed contract logic cannot be modified after deployment.
Motivation
Introducing upgradeability adds complexity, increases security risks, and requires additional governance mechanisms. By keeping contracts immutable, we gain:
Predictable behavior: Contract logic remains constant throughout its lifecycle.
Enhanced security: Eliminates risks associated with upgrade keys and malicious or accidental upgrades.
Simpler architecture: Reduces maintenance overhead and operational complexity.
Greater trust: Users and integrators can rely on deployed contracts remaining unchanged.
Architectural Decision
Deployed Soroban contracts are treated as immutable.
No proxy patterns, delegate calls, or upgrade administrators will be implemented.
New functionality or fixes require deploying a new contract version.
State migration, if needed, will be handled through explicit migration strategies and versioned deployments.
Implications
Advantages
Reduced attack surface
Easier auditing and verification
Clear version history and deployment lineage
Improved decentralization and transparency
Trade-offs
Bug fixes require new deployments
Features cannot be added to existing contract instances
Consumers may need to migrate to newer contract versions
Implementation Notes
Document immutability guarantees in architecture and developer guides.
Establish contract versioning conventions.
Define migration procedures for future contract iterations.
Ensure client applications can discover and interact with the latest contract versions.
Testing
Verified architecture documentation reflects immutability constraints
Confirmed no upgrade hooks or proxy mechanisms exist
Reviewed deployment and migration workflows
Obtain architecture review and team approval
Future Considerations
If requirements evolve, new versions should be released as separate contract deployments with explicit migration paths rather than introducing upgradeability into existing contracts...closed #172