From 7b506b142684aa13e0b5a4b86150ab383476781b Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Fri, 24 Nov 2023 12:53:57 +0000 Subject: [PATCH] Update canisters post release (#4841) --- .../bots/examples/group_prize_bot/impl/src/lib.rs | 1 - .../bots/examples/icp_dispenser/impl/src/lib.rs | 1 - backend/bots/examples/satoshi_dice/impl/src/lib.rs | 1 - backend/bots/examples/sns1_airdrop/impl/src/lib.rs | 1 - backend/canisters/community/CHANGELOG.md | 2 ++ backend/canisters/community/impl/src/lib.rs | 3 --- backend/canisters/group/CHANGELOG.md | 2 ++ backend/canisters/group/impl/src/lib.rs | 3 --- backend/canisters/group_index/CHANGELOG.md | 2 ++ backend/canisters/group_index/impl/src/lib.rs | 1 - .../impl/src/model/cached_hot_groups.rs | 1 - backend/canisters/local_group_index/CHANGELOG.md | 2 ++ .../canisters/local_group_index/impl/src/lib.rs | 1 - backend/canisters/local_user_index/CHANGELOG.md | 7 ++++++- backend/canisters/registry/CHANGELOG.md | 2 ++ backend/canisters/registry/api/src/lib.rs | 1 - backend/canisters/registry/impl/src/lib.rs | 1 - backend/canisters/user/CHANGELOG.md | 2 ++ .../user/api/src/updates/c2c_set_user_suspended.rs | 1 - backend/canisters/user/impl/src/lib.rs | 2 -- .../canisters/user/impl/src/model/direct_chats.rs | 1 - backend/libraries/group_chat_core/src/lib.rs | 1 - backend/libraries/group_chat_core/src/members.rs | 1 - backend/libraries/types/src/channel_summary.rs | 2 -- backend/libraries/types/src/chat_summary.rs | 8 -------- backend/libraries/types/src/polls.rs | 5 ----- canister_commit_ids.json | 14 +++++++------- 27 files changed, 25 insertions(+), 44 deletions(-) diff --git a/backend/bots/examples/group_prize_bot/impl/src/lib.rs b/backend/bots/examples/group_prize_bot/impl/src/lib.rs index 55b9d48810..bea9fbb5bb 100644 --- a/backend/bots/examples/group_prize_bot/impl/src/lib.rs +++ b/backend/bots/examples/group_prize_bot/impl/src/lib.rs @@ -85,7 +85,6 @@ struct Data { pub prizes_sent: Vec, pub groups: HashSet, pub started: bool, - #[serde(default)] pub rng_seed: [u8; 32], } diff --git a/backend/bots/examples/icp_dispenser/impl/src/lib.rs b/backend/bots/examples/icp_dispenser/impl/src/lib.rs index f31603ddaa..7f580bf54d 100644 --- a/backend/bots/examples/icp_dispenser/impl/src/lib.rs +++ b/backend/bots/examples/icp_dispenser/impl/src/lib.rs @@ -56,7 +56,6 @@ struct Data { pub reward_codes: RewardCodes, pub pending_actions: PendingActions, pub avatar: Timestamped>, - #[serde(default)] pub rng_seed: [u8; 32], pub test_mode: bool, } diff --git a/backend/bots/examples/satoshi_dice/impl/src/lib.rs b/backend/bots/examples/satoshi_dice/impl/src/lib.rs index 409f858353..9b12f06aa6 100644 --- a/backend/bots/examples/satoshi_dice/impl/src/lib.rs +++ b/backend/bots/examples/satoshi_dice/impl/src/lib.rs @@ -80,7 +80,6 @@ struct Data { pub users: UserMap, pub pending_actions_queue: PendingActionsQueue, pub initialized: bool, - #[serde(default)] pub rng_seed: [u8; 32], pub test_mode: bool, } diff --git a/backend/bots/examples/sns1_airdrop/impl/src/lib.rs b/backend/bots/examples/sns1_airdrop/impl/src/lib.rs index ddda252967..47e1879c49 100644 --- a/backend/bots/examples/sns1_airdrop/impl/src/lib.rs +++ b/backend/bots/examples/sns1_airdrop/impl/src/lib.rs @@ -54,7 +54,6 @@ struct Data { pub principals: HashSet, pub avatar: Timestamped>, pub completed: bool, - #[serde(default)] pub rng_seed: [u8; 32], pub test_mode: bool, } diff --git a/backend/canisters/community/CHANGELOG.md b/backend/canisters/community/CHANGELOG.md index 5a3c0a4336..be1a7c37a5 100644 --- a/backend/canisters/community/CHANGELOG.md +++ b/backend/canisters/community/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.945](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.945-community)] - 2023-11-24 + ### Added - Support cancelling invites ([#4831](https://github.com/open-chat-labs/open-chat/pull/4831)) diff --git a/backend/canisters/community/impl/src/lib.rs b/backend/canisters/community/impl/src/lib.rs index ef4feaba73..15056815fd 100644 --- a/backend/canisters/community/impl/src/lib.rs +++ b/backend/canisters/community/impl/src/lib.rs @@ -288,11 +288,8 @@ struct Data { next_event_expiry: Option, test_mode: bool, cached_chat_metrics: Timestamped, - #[serde(default)] rng_seed: [u8; 32], - #[serde(default)] pub pending_payments_queue: PendingPaymentsQueue, - #[serde(default)] pub total_payment_receipts: PaymentReceipts, } diff --git a/backend/canisters/group/CHANGELOG.md b/backend/canisters/group/CHANGELOG.md index e9e63dce72..7d08fbd7e1 100644 --- a/backend/canisters/group/CHANGELOG.md +++ b/backend/canisters/group/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.946](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.946-group)] - 2023-11-24 + ### Added - Support cancelling invites ([#4831](https://github.com/open-chat-labs/open-chat/pull/4831)) diff --git a/backend/canisters/group/impl/src/lib.rs b/backend/canisters/group/impl/src/lib.rs index b0a1f3213e..756115f902 100644 --- a/backend/canisters/group/impl/src/lib.rs +++ b/backend/canisters/group/impl/src/lib.rs @@ -361,11 +361,8 @@ struct Data { pub community_being_imported_into: Option, pub serialized_chat_state: Option, pub next_event_expiry: Option, - #[serde(default)] pub rng_seed: [u8; 32], - #[serde(default)] pub pending_payments_queue: PendingPaymentsQueue, - #[serde(default)] pub total_payment_receipts: PaymentReceipts, } diff --git a/backend/canisters/group_index/CHANGELOG.md b/backend/canisters/group_index/CHANGELOG.md index ae140e5052..17234b7d55 100644 --- a/backend/canisters/group_index/CHANGELOG.md +++ b/backend/canisters/group_index/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.942](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.942-group_index)] - 2023-11-24 + ### Changed - Avoid reseeding random number generator after each upgrade ([#4755](https://github.com/open-chat-labs/open-chat/pull/4755)) diff --git a/backend/canisters/group_index/impl/src/lib.rs b/backend/canisters/group_index/impl/src/lib.rs index 723f72a5f3..34050eb619 100644 --- a/backend/canisters/group_index/impl/src/lib.rs +++ b/backend/canisters/group_index/impl/src/lib.rs @@ -132,7 +132,6 @@ struct Data { pub cached_metrics: CachedMetrics, pub local_index_map: LocalGroupIndexMap, pub fire_and_forget_handler: FireAndForgetHandler, - #[serde(default)] pub rng_seed: [u8; 32], } diff --git a/backend/canisters/group_index/impl/src/model/cached_hot_groups.rs b/backend/canisters/group_index/impl/src/model/cached_hot_groups.rs index d819bcb4ef..5fef78bcb0 100644 --- a/backend/canisters/group_index/impl/src/model/cached_hot_groups.rs +++ b/backend/canisters/group_index/impl/src/model/cached_hot_groups.rs @@ -44,7 +44,6 @@ pub struct CachedPublicGroupSummary { pub latest_message_index: Option, pub participant_count: u32, pub events_ttl: Option, - #[serde(default)] pub events_ttl_last_updated: TimestampMillis, pub gate: Option, } diff --git a/backend/canisters/local_group_index/CHANGELOG.md b/backend/canisters/local_group_index/CHANGELOG.md index 3c925994c3..71b4a603d7 100644 --- a/backend/canisters/local_group_index/CHANGELOG.md +++ b/backend/canisters/local_group_index/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.944](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.944-local_group_index)] - 2023-11-24 + ### Changed - Avoid reseeding random number generator after each upgrade ([#4755](https://github.com/open-chat-labs/open-chat/pull/4755)) diff --git a/backend/canisters/local_group_index/impl/src/lib.rs b/backend/canisters/local_group_index/impl/src/lib.rs index f931ea3073..aaa9e81250 100644 --- a/backend/canisters/local_group_index/impl/src/lib.rs +++ b/backend/canisters/local_group_index/impl/src/lib.rs @@ -121,7 +121,6 @@ struct Data { pub group_upgrade_concurrency: u32, pub max_concurrent_community_upgrades: u32, pub community_upgrade_concurrency: u32, - #[serde(default)] pub rng_seed: [u8; 32], } diff --git a/backend/canisters/local_user_index/CHANGELOG.md b/backend/canisters/local_user_index/CHANGELOG.md index 91955669df..c7013adbd5 100644 --- a/backend/canisters/local_user_index/CHANGELOG.md +++ b/backend/canisters/local_user_index/CHANGELOG.md @@ -5,13 +5,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.943](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.943-local_user_index)] - 2023-11-24 + +### Changed + +- Add crypto payment access gate ([#4823](https://github.com/open-chat-labs/open-chat/pull/4823)) + ## [[2.0.940](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.940-local_user_index)] - 2023-11-21 ### Changed - Refund ckBTC which Dfinity provided for the Bitcoin Miami promotion ([#4795](https://github.com/open-chat-labs/open-chat/pull/4795)) - Regenerate random number generator seed across upgrades ([#4814](https://github.com/open-chat-labs/open-chat/pull/4814)) -- Add crypto payment access gate ([#4823](https://github.com/open-chat-labs/open-chat/pull/4823)) ## [[2.0.936](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.936-local_user_index)] - 2023-11-16 diff --git a/backend/canisters/registry/CHANGELOG.md b/backend/canisters/registry/CHANGELOG.md index 83132d015b..6bbf55e801 100644 --- a/backend/canisters/registry/CHANGELOG.md +++ b/backend/canisters/registry/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.941](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.941-registry)] - 2023-10-30 + ### Changed - Use dynamic buffer size when reading from stable memory ([#4683](https://github.com/open-chat-labs/open-chat/pull/4683)) diff --git a/backend/canisters/registry/api/src/lib.rs b/backend/canisters/registry/api/src/lib.rs index 6a426ae002..21307fbd43 100644 --- a/backend/canisters/registry/api/src/lib.rs +++ b/backend/canisters/registry/api/src/lib.rs @@ -25,7 +25,6 @@ pub struct TokenDetails { pub info_url: String, pub how_to_buy_url: String, pub transaction_url_format: String, - #[serde(default)] pub supported_standards: Vec, pub added: TimestampMillis, pub last_updated: TimestampMillis, diff --git a/backend/canisters/registry/impl/src/lib.rs b/backend/canisters/registry/impl/src/lib.rs index 36d09ba24d..622926de54 100644 --- a/backend/canisters/registry/impl/src/lib.rs +++ b/backend/canisters/registry/impl/src/lib.rs @@ -73,7 +73,6 @@ struct Data { tokens: Tokens, nervous_systems: NervousSystems, failed_sns_launches: HashSet, - #[serde(default)] rng_seed: [u8; 32], test_mode: bool, } diff --git a/backend/canisters/user/CHANGELOG.md b/backend/canisters/user/CHANGELOG.md index 2a318e2267..aa98ad37b0 100644 --- a/backend/canisters/user/CHANGELOG.md +++ b/backend/canisters/user/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.947](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.947-user)] - 2023-11-24 + ### Added - Support paying in CHAT for Diamond membership ([#4748](https://github.com/open-chat-labs/open-chat/pull/4748)) diff --git a/backend/canisters/user/api/src/updates/c2c_set_user_suspended.rs b/backend/canisters/user/api/src/updates/c2c_set_user_suspended.rs index aa2fbf816c..7fe3680503 100644 --- a/backend/canisters/user/api/src/updates/c2c_set_user_suspended.rs +++ b/backend/canisters/user/api/src/updates/c2c_set_user_suspended.rs @@ -15,6 +15,5 @@ pub enum Response { #[derive(CandidType, Serialize, Deserialize, Debug)] pub struct SuccessResult { pub groups: Vec, - #[serde(default)] pub communities: Vec, } diff --git a/backend/canisters/user/impl/src/lib.rs b/backend/canisters/user/impl/src/lib.rs index 4aca33d76a..3f03ae19df 100644 --- a/backend/canisters/user/impl/src/lib.rs +++ b/backend/canisters/user/impl/src/lib.rs @@ -178,9 +178,7 @@ struct Data { pub fire_and_forget_handler: FireAndForgetHandler, pub saved_crypto_accounts: Vec, pub next_event_expiry: Option, - #[serde(default)] pub token_swaps: TokenSwaps, - #[serde(default)] pub rng_seed: [u8; 32], } diff --git a/backend/canisters/user/impl/src/model/direct_chats.rs b/backend/canisters/user/impl/src/model/direct_chats.rs index 23eba4fa35..a000762428 100644 --- a/backend/canisters/user/impl/src/model/direct_chats.rs +++ b/backend/canisters/user/impl/src/model/direct_chats.rs @@ -10,7 +10,6 @@ pub struct DirectChats { direct_chats: HashMap, pinned: Timestamped>, metrics: ChatMetricsInternal, - #[serde(default)] chats_removed: BTreeSet<(TimestampMillis, ChatId)>, } diff --git a/backend/libraries/group_chat_core/src/lib.rs b/backend/libraries/group_chat_core/src/lib.rs index e9cc4b50e4..2e71260ef0 100644 --- a/backend/libraries/group_chat_core/src/lib.rs +++ b/backend/libraries/group_chat_core/src/lib.rs @@ -1899,7 +1899,6 @@ pub struct SummaryUpdates { pub struct AccessRulesInternal { pub text: Versioned, pub enabled: bool, - #[serde(default)] pub version_last_updated: TimestampMillis, } diff --git a/backend/libraries/group_chat_core/src/members.rs b/backend/libraries/group_chat_core/src/members.rs index 17d8f0fdcc..d64004001e 100644 --- a/backend/libraries/group_chat_core/src/members.rs +++ b/backend/libraries/group_chat_core/src/members.rs @@ -24,7 +24,6 @@ pub struct GroupMembers { pub moderator_count: u32, pub admin_count: u32, pub owner_count: u32, - #[serde(default)] updates: BTreeSet<(TimestampMillis, UserId, MemberUpdate)>, } diff --git a/backend/libraries/types/src/channel_summary.rs b/backend/libraries/types/src/channel_summary.rs index 1c2c162cbf..3fd8a484fe 100644 --- a/backend/libraries/types/src/channel_summary.rs +++ b/backend/libraries/types/src/channel_summary.rs @@ -26,7 +26,6 @@ pub struct CommunityCanisterChannelSummary { pub metrics: ChatMetrics, pub date_last_pinned: Option, pub events_ttl: Option, - #[serde(default)] pub events_ttl_last_updated: TimestampMillis, pub gate: Option, pub membership: Option, @@ -51,7 +50,6 @@ pub struct CommunityCanisterChannelSummaryUpdates { pub metrics: Option, pub date_last_pinned: Option, pub events_ttl: OptionUpdate, - #[serde(default)] pub events_ttl_last_updated: Option, pub gate: OptionUpdate, pub membership: Option, diff --git a/backend/libraries/types/src/chat_summary.rs b/backend/libraries/types/src/chat_summary.rs index 9f290a884a..5f4f7d56b6 100644 --- a/backend/libraries/types/src/chat_summary.rs +++ b/backend/libraries/types/src/chat_summary.rs @@ -24,7 +24,6 @@ pub struct DirectChatSummary { pub my_metrics: ChatMetrics, pub archived: bool, pub events_ttl: Option, - #[serde(default)] pub events_ttl_last_updated: TimestampMillis, } @@ -65,7 +64,6 @@ pub struct GroupChatSummary { pub date_last_pinned: Option, pub date_read_pinned: Option, pub events_ttl: Option, - #[serde(default)] pub events_ttl_last_updated: TimestampMillis, pub gate: Option, pub rules_accepted: bool, @@ -86,7 +84,6 @@ pub struct DirectChatSummaryUpdates { pub my_metrics: Option, pub archived: Option, pub events_ttl: OptionUpdate, - #[serde(default)] pub events_ttl_last_updated: Option, } @@ -110,7 +107,6 @@ pub struct PublicGroupSummary { pub is_public: bool, pub frozen: Option, pub events_ttl: Option, - #[serde(default)] pub events_ttl_last_updated: TimestampMillis, pub gate: Option, } @@ -143,11 +139,9 @@ pub struct GroupCanisterGroupChatSummary { pub frozen: Option, pub date_last_pinned: Option, pub events_ttl: Option, - #[serde(default)] pub events_ttl_last_updated: TimestampMillis, pub gate: Option, pub rules_accepted: bool, - #[serde(default)] pub membership: Option, } @@ -251,11 +245,9 @@ pub struct GroupCanisterGroupChatSummaryUpdates { pub frozen: OptionUpdate, pub date_last_pinned: Option, pub events_ttl: OptionUpdate, - #[serde(default)] pub events_ttl_last_updated: Option, pub gate: OptionUpdate, pub rules_accepted: Option, - #[serde(default)] pub membership: Option, } diff --git a/backend/libraries/types/src/polls.rs b/backend/libraries/types/src/polls.rs index 0e4ccb11b3..6de83ede62 100644 --- a/backend/libraries/types/src/polls.rs +++ b/backend/libraries/types/src/polls.rs @@ -3,10 +3,6 @@ use candid::CandidType; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, HashSet}; -fn allow_change_default() -> bool { - true -} - #[derive(CandidType, Serialize, Deserialize, Clone, Debug)] pub struct PollConfig { pub text: Option, @@ -15,7 +11,6 @@ pub struct PollConfig { pub anonymous: bool, pub show_votes_before_end_date: bool, pub allow_multiple_votes_per_user: bool, - #[serde(default = "allow_change_default")] pub allow_user_to_change_vote: bool, } diff --git a/canister_commit_ids.json b/canister_commit_ids.json index 8a7fff4619..55b266be04 100644 --- a/canister_commit_ids.json +++ b/canister_commit_ids.json @@ -1,10 +1,10 @@ { - "community": "e34ad4a8fcd63158c4e672e6830831cb88bcd24a", + "community": "ce3033cea45ce8aa6647c3124d7b99b94caa00c4", "cycles_dispenser": "496fd2aa54d194c29a7ba014ee1b6d7d1a2f9a00", - "group": "e34ad4a8fcd63158c4e672e6830831cb88bcd24a", - "group_index": "dd8b65c6459af56aa731a95ff5fba01f657edfb5", - "local_group_index": "d8e2664932ab0c2a70a4b50512f1d67720056a96", - "local_user_index": "e72f5d2e886d84ec2acc220b72101262ee78c7f3", + "group": "e38e72c517886c34b81626e791e5669acdc7acbb", + "group_index": "ce3033cea45ce8aa6647c3124d7b99b94caa00c4", + "local_group_index": "ce3033cea45ce8aa6647c3124d7b99b94caa00c4", + "local_user_index": "ce3033cea45ce8aa6647c3124d7b99b94caa00c4", "market_maker": "9a6a38f86194b57dc8718c2a595ef4b00cf82d47", "neuron_controller": "70cd194427a9eb48972ae8924b6e8a6be74199f4", "notifications": "b72fb44d4d34c1b9f34dc6eb650144944b57860a", @@ -12,9 +12,9 @@ "online_users": "9a6a38f86194b57dc8718c2a595ef4b00cf82d47", "proposals_bot": "45d105cb2e7b10198102f940c3a2a12953ef3f82", "proposal_validation": "03647d5475bd4cb1b6299c5688e6d4f97928559a", - "registry": "ba4c610d94d77eb0741ac673c20fc8e500a49831", + "registry": "ce3033cea45ce8aa6647c3124d7b99b94caa00c4", "storage_bucket": "5c4fb8d98e68053c6d93050dfafbd2dbb4c3c9b9", "storage_index": "8426b83456957cdc997374c8a01d9b641d1d3d08", - "user": "e34ad4a8fcd63158c4e672e6830831cb88bcd24a", + "user": "e38e72c517886c34b81626e791e5669acdc7acbb", "user_index": "58f0e174f283f3ccea672e87e825250309c5ebc5" }