Skip to content

ProcessFrozenBlocks: to support isDomainAheadOfBlocks (which we have in fcu)#18981

Merged
taratorio merged 7 commits into
mainfrom
alex/process_frozen_blocks_skip_ahead2_34
Feb 5, 2026
Merged

ProcessFrozenBlocks: to support isDomainAheadOfBlocks (which we have in fcu)#18981
taratorio merged 7 commits into
mainfrom
alex/process_frozen_blocks_skip_ahead2_34

Conversation

@AskAlexSharov

@AskAlexSharov AskAlexSharov commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Have "state files are ahead of block files" issue in main:

[INFO] [02-05|05:40:47.504] [1/6 OtterSync] Total difficulty index: 15.61M/24.38M
[INFO] [02-05|05:41:07.504] [1/6 OtterSync] Total difficulty index: 23.40M/24.38M
[INFO] [02-05|05:41:22.050] [snapshots:download] Stat                blocks=24.38M indices=24.38M alloc=5.2GB sys=9.8GB
[INFO] [02-05|05:41:22.054] [snapshots:history] Stat                 blocks=1 step2blockNum="8192=24.09M,8320=24.26M,8384=24.33M,8416=24.37M,8424=0" txs=3.29G first_history_idx_in_db=0 alloc=5.2GB sys=9.8GB
[INFO] [02-05|05:41:22.054] [1/6 OtterSync] DONE                     in=1m17.875008871s block=24381999
[EROR] [02-05|05:41:22.054] Could not start execution service        err="[4/6 Execution] behind commitment: TxNums index is at block 24381999 and behind commitment 24382199"
[INFO] [02-05|05:41:41.216] Downloading Execution History            progress=2033/24388522 ETA=297h41m19s blk/sec=22.8
[INFO] [02-05|05:42:11.216] Downloading Execution History            progress=2730/24388522 ETA=295h22m15s blk/sec=22.9

Because:
1: ProcessFrozenBlocks() doesn't support isDomainAheadOfBlocks() (which we have in fcu)
2: SharedDomains now required to be passed from outside of Stage Loop: it creating chicken-egg problem. To run StageSnapshots (which downloading files and filling TxNum index) need to pass SharedDomains which expecting TxNum index to be filled (or failing in constructor). SharedDomains has smart constructor - because it helped us to catch many problems when prepared 3.0 release - but of-course it's anti-pattern.


Still testing. And thinking what to do with point 2

taratorio
taratorio previously approved these changes Feb 5, 2026
Comment thread execution/execmodule/forkchoice.go Outdated
return sendForkchoiceErrorWithoutWaiting(e.logger, outcomeCh, err, false)
}

if execctx.IsDomainAheadOfBlocks(ctx, tx, e.logger) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

actually I think this won't work because it returns before AppendCanonicalTxNums - so a FCU can never append more tx nums to catch up with commitment this way

at the same time we need a SharedDomains created before .RunUnwind to cache the unwind changes in-memory which is before AppendCanonicalTxNums

so the only solution may be to take out SeekCommitment from NewSharedDomains

@taratorio taratorio merged commit 76c05ed into main Feb 5, 2026
18 checks passed
@taratorio taratorio deleted the alex/process_frozen_blocks_skip_ahead2_34 branch February 5, 2026 11:48
mattevans added a commit to ethpandaops/erigone-legacy that referenced this pull request Feb 6, 2026
* upstream/main: (91 commits)
  perf(cl/block_collector): optimize encodeBlock buffer allocation (erigontech#18980)
  db/kv: fix code cache hash key computation (erigontech#18965)
  Fix hive tests 0302 (erigontech#18986)
  perf(execution/types): optimize EIP-7685 request encoding (erigontech#18985)
  refactor: replace interface{} with any for clarity and modernization (erigontech#18978)
  refactor: replace interface{} with any for clarity and modernization (erigontech#18977)
  Rework Dockerhub API call authorization mechanism. (erigontech#18989)
  claude: add erigon-network-ports skill (erigontech#18992)
  PersistentBlockCollector: assert on inserting gap (erigontech#18979)
  qa-tests: add Geth test to the RPC Historic Performance Tests (erigontech#18895)
  a bit less debug logs (erigontech#18974)
  ProcessFrozenBlocks: to support `isDomainAheadOfBlocks` (which we have in `fcu`) (erigontech#18981)
  qa-tests: fix summary in RPC Performance Tests Latest (erigontech#18984)
  handle edge case for genesis block in SeekCommitment (erigontech#18960)
  db/preverified: remove redundant assertSorted in Get (erigontech#18967)
  txnprovider/shutter: fix identity preimage DecodeSSZ error length (erigontech#18938)
  perf(cl/sentinel): use stack allocation for light_client response prefix (erigontech#18961)
  Add debug.SetupSimple, and improve torrent client status info log (erigontech#18953)
  Refactor worker count calculation to remove redundant bounds check (erigontech#18415)
  fix: remove duplicate TxPoolBlobPriceBumpFlag check in setTxPool (erigontech#18472)
  ...
Giulio2002 pushed a commit that referenced this pull request Feb 6, 2026
…e in `fcu`) (#18981)

Have "state files are ahead of block files" issue in main:
```
[INFO] [02-05|05:40:47.504] [1/6 OtterSync] Total difficulty index: 15.61M/24.38M
[INFO] [02-05|05:41:07.504] [1/6 OtterSync] Total difficulty index: 23.40M/24.38M
[INFO] [02-05|05:41:22.050] [snapshots:download] Stat                blocks=24.38M indices=24.38M alloc=5.2GB sys=9.8GB
[INFO] [02-05|05:41:22.054] [snapshots:history] Stat                 blocks=1 step2blockNum="8192=24.09M,8320=24.26M,8384=24.33M,8416=24.37M,8424=0" txs=3.29G first_history_idx_in_db=0 alloc=5.2GB sys=9.8GB
[INFO] [02-05|05:41:22.054] [1/6 OtterSync] DONE                     in=1m17.875008871s block=24381999
[EROR] [02-05|05:41:22.054] Could not start execution service        err="[4/6 Execution] behind commitment: TxNums index is at block 24381999 and behind commitment 24382199"
[INFO] [02-05|05:41:41.216] Downloading Execution History            progress=2033/24388522 ETA=297h41m19s blk/sec=22.8
[INFO] [02-05|05:42:11.216] Downloading Execution History            progress=2730/24388522 ETA=295h22m15s blk/sec=22.9
```

Because:
1: `ProcessFrozenBlocks()` doesn't support `isDomainAheadOfBlocks()`
(which we have in fcu)
2: `SharedDomains` now required to be passed from outside of `Stage
Loop`: it creating chicken-egg problem. To run `StageSnapshots` (which
downloading files and filling `TxNum index`) need to pass
`SharedDomains` which expecting `TxNum` index to be filled (or failing
in constructor). `SharedDomains` has smart constructor - because it
helped us to catch many problems when prepared 3.0 release - but
of-course it's anti-pattern.


----
Still testing. And thinking what to do with point 2
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