hyperledger / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
433 stars 276 forks source link

refactor: how to represent parameters in genesis #4813

Closed Erigara closed 5 days ago

Erigara commented 2 months ago

I would like for parameters to look like this:

  "parameters": [
    {
      "sumeragi": {
        "block_time_ms": 2000
        "commit_time_ms": 4000
      }
    },
    {
      "block": {
        "max_transactions": 512
      }
    },
    {
      "transaction": {
        "max_instructions": 4096
        "smart_contract_size": 4194304
      }
    },
    {
      "executor": {
        "fuel": 55000000
        "memory": 55000000
      }
    },
    {
      "smart_contract": {
        "fuel": 55000000
        "memory": 55000000
      }
    }

_Originally posted by @mversic in https://github.com/hyperledger/iroha/pull/4812#discussion_r1668502409_

divyaranjan1905 commented 1 month ago

@Erigara Just to be sure, you're asking for iroha_data_model::parameter to be refactored into the above? Or, something else to be refactored in genesis' lib.rs?

mversic commented 1 month ago

in genesis/src.lib.rs

Mingela commented 2 weeks ago

Is it going to be reflected in the schema somehow? Would be great to see a proposal for that before merging the change.

dima74 commented 2 weeks ago

Is it going to be reflected in the schema somehow? Would be great to see a proposal for that before merging the change.

Yes, there is type RawGenesisTransaction in the schema, it will be changed accordingly (https://github.com/hyperledger/iroha/pull/5020#discussion_r1736862760)