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

refactor: Change parameters format in genesis.json #5020

Merged

Conversation

dima74
Copy link
Contributor

@dima74 dima74 commented Aug 29, 2024

Context

Fixes #4813

Solution

Changes format of genesis.json from (full format):

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

to (full format):

{
  ...
  "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 dima74 self-assigned this Aug 29, 2024
@github-actions github-actions bot added api-changes Changes in the API for client libraries config-changes Changes in configuration and start up of the Iroha labels Aug 29, 2024
Copy link

@BAStos525

mversic
mversic previously approved these changes Aug 30, 2024
@dima74 dima74 force-pushed the diralik/change-parameter-genesis-json branch from 31dea9a to 731d4c8 Compare September 2, 2024 14:59
Copy link
Contributor

@Erigara Erigara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections from codewise perspective and imo genesis this way looks more readable.

Let's see what SDK guys think: @Mingela @SamHSmith @0x009922

@mversic mversic force-pushed the diralik/change-parameter-genesis-json branch from 731d4c8 to a344382 Compare September 4, 2024 03:23
@mversic mversic requested a review from Erigara September 4, 2024 03:43
@mversic mversic enabled auto-merge (squash) September 4, 2024 07:57
@mversic mversic force-pushed the diralik/change-parameter-genesis-json branch from a344382 to 33decf3 Compare September 4, 2024 12:15
Signed-off-by: Dmitry Murzin <[email protected]>
Signed-off-by: Dmitry Murzin <[email protected]>
@mversic mversic force-pushed the diralik/change-parameter-genesis-json branch from 33decf3 to 6a8c4df Compare September 9, 2024 06:19
@mversic mversic merged commit a60a1a0 into hyperledger-iroha:main Sep 9, 2024
9 checks passed
@dima74 dima74 deleted the diralik/change-parameter-genesis-json branch September 9, 2024 11:39
@dima74
Copy link
Contributor Author

dima74 commented Sep 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries config-changes Changes in configuration and start up of the Iroha
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: how to represent parameters in genesis
3 participants