-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consensus: store entity ids instead of consensus addresses
- Loading branch information
Showing
26 changed files
with
9,135 additions
and
18,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1385,11 +1385,13 @@ components: | |
description: The Merkle root of the state tree after applying the block. | ||
example: *state_root_1 | ||
proposer: | ||
allOf: [$ref: '#/components/schemas/NodeInfo'] | ||
allOf: [$ref: '#/components/schemas/EntityInfo'] | ||
description: The entity that proposed this block. | ||
signers: | ||
type: array | ||
items: | ||
allOf: [$ref: '#/components/schemas/NodeInfo'] | ||
allOf: [$ref: '#/components/schemas/EntityInfo'] | ||
description: A list of the entities that signed the block. | ||
# TODO: Not available on backend | ||
# size: | ||
# type: integer | ||
|
@@ -1404,16 +1406,43 @@ components: | |
description: | | ||
A consensus block. | ||
NodeInfo: | ||
EntityInfo: | ||
type: object | ||
description: Light-weight entity information, containing only its ID, address and registry metadata. | ||
properties: | ||
node_id: | ||
type: string | ||
entity_id: | ||
type: string | ||
description: The ID of the entity owning the node; this corresponds to the entity's public key in base64. | ||
example: "`TqUyj5Q+9vZtqu10yw6Zw7HEX3Ywe0JQA9vHyzY47TU=`" | ||
entity_address: | ||
type: string | ||
entity_metadata: {} | ||
description: Address of the entity owning the node, in Bech32 format (`oasis1...`). | ||
example: "`oasis1qzzd6khm3acqskpxlk9vd5044cmmcce78y5l6000`" | ||
entity_metadata: | ||
description: | | ||
Metadata about an entity, if available. See [the metadata registry](https://github.com/oasisprotocol/metadata-registry) for details. | ||
When available, it is an object with some subset of the following fields: | ||
- `v`: The version of the metadata structure (always present). | ||
- `serial`: The serial number of the metadata statement (always present). | ||
- `name`: The name of the entity. | ||
- `url`: The URL associated with the entity. | ||
- `email`: The email address associated with the entity. | ||
- `keybase`: Tne entity's keybase.io handle. | ||
- `twitter`: The twitter handle associated with the entity. | ||
example: | | ||
An entity with all fields: | ||
{ | ||
"v": 1, | ||
"serial": 1, | ||
"name": "Entity display name", | ||
"url": "https://example.org/entity", | ||
"email": "[email protected]", | ||
"keybase": "keybase_handle", | ||
"twitter": "twitter_handle" | ||
} | ||
Delegation: | ||
type: object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE chain.nodes | ||
ADD COLUMN consensus_pubkey_address TEXT; | ||
|
||
CREATE INDEX ix_nodes_consensus_pubkey_address ON chain.nodes (consensus_pubkey_address); | ||
|
||
ALTER TABLE chain.blocks | ||
ALTER COLUMN block_hash DROP NOT NULL, | ||
ALTER COLUMN time DROP NOT NULL, | ||
ALTER COLUMN num_txs DROP NOT NULL, | ||
ALTER COLUMN namespace DROP NOT NULL, | ||
ALTER COLUMN version DROP NOT NULL, | ||
ALTER COLUMN state_root DROP NOT NULL, | ||
ADD COLUMN proposer_node_consensus_pubkey_address TEXT, | ||
ADD COLUMN signer_node_consensus_pubkey_addresses TEXT[]; | ||
ADD COLUMN proposer_entity_id base64_ed25519_pubkey, | ||
ADD COLUMN signer_entity_ids base64_ed25519_pubkey[]; | ||
|
||
CREATE INDEX ix_blocks_proposer_entity_id ON chain.blocks (proposer_entity_id); | ||
CREATE INDEX ix_blocks_signer_entity_ids ON chain.blocks USING gin(signer_entity_ids); | ||
|
||
COMMIT; |
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/main.pix
Git LFS file not shown
4 changes: 2 additions & 2 deletions
4
tests/e2e_regression/damask/rpc-cache/https_sourcify_dev_server/overflow.pix
Git LFS file not shown
Oops, something went wrong.