Skip to content

Commit

Permalink
chore(nns): Remove neurons fund data migration (#1286)
Browse files Browse the repository at this point in the history
In #1208, we added a migration to improve the naming of fields in
NeuronsFundNeuronPortion, and in #1171 we added a test of that
migration. They are no longer necessary, so this PR removes them

[Next PR →](#870)

Co-authored-by: Arshavir Ter-Gabrielyan <[email protected]>
  • Loading branch information
anchpop and aterga authored Sep 3, 2024
1 parent 622fb34 commit f54741d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 279 deletions.
12 changes: 0 additions & 12 deletions rs/nns/governance/canister/canister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ fn canister_post_upgrade() {
restored_state.neurons.len(),
restored_state.xdr_conversion_rate,
);
let restored_state = migrate_neurons_fund_audit_info(restored_state);
set_governance(Governance::new_restored(
restored_state,
Box::new(CanisterEnv::new()),
Expand All @@ -396,17 +395,6 @@ fn canister_post_upgrade() {
validate_stable_storage();
}

fn migrate_neurons_fund_audit_info(state: InternalGovernanceProto) -> InternalGovernanceProto {
InternalGovernanceProto {
proposals: state
.proposals
.into_iter()
.map(|(id, proposal_data)| (id, proposal_data.migrate()))
.collect(),
..state
}
}

#[cfg(feature = "test")]
#[export_name = "canister_update set_time_warp"]
fn set_time_warp() {
Expand Down
1 change: 0 additions & 1 deletion rs/nns/governance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ mod neuron_store;
pub mod neurons_fund;
mod node_provider_rewards;
pub mod pb;
mod proposal_data_neurons_fund_migration;
pub mod proposals;
mod reward;
pub mod storage;
Expand Down
76 changes: 0 additions & 76 deletions rs/nns/governance/src/proposal_data_neurons_fund_migration.rs

This file was deleted.

22 changes: 0 additions & 22 deletions rs/nns/integration_tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ rust_ic_test_suite_with_extra_srcs(
"src/copy_inactive_neurons_to_stable_memory.rs",
"src/governance_mem_test.rs",
"src/upgrade_canisters_with_golden_nns_state.rs",
"src/hotkeys_migration_test.rs",
],
),
aliases = ALIASES,
Expand Down Expand Up @@ -419,24 +418,3 @@ rust_ic_test(
],
deps = DEPENDENCIES + DEV_DEPENDENCIES,
)

rust_ic_test(
name = "hotkeys_migration_test",
# This uses on the order of 10 GB of disk space.
# Therefore, size = "large" is not large enough.
size = "enormous",
srcs = [
"src/hotkeys_migration_test.rs",
],
aliases = ALIASES,
crate_root = "src/hotkeys_migration_test.rs",
data = DEV_DATA,
env = DEV_ENV,
proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
tags = [
"nns_tests_nightly", # Run this test in the nns-tests-nightly GitHub Action job.
"no-sandbox", # such that the test can access the file $SSH_AUTH_SOCK.
"requires-network", # Because mainnet state is downloaded (and used).
],
deps = DEPENDENCIES + DEV_DEPENDENCIES,
)
165 changes: 0 additions & 165 deletions rs/nns/integration_tests/src/hotkeys_migration_test.rs

This file was deleted.

3 changes: 0 additions & 3 deletions rs/nns/integration_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,3 @@ mod subnet_rental_canister;

#[cfg(test)]
mod stop_or_start_canister;

#[cfg(test)]
mod hotkeys_migration_test;

0 comments on commit f54741d

Please sign in to comment.