Skip to content

Commit

Permalink
[beacon] Remove last uses of dkg_v0 (#20113)
Browse files Browse the repository at this point in the history
## 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:
  • Loading branch information
benr-ml authored Nov 3, 2024
1 parent 61b97e6 commit a0d4c68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
27 changes: 0 additions & 27 deletions crates/mysten-util-mem/src/external_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ where
self.complaints.size_of(ops)
}
}
impl<G, EG> MallocSizeOf for fastcrypto_tbls::dkg_v0::Message<G, EG>
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<G, EG> MallocSizeOf for fastcrypto_tbls::dkg_v1::Message<G, EG>
where
G: fastcrypto::groups::GroupElement,
Expand All @@ -57,24 +48,6 @@ where
self.encrypted_shares.size_of(ops)
}
}
impl<G> MallocSizeOf for fastcrypto_tbls::ecies_v0::Encryption<G>
where
G: fastcrypto::groups::GroupElement,
{
fn size_of(&self, _ops: &mut crate::MallocSizeOfOps) -> usize {
// Can't measure size of internal Vec<u8> here because it's private.
0
}
}
impl<G> MallocSizeOf for fastcrypto_tbls::ecies_v0::MultiRecipientEncryption<G>
where
G: fastcrypto::groups::GroupElement,
{
fn size_of(&self, _ops: &mut crate::MallocSizeOfOps) -> usize {
// Can't measure size of internal Vec<Vec<u8>> here because it's private.
0
}
}
impl<G> MallocSizeOf for fastcrypto_tbls::ecies_v1::MultiRecipientEncryption<G>
where
G: fastcrypto::groups::GroupElement,
Expand Down
6 changes: 3 additions & 3 deletions narwhal/storage/src/node_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -141,8 +141,8 @@ impl NodeStorage {
Self::LAST_COMMITTED_CF;<AuthorityIdentifier, Round>,
Self::SUB_DAG_INDEX_CF;<SequenceNumber, CommittedSubDagShell>,
Self::COMMITTED_SUB_DAG_INDEX_CF;<SequenceNumber, ConsensusCommit>,
Self::PROCESSED_MESSAGES_CF;<PartyId, dkg_v0::ProcessedMessage<PkG, EncG>>,
Self::USED_MESSAGES_CF;<u32, dkg_v0::UsedProcessedMessages<PkG, EncG>>,
Self::PROCESSED_MESSAGES_CF;<PartyId, dkg_v1::ProcessedMessage<PkG, EncG>>,
Self::USED_MESSAGES_CF;<u32, dkg_v1::UsedProcessedMessages<PkG, EncG>>,
Self::CONFIRMATIONS_CF;<PartyId, dkg::Confirmation<EncG>>,
Self::DKG_OUTPUT_CF;<u32, dkg::Output<PkG, EncG>>,
Self::RANDOMNESS_ROUND_CF;<u32, RandomnessRound>
Expand Down

0 comments on commit a0d4c68

Please sign in to comment.