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

Enabling the management of validators. #288

Merged
merged 8 commits into from
Feb 22, 2024
Merged

Enabling the management of validators. #288

merged 8 commits into from
Feb 22, 2024

Conversation

0xmenna
Copy link
Contributor

@0xmenna 0xmenna commented Feb 14, 2024

In order for validators to manage keys, it has been integrated the session pallet into the runtime.
It allows validators to have an address that points to its session keys, used for block production and finality.
Each session takes 600 blocks which corresponds roughly to about 1 hour.

It has also been added the validatorManager pallet to solve the issue of the genesis config of the session pallet. In fact it would not work out of the box because the genesis configuration did not contain the right infos. For this reason the node won't compile correctly because there is no genesis configuration. To upgrade the runtime just compile the runtime to the wasm blob.

Configuration:
To configure correctly the session pallet after the runtime upgrade it's necessary to use the validatorManager pallet.

  1. Call validatorManager.sessionConfig(keys) as sudo providing the validators keys (first two parameters can easily be the account ids that correspond to the aura keys, third parameter is aura key and fourth grandpa key).
    WARNING: It is fundamental to dispatch this call by the time the session begins which happens at a multiple of 600 blocks.

Registration and Retirement of validators:

  • Call deregisterValidators and registerValidators as sudo to respectively delete and/or add validators from the set.
    The changes will take place two sessions after the extrinsic execution (it will be queued at the next session, so it must wait one more session in order for it to take place).

mtmsuhail and others added 7 commits January 25, 2024 18:29
* build(deps): bump clap from 4.4.15 to 4.4.17

Bumps [clap](https://github.com/clap-rs/clap) from 4.4.15 to 4.4.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v4.4.15...v4.4.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...



* build(deps): bump clap from 4.4.17 to 4.4.18

Bumps [clap](https://github.com/clap-rs/clap) from 4.4.17 to 4.4.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v4.4.17...v4.4.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...



* Update origin-server.crt

* build(deps): bump shlex from 1.2.0 to 1.3.0 (#274)

Bumps [shlex](https://github.com/comex/rust-shlex) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/comex/rust-shlex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/comex/rust-shlex/commits)

---
updated-dependencies:
- dependency-name: shlex
  dependency-type: indirect
...




* Fix/readme (#269)

* feat(README): description and title added

* feat(README): requirements added

* fix(README): added few more requirements

* feat(README) added Getting Started section

* feat(README): list of all commands section added

* feat(README): development node section added

* fix(README): renamed title

* feat(README): added  Jur Testnet Ecosystem section

* fix(README): typo

* feat(README): Mainnet ecosystem section added

* feat(RES): spec file added for mainnet

* fix(RES): spec file added

* feat(README): added Validator Node section

* fix(typo)

* fix(cleanup)

* fix(README): updated welcome note

* fix(README): updated alignment

* fix(README): improved readablity

* fix(README): typo

* fix(README): format

* fix(README): Tagline updated

* fix(README): link added for `substrate technology`

* fix(README): added markdown table to improve readability

* fix(README): links added

* fix(README): link added to development ecosystem

* fix(README): typo section name

* fix(README): validator final notes updated

* fix(README): title updated for the table

* fix(README): image added for Getting Started

* fix(README): image updated

* fix(README): screenshots added to both archive and validator node

* feat(README): added Resources section

* build(deps): bump h2 from 0.3.22 to 0.3.24 (#273)

* build(deps): bump snow from 0.9.4 to 0.9.5 (#275)

Bumps [snow](https://github.com/mcginty/snow) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/mcginty/snow/releases)
- [Commits](mcginty/snow@v0.9.4...v0.9.5)

---
updated-dependencies:
- dependency-name: snow
  dependency-type: indirect
...




---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pankaj Chaudhary <[email protected]>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.111 to 1.0.113.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.111...v1.0.113)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.195 to 1.0.196.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.195...v1.0.196)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jsonrpsee](https://github.com/paritytech/jsonrpsee) from 0.16.3 to 0.21.0.
- [Release notes](https://github.com/paritytech/jsonrpsee/releases)
- [Changelog](https://github.com/paritytech/jsonrpsee/blob/master/CHANGELOG.md)
- [Commits](paritytech/jsonrpsee@v0.16.3...v0.21.0)

---
updated-dependencies:
- dependency-name: jsonrpsee
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Collaborator

@Polkaverse Polkaverse left a comment

Choose a reason for hiding this comment

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

Changes looks good. Not tested the code functionally.
We would need to write unit-testing testing and benchmarking for the new extrinsics.

@mtmsuhail mtmsuhail changed the base branch from main to develop February 20, 2024 14:10
@mtmsuhail mtmsuhail merged commit 4084c0b into jurteam:develop Feb 22, 2024
4 of 5 checks passed
mtmsuhail added a commit that referenced this pull request Feb 22, 2024
* build(deps): bump clap from 4.4.15 to 4.4.17

Bumps [clap](https://github.com/clap-rs/clap) from 4.4.15 to 4.4.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v4.4.15...v4.4.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump clap from 4.4.17 to 4.4.18

Bumps [clap](https://github.com/clap-rs/clap) from 4.4.17 to 4.4.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v4.4.17...v4.4.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update origin-server.crt

* build(deps): bump shlex from 1.2.0 to 1.3.0 (#274)

Bumps [shlex](https://github.com/comex/rust-shlex) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/comex/rust-shlex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/comex/rust-shlex/commits)

---
updated-dependencies:
- dependency-name: shlex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix/readme (#269)

* feat(README): description and title added

* feat(README): requirements added

* fix(README): added few more requirements

* feat(README) added Getting Started section

* feat(README): list of all commands section added

* feat(README): development node section added

* fix(README): renamed title

* feat(README): added  Jur Testnet Ecosystem section

* fix(README): typo

* feat(README): Mainnet ecosystem section added

* feat(RES): spec file added for mainnet

* fix(RES): spec file added

* feat(README): added Validator Node section

* fix(typo)

* fix(cleanup)

* fix(README): updated welcome note

* fix(README): updated alignment

* fix(README): improved readablity

* fix(README): typo

* fix(README): format

* fix(README): Tagline updated

* fix(README): link added for `substrate technology`

* fix(README): added markdown table to improve readability

* fix(README): links added

* fix(README): link added to development ecosystem

* fix(README): typo section name

* fix(README): validator final notes updated

* fix(README): title updated for the table

* fix(README): image added for Getting Started

* fix(README): image updated

* fix(README): screenshots added to both archive and validator node

* feat(README): added Resources section

* build(deps): bump h2 from 0.3.22 to 0.3.24 (#273)

* build(deps): bump snow from 0.9.4 to 0.9.5 (#275)

Bumps [snow](https://github.com/mcginty/snow) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/mcginty/snow/releases)
- [Commits](mcginty/snow@v0.9.4...v0.9.5)

---
updated-dependencies:
- dependency-name: snow
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(LICENSE): Licence updated to GPL

* fix(LICENSE): Licence updated to GPL (#278)

* Enabling the management of validators. (#288)

* Develop -> Staging (#276) (#277)

* build(deps): bump clap from 4.4.15 to 4.4.17

Bumps [clap](https://github.com/clap-rs/clap) from 4.4.15 to 4.4.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v4.4.15...v4.4.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...



* build(deps): bump clap from 4.4.17 to 4.4.18

Bumps [clap](https://github.com/clap-rs/clap) from 4.4.17 to 4.4.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@v4.4.17...v4.4.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...



* Update origin-server.crt

* build(deps): bump shlex from 1.2.0 to 1.3.0 (#274)

Bumps [shlex](https://github.com/comex/rust-shlex) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/comex/rust-shlex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/comex/rust-shlex/commits)

---
updated-dependencies:
- dependency-name: shlex
  dependency-type: indirect
...




* Fix/readme (#269)

* feat(README): description and title added

* feat(README): requirements added

* fix(README): added few more requirements

* feat(README) added Getting Started section

* feat(README): list of all commands section added

* feat(README): development node section added

* fix(README): renamed title

* feat(README): added  Jur Testnet Ecosystem section

* fix(README): typo

* feat(README): Mainnet ecosystem section added

* feat(RES): spec file added for mainnet

* fix(RES): spec file added

* feat(README): added Validator Node section

* fix(typo)

* fix(cleanup)

* fix(README): updated welcome note

* fix(README): updated alignment

* fix(README): improved readablity

* fix(README): typo

* fix(README): format

* fix(README): Tagline updated

* fix(README): link added for `substrate technology`

* fix(README): added markdown table to improve readability

* fix(README): links added

* fix(README): link added to development ecosystem

* fix(README): typo section name

* fix(README): validator final notes updated

* fix(README): title updated for the table

* fix(README): image added for Getting Started

* fix(README): image updated

* fix(README): screenshots added to both archive and validator node

* feat(README): added Resources section

* build(deps): bump h2 from 0.3.22 to 0.3.24 (#273)

* build(deps): bump snow from 0.9.4 to 0.9.5 (#275)

Bumps [snow](https://github.com/mcginty/snow) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/mcginty/snow/releases)
- [Commits](mcginty/snow@v0.9.4...v0.9.5)

---
updated-dependencies:
- dependency-name: snow
  dependency-type: indirect
...




---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pankaj Chaudhary <[email protected]>

* fix(LICENSE): Updated license to GNU GPL (#280)

* build(deps): bump serde_json from 1.0.111 to 1.0.113 (#284)

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.111 to 1.0.113.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.111...v1.0.113)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump serde from 1.0.195 to 1.0.196 (#283)

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.195 to 1.0.196.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.195...v1.0.196)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump jsonrpsee from 0.16.3 to 0.21.0 (#281)

Bumps [jsonrpsee](https://github.com/paritytech/jsonrpsee) from 0.16.3 to 0.21.0.
- [Release notes](https://github.com/paritytech/jsonrpsee/releases)
- [Changelog](https://github.com/paritytech/jsonrpsee/blob/master/CHANGELOG.md)
- [Commits](paritytech/jsonrpsee@v0.16.3...v0.21.0)

---
updated-dependencies:
- dependency-name: jsonrpsee
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Runtime integration of session pallet and validatorManager

* Runtime integration of session pallet and validatorManager - session period 600

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: MTM Suhail <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pankaj Chaudhary <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pankaj Chaudhary <[email protected]>
Co-authored-by: Emanuele Valzano <[email protected]>
@mtmsuhail mtmsuhail mentioned this pull request Feb 22, 2024
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 this pull request may close these issues.

3 participants