Repository navigation
Fix stale Soroban host rebuild invalidation. - #5187
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the build invalidation logic for the non-unified Rust build so librust_stellar_core.a is reliably rebuilt when Soroban submodule revisions change (even if Cargo.lock and tracked Rust sources don’t), preventing stale embedded Soroban GIT_REVISION values from persisting until make clean.
Changes:
- Add per-protocol Soroban git-state stamp files and use them to invalidate the Soroban build stamp on submodule commit moves.
- Replace the “touch” Soroban libs stamp with a content-based SHA256 over built Soroban
.rlibs. - Feed Soroban libs state into the top-level
cargo rustcinvocation and add explicit.rlibprerequisites to the final Rust archive target.
dmkozh
enabled auto-merge
March 20, 2026 23:27
Soroban host builds can change their embedded GIT_REVISION after a submodule commit move without changing Cargo.lock or tracked Rust sources. In some scenarios that left the top-level stellar-core Rust archive reusable even though the linked Soroban .rlibs had new contents, so the final binary could still contain the old revisions until `make clean`. To fix this issue, track per-protocol Soroban git state, hash the built Soroban libraries into SOROBAN_LIBS_STAMP, and feed that state into the top-level cargo rustc metadata while depending on the actual .rlibs. This forces the final archive to rebuild when Soroban submodule revisions change.
dmkozh
disabled auto-merge
March 21, 2026 00:27
SirTyson
pushed a commit
to SirTyson/stellar-core
that referenced
this pull request
Apr 10, 2026
# Description Soroban host builds can change their embedded GIT_REVISION after a submodule commit move without changing Cargo.lock or tracked Rust sources. In some scenarios that left the top-level stellar-core Rust archive reusable even though the linked Soroban .rlibs had new contents, so the final binary could still contain the old revisions until `make clean`. To fix this issue, track per-protocol Soroban git state, hash the built Soroban libraries into SOROBAN_LIBS_STAMP, and feed that state into the top-level cargo rustc metadata while depending on the actual .rlibs. This forces the final archive to rebuild when Soroban submodule revisions change. # Checklist - [ ] Reviewed the [contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes) document - [ ] Rebased on top of master (no merge commits) - [ ] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio extension) - [ ] Compiles - [ ] Ran all tests - [ ] If change impacts performance, include supporting evidence per the [performance document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
SirTyson
pushed a commit
to SirTyson/stellar-core
that referenced
this pull request
Apr 13, 2026
# Description Soroban host builds can change their embedded GIT_REVISION after a submodule commit move without changing Cargo.lock or tracked Rust sources. In some scenarios that left the top-level stellar-core Rust archive reusable even though the linked Soroban .rlibs had new contents, so the final binary could still contain the old revisions until `make clean`. To fix this issue, track per-protocol Soroban git state, hash the built Soroban libraries into SOROBAN_LIBS_STAMP, and feed that state into the top-level cargo rustc metadata while depending on the actual .rlibs. This forces the final archive to rebuild when Soroban submodule revisions change. # Checklist - [ ] Reviewed the [contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes) document - [ ] Rebased on top of master (no merge commits) - [ ] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio extension) - [ ] Compiles - [ ] Ran all tests - [ ] If change impacts performance, include supporting evidence per the [performance document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
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
Soroban host builds can change their embedded GIT_REVISION after a submodule commit move without changing Cargo.lock or tracked Rust sources. In some scenarios that left the top-level stellar-core Rust archive reusable even though the linked Soroban .rlibs had new contents, so the final binary could still contain the old revisions until
make clean.To fix this issue, track per-protocol Soroban git state, hash the built Soroban libraries into SOROBAN_LIBS_STAMP, and feed that state into the top-level cargo rustc metadata while depending on the actual .rlibs. This forces the final archive to rebuild when Soroban submodule revisions change.
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)