Skip to content

Conversation

@cytadela8
Copy link
Member

@cytadela8 cytadela8 commented Sep 16, 2025

What ❔

If received batch details contain None/Null chain_id (commit_chain_id, prove_chain_id, execute_chain_id) set it to config provided chain id for L1. This happens for old batches.

Why ❔

If you try syning EN from scratch with a "old" chain you will encounter following error:

Error: One or more tasks failed: ["Task transaction_finality_updater failed: No batch transactions to process for chain id 1 while there are some for None chain_id.Error is thrown so node can restart and reload SL data. If node doesn't make any progress after restart, then it's bug, please contact developers."]

Logic for fetching batch transactions to process their finality status assumes chain_ids are set properly and no transaction should have chain_id = None. However this is the case for old chains. When fetching they return *_chain_id: null in zks_getL1BatchDetails for some old batches.

Is this a breaking change?

  • Yes
  • No

Operational changes

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

@cytadela8 cytadela8 changed the title fix chain_id = Null for old batches fix(EN): properly set chain_id for old batch transactions Sep 16, 2025
@cytadela8
Copy link
Member Author

Seems to be working after testing sync with Abstract testnet (managed to fully sync) and Sophon testnet (sill syncing)

@cytadela8 cytadela8 marked this pull request as ready for review September 16, 2025 19:00
Copy link
Contributor

@Deniallugo Deniallugo left a comment

Choose a reason for hiding this comment

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

lgtm

@cytadela8 cytadela8 enabled auto-merge September 18, 2025 12:27
@cytadela8 cytadela8 added this pull request to the merge queue Sep 18, 2025
Merged via the queue into main with commit 634b6dd Sep 18, 2025
40 checks passed
@cytadela8 cytadela8 deleted the fix-transaction-fetcher branch September 18, 2025 13:03
github-merge-queue bot pushed a commit that referenced this pull request Sep 18, 2025
🤖 I have created a release *beep* *boop*
---


##
[29.3.0](core-v29.2.0...core-v29.3.0)
(2025-09-18)


### Features

* **en:** Check commitment allonside with roothashes
([#4492](#4492))
([6e8f526](6e8f526))
* **en:** Improved en commitment generation error handling
([#4483](#4483))
([1bb82d6](1bb82d6))


### Bug Fixes

* **en:** Add check for commitment in diverged batch
([#4493](#4493))
([e693fd0](e693fd0))
* **en:** allow to disable sanity checks for commitment generation
([#4487](#4487))
([7692f31](7692f31))
* **EN:** properly set chain_id for old batch transactions
([#4488](#4488))
([634b6dd](634b6dd))
* **eth-proof-manager:** don't fail component if proof was incorrect
([#4444](#4444))
([daa1161](daa1161))
* **eth-proof-manager:** verify protocol version and proving mode
alignment
([#4473](#4473))
([99e0423](99e0423))
* **eth-sender:** Fix selector for old batches
([#4489](#4489))
([bb42dcf](bb42dcf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: zksync-era-bot <[email protected]>
Deniallugo pushed a commit that referenced this pull request Oct 22, 2025
## What ❔

If received batch details contain None/Null chain_id (commit_chain_id,
prove_chain_id, execute_chain_id) set it to config provided chain id for
L1. This happens for old batches.

## Why ❔

If you try syning EN from scratch with a "old" chain you will encounter
following error:
```
Error: One or more tasks failed: ["Task transaction_finality_updater failed: No batch transactions to process for chain id 1 while there are some for None chain_id.Error is thrown so node can restart and reload SL data. If node doesn't make any progress after restart, then it's bug, please contact developers."]
```

Logic for fetching batch transactions to process their finality status
assumes chain_ids are set properly and no transaction should have
chain_id = None. However this is the case for old chains. When fetching
they return *_chain_id: null in zks_getL1BatchDetails for some old
batches.

## Is this a breaking change?
- [ ] Yes
- [ ] No

## Operational changes
<!-- Any config changes? Any new flags? Any changes to any scripts? -->
<!-- Please add anything that non-Matter Labs entities running their own
ZK Chain may need to know -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.
Deniallugo pushed a commit that referenced this pull request Oct 22, 2025
🤖 I have created a release *beep* *boop*
---


##
[29.3.0](core-v29.2.0...core-v29.3.0)
(2025-09-18)


### Features

* **en:** Check commitment allonside with roothashes
([#4492](#4492))
([6e8f526](6e8f526))
* **en:** Improved en commitment generation error handling
([#4483](#4483))
([1bb82d6](1bb82d6))


### Bug Fixes

* **en:** Add check for commitment in diverged batch
([#4493](#4493))
([e693fd0](e693fd0))
* **en:** allow to disable sanity checks for commitment generation
([#4487](#4487))
([7692f31](7692f31))
* **EN:** properly set chain_id for old batch transactions
([#4488](#4488))
([634b6dd](634b6dd))
* **eth-proof-manager:** don't fail component if proof was incorrect
([#4444](#4444))
([daa1161](daa1161))
* **eth-proof-manager:** verify protocol version and proving mode
alignment
([#4473](#4473))
([99e0423](99e0423))
* **eth-sender:** Fix selector for old batches
([#4489](#4489))
([bb42dcf](bb42dcf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: zksync-era-bot <[email protected]>
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.

3 participants