iroha icon indicating copy to clipboard operation
iroha copied to clipboard

refactor: Change parameters format in genesis.json

Open dima74 opened this issue 1 year ago • 1 comments

Context

Fixes #4813

Solution

Changes format of genesis.json from:

{
  ...
  "parameters": [
    {
      "Sumeragi": {
        "BlockTimeMs": 2000
      }
    },
    {
      "Sumeragi": {
        "CommitTimeMs": 4000
      }
    },
    ...
    {
      "Transaction": {
        "MaxInstructions": 4096
      }
    },
    ...

to:

{
  ...
  "parameters": {
    "sumeragi": {
      "block_time_ms": 2000,
      "commit_time_ms": 4000,
      ...
    },
    "transaction": {
      "max_instructions": 4096,
      ...
    },
    ...

Migration Guide (optional)

  • kagami genesis generate will generate genesis in the new format. Custom genesis generator tools should be changed to new format.
  • Note that schema.json has type entry RawGenesisTransaction corresponding to genesis.json file

Review notes (optional)

Checklist

  • [ ] I've read CONTRIBUTING.md.
  • [ ] (optional) I've written unit tests for the code changes.
  • [ ] All review comments have been resolved.

dima74 avatar Aug 29 '24 18:08 dima74

@BAStos525

github-actions[bot] avatar Aug 29 '24 18:08 github-actions[bot]

@BAStos525 @timofeevmd format of parameters in genesis.json has changed. Please see PR description for details of the new format.

dima74 avatar Sep 09 '24 11:09 dima74