Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add soroban_env_host::host::LegacyEpoch #754

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Add soroban_env_host::host::LegacyEpoch #754

merged 1 commit into from
Apr 11, 2023

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Apr 6, 2023

This adds a new mechanism for gating old behaviour in the host. Currently it's not used, but the idea is that as we discover divergence we will need to add branches to the code here and there to run "as if" we were an old version.

This is similar to the way protocol-version (and occasionally ledger-number) gating of backward-compatibility code happens in stellar-core, except that (a) ledger-number gating is both brittle and uninformative and (b) we don't have clear enough insight in advance of making a breaking change that we're doing so, due to the size of the dependency tree. So instead the embedder is forced to do a multi-step upgrade process, with two versions of the entire host active at once. The embedder should be able to do this correctly since it both sees the entire dependency tree of each host version it embeds, and can compare the history segment between the two for divergence and add legacy epochs to the host as necessary in order to achieve accurate replay.

@graydon graydon requested a review from sisuresh as a code owner April 6, 2023 05:48
@graydon graydon enabled auto-merge (squash) April 6, 2023 06:06
soroban-env-host/src/host.rs Outdated Show resolved Hide resolved
@graydon graydon merged commit 8846543 into main Apr 11, 2023
@graydon graydon deleted the legacy-epochs branch April 11, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants