Skip to content

Commit

Permalink
feat: 14294 Add AddressBook to PlatformState (#397)
Browse files Browse the repository at this point in the history
* feat: 14294 Add `AddressBook` to `PlatformState`

Signed-off-by: Ivan Malygin <[email protected]>

* Added missing newline at EOF

Signed-off-by: Ivan Malygin <[email protected]>

* Removed unnecessary comment.

Signed-off-by: Ivan Malygin <[email protected]>

* Update platform/state/platform_state.proto

Co-authored-by: kfa-aguda <[email protected]>
Signed-off-by: Ivan Malygin <[email protected]>

* Update platform/state/platform_state.proto

Co-authored-by: kfa-aguda <[email protected]>
Signed-off-by: Ivan Malygin <[email protected]>

* Update platform/state/platform_state.proto

Co-authored-by: Joseph S. <[email protected]>
Signed-off-by: Ivan Malygin <[email protected]>

---------

Signed-off-by: Ivan Malygin <[email protected]>
Co-authored-by: kfa-aguda <[email protected]>
Co-authored-by: Joseph S. <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
  • Loading branch information
3 people authored and vtronkov committed Jul 23, 2024
1 parent 30b3d5f commit 7448641
Showing 1 changed file with 144 additions and 0 deletions.
144 changes: 144 additions & 0 deletions platform/state/platform_state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,22 @@ message PlatformState {
*/
proto.SemanticVersion first_version_in_birth_round_mode = 10003 [deprecated = true];

/**
* An address book for this round.
* <p>
* This SHALL be the latest network-consensus view of consensus nodes.
*/
AddressBook address_book = 10004 [deprecated = true];

/**
* A previous address book.
* <p>
* If present, the previous address book SHALL be the address book from the
* most recent preceding round.
* <p>
* This is a temporary workaround until dynamic address books are supported.
*/
AddressBook previous_address_book = 10005 [deprecated = true];
}


Expand Down Expand Up @@ -195,3 +211,131 @@ message MinimumJudgeInfo {
*/
uint64 minimum_judge_ancient_threshold = 2;
}

/**
* A network address book.<br/>
* The address book records the address of every known consensus node that
* participates in the network, including `0 weight` nodes.<br/>
*/
message AddressBook {
/**
* A consensus round.<br/>
* The round when this address book was created.
*/
int64 round = 1;

/**
* The node ID of the next address that can be added.
* <p>
* The next node identifier assigned SHALL be equal to this value.<br/>
* All existing node identifiers SHALL be strictly less than this value.<br/>
*/
NodeId next_node_id = 2;

/**
* A list of all consensus node addresses.
* <p>
* This list SHALL NOT be empty.
* If a consensus node is not in this list it SHALL NOT participate in the
* network.
*/
repeated Address addresses = 3;
}

/**
* A single network address.
* This is one address in the network address book, including all required
* information to include that consensus node in the consensus gossip.
*
*/
message Address {
/**
* The ID of this member.
* <p>
* This identifier SHALL be agreed upon by all consensus nodes.
*/
NodeId id = 1;

/**
* The nickname other consensus nodes will use to refer to this consensus node.
*/
string nickname = 2;

/**
* The name that a consensus node uses to refer to themselves.
*/
string self_name = 3;

/**
* A consensus weight.<br/>
* This value is the relative weight for this consensus node in the
* consensus voting algorithm.
*/
uint64 weight = 4;

/**
* A string network address.<br/>
* This value is the hostname assigned on the "internal" network
* interface behind any network firewalls, protocol gateways, or
* DNS translations.
* <p>
* This value SHALL be either a FQDN host name or an IPv4 address.
*/
string hostname_internal = 5;

/**
* Network port number.<br/>
* This value is the "translated" port number assigned on the "internal"
* network behind any network firewalls or other address translations.
* <p>
* This value SHALL be between 1 and 65535.
*/
uint32 port_internal = 6;

/**
* A string network address.<br/>
* This value is the hostname assigned on the "public" network
* interface visible to the general internet.
* <p>
* This value SHALL be either a FQDN host name or an IPv4 address.
*/
string hostname_external = 7;

/**
* Network port number.<br/>
* This value is the port number visible to the general internet.
* <p>
* This value SHALL be between 1 and 65535.
*/
uint32 port_external = 8;

/**
* The signing x509 certificate of the consensus node.
* <p>
* This SHALL provide the public key used for signing.
*/
bytes signing_certificate = 9;

/**
* The agreement x509 certificate of the consensus node.
* <p>
* This SHALL be used for establishing TLS connections.
*/
bytes agreement_certificate = 10;

/**
* A string that provides additional information about this consensus node.
*/
string memo = 11;
}

/**
* A consensus node identifier.<br/>
* This value uniquely identifies a single consensus node within the network.
*/
message NodeId {
/**
* A numeric identifier.
*/
uint64 id = 1;
}

0 comments on commit 7448641

Please sign in to comment.