Skip to content

Commit 4b5d428

Browse files
committed
Updated upgrade test
1 parent c0abe76 commit 4b5d428

20 files changed

+2115
-309
lines changed

README-DEV.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ Start a local pool as described above, and then just execute
125125
dcld
126126
```
127127

128-
Have a look at [How To](docs/how-to.md) and [transactions](docs/transactions.md) for instructions how to configure and use the CLI.
128+
Have a look at [How To](docs/how-to.md) and [transactions](docs/transactions/transactions.md) for instructions how to configure and use the CLI.
129129

130130
## REST
131131

132132
Start a local pool as described above.
133133

134134
Every node exposes a REST API at `http://<node-host>:1317` (see <https://docs.cosmos.network/v0.45/core/grpc_rest.html>).
135135

136-
Have a look at [transactions](docs/transactions.md) for a full list of REST endpoints.
136+
Have a look at [transactions](docs/transactions/transactions.md) for a full list of REST endpoints.
137137

138138
## Contributing
139139

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ DC Ledger is based on [CometBFT](https://cometbft.com/) and [Cosmos SDK](https:/
2222

2323
DC Ledger is a public permissioned ledger in the following sense:
2424

25-
- Anyone can read from the ledger (that's why it's public). See [How to read from the Ledger](docs/transactions.md#how-to-read-from-the-ledger).
26-
- Writes to the ledger are permissioned. See [How to write to the Ledger](docs/transactions.md#how-to-write-to-the-ledger) for details.
25+
- Anyone can read from the ledger (that's why it's public). See [How to read from the Ledger](docs/transactions/transactions.md#how-to-read-from-the-ledger).
26+
- Writes to the ledger are permissioned. See [How to write to the Ledger](docs/transactions/transactions.md#how-to-write-to-the-ledger) for details.
2727
- PoA (proof of authority) approach is used for adding new validator nodes to the network
2828
(see [Add New Node Use Case](docs/use_cases/use_cases_add_validator_node.png)) and
2929
[Running Node](docs/running-node.md).
@@ -117,7 +117,7 @@ See [Run local pool](README-DEV.md#run-local-pool) section in [README-DEV.md](RE
117117
### CLI
118118

119119
- The same `dcld` binary as a Node
120-
- A full list of all CLI commands can be found there: [transactions.md](docs/transactions.md).
120+
- A full list of all CLI commands can be found there: [transactions.md](docs/transactions/transactions.md).
121121
- CLI can be used for write and read requests.
122122
- Please configure the CLI before using (see [how-to.md](docs/how-to.md#cli-configuration)).
123123
- **If there are no trusted Observer or Validator nodes to connect a CLI, then a [Light Client Proxy](#light-client-proxy) can be used.**
@@ -140,20 +140,20 @@ See [Run Light Client Proxy](docs/running-light-client-proxy.md) for details how
140140
- **There are no state proofs in REST, so REST queries should be sent to trusted Validator or Observer nodes only.**
141141
- OpenAPI specification: <https://zigbee-alliance.github.io/distributed-compliance-ledger/>.
142142
- Any running node exposes a REST API at port `1317`. See <https://docs.cosmos.network/v0.47/learn/advanced/grpc_rest>.
143-
- See [transactions](docs/transactions.md) for a full list of endpoints.
143+
- See [transactions](docs/transactions/transactions.md) for a full list of endpoints.
144144
- REST HTTP(S) queries can be directly used for read requests.
145-
See [How to read from the Ledger](docs/transactions.md#how-to-read-from-the-ledger).
145+
See [How to read from the Ledger](docs/transactions/transactions.md#how-to-read-from-the-ledger).
146146
- REST HTTP(S) queries can be directly used to broadcast generated and signed transaction.
147147
- Generation and signing of transactions need to be done in code or via CLI.
148-
See [How to write to the Ledger](docs/transactions.md#how-to-write-to-the-ledger).
148+
See [How to write to the Ledger](docs/transactions/transactions.md#how-to-write-to-the-ledger).
149149

150150
### gRPC
151151

152152
- **There are no state proofs in gRPC, so gRPC queries should be sent to trusted Validator or Observer nodes only.**
153153
- Any running node exposes a REST API at port `9090`. See <https://docs.cosmos.network/v0.47/learn/advanced/grpc_rest>.
154154
- A client code can be generated for all popular languages from the proto files [proto](proto), see <https://grpc.io/docs/languages/>.
155155
- The generated client code can be used for read and write requests, i.e. generation and signing of transactions
156-
See [How to read from the Ledger](docs/transactions.md#how-to-read-from-the-ledger) and [How to write to the Ledger](docs/transactions.md#how-to-write-to-the-ledger) for details.
156+
See [How to read from the Ledger](docs/transactions/transactions.md#how-to-read-from-the-ledger) and [How to write to the Ledger](docs/transactions/transactions.md#how-to-write-to-the-ledger) for details.
157157

158158
### CometBFT RPC and Light Client
159159

@@ -209,7 +209,7 @@ the following instructions from [how-to.md](docs/how-to.md) can be used for ever
209209

210210
- [OpenAPI specification](https://zigbee-alliance.github.io/distributed-compliance-ledger/)
211211
- [Quick Start](docs/quickStartGuide.adoc)
212-
- [List of Transactions, Queries, CLI command, REST API](docs/transactions.md)
212+
- [List of Transactions, Queries, CLI command, REST API](docs/transactions/transactions.md)
213213
- [How To Guide](docs/how-to.md)
214214
- [Use Case Diagrams](docs/use_cases)
215215
- [PKI](docs/use_cases/use_cases_pki.png)

docs/how-to.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document contains tutorials demonstrating how to accomplish common tasks us
66
- If write requests to the Ledger needs to be sent, please make sure that you have
77
an Account created on the Ledger with an appropriate role (see [Getting Account](#getting-account) section in [how-to.md](how-to.md)).
88
- Sending read requests to the Ledger doesn't require an Account (Ledger is public for reads).
9-
- A full list of all CLI commands with all parameters can be found there: [transactions](transactions.md).
9+
- A full list of all CLI commands with all parameters can be found there: [transactions](transactions/transactions.md).
1010
- After the CLI is configured and Account with an appropriate role is created,
1111
the following instructions can be used for every role (see [Use Case Diagrams](use_cases)):
1212
- [Trustee](#trustee-instructions)

docs/pool-upgrade-how-to.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ One of the trustees proposes the upgrade using the following steps:
6060
```
6161
Please note, that it must be called against the `dcld` binary, not the platform archive itself. So, for Ubuntu, either take a `dcld` binary from the root folder of the release, or extract it from ` dcld.ubuntu.tar.gz`.
6262

63-
2. Sends [`ProposeUpgrade`](./transactions.md#propose_upgrade) transaction
63+
2. Sends [`ProposeUpgrade`](transactions/transactions.md#propose_upgrade) transaction
6464
with the name of the new upgrade handler, the chosen ledger height and the
6565
info containing URLs of the new application version binaries for supported
6666
platforms with the calculated checksums.
@@ -92,7 +92,7 @@ Each of them uses the following steps to accomplish this:
9292
```
9393
Please note, that it must be called against the `dcld` binary, not the platform archive itself. So, for Ubuntu, either take a `dcld` binary from the root folder of the release, or extract it from ` dcld.ubuntu.tar.gz`.
9494

95-
2. Sends [`ApproveUpgrade`](./transactions.md#approve_upgrade) transaction
95+
2. Sends [`ApproveUpgrade`](transactions/transactions.md#approve_upgrade) transaction
9696
with the name of the proposed upgrade.
9797

9898
For example:

docs/pool-upgrade.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Any upgrade plan has the following fields:
2727
## Workflow
2828

2929
Initially an upgrade plan is proposed by one of trustees using
30-
[propose-upgrade](./transactions.md#propose_upgrade) command. Then the proposed
30+
[propose-upgrade](transactions/transactions.md#propose_upgrade) command. Then the proposed
3131
upgrade plan has to be approved by the majority of trustees (2/3 including the
3232
trustee who has proposed it) using
33-
[approve-upgrade](./transactions.md#approve_upgrade) command. When the necessary
33+
[approve-upgrade](transactions/transactions.md#approve_upgrade) command. When the necessary
3434
count of approvals is gathered, the upgrade plan turns into the approved state
3535
and is actually scheduled.
3636

@@ -81,5 +81,5 @@ checksum when the URL is provided in the specified format. If the downloaded
8181
file checksum does not equal to the checksum provided in the URL, `go-getter`
8282
reports that checksums did not match. To view `Info` field value of an upgrade
8383
plan, just execute an appropriate query command from `dclupgrade` or `upgrade`
84-
module. See [Upgrade CLI commands reference](./transactions.md#upgrade) for
84+
module. See [Upgrade CLI commands reference](transactions/transactions.md#upgrade) for
8585
details.

docs/transactions.md docs/transactions/transactions.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ See use case sequence diagrams for the examples of how transaction can be used.
2121

2222
- Every writer to the Ledger must
2323
- Have a private/public key pair.
24-
- Have an Account created on the ledger via `ACCOUNT` transaction (see [Use Case Txn Auth](use_cases/use_cases_txn_auth.puml)).
24+
- Have an Account created on the ledger via `ACCOUNT` transaction (see [Use Case Txn Auth](../use_cases/use_cases_txn_auth.puml)).
2525
- The Account stores the public part of the key
2626
- The Account has an associated role. The role is used for authorization policies.
2727
- Sign every transaction by the private key.
@@ -38,9 +38,9 @@ an Account or sign the request.
3838

3939
- Local CLI
4040
- Configure the CLI before using.
41-
See `CLI Configuration` section in [how-to.md](how-to.md#cli-configuration).
41+
See `CLI Configuration` section in [how-to.md](../how-to.md#cli-configuration).
4242
- Generate and store a private key for the Account to be used for sending.
43-
See `Getting Account` section in [how-to.md](how-to.md#getting-account).
43+
See `Getting Account` section in [how-to.md](../how-to.md#getting-account).
4444
- Send transactions to the ledger from the Account (`--from`).
4545
- it will automatically build a request, sign it by the account's key, and broadcast to the ledger.
4646
- See `CLI` sub-sections for every write request (transaction).
@@ -54,9 +54,9 @@ an Account or sign the request.
5454
- Broadcast transaction by CLI 1: `dcld tx broadcast txn.json`
5555
- To get the actual result of transaction, `dcld query tx=txHash` call must be executed, where `txHash` is the hash of previously executed transaction.
5656
- gRPC:
57-
- Generate a client code from the proto files [proto](../proto) for the client language (see <https://grpc.io/docs/languages/>)
57+
- Generate a client code from the proto files [proto](../../proto) for the client language (see <https://grpc.io/docs/languages/>)
5858
- Build, sign, and broadcast the message (transaction).
59-
See [grpc/rest integration tests](../integration_tests/grpc_rest) as an example.
59+
See [grpc/rest integration tests](../../integration_tests/grpc_rest) as an example.
6060
- REST API
6161
- Build and sign a transaction by one of the following ways
6262
- In code via gRPC (see above)
@@ -81,25 +81,25 @@ Please make sure that TLS is enabled in gRPC, REST or Light Client Proxy for sec
8181

8282
- Local CLI
8383
- See `CLI` section for every read request.
84-
- If there are no trusted Observer or Validator nodes to connect a CLI, then a [Light Client Proxy](running-light-client-proxy.md) can be used.
84+
- If there are no trusted Observer or Validator nodes to connect a CLI, then a [Light Client Proxy](../running-light-client-proxy.md) can be used.
8585
- REST API
8686
- OpenAPI specification: <https://zigbee-alliance.github.io/distributed-compliance-ledger/>.
8787
- Any running node exposes a REST API at port `1317`. See <https://docs.cosmos.network/v0.45/core/grpc_rest.html>.
8888
- See `REST API` section for every read request.
89-
- See [grpc/rest integration tests](../integration_tests/grpc_rest) as an example.
89+
- See [grpc/rest integration tests](../../integration_tests/grpc_rest) as an example.
9090
- There are no state proofs in REST, so REST queries should be sent to trusted Validator or Observer nodes only.
9191
- gRPC
9292
- Any running node exposes a REST API at port `9090`. See <https://docs.cosmos.network/v0.45/core/grpc_rest.html>.
93-
- Generate a client code from the proto files [proto](../proto) for the client language (see <https://grpc.io/docs/languages/>).
94-
- See [grpc/rest integration tests](../integration_tests/grpc_rest) as an example.
93+
- Generate a client code from the proto files [proto](../../proto) for the client language (see <https://grpc.io/docs/languages/>).
94+
- See [grpc/rest integration tests](../../integration_tests/grpc_rest) as an example.
9595
- There are no state proofs in gRPC, so gRPC queries should be sent to trusted Validator or Observer nodes only.
9696
- Tendermint RPC
9797
- Tendermint RPC OpenAPI specification can be found in <https://zigbee-alliance.github.io/distributed-compliance-ledger/>.
9898
- Tendermint RPC is exposed by every running node at port `26657`. See <https://docs.cosmos.network/v0.45/core/grpc_rest.html#tendermint-rpc>.
9999
- Tendermint RPC supports state proofs. Tendermint's Light Client library can be used to verify the state proofs.
100100
So, if Light Client API is used, then it's possible to communicate with non-trusted nodes.
101101
- Please note, that multi-value queries don't have state proofs support and should be sent to trusted nodes only.
102-
- Refer to [this doc](./cometbft-rpc.md) to see how to [subscribe](./cometbft-rpc.md#subscribe) to a Tendermint WebSocket based events and/or [query](./cometbft-rpc.md#querying-application-components) an application components.
102+
- Refer to [this doc](../cometbft-rpc.md) to see how to [subscribe](../cometbft-rpc.md#subscribe) to a Tendermint WebSocket based events and/or [query](../cometbft-rpc.md#querying-application-components) an application components.
103103

104104
`NotFound` (404 code) is returned if an entry is not found on the ledger.
105105

integration_tests/cli/pki-add-vendor-x509-certificates.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-assign-vid.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-combine-certs.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-noc-certs.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-noc-revocation-with-revoking-child.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-noc-revocation-with-serial-number.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-remove-noc-certificates.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-remove-x509-certificates.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-revocation-points.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

integration_tests/cli/pki-revocation-with-revoking-child.sh

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2020 DSR Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
set -euo pipefail
217
source integration_tests/cli/common.sh
318

0 commit comments

Comments
 (0)