From a0d4c6874f3135b570fdb9d24506ea6a13414b72 Mon Sep 17 00:00:00 2001 From: benr-ml <112846738+benr-ml@users.noreply.github.com> Date: Sun, 3 Nov 2024 13:51:38 +0200 Subject: [PATCH] [beacon] Remove last uses of dkg_v0 (#20113) ## Description Switching old code to the v1 structs (should be safe since that data is not being used anymore). ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- crates/mysten-util-mem/src/external_impls.rs | 27 -------------------- narwhal/storage/src/node_store.rs | 6 ++--- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/crates/mysten-util-mem/src/external_impls.rs b/crates/mysten-util-mem/src/external_impls.rs index 87ad10110c006..0fd900aa955ac 100644 --- a/crates/mysten-util-mem/src/external_impls.rs +++ b/crates/mysten-util-mem/src/external_impls.rs @@ -39,15 +39,6 @@ where self.complaints.size_of(ops) } } -impl MallocSizeOf for fastcrypto_tbls::dkg_v0::Message -where - G: fastcrypto::groups::GroupElement, - EG: fastcrypto::groups::GroupElement, -{ - fn size_of(&self, ops: &mut crate::MallocSizeOfOps) -> usize { - self.encrypted_shares.size_of(ops) - } -} impl MallocSizeOf for fastcrypto_tbls::dkg_v1::Message where G: fastcrypto::groups::GroupElement, @@ -57,24 +48,6 @@ where self.encrypted_shares.size_of(ops) } } -impl MallocSizeOf for fastcrypto_tbls::ecies_v0::Encryption -where - G: fastcrypto::groups::GroupElement, -{ - fn size_of(&self, _ops: &mut crate::MallocSizeOfOps) -> usize { - // Can't measure size of internal Vec here because it's private. - 0 - } -} -impl MallocSizeOf for fastcrypto_tbls::ecies_v0::MultiRecipientEncryption -where - G: fastcrypto::groups::GroupElement, -{ - fn size_of(&self, _ops: &mut crate::MallocSizeOfOps) -> usize { - // Can't measure size of internal Vec> here because it's private. - 0 - } -} impl MallocSizeOf for fastcrypto_tbls::ecies_v1::MultiRecipientEncryption where G: fastcrypto::groups::GroupElement, diff --git a/narwhal/storage/src/node_store.rs b/narwhal/storage/src/node_store.rs index e102afe37feda..065c3d5e66ec1 100644 --- a/narwhal/storage/src/node_store.rs +++ b/narwhal/storage/src/node_store.rs @@ -11,7 +11,7 @@ use crate::{ use config::{AuthorityIdentifier, WorkerId}; use fastcrypto::groups; use fastcrypto_tbls::nodes::PartyId; -use fastcrypto_tbls::{dkg, dkg_v0}; +use fastcrypto_tbls::{dkg, dkg_v1}; use std::num::NonZeroUsize; use std::sync::Arc; use std::time::Duration; @@ -141,8 +141,8 @@ impl NodeStorage { Self::LAST_COMMITTED_CF;, Self::SUB_DAG_INDEX_CF;, Self::COMMITTED_SUB_DAG_INDEX_CF;, - Self::PROCESSED_MESSAGES_CF;>, - Self::USED_MESSAGES_CF;>, + Self::PROCESSED_MESSAGES_CF;>, + Self::USED_MESSAGES_CF;>, Self::CONFIRMATIONS_CF;>, Self::DKG_OUTPUT_CF;>, Self::RANDOMNESS_ROUND_CF;