Skip to content

Commit

Permalink
Merge branch 'main' into schema_for_unordered_set
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Nov 12, 2024
2 parents 5ca3a4f + 79cb8c7 commit 33c2c35
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/node/node_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 0 additions & 11 deletions src/node/rpc/node_call_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConsensusType> consensus_type = std::nullopt;
std::optional<ccf::kv::Version> startup_seqno = std::nullopt;
std::optional<ccf::crypto::Pem> certificate_signing_request =
std::nullopt;
Expand All @@ -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<ReconfigurationType> reconfiguration_type =
std::nullopt; // Unused, but kept for backwards compatibility

LedgerSecretsMap ledger_secrets;
NetworkIdentity identity;
std::optional<ServiceStatus> service_status = std::nullopt;
Expand All @@ -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<ccf::crypto::Pem>& 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),
Expand All @@ -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 &&
Expand Down
3 changes: 0 additions & 3 deletions src/node/rpc/node_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down
9 changes: 2 additions & 7 deletions src/node/rpc/serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down

0 comments on commit 33c2c35

Please sign in to comment.