Skip to content

Commit

Permalink
Update canisters post release (#5639)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Apr 8, 2024
1 parent eeebb98 commit 37edcc3
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 19 deletions.
2 changes: 2 additions & 0 deletions backend/canisters/event_relay/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1125](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1125-event_relay)] - 2024-03-28

### Changed

- Update `event_store` packages to latest version ([#5593](https://github.com/open-chat-labs/open-chat/pull/5593))
Expand Down
2 changes: 2 additions & 0 deletions backend/canisters/identity/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1130](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1130-identity)] - 2024-04-05

### Added

- Implement ability to update user principals ([#5220](https://github.com/open-chat-labs/open-chat/pull/5220))
Expand Down
1 change: 0 additions & 1 deletion backend/canisters/identity/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ struct Data {
salt: Salt,
principal_migration_job_enabled: bool,
rng_seed: [u8; 32],
#[serde(default)]
challenges: Challenges,
test_mode: bool,
}
Expand Down
2 changes: 2 additions & 0 deletions backend/canisters/market_maker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1128](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1128-market_maker)] - 2024-04-05

### Changed

- Seed rng with entropy before calling `raw_rand` to get randomness ([#5454](https://github.com/open-chat-labs/open-chat/pull/5454))
Expand Down
1 change: 0 additions & 1 deletion backend/canisters/market_maker/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ struct Data {
pub icp_ledger_canister_id: CanisterId,
pub chat_ledger_canister_id: CanisterId,
pub orders_log: OrdersLog,
#[serde(default)]
pub latest_orders_taken: HashMap<ExchangeId, (Option<u64>, Option<u64>)>,
pub my_open_orders: HashMap<ExchangeId, AggregatedOrders>,
pub market_makers_in_progress: HashMap<ExchangeId, TimestampMillis>,
Expand Down
2 changes: 2 additions & 0 deletions backend/canisters/proposal_validation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1123](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1123-proposal_validation)] - 2024-03-27

### Added

- Add validation function for `manage_neuron` proposals ([#5595](https://github.com/open-chat-labs/open-chat/pull/5595))
Expand Down
2 changes: 2 additions & 0 deletions backend/canisters/proposals_bot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1124](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1124-proposals_bot)] - 2024-03-26

### Fixed

- Fix proposal decision calculation to account for critical proposals ([#5600](https://github.com/open-chat-labs/open-chat/pull/5600))
Expand Down
2 changes: 2 additions & 0 deletions backend/canisters/registry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1122](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1122-registry)] - 2024-03-26

### Added

- Serve up token logos from the Registry canister ([#5592](https://github.com/open-chat-labs/open-chat/pull/5592))
Expand Down
2 changes: 2 additions & 0 deletions backend/canisters/user_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1129](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1129-user_index)] - 2024-04-05

### Added

- Sync legacy principals to the Identity canister ([#5619](https://github.com/open-chat-labs/open-chat/pull/5619))
Expand Down
3 changes: 0 additions & 3 deletions backend/canisters/user_index/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ struct Data {
pub nns_8_year_neuron: Option<NnsNeuron>,
pub rng_seed: [u8; 32],
pub diamond_membership_fees: DiamondMembershipFees,
pub legacy_principals_synced: bool,
pub video_call_operators: Vec<Principal>,
pub oc_key_pair: P256KeyPair,
}
Expand Down Expand Up @@ -327,7 +326,6 @@ impl Data {
fire_and_forget_handler: FireAndForgetHandler::default(),
rng_seed: [0; 32],
diamond_membership_fees: DiamondMembershipFees::default(),
legacy_principals_synced: false,
video_call_operators,
oc_key_pair: P256KeyPair::default(),
};
Expand Down Expand Up @@ -416,7 +414,6 @@ impl Default for Data {
nns_8_year_neuron: None,
rng_seed: [0; 32],
diamond_membership_fees: DiamondMembershipFees::default(),
legacy_principals_synced: false,
video_call_operators: Vec::default(),
oc_key_pair: P256KeyPair::default(),
}
Expand Down
15 changes: 1 addition & 14 deletions backend/canisters/user_index/impl/src/lifecycle/post_upgrade.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::lifecycle::{init_env, init_state};
use crate::memory::get_upgrades_memory;
use crate::{mutate_state, Data};
use crate::Data;
use canister_logger::LogEntry;
use canister_tracing_macros::trace;
use ic_cdk_macros::post_upgrade;
Expand All @@ -24,17 +24,4 @@ fn post_upgrade(args: Args) {
init_state(env, data, args.wasm_version);

info!(version = %args.wasm_version, "Post-upgrade complete");

// Post upgrade - remove
mutate_state(|state| {
if !state.data.legacy_principals_synced {
state.data.legacy_principals_synced = true;
state
.data
.legacy_principals_sync_queue
.extend(state.data.users.iter().map(|u| u.principal));

crate::jobs::sync_legacy_user_principals::start_job_if_required(state);
}
});
}

0 comments on commit 37edcc3

Please sign in to comment.