Skip to content
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

Split Transactions document into sub documents #614

Merged
merged 40 commits into from
Nov 15, 2024
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
880627f
Split history transactions.md to general.md
Artemkaaas Nov 1, 2024
0c799e8
Split history transactions.md to general.md
Artemkaaas Nov 1, 2024
f8a5fdd
Split history transactions.md to general.md
Artemkaaas Nov 1, 2024
66e15c9
Split history transactions.md to general.md
Artemkaaas Nov 1, 2024
dd636f5
Split history transactions.md to model.md
Artemkaaas Nov 1, 2024
a0bec1e
Split history transactions.md to model.md
Artemkaaas Nov 1, 2024
5541b66
Split history transactions.md to model.md
Artemkaaas Nov 1, 2024
08bc88a
Split history transactions.md to model.md
Artemkaaas Nov 1, 2024
2d8c6bd
Split history transactions.md to compliance.md
Artemkaaas Nov 1, 2024
ff1b393
Split history transactions.md to compliance.md
Artemkaaas Nov 1, 2024
9c93c6a
Split history transactions.md to compliance.md
Artemkaaas Nov 1, 2024
32c88ae
Split history transactions.md to compliance.md
Artemkaaas Nov 1, 2024
880b48b
Split history transactions.md to pki.md
Artemkaaas Nov 1, 2024
23d7d18
Split history transactions.md to pki.md
Artemkaaas Nov 1, 2024
e2eba3b
Split history transactions.md to pki.md
Artemkaaas Nov 1, 2024
47d84f1
Split history transactions.md to pki.md
Artemkaaas Nov 1, 2024
75ba0a7
Split history transactions.md to auth.md
Artemkaaas Nov 1, 2024
42b9b92
Split history transactions.md to auth.md
Artemkaaas Nov 1, 2024
e234cef
Split history transactions.md to auth.md
Artemkaaas Nov 1, 2024
0705d5d
Split history transactions.md to auth.md
Artemkaaas Nov 1, 2024
8e9840b
Split history transactions.md to validator-node.md
Artemkaaas Nov 1, 2024
fc60c54
Split history transactions.md to validator-node.md
Artemkaaas Nov 1, 2024
ee17fa8
Split history transactions.md to validator-node.md
Artemkaaas Nov 1, 2024
3250147
Split history transactions.md to validator-node.md
Artemkaaas Nov 1, 2024
fa8a403
Split history transactions.md to modules
Artemkaaas Nov 1, 2024
f481423
Split history transactions.md to upgrade.md
Artemkaaas Nov 1, 2024
9f268a5
Split history transactions.md to upgrade.md
Artemkaaas Nov 1, 2024
0d3c6fd
Split history transactions.md to upgrade.md
Artemkaaas Nov 1, 2024
cd502e2
Split history transactions.md to upgrade.md
Artemkaaas Nov 1, 2024
b273ae3
Split history transactions.md to upgrade.md
Artemkaaas Nov 1, 2024
0434fc6
Updated transactions.md file
Artemkaaas Nov 2, 2024
4a50032
Merge branch 'pki-compatibility' into split-transactions-doc
Artemkaaas Nov 7, 2024
3e0ff58
Changed structure
Artemkaaas Nov 7, 2024
bc0b509
Added REST endpoints
Artemkaaas Nov 11, 2024
90428d6
Updated cli command
Artemkaaas Nov 12, 2024
0f532ba
Added CLI parameters to table
Artemkaaas Nov 13, 2024
3233ddf
Combined method and description columns
Artemkaaas Nov 14, 2024
9fca4e7
Updated titles
Artemkaaas Nov 14, 2024
31f91df
Merge remote-tracking branch 'origin/master' into split-transactions-doc
Artemkaaas Nov 15, 2024
2b5a9ca
Processed review comments
Artemkaaas Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,819 changes: 179 additions & 2,640 deletions docs/transactions.md

Large diffs are not rendered by default.

266 changes: 266 additions & 0 deletions docs/transactions/auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
## AUTH

<!-- markdownlint-disable MD036 -->

### PROPOSE_ADD_ACCOUNT

**Status: Implemented**

Proposes a new Account with the given address, public key and role.

If more than 1 Trustee signature is required to add the account, the account
will be in a pending state until sufficient number of approvals is received.

- Parameters:
- address: `string` - account address; Bech32 encoded
- pub_key: `string` - account's Protobuf JSON encoded public key
- vid: `optional(uint16)` - vendor ID (only needed for vendor role)
- pid_ranges: `optional(array<uint16 range>)` - the list of product-id ranges (range item separated with "-"), comma-separated, in increasing order, associated with this account: `1-100,201-300...`
- roles: `array<string>` - the list of roles, comma-separated, assigning to the account. Supported roles: `Vendor`, `TestHouse`, `CertificationCenter`, `Trustee`, `NodeAdmin`, `VendorAdmin`.
- info: `optional(string)` - information/notes for the proposal
- time: `optional(int64)` - proposal time (number of nanoseconds elapsed since January 1, 1970 UTC). This field cannot be specified using a CLI command and will use the current time by default.
- In State: `dclauth/PendingAccount/value/<address>`
- Who can send:
- Trustee
- CLI command:
- `dcld tx auth propose-add-account --address=<bench32 encoded string> --pubkey='<protobuf JSON encoded>' --roles=<role1,role2,...> --vid=<uint16> --pid_ranges=<uint16-range,uint16-range,...> --from=<account>`

### APPROVE_ADD_ACCOUNT

**Status: Implemented**

Approves the proposed account. It also can be used for revote (i.e. change vote from reject to approve)

The account is not active until sufficient number of Trustees approve it.

- Parameters:
- address: `string` - account address; Bech32 encoded
- info: `optional(string)` - information/notes for the approval
- time: `optional(int64)` - approval time (number of nanoseconds elapsed since January 1, 1970 UTC). This field cannot be specified using a CLI command and will use the current time by default.
- In State: `dclauth/Account/value/<address>`
- Who can send:
- Trustee
- Number of required approvals:
- greater than or equal 2/3 of Trustees for account roles: `TestHouse`, `CertificationCenter`, `Trustee`, `NodeAdmin`, `VendorAdmin` (proposal by a Trustee is also counted as an approval)
- greater than 1/3 of Trustees for account role: `Vendor` (proposal by a Trustee is also counted as an approval)
- CLI command:
- `dcld tx auth approve-add-account --address=<bench32 encoded string> --from=<account>`

> **_Note:_** If we are approving an account with role `Vendor`, then we need more than 1/3 of Trustees approvals.

### REJECT_ADD_ACCOUNT

**Status: Implemented**

Rejects the proposed account. It also can be used for revote (i.e. change vote from approve to reject)

If proposed account has only proposer's approval and no rejects then proposer can send this transaction to remove the proposal

The account is not reject until sufficient number of Trustees reject it.

- Parameters:
- address: `string` - account address; Bech32 encoded
- info: `optional(string)` - information/notes for the reject
- time: `optional(int64)` - reject time (number of nanoseconds elapsed since January 1, 1970 UTC). This field cannot be specified using a CLI command and will use the current time by default.
- In State: `dclauth/RejectedAccount/value/<address>`
- Who can send:
- Trustee
- Number of required rejects:
- greater than 1/3 of Trustees for account roles: `TestHouse`, `CertificationCenter`, `Trustee`, `NodeAdmin`, `VendorAdmin` (proposal by a Trustee is also counted as an approval)
- greater than or equal 2/3 of Trustees for account role: `Vendor` (proposal by a Trustee is also counted as an approval)
- CLI command:
- `dcld tx auth reject-add-account --address=<bench32 encoded string> --from=<account>`

### PROPOSE_REVOKE_ACCOUNT

**Status: Implemented**

Proposes revocation of the Account with the given address.

If more than 1 Trustee signature is required to revoke the account, the revocation
will be in a pending state until sufficient number of approvals is received.

- Parameters:
- address: `string` - account address; Bech32 encoded
- info: `optional(string)` - information/notes for the revocation proposal
- time: `optional(int64)` - revocation proposal time (number of nanoseconds elapsed since January 1, 1970 UTC). This field cannot be specified using a CLI command and will use the current time by default.
- In State: `dclauth/Account/value/<address>`
- Who can send:
- Trustee
- CLI command:
- `dcld tx auth propose-revoke-account --address=<bench32 encoded string> --from=<account>`

### APPROVE_REVOKE_ACCOUNT

**Status: Implemented**

Approves the proposed revocation of the account.

The account is not revoked until sufficient number of Trustees approve it.

- Parameters:
- address: `string` - account address; Bech32 encoded
- info: `optional(string)` - information/notes for the revocation approval
- time: `optional(int64)` - revocation approval time (number of nanoseconds elapsed since January 1, 1970 UTC). This field cannot be specified using a CLI command and will use the current time by default.
- In State: `dclauth/Account/value/<address>`
- Who can send:
- Trustee
- Number of required approvals:
- greater than or equal 2/3 of Trustees (proposal by a Trustee is also counted as an approval)
- CLI command:
- `dcld tx auth approve-revoke-account --address=<bench32 encoded string> --from=<account>`

> **_Note:_** If revoking an account has sufficient number of Trustees approve it then this account is placed in Revoked Account.

### GET_ACCOUNT

**Status: Implemented**

Gets an accounts by the address. Revoked accounts are not returned.

- Parameters:
- address: `string` - account address; Bech32 encoded
- CLI command:
- `dcld query auth account --addres <bench32 encoded string>`
- REST API:
- GET `/dcl/auth/accounts/{address}`

### GET_PROPOSED_ACCOUNT

**Status: Implemented**

Gets a proposed but not approved accounts by its address

- Parameters:
- address: `string` - account address; Bech32 encoded
- CLI command:
- `dcld query auth proposed-account --address <bench32 encoded string>`
- REST API:
- GET `/dcl/auth/proposed-accounts/{address}`

### GET_REJECTED_ACCOUNT

**Status: Implemented**

Get a rejected accounts by its address

- Parameters:
- address: `string` - account address; Bech32 encoded
- CLI command:
- `dcld query auth rejected-account --address <bech32 encoded string>`
- REST API:
- GET `/dcl/auth/rejected-accounts/{address}`

### GET_PROPOSED_ACCOUNT_TO_REVOKE

**Status: Implemented**

Gets a proposed but not approved accounts to be revoked by its address.

- Parameters:
- address: `string` - account address; Bech32 encoded
- CLI command:
- `dcld query auth proposed-account-to-revoke --address <bench32 encoded string>`
- REST API:
- GET `/dcl/auth/proposed-revocation-accounts/{address}`

### GET_REVOKED_ACCOUNT

**Status: Implemented**

Gets a revoked account by its address.

- Parameters:
- address: `string` - account address; Bech32 encoded
- CLI command:
- `dcld query auth revoked-account --address <bench32 encoded string>`
- REST API:
- GET `/dcl/auth/revoked-accounts/{address}`

### GET_ALL_ACCOUNTS

**Status: Implemented**

Gets all accounts. Revoked accounts are not returned.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query auth all-accounts`
- REST API:
- GET `/dcl/auth/accounts`

### GET_ALL_PROPOSED_ACCOUNTS

**Status: Implemented**

Gets all proposed but not approved accounts.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query auth all-proposed-accounts`
- REST API:
- GET `/dcl/auth/proposed-accounts`

### GET_ALL_REJECTED_ACCOUNTS

**Status: Implemented**

Get all rejected accounts.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params]
(#common-pagination-parameters))
- CLI command:
- `dcld query auth all-rejected-accounts`
- REST API:
- GET `/dcl/auth/rejected-accounts`

### GET_ALL_PROPOSED_ACCOUNTS_TO_REVOKE

**Status: Implemented**

Gets all proposed but not approved accounts to be revoked.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query auth all-proposed-accounts-to-revoke`
- REST API:
- GET `/dcl/auth/proposed-revocation-accounts`

### GET_ALL_REVOKED_ACCOUNTS

**Status: Implemented**

Gets all revoked accounts.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query auth all-revoked-accounts`
- REST API:
- GET `/dcl/auth/revoked-accounts`

### ROTATE_KEY

**Status: Not Implemented**

Rotate's the Account's public key by the owner.

- Who can send:
- Any role; owner


<!-- markdownlint-enable MD036 -->
373 changes: 373 additions & 0 deletions docs/transactions/compliance.md

Large diffs are not rendered by default.

291 changes: 291 additions & 0 deletions docs/transactions/model.md

Large diffs are not rendered by default.

1,059 changes: 1,059 additions & 0 deletions docs/transactions/pki.md

Large diffs are not rendered by default.

250 changes: 250 additions & 0 deletions docs/transactions/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
# Upgrade

<!-- markdownlint-disable MD036 -->

### PROPOSE_UPGRADE

**Status: Implemented**

Proposes an upgrade plan with the given name at the given height.

- Parameters:
- name: `string` - upgrade plan name
- upgrade-height: `int64` - upgrade plan height (positive non-zero)
- upgrade-info: `optional(string)` - upgrade plan info (for node admins to
read). Recommended format is an os/architecture -> application binary URL
map as a JSON under `binaries` key where each URL should include the
corresponding checksum as `checksum` query parameter with the value in the
format `type:value` where `type` is `sha256` or `sha512` and `value` is
the actual checksum value. For example:

```json
{
"binaries": {
"linux/amd64":"https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/download/v0.7.0/dcld?checksum=sha256:aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f"
}
}
```

- In State: `dclupgrade/ProposedUpgrade/value/<name>`
- Who can send:
- Trustee
- Number of required approvals:
- greater than 2/3 of Trustees (proposal by a Trustee is also counted as an approval)
- CLI command minimal:

```bash
dcld tx dclupgrade propose-upgrade --name=<string> --upgrade-height=<int64> --from=<account>
```

- CLI command full:

```bash
dcld tx dclupgrade propose-upgrade --name=<string> --upgrade-height=<int64> --upgrade-info=<string> --from=<account>
```

> **_Note:_** If the current upgrade proposal is out of date(when the current network height is greater than the proposed upgrade height), we can resubmit the upgrade proposal with the same name.
### APPROVE_UPGRADE

**Status: Implemented**

Approves the proposed upgrade plan with the given name. It also can be used for revote (i.e. change vote from reject to approve)

- Parameters:
- name: `string` - upgrade plan name
- In State: `upgrade/0x0`
- Who can send:
- Trustee
- Number of required approvals:
- greater than 2/3 of Trustees (proposal by a Trustee is also counted as an approval)
- CLI command:

```bash
dcld tx dclupgrade approve-upgrade --name=<string> --from=<account>
```

### REJECT_UPGRADE

**Status: Implemented**

Rejects the proposed upgrade plan with the given name. It also can be used for revote (i.e. change vote from approve to reject)

If proposed upgrade has only proposer's approval and no rejects then proposer can send this transaction to remove the proposal

- Paramaters:
- name: `string` - upgrade plan name
- In State: `RejectUpgrade/value/<name>`
- Who can send:
- Trustee
- Number of required rejects:
- more than 1/3 of Trustees
- CLI command:

```bash
dcld tx dclupgrade reject-upgrade --name=<string> --from=<account>
```

### GET_PROPOSED_UPGRADE

**Status: Implemented**

Gets the proposed upgrade plan with the given name.

- Parameters:
- name: `string` - upgrade plan name
- CLI command:

```bash
dcld query dclupgrade proposed-upgrade --name=<string>
```

- REST API:
- GET `/dcl/dclupgrade/proposed-upgrades/{name}`

### GET_APPROVED_UPGRADE

**Status: Implemented**

Gets the approved upgrade plan with the given name.

- Parameters:
- name: `string` - upgrade plan name
- CLI command:

```bash
dcld query dclupgrade approved-upgrade --name=<string>
```

- REST API:
- GET `/dcl/dclupgrade/approved-upgrades/{name}`

### GET_REJECTED_UPGRADE

**Status: Implemented**

Gets the rejected upgrade plan with the given name.

- Parameters:
- name: `string` - upgrade plan name
- CLI command:

```bash
dcld query dclupgrade rejected-upgrade --name=<string>
```

- REST API:
- GET `/dcl/dclupgrade/rejected-upgrades/{name}`

### GET_ALL_PROPOSED_UPGRADES

**Status: Implemented**

Gets all the proposed upgrade plans.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:

```bash
dcld query dclupgrade all-proposed-upgrades
```

- REST API:
- GET `/dcl/dclupgrade/proposed-upgrades`

### GET_ALL_APPROVED_UPGRADES

**Status: Implemented**

Gets all the approved upgrade plans.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:

```bash
dcld query dclupgrade all-approved-upgrades
```

- REST API:
- GET `/dcl/dclupgrade/approved-upgrades`

### GET_ALL_REJECTED_UPGRADES

**Status: Implemented**

Gets all the rejected upgrade plans.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:

```bash
dcld query dclupgrade all-rejected-upgrades
```

- REST API:
- GET `/dcl/dclupgrade/rejected-upgrades`

### GET_UPGRADE_PLAN

**Status: Implemented**

Gets the currently scheduled upgrade plan, if it exists.

- CLI command:

```bash
dcld query upgrade plan
```

- REST API:
- GET `/cosmos/upgrade/v1beta1/current_plan`

### GET_APPLIED_UPGRADE

**Status: Implemented**

Returns the header for the block at which the upgrade with the given name was
applied, if it was previously executed on the chain. This helps a client
determine which binary was valid over a given range of blocks, as well as gives
more context to understand past migrations.

- Parameters:
- `string` - upgrade name
- CLI command:

```bash
dcld query upgrade applied <string>
```

- REST API:
- GET `/cosmos/upgrade/v1beta1/applied_plan/{name}`

### GET_MODULE_VERSIONS

**Status: Implemented**

Gets a list of module names and their respective consensus versions. Following
the command with a specific module name will return only that module's
information.

- Parameters:
- `optional(string)` - module name
- CLI command minimal:

```bash
dcld query upgrade module_versions
```

- CLI command full:

```bash
dcld query upgrade module_versions <string>
```

- REST API:
- GET `/cosmos/upgrade/v1beta1/module_versions`

<!-- markdownlint-enable MD036 -->
345 changes: 345 additions & 0 deletions docs/transactions/validator-node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
# Validator Node

<!-- markdownlint-disable MD036 -->

### ADD_VALIDATOR_NODE

**Status: Implemented**

Adds a new Validator node.

- Parameters:
- pubkey: `string` - The validator's Protobuf JSON encoded public key
- moniker: `string` - The validator's human-readable name
- identity: `optional(string)` - identity signature (ex. UPort or Keybase)
- website: `optional(string)` - The validator's site link
- details: `optional(string)` - The validator's details
- ip: `optional(string)` - The node's public IP
- node-id: `optional(string)` - The node's ID
- In State: `validator/Validator/value/<owner-address>`
- Who can send:
- NodeAdmin
- CLI command:
- `dcld tx validator add-node --pubkey='<protobuf JSON encoded>' --moniker=<string> --from=<account>`

### DISABLE_VALIDATOR_NODE

**Status: Implemented**

Disables the Validator node (removes from the validator set) by the owner.

- Who can send:
- NodeAdmin; owner
- Parameters: No
- CLI command:
- `dcld tx validator disable-node --from=<account>`

### PROPOSE_DISABLE_VALIDATOR_NODE

**Status: Implemented**

Proposes disabling of the Validator node from the validator set by a Trustee.

If more than 1 Trustee signature is required to disable a node, the disable
will be in a pending state until sufficient number of approvals is received.

- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- info: `optional(string)` - information/notes for the proposal
- Who can send:
- Trustee
- CLI command:
- `dcld tx validator propose-disable-node --address=<validator address> --from=<account>`
e.g.:

```bash
dcld query validator propose-disable-node --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q --from alice
```

> **_Note:_** You can get Validator's address or owner address using query [GET_VALIDATOR](#get_validator)
### APPROVE_DISABLE_VALIDATOR_NODE
**Status: Implemented**
Approves disabling of the Validator node by a Trustee. It also can be used for revote (i.e. change vote from reject to approve)
The validator node is not disabled until sufficient number of Trustees approve it.
- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- info: `optional(string)` - information/notes for the approval
- Who can send:
- Trustee
- Number of required approvals:
- greater than 2/3 of Trustees (proposal by a Trustee is also counted as an approval)
- CLI command:
- `dcld tx validator approve-disable-node --address=<validator address> --from=<account>`
e.g.:
```bash
dcld tx validator approve-disable-node --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q from alice
```
> **_Note:_** You can get Validator's address or owner address using query [GET_VALIDATOR](#get_validator)

### REJECT_DISABLE_VALIDATOR_NODE

**Status: Implemented**

Rejects disabling of the Validator node by a Trustee. It also can be used for revote (i.e. change vote from approve to reject)

If disable validator proposal has only proposer's approval and no rejects then proposer can send this transaction to remove the proposal
The validator node is not reject until sufficient number of Trustees rejects it.
- Parameters:
- address: `string` - Bech32 encoded validator address
- info: `optional(string)` - information/notes for the reject
- Who can send:
- Trustee
- Number of required rejects:
- more than 1/3 of Trustees
- CLI command:
- `dcld tx validator reject-disable-node --address=<validator address> --from=<account>`
e.g.:
```bash
dcld tx validator reject-disable-node --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q --from alice
```
> **_Note:_** You can get Validator's address or owner address using query [GET_VALIDATOR](#get_validator)

### ENABLE_VALIDATOR_NODE

**Status: Implemented**

Enables the Validator node (returns to the validator set) by the owner.

the node will be enabled and returned to the active validator set.

- Who can send:
- NodeAdmin; owner
- Parameters: No
- CLI command:
- `dcld tx validator enable-node --from=<account>`

### GET_VALIDATOR

**Status: Implemented**

Gets a validator node.

- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- CLI command:
- `dcld query validator node --address=<validator address|account>` e.g.:

```bash
dcld query validator node --address=cosmosvaloper1qse069r3w0d82dul4xluqapxfg62qlndsdw9ms
```

or

```bash
dcld query validator node --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q
```

- REST API:
- GET `/dcl/validator/nodes/{owner}`

### GET_ALL_VALIDATORS

**Status: Implemented**

Gets the list of all validator nodes from the store.

> **_Note:_** All stored validator nodes (`active` and `jailed`) will be returned by default.
In order to get an active validator set use specific command [validator set](#validator-set).

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query validator all-nodes`
- REST API:
- GET `/dcl/validator/nodes`

### GET_PROPOSED_DISABLE_VALIDATOR

**Status: Implemented**

Gets a proposed validator node.

- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- CLI command:
- `dcld query validator proposed-disable-node --address=<validator address|account>` e.g.:

```bash
dcld query validator proposed-disable-node --address=cosmosvaloper1qse069r3w0d82dul4xluqapxfg62qlndsdw9ms
```

or

```bash
dcld query validator proposed-disable-node --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q
```

- REST API:
- GET `/dcl/validator/proposed-disable-nodes/{address}`

### GET_ALL_PROPOSED_DISABLE_VALIDATORS

**Status: Implemented**

Gets the list of all proposed disable validator nodes from the store.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query validator all-proposed-disable-nodes`
- REST API:
- GET `/dcl/validator/proposed-disable-nodes`

### GET_REJECTED_DISABLE_VALIDATOR

**Status: Implemented**

Gets a rejected validator node.

- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- CLI command:
- `dcld query validator rejected-disable-node --address=<validator address|account>` e.g.:

```bash
dcld query validator rejected-disable-node --address=cosmosvaloper1qse069r3w0d82dul4xluqapxfg62qlndsdw9ms
```

or

```bash
dcld query validator rejected-disable-node --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q
```

- REST API:
- GET `/dcl/validator/rejected-disable-nodes/{address}`

### GET_ALL_REJECTED_DISABLE_VALIDATORS

**Status: Implemented**

Gets the list of all rejected disable validator nodes from the store.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query validator all-rejected-disable-nodes`
- REST API:
- GET `/dcl/validator/rejected-disable-nodes`

### GET_DISABLED_VALIDATOR

**Status: Implemented**

Gets a disabled validator node.

- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- CLI command:
- `dcld query validator disabled-node --address=<validator address|account>`
e.g.:

```bash
dcld query validator disabled-node --address=cosmosvaloper1qse069r3w0d82dul4xluqapxfg62qlndsdw9ms
```

or

```bash
dcld query validator disabled-node --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q
```

- REST API:
- GET `/dcl/validator/disabled-nodes/{address}`

### GET_ALL_DISABLED_VALIDATORS

**Status: Implemented**

Gets the list of all disabled validator nodes from the store.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query validator all-disabled-nodes`
- REST API:
- GET `/dcl/validator/disabled-nodes`

### GET_LAST_VALIDATOR_POWER

**Status: Implemented**

Gets a last validator node power.

- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- CLI command:
- `dcld query validator last-power --address=<validator address|account>`
e.g.:

```bash
dcld query validator last-power --address=cosmosvaloper1qse069r3w0d82dul4xluqapxfg62qlndsdw9ms
```

or

```bash
dcld query validator last-power --address=cosmos1nlt926tzc280ntkdmqvqumgrnvym8xc5wqwg3q
```

- REST API:
- GET `/dcl/validator/last-powers/{owner}`

### GET_ALL_LAST_VALIDATORS_POWER

**Status: Implemented**

Gets the list of all last validator nodes power from the store.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query validator all-last-powers`
- REST API:
- GET `/dcl/validator/last-powers`

### UPDATE_VALIDATOR_NODE

**Status: Not Implemented**

Updates the Validator node by the owner.
`address` is used to reference the node, but can not be changed.

- Parameters:
- address: `string` - Bech32 encoded validator address or owner account
- moniker: `string` - The validator's human-readable name
- identity: `optional(string)` - identity signature (ex. UPort or Keybase)
- website: `optional(string)` - The validator's site link
- details: `optional(string)` - The validator's details
- ip: `optional(string)` - The node's public IP
- node-id: `optional(string)` - The node's ID
- Who can send:
- NodeAdmin; owner
<!-- markdownlint-enable MD036 -->
75 changes: 75 additions & 0 deletions docs/transactions/vendor-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Vendor Info

<!-- markdownlint-disable MD036 -->

## VENDOR INFO

### ADD_VENDOR_INFO

**Status: Implemented**

Adds a record about a Vendor.

- Parameters:
- vid: `uint16` - Vendor ID (positive non-zero)
- vendorName: `string` - Vendor name
- companyLegalName: `string` - Legal name of the vendor company
- companyPreferredName: `optional(string)` - Preferred name of the vendor company
- vendorLandingPageURL: `optional(string)` - URL of the vendor's landing page
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability. Should be equal to 0 (default 0)
- In State: `vendorinfo/VendorInfo/value/<vid>`
- Who can send:
- Account with a vendor role who has the matching Vendor ID
- Account with a vendor admin role
- CLI command:
- `dcld tx vendorinfo add-vendor --vid=<uint16> --vendorName=<string> --companyLegalName=<string> --companyPreferredName=<string> --vendorLandingPageURL=<string> --from=<account>`

### UPDATE_VENDOR_INFO

**Status: Implemented**

Updates a record about a Vendor.

- Parameters:
- vid: `uint16` - Vendor ID (positive non-zero)
- vendorName: `optional(string)` - Vendor name
- companyLegalName: `optional(string)` - Legal name of the vendor company
- companyPreferredName: `optional(string)` - Preferred name of the vendor company
- vendorLandingPageURL: `optional(string)` - URL of the vendor's landing page
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability. Should be equal to 0 (default 0)
- In State: `vendorinfo/VendorInfo/value/<vid>`
- Who can send:
- Account with a vendor role who has the matching Vendor ID
- Account with a vendor admin role
- CLI command:
- `dcld tx vendorinfo update-vendor --vid=<uint16> ... --from=<account>`

### GET_VENDOR_INFO

**Status: Implemented**

Gets a Vendor Info for the given `vid` (vendor ID).

- Parameters:
- vid: `uint16` - model vendor ID (positive non-zero)
- CLI command:
- `dcld query vendorinfo vendor --vid=<uint16>`
- REST API:
- GET `/dcl/vendorinfo/vendors/{vid}`

### GET_ALL_VENDOR_INFO

**Status: Implemented**

Gets information about all vendors for all VIDs.

Should be sent to trusted nodes only.

- Parameters:
- Common pagination parameters (see [pagination-params](#common-pagination-parameters))
- CLI command:
- `dcld query vendorinfo all-vendors`
- REST API:
- GET `/dcl/vendorinfo/vendors`

<!-- markdownlint-enable MD036 -->
8 changes: 7 additions & 1 deletion x/pki/client/cli/query_noc_certificates.go
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ func CmdShowNocCertificates() *cobra.Command {

cmd := &cobra.Command{
Use: "noc-x509-cert",
Short: "Gets certificates (either root or ica) by one of property combinations: " +
Short: "Gets NOC certificates (either root or ica) by one of property combinations: " +
"'subject + subject-key-id' or 'VID and subject-key-id' or just 'subject-key-id'",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
@@ -68,6 +68,12 @@ func CmdShowNocCertificates() *cobra.Command {
return err
}

if vid != 0 && subject != "" && subjectKeyID != "" {
return clientCtx.PrintString("Incorrect parameters combination. " +
"You must provide '--subject, --subject-key-id' or '--vid , --subject-key-id' or " +
"just '--subject-key-id'")
}

if subject != "" && subjectKeyID != "" {
var res types.NocCertificates