Skip to content

[stable2603] Backport #11153#11489

Draft
paritytech-release-backport-bot[bot] wants to merge 1 commit intostable2603from
backport-11153-to-stable2603
Draft

[stable2603] Backport #11153#11489
paritytech-release-backport-bot[bot] wants to merge 1 commit intostable2603from
backport-11153-to-stable2603

Conversation

@paritytech-release-backport-bot

Backport #11153 into stable2603 from marian-radu.

See the documentation on how to use this bot.

@paritytech-release-backport-bot
Copy link
Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-11153-to-stable2603
git worktree add --checkout .worktree/backport-11153-to-stable2603 backport-11153-to-stable2603
cd .worktree/backport-11153-to-stable2603
git reset --hard HEAD^
git cherry-pick -x 8c6f7606348edee72a7a1abf14807e38bec5ca17
git push --force-with-lease

@github-actions github-actions bot added the A3-backport Pull request is already reviewed well in another branch. label Mar 25, 2026
@github-actions github-actions bot requested a review from marian-radu March 25, 2026 09:28
@EgorPopelyaev
Copy link
Contributor

@marian-radu Hi Marian, could you please check conflicts here?

- New `block_sync` module syncs backward from the latest finalized block
to the first EVM block, with restart-safe checkpoint tracking via a
`sync_state` SQLite table.
- On restart, fills only the top gap (new blocks) and bottom gap
(remaining backfill) without re-syncing completed ranges.
- Auto-discovers and persists `first_evm_block` — the lowest block with
EVM support on the chain.
- Chain identity verification: stores genesis hash in `sync_state` and
validates on startup; detects stale boundaries after reorgs.

New `--eth-pruning` flag replaces `--database-url`, `--cache-size`,
`--index-last-n-blocks`, and `--earliest-receipt-block`:
- `--eth-pruning archive` (default): persistent on-disk DB with backward
historical sync.
- `--eth-pruning <N>`: in-memory DB keeping the latest N blocks.

| Previous flag | Replacement | Notes |
|---|---|---|
| `--cache-size N` | `--eth-pruning N` | In-memory DB, keeps latest N
blocks |
| `--database-url sqlite::memory:` | `--eth-pruning N` | --eth-pruning N
always uses in-memory DB |
| `--database-url /path/to/db.sqlite` | `--base-path /path/to/dir` |
Persistent DB stored as `eth-rpc.db` inside the directory |
| `--index-last-n-blocks N` | `--eth-pruning archive` | Syncs all
finalized blocks down to the first EVM block |
| `--earliest-receipt-block N` | _(removed)_ | Replaced by
auto-discovered `first_evm_block` |

> **Note:** `--dev` automatically uses a temporary directory with an
on-disk DB, which is deleted on exit.

> **Note:** When `--base-path` is omitted, the DB is stored in the
default OS data directory:
> - macOS: `~/Library/Application Support/eth-rpc/`
> - Linux: `~/.local/share/eth-rpc/`
> - Windows: `%APPDATA%\eth-rpc\`

```bash
eth-rpc --dev

eth-rpc --node-rpc-url wss://example.com:443 --eth-pruning 512

eth-rpc --node-rpc-url wss://example.com:443

eth-rpc --node-rpc-url wss://example.com:443 --base-path /data/eth-rpc

eth-rpc --node-rpc-url wss://example.com:443 --eth-pruning archive

paritytech/contract-issues#271

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 8c6f760)
@marian-radu marian-radu force-pushed the backport-11153-to-stable2603 branch from d9c1c28 to 0efcebd Compare March 25, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-backport Pull request is already reviewed well in another branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants