-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Decouple the session validators from im-online #7127
Changes from 1 commit
33b105b
d5ce27f
1070e51
526dbd7
5f1ab56
451179d
725ca92
141b27b
9bed321
1582b7b
8fded12
db2d1a4
9f1344d
d5a3b4f
004bde7
c395c81
550632d
4ebb2ef
5a92424
90efb67
1a71e3e
e1abd33
ee947a5
f274541
c87f862
1840186
da2d4a5
58e9fcc
7066c13
9eea0a3
1848bd7
650f279
ee81bf1
e7598a3
ff94e6b
7d5cceb
de08937
e28377b
6e07546
6c42cc8
fe9e17a
3fdb3c4
6d8defa
aef33ca
b919689
516afb2
c4158d7
ea357a3
6937b72
7a265af
d4787ad
2c007d0
a34f75c
04f247c
865bfd8
0a39d79
e8c8ce5
12ff709
12324f3
3551036
8e392fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Wrap a few too long lines Add some docs
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -231,17 +231,39 @@ pub trait WeightInfo { | |||||
| fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight; | ||||||
| } | ||||||
|
|
||||||
| /// The set of validators that are considered to be running an authority node. | ||||||
| pub trait ValidatorSet<ValidatorId> { | ||||||
| /// Returns all the validators ought to be online. | ||||||
| /// Trait for retrieving the session info needed for online node inspection. | ||||||
| /// | ||||||
| /// This trait is used for decouple the pallet-session dependency from im-online | ||||||
| /// module so that the user of im-online & offences modules can pass any list of | ||||||
| /// validators that are considered to be online in each session, particularly useful | ||||||
| /// for the Substrate-based projects having their own staking implementation | ||||||
| /// instead of using pallet-staking directly. | ||||||
| pub trait SessionInterface<ValidatorId> { | ||||||
|
||||||
| type FullIdentification: Parameter; |
We might also need to move OneSessionHandler into sp-session if we want to remove pallet-session from pallet-im-online entirely.
substrate/frame/im-online/src/lib.rs
Line 621 in b510b85
| impl<T: Trait> pallet_session::OneSessionHandler<T::AccountId> for Module<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomusdrw Now it's enough to fix #7124 without any harm IMHO, but it's not much pretty clear to me how to remove pallet-session dep from im-online entirely, maybe we could create a new issue and refactor this in another PR later? ChainX is badly approaching the 2.0 upgrade, and we really need this patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @tomusdrw :-
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [package] | ||
| name = "pallet-session-common" | ||
| version = "2.0.0" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2018" | ||
| license = "Apache-2.0" | ||
| homepage = "https://substrate.dev" | ||
| repository = "https://github.com/paritytech/substrate/" | ||
| description = "FRAME sessions common pallet" | ||
| readme = "README.md" | ||
|
|
||
| [package.metadata.docs.rs] | ||
| targets = ["x86_64-unknown-linux-gnu"] | ||
|
|
||
| [dependencies] | ||
| sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } | ||
| frame-support = { version = "2.0.0", default-features = false, path = "../../support" } | ||
|
|
||
| [features] | ||
| default = ["std"] | ||
| std = [ | ||
| "sp-runtime/std", | ||
| "frame-support/std", | ||
| ] |
Uh oh!
There was an error while loading. Please reload this page.