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

Support custom session length in config.json #91

Closed
JoshOrndorff opened this issue Apr 28, 2021 · 2 comments · Fixed by #93
Closed

Support custom session length in config.json #91

JoshOrndorff opened this issue Apr 28, 2021 · 2 comments · Fixed by #93

Comments

@JoshOrndorff
Copy link
Contributor

JoshOrndorff commented Apr 28, 2021

Since paritytech/polkadot#2167, polkadot has supported a custom session length in the chain spec file. However this property is not part of the runtime_genesis_config, which means it can't be modified by the mechanism introduced in #88.

This issue is to support custom session length in polkadot-launch's config.json. I can imagine two potential solutions.

  1. Extend polkadot-launch to support it
  2. Modify polkadot so it goes in the normal genesis config (but I'm guessing there is a good reason it wasn't put there to begin with?).
@shawntabrizi
Copy link
Member

shawntabrizi commented Apr 28, 2021

@JoshOrndorff i think it should be easy enough to support it, but can you describe how to do it.

It seems you want to target an object that is one level higher than the hook i wrote for updating config?

@JoshOrndorff
Copy link
Contributor Author

JoshOrndorff commented Apr 28, 2021

Yeah exactly. The output of polkadot build-spec --chain rococo-local is (of the form)

{
  "name": "Rococo Local Testnet",
  "id": "rococo_local_testnet",
  "chainType": "Local",
  "bootNodes": [],
  "telemetryEndpoints": null,
  "protocolId": "dot",
  "properties": null,
  "forkBlocks": null,
  "badBlocks": null,
  "consensusEngine": null,
  "lightSyncState": null,
  "genesis": {
    "runtime": {
      "runtime_genesis_config": {
        // Content elided
        // All of this stuff is already handled properly
      },
      // This is the different one that I'd like to set
      "session_length_in_blocks": 10
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants