Skip to content

Commit

Permalink
feat(eth_sender): set blob gas fee when blobs DA is used (#1285)
Browse files Browse the repository at this point in the history
## What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## 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 `zk spellcheck`.
- [ ] Linkcheck has been run via `zk linkcheck`.

---------

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
  • Loading branch information
koloz193 and montekki authored Feb 29, 2024
1 parent 30579ef commit 57c5526
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions core/lib/zksync_core/src/eth_sender/eth_tx_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,18 @@ impl EthTxManager {
.used_priority_fee_per_gas
.observe(priority_fee_per_gas);

let mut signed_tx = self
.sign_tx(
tx,
base_fee_per_gas,
priority_fee_per_gas,
/* TODO: query adjuster */ None,
let blob_gas_price = if tx.blob_sidecar.is_some() {
Some(
blob_base_fee_per_gas
.expect("always ready to query blob gas price for blob transactions; qed")
.into(),
)
} else {
None
};

let mut signed_tx = self
.sign_tx(tx, base_fee_per_gas, priority_fee_per_gas, blob_gas_price)
.await;

if let Some(blob_sidecar) = &tx.blob_sidecar {
Expand Down

0 comments on commit 57c5526

Please sign in to comment.