Summary
--resolve-deps fails for any package published under a non-canonical env (e.g. testnet_alpha, testnet_beta) instead of testnet
Details
mvr --resolve-deps (the resolver invoked by recent sui move build) fails with an "address missmatch" for any MVR name whose source repo publishes the package under an env name other than the canonical testnet / mainnet, even when the chain-id is 4c78adac
Reproduced against mvr 0.1.0-d85f8ad9 (suiup release) and mvr 0.1.0-1a463386 (main HEAD), with sui 1.69.1 and sui 1.70.2.
Steps to reproduce
-
Clone https://github.com/evefrontier/builder-scaffold/
-
Replace the Move.toml local work dependancy with the mvr name @evefrontier/world-uat
Move.toml:
[package]
name = "smart_gate_extension"
edition = "2024"
[dependencies]
world = { r.mvr = "@evefrontier/world-uat" }
Run sui move build and it fails mvr did not follow the external resolver protocol.
Root cause
The MVR registry entry for @evefrontier/world-uat is correct: package_address = 0x07e6b810… matches [published.testnet_utopia].published-at in world-contracts/contracts/world/Published.toml.
The world-contracts repo publishes four packages, all on chain-id 4c78adac, under different env names mapping to different mvr names :
| env name |
published-at |
original-id |
testnet_internal |
0xe148a214… |
0x35398… |
testnet_stillness |
0xd2fd1224… |
0x28b497… |
testnet_utopia |
0x07e6b810… |
0xd12a70c7… |
In crates/mvr-cli/src/utils/sui_binary.rs#L120-L143:
let network_name = network.to_string(); // always "testnet" or "mainnet"
let chain_id = get_chain_id(&network)?; // "4c78adac" or "35834a8a"
let cli_output = sui_command([
"move", "cache-package",
&network_name, // <-- env name passed to sui
chain_id.as_str(),
dependency_str.as_str(),
])?;
Network is enum { Testnet, Mainnet }, so network.to_string() is always one of those two. Sui's move cache-package uses that as the env name to look up in Published.toml, so it always resolves against [published.testnet] / [published.mainnet].
For @evefrontier/world-uat the correct entry is [published.testnet_utopia]. I guess the tool returns the canonical-tier addresses (0x33226d2e… / 0x920e577e…), and the check at crates/mvr-cli/src/types/resolver_alt.rs#L89-L110 rejects it.
This makes MVR effectively unusable for any project that uses tiered environments sharing a chain-id (a common pattern: dev / staging / prod, plus this project's utopia / stillness / internal).
Suggested fix
Either (a) enumerate every [published.*] entry whose chain-id matches the requested env and accept any match, or (b) thread the registry-stored env name through PackageRequest and pass that to cache-package instead of the canonical testnet / mainnet.
Summary
--resolve-deps fails for any package published under a non-canonical env (e.g. testnet_alpha, testnet_beta) instead of
testnetDetails
mvr --resolve-deps(the resolver invoked by recentsui move build) fails with an "address missmatch" for any MVR name whose source repo publishes the package under an env name other than the canonicaltestnet/mainnet, even when the chain-id is4c78adacReproduced against
mvr 0.1.0-d85f8ad9(suiup release) andmvr 0.1.0-1a463386(mainHEAD), withsui 1.69.1andsui 1.70.2.Steps to reproduce
Clone https://github.com/evefrontier/builder-scaffold/
Replace the Move.toml local work dependancy with the mvr name @evefrontier/world-uat
Move.toml:Run
sui move buildand it failsmvr did not follow the external resolver protocol.Root cause
The MVR registry entry for
@evefrontier/world-uatis correct:package_address = 0x07e6b810…matches[published.testnet_utopia].published-atinworld-contracts/contracts/world/Published.toml.The
world-contractsrepo publishes four packages, all on chain-id4c78adac, under different env names mapping to different mvr names :testnet_internal0xe148a214…0x35398…testnet_stillness0xd2fd1224…0x28b497…testnet_utopia0x07e6b810…0xd12a70c7…In
crates/mvr-cli/src/utils/sui_binary.rs#L120-L143:Networkisenum { Testnet, Mainnet }, sonetwork.to_string()is always one of those two. Sui'smove cache-packageuses that as the env name to look up inPublished.toml, so it always resolves against[published.testnet]/[published.mainnet].For
@evefrontier/world-uatthe correct entry is[published.testnet_utopia]. I guess the tool returns the canonical-tier addresses (0x33226d2e…/0x920e577e…), and the check atcrates/mvr-cli/src/types/resolver_alt.rs#L89-L110rejects it.This makes MVR effectively unusable for any project that uses tiered environments sharing a chain-id (a common pattern: dev / staging / prod, plus this project's utopia / stillness / internal).
Suggested fix
Either (a) enumerate every
[published.*]entry whosechain-idmatches the requested env and accept any match, or (b) thread the registry-stored env name throughPackageRequestand pass that tocache-packageinstead of the canonicaltestnet/mainnet.