Name changes for GrandPa and Beefy notifications protocols (#10463)

* grandpa: update notif protocol name

* grandpa: add chain id prefix to protocol name

* grandpa: beautify protocol name handling

* grandpa: prepend genesis hash to protocol name

* chain-spec: add optional 'fork_id'

'fork_id' is used to uniquely identify forks of the same chain/network
'ChainSpec' trait provides default 'None' implementation, meaning this
chain hasn't been forked.

* grandpa: protocol_name mod instead of struct

* beefy: add genesis hash prefix to protocol name

* chainspec: add fork_id

* grandpa: simplify protocol name

* grandpa: contain protocol name building logic

* beefy: contain protocol name building logic

* grandpa: fix tests

* fix merge damage

* fix docs reference visibility

Signed-off-by: acatangiu <adrian@parity.io>

* Update client/finality-grandpa/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update client/finality-grandpa/src/communication/mod.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update client/beefy/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update client/beefy/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* avoid using hash default, even for protocol names

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
Adrian Catangiu
2022-01-05 19:01:44 +02:00
committed by GitHub
parent 223d929f86
commit c1865988df
18 changed files with 163 additions and 46 deletions
+5
View File
@@ -196,6 +196,7 @@ pub fn staging_testnet_config() -> ChainSpec {
),
None,
None,
None,
Default::default(),
)
}
@@ -386,6 +387,7 @@ pub fn development_config() -> ChainSpec {
None,
None,
None,
None,
Default::default(),
)
}
@@ -410,6 +412,7 @@ pub fn local_testnet_config() -> ChainSpec {
None,
None,
None,
None,
Default::default(),
)
}
@@ -441,6 +444,7 @@ pub(crate) mod tests {
None,
None,
None,
None,
Default::default(),
)
}
@@ -456,6 +460,7 @@ pub(crate) mod tests {
None,
None,
None,
None,
Default::default(),
)
}