Skip to content

feat(zkstack): ensure priority queue is empty before migrating to gateway - #4539

Merged
zkzoomer merged 23 commits into
mainfrom
sma/empty-pq-before-migrate
Oct 22, 2025
Merged

feat(zkstack): ensure priority queue is empty before migrating to gateway#4539
zkzoomer merged 23 commits into
mainfrom
sma/empty-pq-before-migrate

Conversation

@zkzoomer

@zkzoomer zkzoomer commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

What ❔

As part of v30, when a chain migrates to GW it must have empty priority queue. However, our current chain creation process entails spawning priority transactions when the chain is created. This PR introduces a series of changes:

  • Check that the PQ is indeed empty before starting the migration process: fbbb238.
  • Adds an additional flag --skip-priority-txs to chain init to spawn a chain without creating these priority txs immediately.
  • Modifies the existing migrate-to-gateway command, skipping the set_da_validator_pair_via_gateway call if the priority txs were skipped. Note that this step is not skipped when a chain migrates back to gateway, as the contract must have already been deployed.
  • Introduces an additional command to finalize-chain-migration-to-gateway, which sends the skipped priority txs and later calls set_da_validator_pair_via_gateway.

Why ❔

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.

Comment thread core/tests/highlevel-test-tools/src/gateway.ts Dismissed
Comment thread core/lib/config/src/configs/contracts/chain.rs Outdated
@zkzoomer zkzoomer changed the title [wip] empty priority queue before migrating feat(zkstack): ensure priority queue is empty before migrating to gateway Oct 15, 2025
@zkzoomer
zkzoomer marked this pull request as ready for review October 15, 2025 11:56

@Deniallugo Deniallugo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

generally looks good

Comment thread core/lib/config/src/configs/contracts/chain.rs Outdated
Comment thread zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs Outdated
Comment thread zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs Outdated
@zkzoomer
zkzoomer force-pushed the sma/empty-pq-before-migrate branch 2 times, most recently from 4497544 to 742f907 Compare October 20, 2025 12:14
@zkzoomer
zkzoomer force-pushed the sma/empty-pq-before-migrate branch from 742f907 to d47ae2c Compare October 20, 2025 14:20
@zkzoomer
zkzoomer enabled auto-merge October 22, 2025 10:18
@zkzoomer
zkzoomer added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit a5e1133 Oct 22, 2025
39 of 40 checks passed
@zkzoomer
zkzoomer deleted the sma/empty-pq-before-migrate branch October 22, 2025 10:57
github-merge-queue Bot pushed a commit that referenced this pull request Nov 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[29.6.0](core-v29.5.0...core-v29.6.0)
(2025-11-17)


### Features

* **api:** add EIP-7966 eth_sendRawTransactionSync method
([#4565](#4565))
([7c4c428](7c4c428))
* bumping versions
([#4555](#4555))
([1cd803d](1cd803d))
* **eth_sender:** Set fusaka upgrade timestamp
([#4571](#4571))
([3b5a9df](3b5a9df))
* Improve proving networks setup
([#4563](#4563))
([42c3f0f](42c3f0f))
* **zkstack:** ensure priority queue is empty before migrating to
gateway ([#4539](#4539))
([a5e1133](a5e1133))

---
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 <zksync-era-bot@users.noreply.github.com>
Deniallugo pushed a commit that referenced this pull request Dec 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[29.6.0](core-v29.5.0...core-v29.6.0)
(2025-11-17)


### Features

* **api:** add EIP-7966 eth_sendRawTransactionSync method
([#4565](#4565))
([7c4c428](7c4c428))
* bumping versions
([#4555](#4555))
([1cd803d](1cd803d))
* **eth_sender:** Set fusaka upgrade timestamp
([#4571](#4571))
([3b5a9df](3b5a9df))
* Improve proving networks setup
([#4563](#4563))
([42c3f0f](42c3f0f))
* **zkstack:** ensure priority queue is empty before migrating to
gateway ([#4539](#4539))
([a5e1133](a5e1133))

---
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 <zksync-era-bot@users.noreply.github.com>
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.

4 participants