Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
671cc75c
Unverified
Commit
671cc75c
authored
Aug 05, 2020
by
André Silva
Committed by
GitHub
Aug 05, 2020
Browse files
revert enabling authority discovery by default (#1532)
parent
125efa99
Pipeline
#102991
passed with stages
in 27 minutes and 19 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
cli/src/cli.rs
View file @
671cc75c
...
@@ -59,10 +59,7 @@ pub struct RunCmd {
...
@@ -59,10 +59,7 @@ pub struct RunCmd {
#[structopt(long
=
"force-westend"
)]
#[structopt(long
=
"force-westend"
)]
pub
force_westend
:
bool
,
pub
force_westend
:
bool
,
/// Disable the authority discovery module on validator or sentry nodes.
/// Enable the authority discovery module on validator or sentry nodes.
///
/// Enabled by default on validator and sentry nodes. Always disabled on
/// non validator or sentry nodes.
///
///
/// When enabled:
/// When enabled:
///
///
...
@@ -73,8 +70,8 @@ pub struct RunCmd {
...
@@ -73,8 +70,8 @@ pub struct RunCmd {
/// (2) As a validator or sentry node: Discover addresses of validators or
/// (2) As a validator or sentry node: Discover addresses of validators or
/// addresses of their sentry nodes and maintain a permanent connection
/// addresses of their sentry nodes and maintain a permanent connection
/// to a subset.
/// to a subset.
#[structopt(long
=
"
dis
able-authority-discovery"
)]
#[structopt(long
=
"
en
able-authority-discovery"
)]
pub
authority_discovery_
dis
abled
:
bool
,
pub
authority_discovery_
en
abled
:
bool
,
/// Setup a GRANDPA scheduled voting pause.
/// Setup a GRANDPA scheduled voting pause.
///
///
...
...
cli/src/command.rs
View file @
671cc75c
...
@@ -114,7 +114,7 @@ pub fn run() -> Result<()> {
...
@@ -114,7 +114,7 @@ pub fn run() -> Result<()> {
set_default_ss58_version
(
chain_spec
);
set_default_ss58_version
(
chain_spec
);
let
authority_discovery_
dis
abled
=
cli
.run.authority_discovery_
dis
abled
;
let
authority_discovery_
en
abled
=
cli
.run.authority_discovery_
en
abled
;
let
grandpa_pause
=
if
cli
.run.grandpa_pause
.is_empty
()
{
let
grandpa_pause
=
if
cli
.run.grandpa_pause
.is_empty
()
{
None
None
}
else
{
}
else
{
...
@@ -138,7 +138,7 @@ pub fn run() -> Result<()> {
...
@@ -138,7 +138,7 @@ pub fn run() -> Result<()> {
config
,
config
,
None
,
None
,
None
,
None
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
6000
,
6000
,
grandpa_pause
,
grandpa_pause
,
)
.map
(|
r
|
r
.0
),
)
.map
(|
r
|
r
.0
),
...
...
node/service/src/lib.rs
View file @
671cc75c
...
@@ -301,7 +301,7 @@ fn new_full<RuntimeApi, Executor>(
...
@@ -301,7 +301,7 @@ fn new_full<RuntimeApi, Executor>(
mut
config
:
Configuration
,
mut
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
_max_block_data_size
:
Option
<
u64
>
,
_max_block_data_size
:
Option
<
u64
>
,
_authority_discovery_
dis
abled
:
bool
,
_authority_discovery_
en
abled
:
bool
,
_slot_duration
:
u64
,
_slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
->
Result
<
(
)
->
Result
<
(
...
@@ -644,7 +644,7 @@ pub fn polkadot_new_full(
...
@@ -644,7 +644,7 @@ pub fn polkadot_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
)
...
@@ -662,7 +662,7 @@ pub fn polkadot_new_full(
...
@@ -662,7 +662,7 @@ pub fn polkadot_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
)
?
;
)
?
;
...
@@ -676,7 +676,7 @@ pub fn kusama_new_full(
...
@@ -676,7 +676,7 @@ pub fn kusama_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
->
Result
<
(
)
->
Result
<
(
...
@@ -694,7 +694,7 @@ pub fn kusama_new_full(
...
@@ -694,7 +694,7 @@ pub fn kusama_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
)
?
;
)
?
;
...
@@ -708,7 +708,7 @@ pub fn westend_new_full(
...
@@ -708,7 +708,7 @@ pub fn westend_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
)
...
@@ -726,7 +726,7 @@ pub fn westend_new_full(
...
@@ -726,7 +726,7 @@ pub fn westend_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
)
?
;
)
?
;
...
...
node/test-service/src/lib.rs
View file @
671cc75c
...
@@ -62,7 +62,7 @@ pub fn polkadot_test_new_full(
...
@@ -62,7 +62,7 @@ pub fn polkadot_test_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
collating_for
:
Option
<
(
CollatorId
,
ParaId
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
)
->
Result
<
)
->
Result
<
(
(
...
@@ -79,7 +79,7 @@ pub fn polkadot_test_new_full(
...
@@ -79,7 +79,7 @@ pub fn polkadot_test_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
None
,
None
,
true
,
true
,
...
@@ -198,9 +198,9 @@ pub fn run_test_node(
...
@@ -198,9 +198,9 @@ pub fn run_test_node(
>
{
>
{
let
config
=
node_config
(
storage_update_func
,
task_executor
,
key
,
boot_nodes
);
let
config
=
node_config
(
storage_update_func
,
task_executor
,
key
,
boot_nodes
);
let
multiaddr
=
config
.network.listen_addresses
[
0
]
.clone
();
let
multiaddr
=
config
.network.listen_addresses
[
0
]
.clone
();
let
authority_discovery_
dis
abled
=
tru
e
;
let
authority_discovery_
en
abled
=
fals
e
;
let
(
task_manager
,
client
,
handles
,
network
,
rpc_handlers
)
=
let
(
task_manager
,
client
,
handles
,
network
,
rpc_handlers
)
=
polkadot_test_new_full
(
config
,
None
,
None
,
authority_discovery_
dis
abled
,
6000
)
polkadot_test_new_full
(
config
,
None
,
None
,
authority_discovery_
en
abled
,
6000
)
.expect
(
"could not create Polkadot test service"
);
.expect
(
"could not create Polkadot test service"
);
let
peer_id
=
network
.local_peer_id
()
.clone
();
let
peer_id
=
network
.local_peer_id
()
.clone
();
...
...
service/src/lib.rs
View file @
671cc75c
...
@@ -250,7 +250,7 @@ pub fn new_full<RuntimeApi, Executor>(
...
@@ -250,7 +250,7 @@ pub fn new_full<RuntimeApi, Executor>(
mut
config
:
Configuration
,
mut
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
test
:
bool
,
test
:
bool
,
...
@@ -453,7 +453,7 @@ pub fn new_full<RuntimeApi, Executor>(
...
@@ -453,7 +453,7 @@ pub fn new_full<RuntimeApi, Executor>(
}
}
if
matches!
(
role
,
Role
::
Authority
{
..
}
|
Role
::
Sentry
{
..
})
{
if
matches!
(
role
,
Role
::
Authority
{
..
}
|
Role
::
Sentry
{
..
})
{
if
!
authority_discovery_
dis
abled
{
if
authority_discovery_
en
abled
{
let
(
sentries
,
authority_discovery_role
)
=
match
role
{
let
(
sentries
,
authority_discovery_role
)
=
match
role
{
Role
::
Authority
{
ref
sentry_nodes
}
=>
(
Role
::
Authority
{
ref
sentry_nodes
}
=>
(
sentry_nodes
.clone
(),
sentry_nodes
.clone
(),
...
@@ -690,7 +690,7 @@ pub fn polkadot_new_full(
...
@@ -690,7 +690,7 @@ pub fn polkadot_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
)
...
@@ -704,7 +704,7 @@ pub fn polkadot_new_full(
...
@@ -704,7 +704,7 @@ pub fn polkadot_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
@@ -719,7 +719,7 @@ pub fn kusama_new_full(
...
@@ -719,7 +719,7 @@ pub fn kusama_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
->
Result
<
(
)
->
Result
<
(
...
@@ -732,7 +732,7 @@ pub fn kusama_new_full(
...
@@ -732,7 +732,7 @@ pub fn kusama_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
@@ -747,7 +747,7 @@ pub fn westend_new_full(
...
@@ -747,7 +747,7 @@ pub fn westend_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
)
...
@@ -761,7 +761,7 @@ pub fn westend_new_full(
...
@@ -761,7 +761,7 @@ pub fn westend_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
@@ -776,7 +776,7 @@ pub fn rococo_new_full(
...
@@ -776,7 +776,7 @@ pub fn rococo_new_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
)
...
@@ -790,7 +790,7 @@ pub fn rococo_new_full(
...
@@ -790,7 +790,7 @@ pub fn rococo_new_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
@@ -829,7 +829,7 @@ pub fn build_full(
...
@@ -829,7 +829,7 @@ pub fn build_full(
config
:
Configuration
,
config
:
Configuration
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
collating_for
:
Option
<
(
CollatorId
,
parachain
::
Id
)
>
,
max_block_data_size
:
Option
<
u64
>
,
max_block_data_size
:
Option
<
u64
>
,
authority_discovery_
dis
abled
:
bool
,
authority_discovery_
en
abled
:
bool
,
slot_duration
:
u64
,
slot_duration
:
u64
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
grandpa_pause
:
Option
<
(
u32
,
u32
)
>
,
)
->
Result
<
(
TaskManager
,
Client
,
FullNodeHandles
),
ServiceError
>
{
)
->
Result
<
(
TaskManager
,
Client
,
FullNodeHandles
),
ServiceError
>
{
...
@@ -838,7 +838,7 @@ pub fn build_full(
...
@@ -838,7 +838,7 @@ pub fn build_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
@@ -848,7 +848,7 @@ pub fn build_full(
...
@@ -848,7 +848,7 @@ pub fn build_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
@@ -858,7 +858,7 @@ pub fn build_full(
...
@@ -858,7 +858,7 @@ pub fn build_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
@@ -868,7 +868,7 @@ pub fn build_full(
...
@@ -868,7 +868,7 @@ pub fn build_full(
config
,
config
,
collating_for
,
collating_for
,
max_block_data_size
,
max_block_data_size
,
authority_discovery_
dis
abled
,
authority_discovery_
en
abled
,
slot_duration
,
slot_duration
,
grandpa_pause
,
grandpa_pause
,
false
,
false
,
...
...
Ghost User
@ghost
mentioned in commit
6872c566
·
Oct 12, 2020
mentioned in commit
6872c566
mentioned in commit 6872c566ba95bab6f033b6dcd865a26abbb70f14
Toggle commit list
Ghost User
@ghost
mentioned in commit
97fe0162
·
Oct 13, 2020
mentioned in commit
97fe0162
mentioned in commit 97fe016210d7f3e907a50f118df36939f47863bf
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment