Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e44b908
Integrate full package version history management into PackageRegistr…
chrisgitiota Jul 16, 2025
565a4b3
New package-history CLI tool to automatically create and update `Move…
chrisgitiota Jul 16, 2025
56c77e5
Merge branch 'main' into feat/full-package-history
chrisgitiota Jul 28, 2025
0692dbe
Use JSON format instead of TOML for the Move.package-history file
chrisgitiota Jul 28, 2025
3d39d3c
Fixed package_history_cli tests
chrisgitiota Aug 4, 2025
dfc88ce
Remove dead code
chrisgitiota Aug 4, 2025
69ca4cc
Rename `Move.package-history.json` to `Move.history.json`
chrisgitiota Aug 7, 2025
30abbcc
product_common now provides the functionality, previously implemented…
chrisgitiota Aug 8, 2025
29ca4a6
MoveHistoryManager holds move_lock_path and history_file_path now and…
chrisgitiota Aug 8, 2025
4c61d8d
Add function move_lock_file_exists()
chrisgitiota Aug 11, 2025
39aa898
Add function manage_history_file() providing main functionality neede…
chrisgitiota Aug 11, 2025
dc77438
fix fmt issues
chrisgitiota Aug 11, 2025
26a2f7d
fix warnings "hiding a lifetime that's elided elsewhere is confusing"
chrisgitiota Aug 11, 2025
01f1e11
fix bug in `console_out` messages of fn manage_history_file()
chrisgitiota Aug 11, 2025
d8a6b19
Updated MoveHistoryManager docs
chrisgitiota Aug 11, 2025
1bf1bd1
fix fmt issue
chrisgitiota Aug 11, 2025
ca6c8ca
Enhance MoveHistoryManager docs
chrisgitiota Aug 11, 2025
d9db850
fix fmt issue
chrisgitiota Aug 11, 2025
dae0cf5
ignore the build.rs example in rust doctest
chrisgitiota Aug 11, 2025
d854daf
Further enhance the docs for MoveHistoryManager and PackageRegistry
chrisgitiota Aug 12, 2025
ededffe
Merge branch 'main' into feat/full-package-history
chrisgitiota Aug 14, 2025
5363824
Remove doubled PackageRegistry struct definition
chrisgitiota Aug 14, 2025
e5e5e4a
Several enhancements
chrisgitiota Aug 14, 2025
6a08643
Hand over errors from `update()` or `init()` to users of `manage_hist…
chrisgitiota Aug 14, 2025
6c6295b
Replace `aliases_to_ignore` with `additional_aliases_to_watch` and a …
chrisgitiota Sep 23, 2025
12f1d50
Merge branch 'main' into feat/full-package-history
chrisgitiota Sep 23, 2025
23acc3a
Fix clippy anf fmt issues
chrisgitiota Sep 29, 2025
f7e189e
Merge branch 'main' into feat/full-package-history
chrisgitiota Sep 29, 2025
7dccb6f
Aline indexmap dependency with iota repo requirements
chrisgitiota Sep 29, 2025
c4d304e
Aligne indexmap dependency with iota repo requirements
chrisgitiota Sep 29, 2025
e5b8861
Reduce nesting with early returns
chrisgitiota Sep 29, 2025
1a388a6
Merge remote-tracking branch 'origin/feat/full-package-history' into …
chrisgitiota Sep 29, 2025
86c15a0
Fix fmt issue
chrisgitiota Sep 29, 2025
e2dfbd5
Merge branch 'main' into feat/full-package-history
chrisgitiota Nov 5, 2025
7db17e2
Fix typo
chrisgitiota Nov 5, 2025
86fd0a7
Fix bug in alignment of indexmap dependency version with IOTA repository
chrisgitiota Nov 5, 2025
4ed04e7
Add missing whitespace in Success message
chrisgitiota Nov 5, 2025
ec679a0
Implement alias management in PackageRegistry and MoveHistoryManager
itsyaasir Nov 5, 2025
afe7517
Add tests for alias synchronization in MoveHistoryManager
itsyaasir Nov 5, 2025
56aa4ce
Additional HstoryManager test update_syncs_only_aliases_included_in_a…
chrisgitiota Nov 5, 2025
e885380
Extended docs on fn PackageRegistry::insert_new_package_version()
chrisgitiota Nov 5, 2025
2c59b3c
chore:fmt
itsyaasir Nov 6, 2025
219bea6
Merge pull request #71 from iotaledger/fix/issue-4-aliases-are-incons…
itsyaasir Nov 6, 2025
aca4a79
Merge branch 'main' into feat/full-package-history
chrisgitiota Nov 10, 2025
9e17995
Documented edge cases in `Move.history.json` handling for network res…
chrisgitiota Nov 10, 2025
0dc97cd
Some MoveHistoryManager doc fixes
chrisgitiota Nov 10, 2025
6344b38
New test to explicitly test redeploymentents due to breaking changes
chrisgitiota Nov 10, 2025
93eaf35
Fix format issues
chrisgitiota Nov 10, 2025
16ba2eb
chore: ignore incase move lock doesn't have env (#72)
itsyaasir Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
New test to explicitly test redeploymentents due to breaking changes
  • Loading branch information
chrisgitiota committed Nov 10, 2025
commit 6344b38bf025008e955737437ad9ff43c4ee0d6d
43 changes: 43 additions & 0 deletions product_common/src/move_history_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,4 +740,47 @@ latest-published-id = "0x0d88bcecde97585d50207a029a85d7ea0bacf73ab741cbaa975a6e2
// Localnet is not in the aliases_to_watch list per default, so it should not be added
assert_eq!(registry.chain_alias("12345678"), None);
}

#[test]
fn update_handles_redeployment_breaking_changes() {
let (_temp_dir, history_path, move_lock_path, history_manager) =
setup_missing_history_file_test("Move.history.json", "Move.lock", InitialTestFile::HistoryFile);

// Simulate a breaking change redeployment where the original-published-id for mainnet changes
// (previous value has been 0x84cf5d12de2f9731a89bb519bc0c982a941b319a33abefdd5ed2054ad931de08)
// The new original-published-id will equal the new latest-published-id. env.testnet remains unchanged.
let updated_move_lock = r#"
[env.mainnet]
chain-id = "6364aad5"
original-published-id = "0xa4cf5d12de2f9731a89bb519bc0c982a941b319a33abefdd5ed2054ad931de10"
latest-published-id = "0xa4cf5d12de2f9731a89bb519bc0c982a941b319a33abefdd5ed2054ad931de10"

[env.testnet]
chain-id = "2304aa97"
original-published-id = "0x222741bbdff74b42df48a7b4733185e9b24becb8ccfbafe8eac864ab4e4cc555"
latest-published-id = "0x222741bbdff74b42df48a7b4733185e9b24becb8ccfbafe8eac864ab4e4cc555"
"#;
fs::write(&move_lock_path, updated_move_lock).unwrap();

history_manager.update().unwrap();

let updated_content = fs::read_to_string(&history_path).unwrap();
let registry = PackageRegistry::from_package_history_json_str(&updated_content).unwrap();

// Old version from initial history should still be present
let mainnet_history = registry.history("6364aad5").unwrap();
assert_eq!(mainnet_history.len(), 2);
assert_eq!(
mainnet_history[0].to_hex_literal(),
"0x84cf5d12de2f9731a89bb519bc0c982a941b319a33abefdd5ed2054ad931de08"
);
// New redeployed version should be added
assert_eq!(
mainnet_history[1].to_hex_literal(),
"0xa4cf5d12de2f9731a89bb519bc0c982a941b319a33abefdd5ed2054ad931de10"
);

// Testnet should remain unchanged with only one version
assert_eq!(registry.history("2304aa97").unwrap().len(), 1);
}
}
Loading