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
8d92debd
Commit
8d92debd
authored
2 years ago
by
Bradley Olson
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Testing Reversion Speed on Dispute Concluded Against (#6880)
* First pass adding logs * fmt * Adjustments
parent
b2a15ed8
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
polkadot/node/core/chain-selection/src/tree.rs
+14
-0
14 additions, 0 deletions
polkadot/node/core/chain-selection/src/tree.rs
polkadot/node/core/dispute-coordinator/src/initialized.rs
+9
-0
9 additions, 0 deletions
polkadot/node/core/dispute-coordinator/src/initialized.rs
with
23 additions
and
0 deletions
polkadot/node/core/chain-selection/src/tree.rs
+
14
−
0
View file @
8d92debd
...
...
@@ -359,6 +359,14 @@ fn apply_ancestor_reversions(
// of unviability is only heavy on the first log.
for
revert_number
in
reversions
{
let
maybe_block_entry
=
load_ancestor
(
backend
,
block_hash
,
block_number
,
revert_number
)
?
;
if
let
Some
(
block_entry
)
=
&
maybe_block_entry
{
gum
::
trace!
(
target
:
LOG_TARGET
,
?
revert_number
,
revert_hash
=
?
block_entry
.block_hash
,
"Block marked as reverted via scraped on-chain reversions"
);
}
revert_single_block_entry_if_present
(
backend
,
maybe_block_entry
,
...
...
@@ -380,6 +388,12 @@ pub(crate) fn apply_single_reversion(
revert_hash
:
Hash
,
revert_number
:
BlockNumber
,
)
->
Result
<
(),
Error
>
{
gum
::
trace!
(
target
:
LOG_TARGET
,
?
revert_number
,
?
revert_hash
,
"Block marked as reverted via ChainSelectionMessage::RevertBlocks"
);
let
maybe_block_entry
=
backend
.load_block_entry
(
&
revert_hash
)
?
;
revert_single_block_entry_if_present
(
backend
,
...
...
This diff is collapsed.
Click to expand it.
polkadot/node/core/dispute-coordinator/src/initialized.rs
+
9
−
0
View file @
8d92debd
...
...
@@ -1034,6 +1034,15 @@ impl Initialized {
// will need to mark the candidate's relay parent as reverted.
if
import_result
.is_freshly_concluded_against
()
{
let
blocks_including
=
self
.scraper
.get_blocks_including_candidate
(
&
candidate_hash
);
for
(
parent_block_number
,
parent_block_hash
)
in
&
blocks_including
{
gum
::
trace!
(
target
:
LOG_TARGET
,
?
candidate_hash
,
?
parent_block_number
,
?
parent_block_hash
,
"Dispute has just concluded against the candidate hash noted. Its parent will be marked as reverted."
);
}
if
blocks_including
.len
()
>
0
{
ctx
.send_message
(
ChainSelectionMessage
::
RevertBlocks
(
blocks_including
))
.await
;
}
else
{
...
...
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