You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README-DEV.md
+22-19
Original file line number
Diff line number
Diff line change
@@ -153,10 +153,16 @@ Please take into account the following when sending a PR:
153
153
154
154
## How To Add a new Module or Transaction
155
155
156
-
- Use [starport](https://github.com/tendermint/starport) command to scaffold the module.
157
-
Consider using a docker container built from the provided [Dockerfile](scripts/Dockerfile) to have a predictable version of starport. See [README.md](scripts/README.md).
156
+
- Use [ignite v0.27.1](https://github.com/ignite/cli) command to scaffold the module.
157
+
Consider using a docker container built from the provided [Dockerfile](scripts/Dockerfile) to have a predictable version of ignite. See [README.md](scripts/README.md).
158
158
- Have a look at the scripts and commands used forgeneration of existing modules, messages and CRUD operations and do itin a similar way
159
159
(for example [PKI module commands](scripts/starport/upgrade-0.44/07.pki_types.sh)).
160
+
-
161
+
**Note**:
162
+
1. On previous scaffolding of modules `starport` cli used instead of `ignite`.
163
+
While generating new module, command structure will the same except it must start with `ignite`.
164
+
2. After execution of command`ignite scaffold ...` generated `.proto` files will be added into `proto/distributedcoplianceledger/{module}/{proto}`
165
+
. So make sure to put contents of generated proto files into related folders inside `proto/zigbeealliance/..` folder.
160
166
- If a new transaction with a new data in state (key-value) and new queries needs to be created, then both message and CRUD commands need to be executed.
161
167
- If just a message to update existing state values need to be created, then a message command is enough.
162
168
- Adjust the generated code
@@ -166,19 +172,18 @@ Please take into account the following when sending a PR:
166
172
- add `(cosmos_proto.scalar) = "cosmos.AddressString"` annotation for all fields with address/account type (such as `signer` or `owner`).
167
173
- fix types if needed in`proto/<module>/<entity>.proto` files
168
174
- Note1: `unit64` will be returned as string if the output is a JSON format. So, it's better to use `uint64` only when it's really `uint64`.
169
-
- Note2: for`uint16` type: use `int32` during starport scaffolding, and add custom validation (annotations above) to check the lower and upper bounds.
170
-
- Note3: for`uint32` type: use `int32` during starport scaffolding, then replace it by `uint32`in .proto files, re-generate the code and fix compilation errors.
171
-
- build proto (for example `starport chain build`). Fix compilation errors if any.
175
+
- Note2: for`uint16` type: use `int32` during ignite scaffolding, and add custom validation (annotations above) to check the lower and upper bounds.
176
+
- Note3: for`uint32` type: use `int32` during ignite scaffolding, then replace it by `uint32`in .proto files, re-generate the code and fix compilation errors.
177
+
- build proto (for example `ignite chain build`). Fix compilation errors if any.
172
178
- generate openapi docs from proto using (`scripts/dcl-swagger-gen.sh`). It's recommended to run from container built from [Dockerfile](scripts/Dockerfile)
173
179
174
180
- **Note1**: colons (`:`) are part of subject-id in PKI module, but colons are not allowed in gRPC REST URLs by default.
175
181
`allow_colon_final_segments=true` should be used as a workaround.
176
182
So, make sure that `runtime.AssumeColonVerbOpt(false)` in `/x/pki/types/query.pb.gw.go`.
177
183
It's usually sufficient to revert the generated changes in`/x/pki/types/query.pb.gw.go`.
178
-
- **Note2**: move `compliance_info.pb.go` and `compliance_history_item.pb.go` to `types/compliance` and adjust the import in other places accordingly.
179
184
It may be easier just to revert changes in all `*.pb.go` files not affected by your changes in`.proto`
180
-
- **Note3**: `starport chain build` needs to be called only if you made manual changes in`.proto` files.
181
-
There is no need to call `starport chain build` again once all errors and adjustments above are done. It's sufficient just to build the project via usual ways (such as `make build`)
185
+
- **Note3**: `ignite chain build` needs to be called only if you made manual changes in`.proto` files.
186
+
There is no need to call `ignite chain build` again once all errors and adjustments above are done. It's sufficient just to build the project via usual ways (such as `make build`)
182
187
- Add static validation for new messages:
183
188
- Call `validator.Validate(msg)` in `ValidateBasic` methods for all generated messages
184
189
- Add additional checks to `ValidateBasic` that do not depend on the state (key-value) and order of transactions
@@ -195,19 +200,19 @@ Please take into account the following when sending a PR:
195
200
196
201
## How To Make Changes in Data Model for Existing Modules
197
202
198
-
- Use [starport](https://github.com/tendermint/starport) command to scaffold the module.
199
-
Consider using the provided [Dockerfile](scripts/Dockerfile) to have a predictable version of starport. See [README.md](scripts/README.md).
203
+
- Use [ignite](https://github.com/ignite/cli) command to scaffold the module.
204
+
Consider using the provided [Dockerfile](scripts/Dockerfile) to have a predictable version of ignite. See [README.md](scripts/README.md).
200
205
- **Never change `.pb` files manually**. Do the changes in`.proto` files.
201
-
- Every time`.proto` files change, re-generate the code (for example `starport chain build`) and fix compilation errors if any.
206
+
- Every time`.proto` files change, re-generate the code (for example `ignite chain build`) and fix compilation errors if any.
202
207
- Update openapi docs from proto using (`scripts/dcl-swagger-gen.sh`). It's recommended to run from container built from [Dockerfile](scripts/Dockerfile).
203
208
- **Note1**: colons (`:`) are part of subject-id in PKI module, but colons are not allowed in gRPC REST URLs by default.
204
209
`allow_colon_final_segments=true` should be used as a workaround.
205
210
So, make sure that `runtime.AssumeColonVerbOpt(false)` in `/x/pki/types/query.pb.gw.go`.
206
211
It's usually sufficient to revert the generated changes in`/x/pki/types/query.pb.gw.go`.
207
212
- **Note2**: move `compliance_info.pb.go` and `compliance_history_item.pb.go` to `types/compliance` and adjust the import in other places accordingly.
208
213
It may be easier just to revert changes in all `*.pb.go` files not affected by your changes in`.proto`
209
-
- **Note3**: `starport chain build` needs to be called only if you made manual changes in`.proto` files.
210
-
There is no need to call `starport chain build` again once all errors and adjustments above are done. It's sufficient just to build the project via usual ways (such as `make build`)
214
+
- **Note3**: `ignite chain build` needs to be called only if you made manual changes in`.proto` files.
215
+
There is no need to call `ignite chain build` again once all errors and adjustments above are done. It's sufficient just to build the project via usual ways (such as `make build`)
211
216
212
217
213
218
## Update Cosmos-sdk Version
@@ -221,14 +226,12 @@ Re-generate cosmos base openapi (service API from cosmos exposed in DCL) using [
221
226
./scripts/cosmos-swagger-gen.sh tx
222
227
```
223
228
224
-
## Update Tendermint Version
225
-
226
-
Please note, that we depend on the Tendermint fork <https://github.com/zigbee-alliance/tendermint/releases/tag/v0.34.140>
227
-
due to hotfixes for <https://github.com/tendermint/tendermint/issues/7640> and <https://github.com/tendermint/tendermint/issues/7641>
229
+
## Update CometBFT Version
230
+
Please note, that we depend on the CometBFT fork https://github.com/zigbee-alliance/cometbft/releases/tag/v0.37.5
231
+
due to hotfixes for https://github.com/tendermint/tendermint/issues/7640 and https://github.com/tendermint/tendermint/issues/7641
228
232
required for Light Client Proxy.
229
-
Now that fixes are merged to Tendermint master, so check if we still need to depend on the fork.
230
233
231
-
Also don't forget to update the link to the Tendermint RPC in [Swagger UI](docs/index.html).
234
+
Also don't forget to update the link to the CometBFT RPC in [Swagger UI](docs/index.html).
Copy file name to clipboardexpand all lines: README.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ DC Ledger is a public permissioned Ledger which can be used for two main use cas
18
18
19
19
More information about use cases can be found in [DC Ledger Overview](./docs/design/DCL-Overview.pdf) and [Use Case Diagrams](docs/use_cases).
20
20
21
-
DC Ledger is based on [Tendermint](https://tendermint.com/) and [Cosmos SDK](https://cosmos.network/sdk).
21
+
DC Ledger is based on [CometBFT](https://cometbft.com/) and [Cosmos SDK](https://cosmos.network/sdk).
22
22
23
23
DC Ledger is a public permissioned ledger in the following sense:
24
24
@@ -40,7 +40,7 @@ In order to send write transactions to the ledger you need:
40
40
41
41
### Pool of Nodes
42
42
43
-
- A network of Tendermint-based validator nodes (Validators and Observers) maintaining the ledger.
43
+
- A network of CometBFT-based validator nodes (Validators and Observers) maintaining the ledger.
44
44
- Every validator node (`dcld` binary) runs DC Ledger application code (based on Cosmos SDK) implementing the use cases.
45
45
- See the proposed deployment in [deployment](docs/deployment.png) and [deployment-detailed](docs/deployment-detailed.png).
46
46
- See recommended design for DCL MainNet deployment on AWS in [aws deployment](./docs/deployment-design-aws.md)
@@ -54,7 +54,7 @@ In order to send write transactions to the ledger you need:
54
54
-**Private Sentry Node:** a full node to connect other Validator or Sentry nodes only; should not be accessed by clients.
55
55
-**Public Sentry Node:** a full node to connect other external full nodes (possibly observer nodes).
56
56
-**Observer Node (ON):** a full node that doesn't participate in consensus. Should be used to receive read/write requests from the clients.
57
-
-**Light Client Proxy Node**: doesn't contain a full replication of data. Can be used as a proxy to untrusted Full nodes for single-value query requests sent via CLI or Tendermint RPC.
57
+
-**Light Client Proxy Node**: doesn't contain a full replication of data. Can be used as a proxy to untrusted Full nodes for single-value query requests sent via CLI or CometBFT RPC.
58
58
It will verify all state proofs automatically.
59
59
-**Seed Node**: provides a list of peers which a node can connect to.
- Any running node exposes a REST API at port `1317`. See <https://docs.cosmos.network/v0.45/core/grpc_rest.html>.
142
+
- Any running node exposes a REST API at port `1317`. See <https://docs.cosmos.network/v0.47/learn/advanced/grpc_rest>.
143
143
- See [transactions](docs/transactions.md) for a full list of endpoints.
144
144
- REST HTTP(S) queries can be directly used for read requests.
145
145
See [How to read from the Ledger](docs/transactions.md#how-to-read-from-the-ledger).
@@ -150,23 +150,23 @@ See [Run Light Client Proxy](docs/running-light-client-proxy.md) for details how
150
150
### gRPC
151
151
152
152
-**There are no state proofs in gRPC, so gRPC queries should be sent to trusted Validator or Observer nodes only.**
153
-
- Any running node exposes a REST API at port `9090`. See <https://docs.cosmos.network/v0.45/core/grpc_rest.html>.
153
+
- Any running node exposes a REST API at port `9090`. See <https://docs.cosmos.network/v0.47/learn/advanced/grpc_rest>.
154
154
- A client code can be generated for all popular languages from the proto files [proto](proto), see <https://grpc.io/docs/languages/>.
155
155
- The generated client code can be used for read and write requests, i.e. generation and signing of transactions
156
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.
157
157
158
-
### Tendermint RPC and Light Client
158
+
### CometBFT RPC and Light Client
159
159
160
-
-Tendermint RPC is exposed by every running node at port `26657`. See <https://docs.cosmos.network/v0.45/core/grpc_rest.html#tendermint-rpc>.
161
-
-Tendermint RPC supports state proofs. Tendermint's Light Client library can be used to verify the state proofs.
160
+
-CometBFT RPC is exposed by every running node at port `26657`. See <https://docs.cosmos.network/v0.47/learn/advanced/grpc_rest#cometbft-rpc>.
161
+
-CometBFT RPC supports state proofs. CometBFT's Light Client library can be used to verify the state proofs.
162
162
So, if Light Client API is used, then it's possible to communicate with non-trusted nodes.
163
163
- Please note, that multi-value queries don't have state proofs support and should be sent to trusted nodes only.
164
164
- There are currently no DC Ledger specific API libraries for various platforms and languages,
165
165
but they may be provided in the future.
166
166
- The following libraries can be used as light clients:
- Refer to [this doc](./docs/tendermint-rpc.md) to see how to [subscribe](./docs/tendermint-rpc.md#subscribe) to a Tendermint WebSocket based events and/or [query](./docs/tendermint-rpc.md#querying-application-components) an application components.
- Refer to [this doc](./docs/cometbft-rpc.md) to see how to [subscribe](./docs/cometbft-rpc.md#subscribe) to a CometBFT WebSocket based events and/or [query](./docs/cometbft-rpc.md#querying-application-components) an application components.
170
170
171
171
172
172
### Instructions
@@ -227,5 +227,5 @@ the following instructions from [how-to.md](docs/how-to.md) can be used for ever
227
227
-[Running Node](docs/running-node.md)
228
228
-[Pool Upgrade](docs/pool-upgrade.md)
229
229
-[Pool Upgrade How To Guide](docs/pool-upgrade-how-to.md)
0 commit comments