@@ -483,10 +483,6 @@ pub struct AuthorityEpochTables {
483483 #[ default_options_override_fn = "pending_consensus_transactions_table_default_config" ]
484484 pending_consensus_transactions : DBMap < ConsensusTransactionKey , ConsensusTransaction > ,
485485
486- /// this table is not used
487- #[ allow( dead_code) ]
488- consensus_message_order : DBMap < ExecutionIndices , TransactionDigest > ,
489-
490486 /// The following table is used to store a single value (the corresponding
491487 /// key is a constant). The value represents the index of the latest
492488 /// consensus message this authority processed. This field is written by
@@ -502,21 +498,13 @@ pub struct AuthorityEpochTables {
502498 /// This field is written by a single process (consensus handler).
503499 last_consensus_stats : DBMap < u64 , ExecutionIndicesWithStats > ,
504500
505- /// this table is not used
506- #[ allow( dead_code) ]
507- checkpoint_boundary : DBMap < u64 , u64 > ,
508-
509501 /// This table contains current reconfiguration state for validator for
510502 /// current epoch
511503 reconfig_state : DBMap < u64 , ReconfigState > ,
512504
513505 /// Validators that have sent EndOfPublish message in this epoch
514506 end_of_publish : DBMap < AuthorityName , ( ) > ,
515507
516- // TODO: Unused. Remove when removal of DBMap tables is supported.
517- #[ allow( dead_code) ]
518- final_epoch_checkpoint : DBMap < u64 , u64 > ,
519-
520508 /// This table has information for the checkpoints for which we constructed
521509 /// all the data from consensus, but not yet constructed actual
522510 /// checkpoint.
@@ -552,12 +540,9 @@ pub struct AuthorityEpochTables {
552540 /// checkpoint later.
553541 user_signatures_for_checkpoints : DBMap < TransactionDigest , Vec < GenericSignature > > ,
554542
555- /// This table is not used
556- #[ allow( dead_code) ]
557- builder_checkpoint_summary : DBMap < CheckpointSequenceNumber , CheckpointSummary > ,
558543 /// Maps sequence number to checkpoint summary, used by CheckpointBuilder to
559544 /// build checkpoint within epoch
560- builder_checkpoint_summary_v2 : DBMap < CheckpointSequenceNumber , BuilderCheckpointSummary > ,
545+ builder_checkpoint_summary : DBMap < CheckpointSequenceNumber , BuilderCheckpointSummary > ,
561546
562547 // Maps checkpoint sequence number to an accumulator with accumulated state
563548 // only for the checkpoint that the key references. Append-only, i.e.,
@@ -583,11 +568,6 @@ pub struct AuthorityEpochTables {
583568 pub ( crate ) executed_transactions_to_checkpoint :
584569 DBMap < TransactionDigest , CheckpointSequenceNumber > ,
585570
586- /// This table is no longer used (can be removed when DBMap supports
587- /// removing tables)
588- #[ allow( dead_code) ]
589- oauth_provider_jwk : DBMap < JwkId , JWK > ,
590-
591571 /// JWKs that have been voted for by one or more authorities but are not yet
592572 /// active.
593573 pending_jwks : DBMap < ( AuthorityName , JwkId , JWK ) , ( ) > ,
@@ -601,51 +581,31 @@ pub struct AuthorityEpochTables {
601581 /// Transactions that are being deferred until some future time
602582 deferred_transactions : DBMap < DeferralKey , Vec < VerifiedSequencedConsensusTransaction > > ,
603583
604- /// This table is no longer used (can be removed when DBMap supports
605- /// removing tables)
606- #[ allow( dead_code) ]
607- randomness_rounds_written : DBMap < narwhal_types:: RandomnessRound , ( ) > ,
608-
609584 /// Tables for recording state for RandomnessManager.
610585
611586 /// Records messages processed from other nodes. Updated when receiving a
612587 /// new dkg::Message via consensus.
613- pub ( crate ) dkg_processed_messages_v2 : DBMap < PartyId , VersionedProcessedMessage > ,
614- /// This table is no longer used (can be removed when DBMap supports
615- /// removing tables)
616- #[ allow( dead_code) ]
617- #[ deprecated]
618- pub ( crate ) dkg_processed_messages : DBMap < PartyId , Vec < u8 > > ,
588+ pub ( crate ) dkg_processed_messages : DBMap < PartyId , VersionedProcessedMessage > ,
619589
620590 /// Records messages used to generate a DKG confirmation. Updated when
621591 /// enough DKG messages are received to progress to the next phase.
622- pub ( crate ) dkg_used_messages_v2 : DBMap < u64 , VersionedUsedProcessedMessages > ,
623- /// This table is no longer used (can be removed when DBMap supports
624- /// removing tables)
625- #[ allow( dead_code) ]
626- #[ deprecated]
627- pub ( crate ) dkg_used_messages : DBMap < u64 , Vec < u8 > > ,
592+ pub ( crate ) dkg_used_messages : DBMap < u64 , VersionedUsedProcessedMessages > ,
628593
629594 /// Records confirmations received from other nodes. Updated when receiving
630595 /// a new dkg::Confirmation via consensus.
631- pub ( crate ) dkg_confirmations_v2 : DBMap < PartyId , VersionedDkgConfirmation > ,
632- /// This table is no longer used (can be removed when DBMap supports
633- /// removing tables)
634- #[ allow( dead_code) ]
635- #[ deprecated]
636- pub ( crate ) dkg_confirmations : DBMap < PartyId , Vec < u8 > > ,
596+ pub ( crate ) dkg_confirmations : DBMap < PartyId , VersionedDkgConfirmation > ,
597+
637598 /// Records the final output of DKG after completion, including the public
638599 /// VSS key and any local private shares.
639600 pub ( crate ) dkg_output : DBMap < u64 , dkg:: Output < PkG , EncG > > ,
640- /// This table is no longer used (can be removed when DBMap supports
641- /// removing tables)
642- #[ allow( dead_code) ]
643- randomness_rounds_pending : DBMap < RandomnessRound , ( ) > ,
601+
644602 /// Holds the value of the next RandomnessRound to be generated.
645603 pub ( crate ) randomness_next_round : DBMap < u64 , RandomnessRound > ,
604+
646605 /// Holds the value of the highest completed RandomnessRound (as reported to
647606 /// RandomnessReporter).
648607 pub ( crate ) randomness_highest_completed_round : DBMap < u64 , RandomnessRound > ,
608+
649609 /// Holds the timestamp of the most recently generated round of randomness.
650610 pub ( crate ) randomness_last_round_timestamp : DBMap < u64 , TimestampMs > ,
651611}
@@ -3861,7 +3821,7 @@ impl AuthorityPerEpochStore {
38613821 checkpoint_height : Some ( commit_height) ,
38623822 position_in_commit,
38633823 } ;
3864- batch. insert_batch ( & self . tables ( ) ?. builder_checkpoint_summary_v2 , [ (
3824+ batch. insert_batch ( & self . tables ( ) ?. builder_checkpoint_summary , [ (
38653825 & sequence_number,
38663826 summary,
38673827 ) ] ) ?;
@@ -3899,7 +3859,7 @@ impl AuthorityPerEpochStore {
38993859 position_in_commit : 0 ,
39003860 } ;
39013861 self . tables ( ) ?
3902- . builder_checkpoint_summary_v2
3862+ . builder_checkpoint_summary
39033863 . insert ( summary. sequence_number ( ) , & builder_summary) ?;
39043864 Ok ( ( ) )
39053865 }
@@ -3909,7 +3869,7 @@ impl AuthorityPerEpochStore {
39093869 ) -> IotaResult < Option < BuilderCheckpointSummary > > {
39103870 Ok ( self
39113871 . tables ( ) ?
3912- . builder_checkpoint_summary_v2
3872+ . builder_checkpoint_summary
39133873 . unbounded_iter ( )
39143874 . skip_to_last ( )
39153875 . next ( )
@@ -3921,7 +3881,7 @@ impl AuthorityPerEpochStore {
39213881 ) -> IotaResult < Option < ( CheckpointSequenceNumber , CheckpointSummary ) > > {
39223882 Ok ( self
39233883 . tables ( ) ?
3924- . builder_checkpoint_summary_v2
3884+ . builder_checkpoint_summary
39253885 . unbounded_iter ( )
39263886 . skip_to_last ( )
39273887 . next ( )
@@ -3934,7 +3894,7 @@ impl AuthorityPerEpochStore {
39343894 ) -> IotaResult < Option < CheckpointSummary > > {
39353895 Ok ( self
39363896 . tables ( ) ?
3937- . builder_checkpoint_summary_v2
3897+ . builder_checkpoint_summary
39383898 . get ( & sequence) ?
39393899 . map ( |s| s. summary ) )
39403900 }
@@ -4324,13 +4284,10 @@ impl ConsensusCommitOutput {
43244284 ) ] ) ?;
43254285 }
43264286
4327- batch. insert_batch ( & tables. dkg_confirmations_v2 , self . dkg_confirmations ) ?;
4328- batch. insert_batch (
4329- & tables. dkg_processed_messages_v2 ,
4330- self . dkg_processed_messages ,
4331- ) ?;
4287+ batch. insert_batch ( & tables. dkg_confirmations , self . dkg_confirmations ) ?;
4288+ batch. insert_batch ( & tables. dkg_processed_messages , self . dkg_processed_messages ) ?;
43324289 batch. insert_batch (
4333- & tables. dkg_used_messages_v2 ,
4290+ & tables. dkg_used_messages ,
43344291 // using Option as iter
43354292 self . dkg_used_message
43364293 . into_iter ( )
0 commit comments