@@ -32,7 +32,7 @@ class PruningSigner {
3232 public:
3333 // Construct by passing the configuration for the node the signer is running
3434 // on.
35- PruningSigner (const std::string &key );
35+ PruningSigner ();
3636 // Sign() methods sign the passed message and store the signature in the
3737 // 'signature' field of the message. An exception is thrown on error.
3838 //
@@ -41,9 +41,6 @@ class PruningSigner {
4141 // application-level signature rather than a Concord-BFT Principal's RSA/EdDSA
4242 // signature.
4343 void sign (concord::messages::LatestPrunableBlock &);
44-
45- private:
46- std::unique_ptr<concord::crypto::ISigner> signer_;
4744};
4845
4946// This class verifies pruning messages that were signed by serializing message
@@ -55,7 +52,7 @@ class PruningSigner {
5552class PruningVerifier {
5653 public:
5754 // Construct by passing the system configuration.
58- PruningVerifier (const std::set<std::pair< uint16_t , const std::string>> &replicasPublicKeys );
55+ PruningVerifier ();
5956 // Verify() methods verify that the message comes from the advertised sender.
6057 // Methods return true on successful verification and false on unsuccessful.
6158 // An exception is thrown on error.
@@ -76,22 +73,6 @@ class PruningVerifier {
7673 };
7774
7875 bool verify (std::uint64_t sender, const std::string &ser, const std::string &signature) const ;
79-
80- using ReplicaVector = std::vector<Replica>;
81-
82- // Get a replica from the replicas vector by its index.
83- const Replica &getReplica (ReplicaVector::size_type idx) const ;
84-
85- // A vector of all the replicas in the system.
86- ReplicaVector replicas_;
87- // We map a principal_id to a replica index in the replicas_ vector to be able
88- // to verify a message through the Replica's verifier that is associated with
89- // its public key.
90- std::unordered_map<std::uint64_t , ReplicaVector::size_type> principal_to_replica_idx_;
91-
92- // Contains a set of replica principal_ids for use in verification. Filled in
93- // once during construction.
94- std::unordered_set<std::uint64_t > replica_ids_;
9576};
9677class PruningHandler : public concord ::reconfiguration::OperatorCommandsReconfigurationHandler {
9778 // This class implements the KVB pruning state machine. Main functionalities
@@ -171,7 +152,6 @@ class PruningHandler : public concord::reconfiguration::OperatorCommandsReconfig
171152 // Throws on errors.
172153 void pruneThroughBlockId (kvbc::BlockId block_id) const ;
173154 uint64_t getBlockBftSequenceNumber (kvbc::BlockId) const ;
174- logging::Logger logger_;
175155 PruningSigner signer_;
176156 PruningVerifier verifier_;
177157 kvbc::IReader &ro_storage_;
@@ -198,7 +178,7 @@ class ReadOnlyReplicaPruningHandler : public concord::reconfiguration::OperatorC
198178 IReader &ro_storage)
199179 : concord::reconfiguration::OperatorCommandsReconfigurationHandler{operator_pkey_path, type},
200180 ro_storage_{ro_storage},
201- signer_{bftEngine::ReplicaConfig::instance (). replicaPrivateKey },
181+ signer_{},
202182 pruning_enabled_{bftEngine::ReplicaConfig::instance ().pruningEnabled_ },
203183 replica_id_{bftEngine::ReplicaConfig::instance ().replicaId } {}
204184 bool handle (const concord::messages::LatestPrunableBlockRequest &,
0 commit comments