Skip to content

db/state, cmd: let a bin-only datadir drop an unrequested parallel-commitment default - #24617

Closed
CPerezz wants to merge 1 commit into
erigontech:binary-triefrom
CPerezz:fix/bin-trie-parallel-default
Closed

CPerezz wants to merge 1 commit into
erigontech:binary-triefrom
CPerezz:fix/bin-trie-parallel-default

Conversation

@CPerezz

@CPerezz CPerezz commented Oct 6, 2026 •

Copy link
Copy Markdown

Fixes #24612

Parallel commitment became the default in #23831. reconcileTrieVariant refuses parallel commitment on a
bin-only datadir whenever ExperimentalParallelCommitment is true, without telling the default apart from a
request.

Changes:

  • statecfg.ExperimentalParallelCommitmentExplicit records whether parallel commitment was requested:
    COMMITMENT_PARALLEL is present (new dbg.EnvIsSet), --experimental.parallel-commitment is set
    (setParallelCommitment), or it is changed on the integration commands.
  • reconcileTrieVariant still refuses an explicit request on a bin-only datadir. A default is turned off,
    with an info log.
  • commitmentflags.Restore saves and restores the new flag.

…mmitment default

Since parallel commitment became the default, reconcileTrieVariant refused every
bin-only datadir, so a genesis with binaryTrieTime 0 could not be initialised or
started without COMMITMENT_PARALLEL=false. Record whether parallel commitment was
requested (env or flag) and refuse only an explicit request; otherwise use the
sequential trie the datadir requires.
@awskii

awskii commented Oct 6, 2026

Copy link
Copy Markdown
Member

thats a no-go fix, bin trie should just ignore the flag. redoing now.

@awskii awskii closed this Oct 6, 2026
awskii added a commit that referenced this pull request Oct 6, 2026
…#24623)

Fixes #24612. Alternative to #24617.

Since #23831 made parallel commitment the default,
`reconcileTrieVariant` refuses every bin-only datadir, so `erigon init`
on a genesis with `binaryTrieTime: 0` fails with no flags. The refusal
protects nothing: `PickTrieVariant` returns the bin trie before it reads
the parallel flag. This drops the refusal and leaves the parallel
default alone.

## Changes

- `reconcileTrieVariant` no longer refuses parallel commitment on a
bin-only datadir and does not touch `ExperimentalParallelCommitment`.
- `TestPBinVariantBinDatadirRefusesParallel` becomes
`TestPBinVariantBinDatadirResolvesWithParallelDefault`: resolve
succeeds, parallel stays on, `PickTrieVariant()` is bin.
- The bin test helpers (genesis, rpchelper, PBT builder, acceptance
harness) stop forcing parallel off, so they run under the default.
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.

2 participants