offchain: replace the ten git dependencies with path dependencies - #4245
Open
bgm-malbeclabs wants to merge 2 commits into
Open
offchain: replace the ten git dependencies with path dependencies#4245bgm-malbeclabs wants to merge 2 commits into
bgm-malbeclabs wants to merge 2 commits into
Conversation
Seven pointed at malbeclabs/doublezero pinned to client/v0.31.0 and three at malbeclabs/doublezero-solana pinned to revenue-distribution/v0.3.7. Both trees now live in this repo, and a path dependency may point outside its own workspace, so this works while offchain and solana are still excluded nested workspaces. All ten pins stop existing. The failure this removes is the one from 2026-08-26: cargo treats a git dependency's URL and revision as part of the crate identity, so two consumers naming the same crate differently build two copies whose types do not unify, which surfaced as 194 errors about methods that plainly existed. Flipping the pins moves offchain from client/v0.31.0 to current main, 80 commits and 150 changed files across the seven packages. One schema change needed a compat migration: User.feed_pk became feed_pks in malbeclabs/infra#2114, and the golden snapshot predates it. Like publishers and subscribers, the list serializes as one comma-separated string rather than a JSON array, so an absent feed is the empty string. The contributor-rewards goldens still match exactly, so the move to current main leaves every computed reward value unchanged.
martinsander00
approved these changes
Aug 29, 2026
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.
Step 3 of the monorepo migration. Stacked on #4240 and based on that branch, so the diff shown here is step 3 alone. It retargets to
mainonce #4240 merges.Summary
Ten git dependencies in
offchain/Cargo.tomlbecome path dependencies:malbeclabs/doublezero, pinned toclient/v0.31.0, now point intocrates/,config/andsmartcontract/.malbeclabs/doublezero-solana, pinned torevenue-distribution/v0.3.7, now point intosolana/.All ten pins stop existing. That removes the failure of 2026-08-26 as a class: cargo treats a git dependency's URL and revision as part of the crate identity, so two consumers naming the same crate differently build two copies whose types do not unify. It surfaced as 194 errors about methods that plainly existed, with nothing in the error text pointing at the cause.
Both trees are still excluded nested workspaces with their own lockfiles. A path dependency may point outside its own workspace, so this lands before the workspaces merge in step 4.
network-shapley-rsstays a git dependency, since it lives in another organization and is out of scope.The one code change
Flipping the pins moves offchain from
client/v0.31.0to currentmain: 80 commits and about 150 changed files across the seven packages. Exactly one thing broke, and thecontributor-rewardsgolden tests from #414 are what caught it.User.feed_pk: Pubkeybecamefeed_pks: Vec<Pubkey>in malbeclabs/infra#2114, and the committed snapshot predates the change.apply_serviceability_json_compat_migrationsalready backfilled the singular field, so it now folds it into the plural one. The subtlety is that this list serializes as a single comma-separated string rather than a JSON array, the same as itspublishersandsubscribersneighbors, so an absent feed is the empty string and not an empty array.The goldens then matched exactly. Moving to current
mainleaves every computed reward value unchanged, which is the assurance step 1 existed to provide.Testing Verification
git+source formalbeclabs/doublezeroormalbeclabs/doublezero-solanaremains inoffchain/Cargo.lock. The only git source left isnetwork-shapley-rs, unchanged.contributor-rewardsgoldens pass and match, so the reward values this repo computes are identical before and after.test_configure_program, needsmake build-sbfto have run first, assolana/README.mddocuments, and fails the same way on the base branch.cargo fmt --all --checkandcargo clippy --workspace --all-targetsare clean on offchain.One thing to know for step 4
rust-toolchain.tomlis directory-scoped, not workspace-scoped. Building fromoffchain/now compiles the root crates with offchain's 1.92.0 toolchain rather than the root's 1.97.1. It works today, and this pull request deliberately leaves it alone. Step 4 resolves it by deletingoffchain/rust-toolchain.tomlwhen the workspaces merge, along with the edition trap: all 14 offchain crates declareedition.workspace = trueand would silently inherit the root's 2021 instead of their 2024.