Skip to content

Restore receipts after recent fix - #4248

Merged
Longarithm merged 125 commits into
masterfrom
restore-receipts
May 24, 2021
Merged

Restore receipts after recent fix#4248
Longarithm merged 125 commits into
masterfrom
restore-receipts

Conversation

@Longarithm

@Longarithm Longarithm commented Apr 22, 2021

Copy link
Copy Markdown
Contributor

Currently rebased on #4274 to reuse MigrationData.

This PR has two goals:

  1. Re-introduce receipts to the chain, which were previously lost because of the bug in apply_chunks fixed here: Fix(chain): fix apply chunks #4228
  2. Provide a script allowing to verify that added receipts were actually lost. Because usual nodes clean old data, it can be launched only on mainnet archival node dumps.

Test plan

Check that

  • incorrect receipts don't pass verification and there are no still missing receipts: restored-receipts-verifier -> test_checking_differences
  • new receipts are correctly added to chain: the epoch is right, missing chunks don't affect the process, all receipts are added: process_blocks -> test_restoring_receipts_mainnet

@bowenwang1996 bowenwang1996 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a description to the PR on what this PR does and what the test plan is

Comment thread chain/chain/src/chain.rs Outdated
Comment thread chain/chain/src/chain.rs Outdated
Comment thread utils/restored-receipts-verifier/Cargo.toml Outdated
Comment thread utils/restored-receipts-verifier/src/main.rs Outdated
Comment thread utils/restored-receipts-verifier/src/main.rs Outdated
Comment thread utils/restored-receipts-verifier/src/main.rs Outdated
Comment thread utils/restored-receipts-verifier/src/main.rs Outdated
Comment thread utils/restored-receipts-verifier/src/main.rs Outdated
Comment thread utils/restored-receipts-verifier/src/main.rs Outdated
Comment thread utils/restored-receipts-verifier/src/main.rs Outdated