Skip to content

Commit

Permalink
Genesis config value example for `pallet-ddc-nodes::StorageNodes::hos…
Browse files Browse the repository at this point in the history
…t` field (#201)
  • Loading branch information
khssnv authored Dec 18, 2023
1 parent b09be69 commit 1fbe546
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
7 changes: 6 additions & 1 deletion docs/genesis-state.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# State preset
# Genesis state

Sometimes we use the blockchain as a part of a test environment.
Those tests typically want a certain state of the blockchain.
Expand All @@ -22,6 +22,11 @@ And a _raw_ form with key-value pairs which will be written to the database.
1. Set genesis state for each module.
There is an example in `node/service/example.json`, you can copy everything except the `code` field value from it to the `plain.json`.

> Special note for a `ddcNodes.storageNodes.host` field.
> In the `example.json` it is set as:
> `"host": [ 49, 50, 55, 46, 48, 46, 48, 46, 49 ]`.
> Where the array is an encoded `127.0.0.1` value.

1. Create a raw form chain spec.

```console
Expand Down
12 changes: 11 additions & 1 deletion node/service/chain-specs/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,17 @@
"provider_id": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"cluster_id": "0x0000000000000000000000000000000000000001",
"props": {
"host": [],
"host": [
49,
50,
55,
46,
48,
46,
48,
46,
49
],
"http_port": 8080,
"grpc_port": 8081,
"p2p_port": 8082
Expand Down

0 comments on commit 1fbe546

Please sign in to comment.