Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add srml/im-online integrations #3223

Closed
wants to merge 11 commits into from
Closed

Conversation

cmichi
Copy link
Contributor

@cmichi cmichi commented Jul 27, 2019

Follow-up to #2719.

This PR tries to achieve two things:

  • Once a session ends, all validators which according to srml/im-online were not online in the session which just ended should be disabled.
  • Validators should automatically be marked online once they author a block.

Tests will follow in a follow-up PR, once the behavior/API is set.

ToDos

  • Once a session ends, disable a validator if it wasn't online in the session which just ended.
  • Automatically mark validators as online once they author a block.
  • The two fields from the ImOnlineConfig don't need to be configurable, they should both just be 0 by default.
  • Update the srml/im-online version in Polkadot (here's the PR for the master version of this module, Integrate srml/im-online polkadot#342, needs to be updated once this PR is merged).

Current Status

I checked two of the ToDos, since a review hasn't been done yet this is to be taken with reservation though.

The automatically-mark-online feature is implemented in this PR, but the note_author() hooks will only work properly after #2986 has implemented authorship::Trait for the runtime (same goes for e.g. the note_author() hooks which slashing has implemented).

The tests run besides this one, which is deadlocking:

test tests::authoring_blocks ... test tests::authoring_blocks has been running for over 60 second

I suspect because of something to do with authorship.

@cmichi cmichi added the A3-in_progress Pull request is in progress. No review needed at this stage. label Jul 27, 2019
@cmichi cmichi added this to the 2.0-k milestone Jul 27, 2019
@cmichi cmichi force-pushed the cmichi-heartbeat-integrations branch 2 times, most recently from 777dbde to 063bf25 Compare July 27, 2019 09:49
@cmichi cmichi force-pushed the cmichi-heartbeat-integrations branch from 063bf25 to a3857ab Compare July 27, 2019 10:20
@gavofyork
Copy link
Member

This should all be sorted in #3296

@gavofyork gavofyork closed this Aug 8, 2019
@cmichi cmichi deleted the cmichi-heartbeat-integrations branch August 13, 2019 16:08
@gnunicorn gnunicorn modified the milestones: 2.1, Polkadot Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A3-in_progress Pull request is in progress. No review needed at this stage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants