-
Notifications
You must be signed in to change notification settings - Fork 228
Self healing open #7189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Self healing open #7189
Changes from 187 commits
0a63230
859d30d
9eb305d
0bf26f9
2b8a1d6
bad8a13
1965453
5f066e5
09388e7
b991b9d
4f6de45
5a98922
9edf637
c745ade
71c1fb3
695f351
2956c38
709228f
32d1361
f88d7b5
4458c8b
cdebe29
4ea2bb7
6214b6c
a4be0c3
fce77da
58eb20c
5b52e3d
b876cca
68aff99
934010f
c84ba3f
594f536
333c427
12edb67
14d827b
6c44deb
1fbd015
c790f4d
b153e53
fee3559
dc6a7ee
2058180
f8981ae
963b6c1
4d22d82
c67f032
207b142
1073177
9d95055
b3a1f9b
39da991
64e3dc8
bba91ce
d28af46
b4e1d16
20e54fe
5626b86
7b72ea7
54f0823
e55f9df
af81c10
eb0dcd0
86f624f
ebf73b4
0152a4e
0d85ab8
64da579
fa52e9b
5205458
080ded9
60a66c3
d0fe1f3
e6bfb0b
d716c8b
62b99ed
b6352c0
a23a882
7f55f13
5282f19
03a8d5d
8cfb104
9b59d25
ef1f464
acbdcb1
2e1089c
6e05563
df7c7d4
6fa1587
63c4383
51b4f3b
ad47f4f
5a8de4a
02bb533
ff72e76
1dc290c
fd39352
699445c
6fa7169
068cc59
9e0ae3d
6830d02
d18a950
a4235ac
aeeef5f
a04a755
20041ea
9a2ba9a
03f0590
a4f234c
6a083b3
0578b15
8b7cedd
31e1b5f
29d6a9d
4b910b8
27be8e9
259522d
47aff71
ed0d4f0
5198f4d
b93ab79
a94de31
8e9e2ff
2ead593
3ecfd7e
8384d1a
5a9fa04
efe59bb
64779bd
ef70b52
c1a7aed
30344fd
84960c0
b55ac60
e102af9
a955313
4a7b3a5
f16c452
8003292
d21d71f
1dc62d0
3e04eb4
465e1df
9b5d6b6
7950eb7
45f54f0
e0fa598
f0175d9
e9cb10d
8c8816c
1c8d6cb
753d511
58ffb4d
0d9283a
bf08f9c
abeccda
53a9139
6b82bf3
db6fb56
4c527e2
d05b745
a4b6d83
300b13b
cae83b7
f0b0fd5
2cf40b2
2e4ca7c
cbc1513
2430e17
ec72561
d5e96e0
29b4de4
85538ec
2543e1d
fbbf5f9
49cce91
22dca96
afb4a1d
fd8750b
13e05b7
a9ab437
474b199
c06895c
499ea78
7e5af0d
009a1c1
9e7d6e0
f01931a
125a0fb
be6edc9
7ee3d5b
ccb43b7
af6757f
a83a44e
56ebb3e
cb23343
e977b74
c3a8a46
d6827c9
eacbf66
0e25ca7
e9b5c4c
c3f2b79
750e259
b8126ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,14 @@ namespace ccf | |
Snapshots snapshots = {}; | ||
}; | ||
|
||
struct SelfHealingOpenConfig | ||
{ | ||
std::vector<std::string> addresses; | ||
ccf::ds::TimeString retry_timeout = {"100ms"}; | ||
ccf::ds::TimeString timeout = {"2000ms"}; | ||
|
||
bool operator==(const SelfHealingOpenConfig&) const = default; | ||
}; | ||
|
||
struct StartupConfig : CCFConfig | ||
{ | ||
StartupConfig() = default; | ||
|
@@ -146,6 +154,7 @@ namespace ccf | |
std::nullopt; | ||
std::optional<std::string> previous_sealed_ledger_secret_location = | ||
std::nullopt; | ||
std::optional<SelfHealingOpenConfig> self_healing_open = std::nullopt; | ||
}; | ||
Recover recover = {}; | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the Apache 2.0 License. | ||
#pragma once | ||
|
||
#include "ccf/ds/enum_formatter.h" | ||
#include "ccf/ds/json.h" | ||
#include "ccf/ds/quote_info.h" | ||
#include "ccf/service/map.h" | ||
|
||
using IntrinsicIdentifier = std::string; | ||
|
||
struct SelfHealingOpenNodeInfo_t | ||
cjen1-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
{ | ||
ccf::QuoteInfo quote_info; | ||
std::string published_network_address; | ||
std::vector<uint8_t> cert_der; | ||
std::string service_identity; | ||
IntrinsicIdentifier intrinsic_id; | ||
}; | ||
|
||
DECLARE_JSON_TYPE(SelfHealingOpenNodeInfo_t); | ||
DECLARE_JSON_REQUIRED_FIELDS( | ||
SelfHealingOpenNodeInfo_t, | ||
quote_info, | ||
published_network_address, | ||
cert_der, | ||
service_identity, | ||
intrinsic_id); | ||
|
||
enum class SelfHealingOpenSM | ||
{ | ||
GOSSIPPING = 0, | ||
cjen1-msft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
VOTING, | ||
OPENING, // by chosen replica | ||
JOINING, // by all other replicas | ||
OPEN, | ||
}; | ||
|
||
DECLARE_JSON_ENUM( | ||
SelfHealingOpenSM, | ||
{{SelfHealingOpenSM::GOSSIPPING, "Gossipping"}, | ||
{SelfHealingOpenSM::VOTING, "Voting"}, | ||
{SelfHealingOpenSM::OPENING, "Opening"}, | ||
{SelfHealingOpenSM::JOINING, "Joining"}, | ||
{SelfHealingOpenSM::OPEN, "Open"}}); | ||
|
||
namespace ccf | ||
{ | ||
using SelfHealingOpenNodeInfo = | ||
ServiceMap<IntrinsicIdentifier, SelfHealingOpenNodeInfo_t>; | ||
using SelfHealingOpenGossips = | ||
ServiceMap<IntrinsicIdentifier, ccf::kv::Version>; | ||
using SelfHealingOpenChosenReplica = ServiceValue<IntrinsicIdentifier>; | ||
using SelfHealingOpenVotes = ServiceSet<IntrinsicIdentifier>; | ||
using SelfHealingOpenSMState = ServiceValue<SelfHealingOpenSM>; | ||
using SelfHealingOpenTimeoutSMState = ServiceValue<SelfHealingOpenSM>; | ||
using SelfHealingOpenFailoverFlag = ServiceValue<bool>; | ||
|
||
namespace Tables | ||
{ | ||
static constexpr auto SELF_HEALING_OPEN_NODES = | ||
"public:ccf.gov.selfhealingopen.nodes"; | ||
static constexpr auto SELF_HEALING_OPEN_GOSSIPS = | ||
"public:ccf.gov.selfhealingopen.gossip"; | ||
static constexpr auto SELF_HEALING_OPEN_CHOSEN_REPLICA = | ||
"public:ccf.gov.selfhealingopen.chosen_replica"; | ||
static constexpr auto SELF_HEALING_OPEN_VOTES = | ||
"public:ccf.gov.selfhealingopen.votes"; | ||
static constexpr auto SELF_HEALING_OPEN_SM_STATE = | ||
"public:ccf.gov.selfhealingopen.sm_state"; | ||
static constexpr auto SELF_HEALING_OPEN_TIMEOUT_SM_STATE = | ||
"public:ccf.gov.selfhealingopen.timeout_sm_state"; | ||
static constexpr auto SELF_HEALING_OPEN_FAILOVER_FLAG = | ||
"public:ccf.gov.selfhealingopen.failover_open"; | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.