Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update base token rate on L1 #2589

Merged
merged 58 commits into from
Aug 19, 2024
Merged

Conversation

ischasny
Copy link
Collaborator

@ischasny ischasny commented Aug 5, 2024

Currently base token to ETH ratio is always locked to 1:1 on the L1. This PR changes that and adds functionality to update L1 numerator and denominator as soon as they get updated on the L2. Updates are done by calling IChainAdmin.setTokenMultiplier function. The function can only be called by a new role - tokenMultiplierSetter.

This PR introduces the following changes:

  • new wallet for tokenMultiplierSetter, provisioned with ETH on network initialisation;
  • updates to old and new tooling to fully support this new role;
  • updates to base_token_ratio_persister to do the L1 updates;

What is not included:

  • Conditional updates - to save gas cost if numerator / denominator hasn't changed since the last time;
  • Support for fluctuating numerator / denominator in EN - that will be added in a separate PR.

PR to update tolling on the era-contracts side.

@ischasny
Copy link
Collaborator Author

What's the plan if max_attempts is reached for sending l1 tx?

Good point - currently the server is going to halt, which shouldn't be the case. Updated the logic so that it's going to be just retried on the next iteration.

@ischasny ischasny enabled auto-merge August 14, 2024 14:33
@ischasny ischasny added this pull request to the merge queue Aug 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 19, 2024
@ischasny ischasny added this pull request to the merge queue Aug 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 19, 2024
@ischasny ischasny enabled auto-merge August 19, 2024 16:37
@ischasny ischasny added this pull request to the merge queue Aug 19, 2024
Merged via the queue into main with commit f84aaaf Aug 19, 2024
54 checks passed
@ischasny ischasny deleted the ivan/pe-128-base-token-l1-update branch August 19, 2024 21:33
github-merge-queue bot pushed a commit that referenced this pull request Aug 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.2](zk_toolbox-v0.1.1...zk_toolbox-v0.1.2)
(2024-08-20)


### Features

* Poll the main node API for attestation status - relaxed (BFT-496)
([#2583](#2583))
([b45aa91](b45aa91))
* update base token rate on L1
([#2589](#2589))
([f84aaaf](f84aaaf))
* **zk_toolbox:** Add installation script
([#2569](#2569))
([009cd97](009cd97))
* **zk_toolbox:** Add lint command
([#2626](#2626))
([3d02946](3d02946))
* **zk_toolbox:** Add observability interactive option
([#2592](#2592))
([3aeaaed](3aeaaed))
* **zk_toolbox:** Add zk_supervisor run unit tests command
([#2610](#2610))
([fa866cd](fa866cd))
* **zk_toolbox:** Add zk_supervisor test l1 contracts command
([#2613](#2613))
([931e452](931e452))
* **zk_toolbox:** Add zk_supervisor test prover command
([#2614](#2614))
([0fe173b](0fe173b))
* **zk_toolbox:** allow to run `zk_inception chain create`
non-interactively
([#2579](#2579))
([555fcf7](555fcf7))
* **zk_toolbox:** Minting base token
([#2571](#2571))
([ae2dd3b](ae2dd3b))
* **zk_toolbox:** Run formatters and linterrs
([#2675](#2675))
([caedd1c](caedd1c))


### Bug Fixes

* Bump prover dependencies & rust toolchain
([#2600](#2600))
([849c6a5](849c6a5))
* **zk_toolbox:** Do not panic during mint
([#2658](#2658))
([1a8ee90](1a8ee90))
* **zk_toolbox:** Get l1-network config param from flag
([#2603](#2603))
([553d307](553d307))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2024
🤖 I have created a release *beep* *boop*
---


##
[24.19.0](core-v24.18.0...core-v24.19.0)
(2024-08-21)


### Features

* **db:** Allow creating owned Postgres connections
([#2654](#2654))
([47a082b](47a082b))
* **eth-sender:** add option to pause aggregator for gateway migration
([#2644](#2644))
([56d8ee8](56d8ee8))
* **eth-sender:** added chain_id column to eth_txs + support for gateway
in tx_aggregator
([#2685](#2685))
([97aa6fb](97aa6fb))
* **eth-sender:** gateway support for eth tx manager
([#2593](#2593))
([25aff59](25aff59))
* **prover_cli:** Add test for status, l1 and config commands.
([#2263](#2263))
([6a2e3b0](6a2e3b0))
* **prover_cli:** Stuck status
([#2441](#2441))
([232a817](232a817))
* **prover:** Add ProverJobMonitor
([#2666](#2666))
([e22cfb6](e22cfb6))
* **prover:** parallelized memory queues simulation in BWG
([#2652](#2652))
([b4ffcd2](b4ffcd2))
* update base token rate on L1
([#2589](#2589))
([f84aaaf](f84aaaf))
* **zk_toolbox:** Add zk_supervisor run unit tests command
([#2610](#2610))
([fa866cd](fa866cd))
* **zk_toolbox:** Run formatters and linterrs
([#2675](#2675))
([caedd1c](caedd1c))


### Bug Fixes

* **contract-verifier:** Check for 0x in zkvyper output
([#2693](#2693))
([0d77588](0d77588))
* make set token multiplier optional
([#2696](#2696))
([16dff4f](16dff4f))
* **prover:** change bucket for RAM permutation witnesses
([#2672](#2672))
([8b4cbf4](8b4cbf4))
* use lower fair l2 gas price for cbt
([#2690](#2690))
([e1146fc](e1146fc))


### Performance Improvements

* **logs-bloom:** do not run heavy query if migration was completed
([#2680](#2680))
([f9ef00e](f9ef00e))

---
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.

4 participants