Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
7530a0c4
Commit
7530a0c4
authored
4 years ago
by
ordian
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
validator_discovery: some logs to help identify authority discovery issues (#2533)
parent
48409e55
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
polkadot/node/network/bridge/src/validator_discovery.rs
+12
-1
12 additions, 1 deletion
polkadot/node/network/bridge/src/validator_discovery.rs
with
12 additions
and
1 deletion
polkadot/node/network/bridge/src/validator_discovery.rs
+
12
−
1
View file @
7530a0c4
...
...
@@ -264,6 +264,8 @@ impl<N: Network, AD: AuthorityDiscovery> Service<N, AD> {
if
let
Some
(
addresses
)
=
result
{
// We might have several `PeerId`s per `AuthorityId`
multiaddr_to_add
.extend
(
addresses
.into_iter
()
.take
(
MAX_ADDR_PER_PEER
));
}
else
{
tracing
::
debug!
(
target
:
LOG_TARGET
,
"Authority Discovery couldn't resolve {:?}"
,
authority
);
}
}
...
...
@@ -282,6 +284,9 @@ impl<N: Network, AD: AuthorityDiscovery> Service<N, AD> {
}
// clean up revoked requests states
//
// note that the `.rev()` here is important to guarantee `swap_remove`
// doesn't invalidate unprocessed `revoked_indices`
for
to_revoke
in
revoked_indices
.into_iter
()
.rev
()
{
drop
(
state
.non_revoked_discovery_requests
.swap_remove
(
to_revoke
));
}
...
...
@@ -289,9 +294,15 @@ impl<N: Network, AD: AuthorityDiscovery> Service<N, AD> {
// multiaddresses to remove
let
mut
multiaddr_to_remove
=
HashSet
::
new
();
for
id
in
revoked_validators
.into_iter
()
{
let
result
=
authority_discovery_service
.get_addresses_by_authority_id
(
id
)
.await
;
let
result
=
authority_discovery_service
.get_addresses_by_authority_id
(
id
.clone
()
)
.await
;
if
let
Some
(
addresses
)
=
result
{
multiaddr_to_remove
.extend
(
addresses
.into_iter
());
}
else
{
tracing
::
debug!
(
target
:
LOG_TARGET
,
"Authority Discovery couldn't resolve {:?} on cleanup, a leak is possible"
,
id
,
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment