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
59ee3ebf
Unverified
Commit
59ee3ebf
authored
Dec 04, 2020
by
Sergey Pepyakin
Committed by
GitHub
Dec 04, 2020
Browse files
Add tracing for candidate validation failures in backing (#2071)
parent
fad52682
Pipeline
#116152
passed with stages
in 17 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
node/core/backing/src/lib.rs
View file @
59ee3ebf
...
...
@@ -404,6 +404,12 @@ async fn validate_and_make_available(
ValidationResult
::
Valid
(
commitments
,
validation_data
)
=>
{
// If validation produces a new set of commitments, we vote the candidate as invalid.
if
commitments
.hash
()
!=
expected_commitments_hash
{
tracing
::
trace!
(
target
:
LOG_TARGET
,
candidate_receipt
=
?
candidate
,
actual_commitments
=
?
commitments
,
"Commitments obtained with validation don't match the announced by the candidate receipt"
,
);
Err
(
candidate
)
}
else
{
let
erasure_valid
=
make_pov_available
(
...
...
@@ -418,11 +424,25 @@ async fn validate_and_make_available(
match
erasure_valid
{
Ok
(())
=>
Ok
((
candidate
,
commitments
,
pov
.clone
())),
Err
(
InvalidErasureRoot
)
=>
Err
(
candidate
),
Err
(
InvalidErasureRoot
)
=>
{
tracing
::
trace!
(
target
:
LOG_TARGET
,
candidate_receipt
=
?
candidate
,
actual_commitments
=
?
commitments
,
"Erasure root doesn't match the announced by the candidate receipt"
,
);
Err
(
candidate
)
},
}
}
}
ValidationResult
::
Invalid
(
_reason
)
=>
{
ValidationResult
::
Invalid
(
reason
)
=>
{
tracing
::
trace!
(
target
:
LOG_TARGET
,
candidate_receipt
=
?
candidate
,
reason
=
?
reason
,
"Validation yielded an invalid candidate"
,
);
Err
(
candidate
)
}
};
...
...
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