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

Short term fee model + 1.4.1 #159

Merged
merged 231 commits into from
Jan 12, 2024
Merged

Conversation

StanislavBreadless
Copy link
Collaborator

@StanislavBreadless StanislavBreadless commented Jan 9, 2024

What ❔

This PR introduces the following features:

  • The new fee model
  • 1.4.1 integration
  • The ability to reinitialize a bridged ERC20 token's metadata
  • Various minor fixes
  • Increase of the max number of transactions per batch to 10 thousand.

Note, that with the increase of the number of txs per batch, we also increased the bootloader memory size. This means that the new version of the VM had to be used for the bootloader tests and so once merged, the PRs to the dev of system contracts that introduce any additional changes will have to be built on top of the following server PR: matter-labs/zksync-era#791

Why ❔

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.

l1-contracts/contracts/bridge/L1ERC20Bridge.sol Outdated Show resolved Hide resolved
l1-contracts/contracts/upgrades/BaseZkSyncUpgrade.sol Outdated Show resolved Hide resolved
l1-contracts/contracts/zksync/Config.sol Outdated Show resolved Hide resolved
system-contracts/bootloader/bootloader.yul Outdated Show resolved Hide resolved
/// @dev It is expected of the operator to set the "fair L2 gas price" appropriately to ensure that it is
/// compensated enough in case the batch might be prematurely sealed because of the transaction slots being filled up.
function TX_SLOT_OVERHEAD_GAS() -> ret {
ret := 10000
Copy link
Member

Choose a reason for hiding this comment

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

Why it is not 8000 as described in the doc?

Copy link
Collaborator Author

@StanislavBreadless StanislavBreadless Jan 12, 2024

Choose a reason for hiding this comment

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

In the doc it used to be 80k, but this PR also included the increase in the number of transactions in batch (1024 -> 10k) and so we overhead got reduced 10x (I decided to not go below 10k to take into account that the transaction's information will eventually be stored in the DB, etc, so the overhead per transaction should not become much lower than Ethereum's 21k)

SystemConfig.json Outdated Show resolved Hide resolved
SystemConfig.json Outdated Show resolved Hide resolved
@StanislavBreadless StanislavBreadless merged commit ac793e5 into dev Jan 12, 2024
16 checks passed
@StanislavBreadless StanislavBreadless deleted the sb-short-term-fee-model-dev branch January 12, 2024 14:18
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Jan 18, 2024
## What ❔

Adds a new VM version `VM_1_4_1` that will work with `[email protected]` and
the [following
contracts](matter-labs/era-contracts#159).

Generally, it contains the following features (on the server side):

- The new fee model
- 1.4.1 integration
- The Increase of the maximal number of transactions per batch to 10
thousand.

❗ Requires DB migration and new config params before being deployed❗

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## 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 `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `cargo spellcheck
--cfg=./spellcheck/era.cfg --code 1`.

---------

Co-authored-by: AntonD3 <[email protected]>
Co-authored-by: AntonD3 <[email protected]>
Co-authored-by: Emil <[email protected]>
Co-authored-by: Fedor Sakharov <[email protected]>
Co-authored-by: perekopskiy <[email protected]>
Co-authored-by: zksync-admin-bot2 <[email protected]>
Co-authored-by: perekopskiy <[email protected]>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Jan 18, 2024
## What ❔

Adds a new VM version `VM_1_4_1` that will work with `[email protected]` and
the [following
contracts](matter-labs/era-contracts#159).

Generally, it contains the following features (on the server side):

- The new fee model
- 1.4.1 integration
- The Increase of the maximal number of transactions per batch to 10
thousand.

❗ Requires DB migration and new config params before being deployed❗

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## 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 `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `cargo spellcheck
--cfg=./spellcheck/era.cfg --code 1`.

---------

Co-authored-by: AntonD3 <[email protected]>
Co-authored-by: AntonD3 <[email protected]>
Co-authored-by: Emil <[email protected]>
Co-authored-by: Fedor Sakharov <[email protected]>
Co-authored-by: perekopskiy <[email protected]>
Co-authored-by: zksync-admin-bot2 <[email protected]>
Co-authored-by: perekopskiy <[email protected]>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Jan 18, 2024
## What ❔

Adds a new VM version `VM_1_4_1` that will work with `[email protected]` and
the [following
contracts](matter-labs/era-contracts#159).

Generally, it contains the following features (on the server side):

- The new fee model
- 1.4.1 integration
- The Increase of the maximal number of transactions per batch to 10
thousand.

❗ Requires DB migration and new config params before being deployed❗

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## 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 `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `cargo spellcheck
--cfg=./spellcheck/era.cfg --code 1`.

---------

Co-authored-by: AntonD3 <[email protected]>
Co-authored-by: AntonD3 <[email protected]>
Co-authored-by: Emil <[email protected]>
Co-authored-by: Fedor Sakharov <[email protected]>
Co-authored-by: perekopskiy <[email protected]>
Co-authored-by: zksync-admin-bot2 <[email protected]>
Co-authored-by: perekopskiy <[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.

6 participants