From 79cb8c7b6fbb4058e2957ce1dd04cce8e15eadcb Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 12 Nov 2024 13:26:27 +0000 Subject: [PATCH] Remove deprecated fields (#6631) --- src/node/node_state.h | 1 - src/node/rpc/node_call_types.h | 11 ----------- src/node/rpc/node_frontend.h | 3 --- src/node/rpc/serialization.h | 9 ++------- 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/node/node_state.h b/src/node/node_state.h index 6b97f9939e94..cb7a3d9ed5ff 100644 --- a/src/node/node_state.h +++ b/src/node/node_state.h @@ -785,7 +785,6 @@ namespace ccf join_params.certificate_signing_request = node_sign_kp->create_csr( config.node_certificate.subject_name, subject_alt_names); join_params.node_data = config.node_data; - join_params.consensus_type = ConsensusType::CFT; LOG_DEBUG_FMT( "Sending join request to {}", config.join.target_rpc_address); diff --git a/src/node/rpc/node_call_types.h b/src/node/rpc/node_call_types.h index 5e70089fcc4f..ecac56781d31 100644 --- a/src/node/rpc/node_call_types.h +++ b/src/node/rpc/node_call_types.h @@ -83,9 +83,6 @@ namespace ccf NodeInfoNetwork node_info_network; QuoteInfo quote_info; ccf::crypto::Pem public_encryption_key; - // Always set by the joiner (node_state.h), but defaults to nullopt here - // to make sure serialisation does take place now that it is OPTIONAL. - std::optional consensus_type = std::nullopt; std::optional startup_seqno = std::nullopt; std::optional certificate_signing_request = std::nullopt; @@ -103,10 +100,6 @@ namespace ccf { bool public_only = false; ccf::kv::Version last_recovered_signed_idx = ccf::kv::NoVersion; - ConsensusType consensus_type = ConsensusType::CFT; - std::optional reconfiguration_type = - std::nullopt; // Unused, but kept for backwards compatibility - LedgerSecretsMap ledger_secrets; NetworkIdentity identity; std::optional service_status = std::nullopt; @@ -118,14 +111,12 @@ namespace ccf NetworkInfo( bool public_only, ccf::kv::Version last_recovered_signed_idx, - ReconfigurationType reconfiguration_type, const LedgerSecretsMap& ledger_secrets, const NetworkIdentity& identity, ServiceStatus service_status, const std::optional& endorsed_certificate) : public_only(public_only), last_recovered_signed_idx(last_recovered_signed_idx), - reconfiguration_type(reconfiguration_type), ledger_secrets(ledger_secrets), identity(identity), service_status(service_status), @@ -136,8 +127,6 @@ namespace ccf { return public_only == other.public_only && last_recovered_signed_idx == other.last_recovered_signed_idx && - consensus_type == other.consensus_type && - reconfiguration_type == other.reconfiguration_type && ledger_secrets == other.ledger_secrets && identity == other.identity && service_status == other.service_status && diff --git a/src/node/rpc/node_frontend.h b/src/node/rpc/node_frontend.h index 70c5b5a7eacb..d010cb02de60 100644 --- a/src/node/rpc/node_frontend.h +++ b/src/node/rpc/node_frontend.h @@ -366,7 +366,6 @@ namespace ccf rep.network_info = JoinNetworkNodeToNode::Out::NetworkInfo{ node_operation.is_part_of_public_network(), node_operation.get_last_recovered_signed_idx(), - ReconfigurationType::ONE_TRANSACTION, this->network.ledger_secrets->get(tx), *this->network.identity.get(), service_status, @@ -480,7 +479,6 @@ namespace ccf rep.network_info = JoinNetworkNodeToNode::Out::NetworkInfo( node_operation.is_part_of_public_network(), node_operation.get_last_recovered_signed_idx(), - ReconfigurationType::ONE_TRANSACTION, this->network.ledger_secrets->get( args.tx, existing_node_info->ledger_secret_seqno), *this->network.identity.get(), @@ -556,7 +554,6 @@ namespace ccf rep.network_info = JoinNetworkNodeToNode::Out::NetworkInfo( node_operation.is_part_of_public_network(), node_operation.get_last_recovered_signed_idx(), - ReconfigurationType::ONE_TRANSACTION, this->network.ledger_secrets->get( args.tx, existing_node_info->ledger_secret_seqno), *this->network.identity.get(), diff --git a/src/node/rpc/serialization.h b/src/node/rpc/serialization.h index 89d0e36065a9..3d72a9fc40c5 100644 --- a/src/node/rpc/serialization.h +++ b/src/node/rpc/serialization.h @@ -33,10 +33,7 @@ namespace ccf public_encryption_key, startup_seqno) DECLARE_JSON_OPTIONAL_FIELDS( - JoinNetworkNodeToNode::In, - certificate_signing_request, - node_data, - consensus_type) + JoinNetworkNodeToNode::In, certificate_signing_request, node_data) DECLARE_JSON_ENUM( ccf::IdentityType, @@ -58,9 +55,7 @@ namespace ccf DECLARE_JSON_OPTIONAL_FIELDS( JoinNetworkNodeToNode::Out::NetworkInfo, service_status, - endorsed_certificate, - reconfiguration_type, - consensus_type) + endorsed_certificate) DECLARE_JSON_TYPE_WITH_OPTIONAL_FIELDS(JoinNetworkNodeToNode::Out) DECLARE_JSON_REQUIRED_FIELDS(JoinNetworkNodeToNode::Out, node_status) DECLARE_JSON_OPTIONAL_FIELDS(