Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
35e3582
small fix to prevent crash (#15268)
sudeepdino008 May 27, 2025
75aa63c
[e30] agg: .ef files garbage didn't cleanup (#15242)
AskAlexSharov May 27, 2025
15642f5
Update ChangeLog.md (#15232)
VBulikov May 27, 2025
51ecfe1
[e30] rpctest eth_getLogs no-duplicates chk (#15234)
AskAlexSharov May 27, 2025
396d83e
dl: remove .torrent after merge (#15282)
AskAlexSharov May 27, 2025
13345c3
[r3.0] rpcdaemon: eth_call for future blocks should return an error …
lupin012 May 28, 2025
d63685c
stage_custom_trace: support all indices (#15293)
AskAlexSharov May 28, 2025
b72a20e
[r3.0] Enable ERIGON_ASSERT: true in CI tests and on Syncing in CI (…
JkLondon May 29, 2025
4003a37
Cherry Picked: polygon/sync: process partially connected header chain…
mh0lt May 30, 2025
6185994
polygon/sync: fix inserts of new blocks when partially connected due …
taratorio May 30, 2025
87e502b
polygon/sync: tweak fetch blocks backwards timeout (#15328) (#15357)
taratorio May 30, 2025
bd633e9
R3 Polygon Bhilai Fork Updates (#15331)
mh0lt May 30, 2025
4b9748c
bump version to 305 (#15369)
VBulikov May 30, 2025
6a64e17
add fork number to config (#15444)
mh0lt Jun 4, 2025
42cc7e3
[pick] jsonrpc: Add `acc.IsEmptyCodeHash` check in GetCode (#15360) (…
somnergy Jun 4, 2025
90feb30
[e30] integrity check: less ram use (#15392)
AskAlexSharov Jun 4, 2025
3800178
[pick] txpool: allow higher nonce in pool with existing SetcodeTxn (#…
somnergy Jun 4, 2025
f1e2230
Cherry-Pick: extend timeout on block building to slot time (#15312)
Giulio2002 Jun 4, 2025
6568408
Cherry-pick: Fix receipts dangling from reorged blocks (#15401) (#15404)
Giulio2002 Jun 4, 2025
ff63e63
integrity: fix check for spans and checkpoints (#15447) (#15451)
taratorio Jun 4, 2025
d2be908
[r.30] Fix Heimdall Integrity (#15465)
JkLondon Jun 5, 2025
730c2f0
jsonrpc: Fix nil ptr in trace_callMany (#15474)
somnergy Jun 6, 2025
810adb1
Fixed snapshot downloader inconsistency for minimal mode node (#15429…
eastorski Jun 6, 2025
5e1cc9a
[r3.0] add cmd to rename all files to 3.0 format (#15468)
JkLondon Jun 6, 2025
348d983
[r30] stage_custom_trace: used deprecated config field (#15492)
AskAlexSharov Jun 7, 2025
61c5072
[r30] history pruning: error for unexpected value length (#15507)
canepat Jun 9, 2025
a62859d
[r30] integrity.ReceiptsNoDuplicates: to skip Final txs (#15506)
AskAlexSharov Jun 10, 2025
5bfe239
[e30] ReceiptDomain: miss final txn (#15527)
AskAlexSharov Jun 12, 2025
fdb876f
Eastorski/cherry pick polyon miner commits (#15540)
eastorski Jun 12, 2025
9d9caf9
optimise FindBlockNum (#15398) (#15529)
sudeepdino008 Jun 12, 2025
048dbed
upstream v3.0.5
blxdyx Jun 12, 2025
cb0778d
Merge remote-tracking branch 'erigontech/release/3.0' into upstream
blxdyx Jun 12, 2025
26b0d31
upstream v3.0.5
blxdyx Jun 12, 2025
cf641e8
Fixed polygon sync when no heimdall waypoints are available (#13844) …
eastorski Jun 12, 2025
f1a92b9
[r3.0]Comp check (#15559)
JkLondon Jun 13, 2025
f710da3
cp: cancel previous job runs in integration and qa-rpc (#15566)
sudeepdino008 Jun 13, 2025
cd61822
[r30] ci: fix and enable TestEthSubscribe (#15567)
canepat Jun 13, 2025
09ebf50
[r30] caplin: fix safe block hash in fork choice update (#15563)
canepat Jun 14, 2025
8690051
Set code signer to handle bhilai code signing (#15577)
mh0lt Jun 14, 2025
7f9ec85
[e30] rchache: don't download `.kv` file by default (#15591)
AskAlexSharov Jun 16, 2025
309ee12
[r30] qa_tests: update rpc-tests to fix parity_listStorageKeys (#15573)
lupin012 Jun 16, 2025
d3636d1
Eastorski/cherry pick heimdallv2 (#15596)
eastorski Jun 16, 2025
0ee5162
[r30] rpc: return empty code for store out-of-gas in CREATE calls (#1…
canepat Jun 16, 2025
cde2913
Update version.go (#15600)
VBulikov Jun 16, 2025
29048c6
Backport: Fix datadir execution permissions for multi-user setups (#1…
anacrolix Jun 16, 2025
982a5d3
upstream v3.0.6
blxdyx Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ on:

workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ !contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
"refs/heads/main"
]'), github.ref) }}

jobs:
tests:
linux:
concurrency:
group: ci-${{ matrix.os }}-${{ github.ref }}
cancel-in-progress: >-
${{
!startsWith(github.ref, 'refs/heads/release/') &&
github.ref != 'refs/heads/main'
}}
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
matrix:
Expand Down Expand Up @@ -76,7 +75,14 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
continue-on-error: true

# tests-windows:
# win:
# concurrency:
# group: ci-win-${{ matrix.os }}-${{ github.ref }}
# cancel-in-progress: >-
# ${{
# !startsWith(github.ref, 'refs/heads/release/') &&
# github.ref != 'refs/heads/main'
# }}
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# strategy:
# matrix:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/kurtosis/eip7702-test.io
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tasks:
prefundMinBalance: 10000000000000000000 # ensure 10 ETH
walletAddressResultVar: "eoaAddress"
walletPrivateKeyResultVar: "eoaPrivateKey"
randomSeed: true
configVars:
privateKey: "walletPrivkey"
- name: sleep
Expand Down Expand Up @@ -60,4 +61,4 @@ tasks:
configVars:
privateKey: "eoaPrivateKey"
targetAddress: "testContractAddr"
authorizations: "| [ { codeAddress: .delegateContractAddr, signerPrivkey: .eoaPrivateKey } ]"
authorizations: "| [ { codeAddress: .delegateContractAddr, signerPrivkey: .eoaPrivateKey, nonce: 3 } ]"
1 change: 1 addition & 0 deletions .github/workflows/kurtosis/pectra.io
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ participants_matrix:
el:
- el_type: erigon
el_image: test/erigon:current
el_log_level: "debug"
cl:
- cl_type: teku
cl_image: consensys/teku:develop
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/qa-rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ on:
# types:
# - ready_for_review

concurrency:
group: ${{ github.ref }}
cancel-in-progress: >-
${{
!startsWith(github.ref, 'refs/heads/release/') &&
github.ref != 'refs/heads/main'
}}


jobs:
integration-test-suite:
runs-on: [ self-hosted, qa, RpcSpecific ]
Expand All @@ -21,6 +30,7 @@ jobs:
ERIGON_TESTBED_AREA: /opt/erigon-testbed
ERIGON_QA_PATH: /home/qarunner/erigon-qa
RPC_PAST_TEST_DIR: /opt/rpc-past-tests
ERIGON_ASSERT: true
CHAIN: mainnet

steps:
Expand All @@ -30,7 +40,7 @@ jobs:
- name: Checkout RPC Tests Repository & Install Requirements
run: |
rm -rf ${{ runner.workspace }}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v1.41.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch release/3.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
cd ${{ runner.workspace }}/rpc-tests
pip3 install -r requirements.txt

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qa-sync-from-scratch-minimal-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
TRACKING_TIME_SECONDS: 7200 # 2 hours
TOTAL_TIME_SECONDS: 64800 # 18 hours
CHAIN: ${{ matrix.chain }}
ERIGON_ASSERT: true

steps:
- name: Check out repository
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/qa-sync-from-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
TRACKING_TIME_SECONDS: 7200 # 2 hours
TOTAL_TIME_SECONDS: 43200 # 12 hours
CHAIN: ${{ matrix.chain }}
ERIGON_ASSERT: true


steps:
- name: Check out repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qa-sync-with-externalcl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
ERIGON_QA_PATH: /home/qarunner/erigon-qa
TRACKING_TIME_SECONDS: 3600 # 1 hour
TOTAL_TIME_SECONDS: 25200 # 7 hours
ERIGON_ASSERT: true

steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration-caplin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- reopened
- synchronize
- ready_for_review

jobs:
tests:
strategy:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test-integration-erigon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ jobs:

tests-mac-linux:
needs: source-of-changes
concurrency:
group: tests-mac-linux-${{ matrix.os }}-${{ github.ref }}
cancel-in-progress: >-
${{
needs.source-of-changes.outputs.changed_files != 'true' &&
!startsWith(github.ref, 'refs/heads/release/') &&
github.ref != 'refs/heads/main'
}}
strategy:
matrix:
os:
Expand Down Expand Up @@ -88,6 +96,14 @@ jobs:

tests-windows:
needs: source-of-changes
concurrency:
group: tests-windows-${{ matrix.os }}-${{ github.ref }}
cancel-in-progress: >-
${{
needs.source-of-changes.outputs.changed_files != 'true' &&
!startsWith(github.ref, 'refs/heads/release/') &&
github.ref != 'refs/heads/main'
}}
strategy:
matrix:
os: [ windows-2025 ]
Expand Down
94 changes: 93 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,110 @@
ChangeLog
---------

## v3.0.3 (in development)
## v3.0.5 (in development)

### Milestone

https://github.com/erigontech/erigon/milestone/44

## v3.0.4

### Milestone

https://github.com/erigontech/erigon/milestone/43

**Improvements:**

- disable diagnostics by default by @yperbasis in https://github.com/erigontech/erigon/pull/14953
- less disk IO during files merge by @AskAlexSharov in https://github.com/erigontech/erigon/pull/14901
- stage_custom_trace: to produce indices by @AskAlexSharov in https://github.com/erigontech/erigon/pull/14879
- persist receipts - external rpcd support by @AskAlexSharov in https://github.com/erigontech/erigon/pull/15004
- support `NO_PRUNE` env var by @AskAlexSharov in https://github.com/erigontech/erigon/pull/15131
- cmd: Increase default `db.size.limit` by @AskAlexSharov in https://github.com/erigontech/erigon/pull/15170
- notify rpcd when e3 files change by @sudeepdino008 in https://github.com/erigontech/erigon/pull/15044
- mdbx v0.13.6 by @JkLondon in https://github.com/erigontech/erigon/pull/15112

**Bugfixes:**

- Fix issues reported in snapshot processing to fix sync issues due to bugs in sync event and checkpoint snapshot production by @eastorski in https://github.com/erigontech/erigon/pull/14887, https://github.com/erigontech/erigon/pull/14947, https://github.com/erigontech/erigon/pull/14951
- Update go-libutp for AUR build error by @anacrolix in https://github.com/erigontech/erigon/pull/14892
- Caplin: fix occassional mev-boost bug by @Giulio2002 in https://github.com/erigontech/erigon/pull/14991
- Erigon: optimistic inclusion for deep reorgs #14875 by @Giulio2002 in https://github.com/erigontech/erigon/pull/14876
- Caplin: Fix misc issues after electra (#14910) by @domiwei in https://github.com/erigontech/erigon/pull/14935
- fix erigon seg retire to handle incomplete merges by @sudeepdino008 in https://github.com/erigontech/erigon/pull/15003
- fast failing if version string contains "." (v1.0- v2.23 for ex) by @JkLondon in https://github.com/erigontech/erigon/pull/15048
- prune mode flag parsing and `String()`-ing by @awskii in https://github.com/erigontech/erigon/pull/14882
- rpcdaemon: fix txNum at GetReceipt call in getLogsV3 by @lupin012 in https://github.com/erigontech/erigon/pull/14986

**Full Changelog**: https://github.com/erigontech/erigon/compare/v3.0.3...v3.0.4

## v3.0.3

### Milestone

https://github.com/erigontech/erigon/milestone/42

**RPC fixes:**

Polygon users who have previously run migration steps to fix incorrect logIndex related to state sync transactions released in 3.0.2 are advised to run the migration steps again and add the --polygon.logindex flag to their flags for a complete mitigation.

**Improvements:**

- consensus: Add syscall failure scenarios (#14403) by @somnathb1 in https://github.com/erigontech/erigon/pull/14818
- consensus: validate fixed lengths in abi decoding EIP-6110 deposit requests by @somnathb1 in https://github.com/erigontech/erigon/pull/14823
- historical receipts persistency (optional) by @AskAlexSharov in https://github.com/erigontech/erigon/pull/14781
- reduce dependency on github; download snapshot hashes from R2 by @wmitsuda in https://github.com/erigontech/erigon/pull/14849

**Bugfixes:**

- eth, execution: Use block level gasPool in serial execution (#14761) by @somnathb1 in https://github.com/erigontech/erigon/pull/14820
- no greedy prune on chain-tip (node did fall behind periodically) by @AskAlexSharov in https://github.com/erigontech/erigon/pull/14782
- fixed performance and ordering issues with the [RPC fix from 3.0.2](https://github.com/erigontech/erigon/releases/tag/v3.0.2) by @mh0lt and @shohamc1 in https://github.com/erigontech/erigon/pull/14842 https://github.com/erigontech/erigon/pull/14785 https://github.com/erigontech/erigon/pull/14790

**Full Changelog**: https://github.com/erigontech/erigon/compare/v3.0.2...v3.0.3

## v3.0.2

### Milestone

https://github.com/erigontech/erigon/milestone/41

**Gnosis users: this is a required update for the upcoming Pectra hardfork scheduled for 30 April 2025**

**RPC fixes:**

Previous versions of Erigon 3 have two bugs regarding handling of state sync events on Polygon chains:
- Incorrect `logIndex` on all state sync transaction logs
- Missing log events when using `eth_getLogs` with filters

A proper fix has been implemented and will be progressively rolled out in Erigon 3.1 and 3.2 (track issue [here](https://github.com/erigontech/erigon/issues/14003)). A temporary workaround has been introduced if these issues are critical for your use-case. This requires regenerating receipts for all transactions on the chain. The procedure is as follows:
1. Shutdown Erigon and all rpcdaemon processes
2. Update binaries Erigon release
3. `erigon seg rm-state-snapshots --domain=receipt --datadir <your-datadir>`
4. `integration stage_custom_trace --datadir <your-datadir> --chain <amoy|bor-mainnet> --bor.heimdall <heimdall-url>`
- For machines with many cores, you can add ` --exec.workers=<num>` to improve performance (default is `7`)
5. Once complete, `rm -rf <your-datadir>/chaindata`
6. Start Erigon

**Improvements:**

- Schedule Pectra hard fork for Gnosis Mainnet (#14521) by @somnathb1 in https://github.com/erigontech/erigon/pull/14523
- params: Use no padding in minor version (#14588) by @somnathb1 in https://github.com/erigontech/erigon/pull/14594
- recent receipts persistence: to reduce RPC latency by @AskAlexSharov in https://github.com/erigontech/erigon/pull/14532
- historical `eth_getProof` experimental flag by @Giulio2002 in https://github.com/erigontech/erigon/pull/14568
- Enhance efficiency of attestation selection (#14624) by @Giulio2002 in https://github.com/erigontech/erigon/pull/14633
- EngineAPI: recover from missing chain segments (#14579) by @Giulio2002 in https://github.com/erigontech/erigon/pull/14589
- remove unsafe closing of subsumed files in mergeLoopStep by @sudeepdino008 in https://github.com/erigontech/erigon/pull/14557

**Bugfixes:**

- execution: fix missing log notifications when flushing extending fork… by @Giulio2002 in https://github.com/erigontech/erigon/pull/14578
- EthereumExecution: fix canonical chain routine (#14580) by @Giulio2002 in https://github.com/erigontech/erigon/pull/14592
- caplin: fix parsing topics (#14543) by @Giulio2002 in https://github.com/erigontech/erigon/pull/14593
- Fix `trace_transaction` for Polygon chains (#14470) by @shohamc1 in https://github.com/erigontech/erigon/pull/14530

**Full Changelog**: https://github.com/erigontech/erigon/compare/v3.0.1...v3.0.2

## v3.0.1

**Improvements:**
Expand Down
10 changes: 8 additions & 2 deletions cl/beacon/handler/block_production.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ func (a *ApiHandler) produceBeaconBody(
if finalizedHash == (libcommon.Hash{}) {
finalizedHash = head // probably fuck up fcu for EL but not a big deal.
}
safeHash := a.forkchoiceStore.GetEth1Hash(baseState.CurrentJustifiedCheckpoint().Root)
if safeHash == (libcommon.Hash{}) {
safeHash = head
}
proposerIndex, err := baseState.GetBeaconProposerIndexForSlot(targetSlot)
if err != nil {
return nil, 0, err
Expand Down Expand Up @@ -616,6 +620,7 @@ func (a *ApiHandler) produceBeaconBody(
idBytes, err := a.engine.ForkChoiceUpdate(
ctx,
finalizedHash,
safeHash,
head,
&engine_types.PayloadAttributes{
Timestamp: hexutil.Uint64(latestExecutionPayload.Time + secsDiff),
Expand Down Expand Up @@ -1207,8 +1212,9 @@ func (a *ApiHandler) storeBlockAndBlobs(
if err := a.forkchoiceStore.OnBlock(ctx, block, true, true, false); err != nil {
return err
}
finalizedBlockRoot := a.forkchoiceStore.FinalizedCheckpoint().Root
if _, err := a.engine.ForkChoiceUpdate(ctx, a.forkchoiceStore.GetEth1Hash(finalizedBlockRoot), a.forkchoiceStore.GetEth1Hash(blockRoot), nil); err != nil {
finalizedHash := a.forkchoiceStore.GetEth1Hash(a.forkchoiceStore.FinalizedCheckpoint().Root)
safeHash := a.forkchoiceStore.GetEth1Hash(a.forkchoiceStore.JustifiedCheckpoint().Root)
if _, err := a.engine.ForkChoiceUpdate(ctx, finalizedHash, safeHash, a.forkchoiceStore.GetEth1Hash(blockRoot), nil); err != nil {
return err
}
headState, err := a.forkchoiceStore.GetStateAtBlockRoot(blockRoot, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (b *blockCollector) Flush(ctx context.Context) error {
isForkchoiceNeeded := currentHeader == nil || blocksBatch[len(blocksBatch)-1].NumberU64() > currentHeader.Number.Uint64()
if inserted >= b.syncBackLoop {
if isForkchoiceNeeded {
if _, err := b.engine.ForkChoiceUpdate(ctx, lastBlockHash, lastBlockHash, nil); err != nil {
if _, err := b.engine.ForkChoiceUpdate(ctx, lastBlockHash, lastBlockHash, lastBlockHash, nil); err != nil {
b.logger.Warn("failed to update fork choice", "err", err)
}
}
Expand Down
4 changes: 2 additions & 2 deletions cl/phase1/execution_client/execution_client_direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ func (cc *ExecutionClientDirect) NewPayload(
return PayloadStatusNone, errors.New("unexpected status")
}

func (cc *ExecutionClientDirect) ForkChoiceUpdate(ctx context.Context, finalized libcommon.Hash, head libcommon.Hash, attr *engine_types.PayloadAttributes) ([]byte, error) {
status, _, _, err := cc.chainRW.UpdateForkChoice(ctx, head, head, finalized)
func (cc *ExecutionClientDirect) ForkChoiceUpdate(ctx context.Context, finalized, safe, head libcommon.Hash, attr *engine_types.PayloadAttributes) ([]byte, error) {
status, _, _, err := cc.chainRW.UpdateForkChoice(ctx, head, safe, finalized)
if err != nil {
return nil, fmt.Errorf("execution Client RPC failed to retrieve ForkChoiceUpdate response, err: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions cl/phase1/execution_client/execution_client_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ func (cc *ExecutionClientRpc) NewPayload(
return newPayloadStatusByEngineStatus(payloadStatus.Status), checkPayloadStatus(payloadStatus)
}

func (cc *ExecutionClientRpc) ForkChoiceUpdate(ctx context.Context, finalized libcommon.Hash, head libcommon.Hash, attributes *engine_types.PayloadAttributes) ([]byte, error) {
func (cc *ExecutionClientRpc) ForkChoiceUpdate(ctx context.Context, finalized, safe, head libcommon.Hash, attributes *engine_types.PayloadAttributes) ([]byte, error) {
forkChoiceRequest := engine_types.ForkChoiceState{
HeadHash: head,
SafeBlockHash: head,
SafeBlockHash: safe,
FinalizedBlockHash: finalized,
}
forkChoiceResp := &engine_types.ForkChoiceUpdatedResponse{}
Expand Down
12 changes: 6 additions & 6 deletions cl/phase1/execution_client/execution_engine_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cl/phase1/execution_client/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var errContextExceeded = "rpc error: code = DeadlineExceeded desc = context dead
//go:generate mockgen -typed=true -source=./interface.go -destination=./execution_engine_mock.go -package=execution_client . ExecutionEngine
type ExecutionEngine interface {
NewPayload(ctx context.Context, payload *cltypes.Eth1Block, beaconParentRoot *libcommon.Hash, versionedHashes []libcommon.Hash, executionRequestsList []hexutility.Bytes) (PayloadStatus, error)
ForkChoiceUpdate(ctx context.Context, finalized libcommon.Hash, head libcommon.Hash, attributes *engine_types.PayloadAttributes) ([]byte, error)
ForkChoiceUpdate(ctx context.Context, finalized, safe, head libcommon.Hash, attributes *engine_types.PayloadAttributes) ([]byte, error)
SupportInsertion() bool
InsertBlocks(ctx context.Context, blocks []*types.Block, wait bool) error
InsertBlock(ctx context.Context, block *types.Block) error
Expand Down
2 changes: 2 additions & 0 deletions cl/phase1/stages/forkchoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ func computeAndNotifyServicesOfNewForkChoice(ctx context.Context, logger log.Log
// Perform fork choice update if the engine is available
if cfg.forkChoice.Engine() != nil {
finalizedCheckpoint := cfg.forkChoice.FinalizedCheckpoint()
justifiedCheckpoint := cfg.forkChoice.JustifiedCheckpoint()
logger.Debug("Caplin is sending forkchoice")

// Run fork choice update with finalized checkpoint and head
if _, err = cfg.forkChoice.Engine().ForkChoiceUpdate(
ctx,
cfg.forkChoice.GetEth1Hash(finalizedCheckpoint.Root),
cfg.forkChoice.GetEth1Hash(justifiedCheckpoint.Root),
cfg.forkChoice.GetEth1Hash(headRoot), nil,
); err != nil {
err = fmt.Errorf("failed to run forkchoice: %w", err)
Expand Down
Loading