Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deep reorgs #16594

Merged
merged 14 commits into from
Nov 15, 2023
Merged

Fix deep reorgs #16594

merged 14 commits into from
Nov 15, 2023

Commits on Nov 14, 2023

  1. add feature to BlockTools to allow including block references to prev…

    …ious generators in test chains. Use a longer chain, with block generators, in the long_reorg test
    
    add new test block chain fixture for reorgs with lighter weight blocks, this covers reorgs to greater block heights than the current peak
    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    020bf7f View commit details
    Browse the repository at this point in the history
  2. add feature to BlockTools to include transactions in every transactio…

    …n block, to exercise more parts of our validation logic in simulations
    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    9713563 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    27f1ef9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0c299c1 View commit details
    Browse the repository at this point in the history
  5. introduce new function, lookup_fork_chain(), similar to find_fork_poi…

    …nt_in_chain(), but return the whole sequence of block hashes
    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    43b5fff View commit details
    Browse the repository at this point in the history
  6. optimize find_fork_point_in_chain() to just look up prev_hash from th…

    …e database, avoiding parsing and constructing a whole BlockRecord object for block traversed
    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    e42f77c View commit details
    Browse the repository at this point in the history
  7. fix reorg performance issue by preserving additions and removals acro…

    …ss block validations (instead of re-computing them from scratch for every block)
    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    d9f0a0f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    482d1ba View commit details
    Browse the repository at this point in the history
  9. update test_long_reorg to use the new, longer, test chains with block…

    … generators and block references
    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    d72c030 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9ec2252 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e44ab03 View commit details
    Browse the repository at this point in the history
  12. log when entering the slow-path of validating orphaned blocks. Ideall…

    …y, we don't get here
    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    10fc08e View commit details
    Browse the repository at this point in the history
  13. add comments

    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    8c5a374 View commit details
    Browse the repository at this point in the history
  14. bump test chains used on CI

    arvidn committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    e277a4f View commit details
    Browse the repository at this point in the history