Skip to content

Feature/core 288 optimisations of indexing process - #5435

Closed
zajko wants to merge 6 commits into
casper-network:feat-evmfrom
zajko:feature/CORE-288_optimisations_of_indexing_process
Closed

Feature/core 288 optimisations of indexing process#5435
zajko wants to merge 6 commits into
casper-network:feat-evmfrom
zajko:feature/CORE-288_optimisations_of_indexing_process

Conversation

@zajko

@zajko zajko commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

zajko added 6 commits July 21, 2026 12:20
- **Disk-backed indexed.** `block_height_index` / `switch_block_era_id_index` /
  `transaction_hash_index` are now LMDB tables. If a node boots against a store where they're missing or empty, they're rebuilt from a one-off full header scan
- **`IndexedLmdbBlockStore` merged into `LmdbBlockStore`.** Eliminated the separate wrapper type
  and the largely pass-through `DataReader`/`DataWriter` duplication; index-aware
  logic now lives directly on `LmdbBlockStore`. Also removed the now-unused in-memory `temp_map`.
- **Protocol upgrade commit restructured.** Dropped `ReactorState::Upgrading` /
  `upgrading_instruction.rs`. The commit now happens synchronously in `MainReactor::new`, before
  the event loop starts, for a node restarting with its tip already at the pre-activation switch
  block; `CatchUp` just finishes (signs + gossips) the resulting immediate switch block. Also
  removed a redundant in-`CatchUp` commit path for nodes syncing through a _historical_ activation
  point — verified empirically against `dev` that this case never needs it; those nodes just
  fetch the post-upgrade chain normally, like any other historical data.
- **New test coverage**: `emergency_upgrade.rs` (hard-reset upgrade with block peeling) and
  `legacy_storage_reindex_and_upgrade.rs`, which boots a 4-node network from a committed
  pre-refactor block store (real blocks/transactions across 3 eras, no persisted indexes),
  confirms the indexes rebuild and the network stays live, then drives it through an ordinary
  protocol upgrade.
- **Test harness additions** in `fixture.rs`: `new_with_keys_and_storage_dirs` (boot nodes from
  pre-existing storage) and a generalized `schedule_upgrade` (arbitrary era/version, not just
  era 2).
@zajko
zajko changed the base branch from dev to feat-evm July 24, 2026 11:55
@zajko zajko closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant