Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Chain Reversion Load Test #6735

Closed
eskimor opened this issue Feb 16, 2023 · 4 comments
Closed

Chain Reversion Load Test #6735

eskimor opened this issue Feb 16, 2023 · 4 comments
Assignees

Comments

@eskimor
Copy link
Member

eskimor commented Feb 16, 2023

Run concluding invalid disputes (with reversions) on Versi again to see how well we handle those these days. In particular, it would be good to see this in action, ideally with some data how much quicker we can revert under load with that change.

@BradleyOlson64
Copy link
Contributor

Was able to get confirmation from traces that reversions are primarily happening via overseer message now. Here are some results from Versi with 211 active validators, 5 of which are producing garbage candidates.

Average reversion time after dispute resolution:
Overseer message - 0.001 Seconds
Chain scraping - 6+ Seconds

97.7% (760/778) of reversions handled via overseer message. Exceptions are when chain selection scrapes a reversion before the dispute coordinator has processed statement imports. This happens when a node is down or isolated from peers while a dispute is being decided.

@BradleyOlson64
Copy link
Contributor

BradleyOlson64 commented Apr 2, 2023

Example reversions caused by a single parablock candidate:

Parent blocks reverted via chainSelectionMessage::RevertBlock:
2023-04-02 17:09:54.475 TRACE tokio-runtime-worker parachain::dispute-coordinator: Dispute has just concluded against the candidate hash noted. Its parent will be marked as reverted. candidate_hash=0x2d320de018c23484cc73754b03d06a0f7f998fbe6bc29c2c233e739f402d259e parent_block_number=30720 parent_block_hash=0xe0f9f7b42d04f9312827245b990861a10598c2f33fc09e279a5b154fa27ddf18 traceID=60075156079343626186502069228793784847

2023-04-02 17:09:54.475 TRACE tokio-runtime-worker parachain::dispute-coordinator: Dispute has just concluded against the candidate hash noted. Its parent will be marked as reverted. candidate_hash=0x2d320de018c23484cc73754b03d06a0f7f998fbe6bc29c2c233e739f402d259e parent_block_number=30720 parent_block_hash=0xd2af91fcfe4ebfd62d408116ed9f1901e81376f26a70cba02764261a47f0df55 traceID=60075156079343626186502069228793784847

ChainSelectionMessage::RevertBlocks:
2023-04-02 17:09:54.476 TRACE tokio-runtime-worker parachain::chain-selection: Block marked as reverted via ChainSelectionMessage::RevertBlocks revert_number=30720 revert_hash=0xe0f9f7b42d04f9312827245b990861a10598c2f33fc09e279a5b154fa27ddf18

2023-04-02 17:09:54.476 TRACE tokio-runtime-worker parachain::chain-selection: Block marked as reverted via ChainSelectionMessage::RevertBlocks revert_number=30720 revert_hash=0xd2af91fcfe4ebfd62d408116ed9f1901e81376f26a70cba02764261a47f0df55

Block we hadn’t seen is later reverted via On-chain:
2023-04-02 17:10:36.142 TRACE tokio-runtime-worker parachain::chain-selection: Block marked as reverted via scraped on-chain reversions revert_number=30720 revert_hash=0xa666b128f0d80624754054351135ff76e36f96a5155e58890c3c1b0654c7806e

@BradleyOlson64
Copy link
Contributor

For each relay parent only one of the two reversion methods can be used, since the first reversion method to trigger removes the relevant block_entry in the chain selection tree.

@eskimor
Copy link
Member Author

eskimor commented Apr 3, 2023

Awesome, thanks Bradley!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants