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

fix: blob fees #11029

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open

fix: blob fees #11029

wants to merge 37 commits into from

Conversation

spypsy
Copy link
Member

@spypsy spypsy commented Jan 3, 2025

fixes: #11005

@spypsy spypsy marked this pull request as ready for review January 3, 2025 13:58
Copy link
Collaborator

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

I think we still need to make a few more changes to how the price bump is computed, but this should fix the error we're seeing now in Sepolia.

Also, I'm not a fan of passing the blobs as a separate third argument in the API. I'd expect them to be part of the request object. I know you didn't introduce it though, but I'd consider changing it eventually.

yarn-project/ethereum/src/l1_tx_utils.test.ts Show resolved Hide resolved
const blobBaseFeeHex = await this.publicClient.request({ method: 'eth_blobBaseFee' });
blobBaseFee = BigInt(blobBaseFeeHex);
} catch {
// Ignore if not supported
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's at least log this as a warn. I'm worried about a scenario where the blobBaseFee request fails due to a connectivity error and we end up sending the tx with zero fee.

Comment on lines +376 to +377
const blobBaseFeeHex = await this.publicClient.request({ method: 'eth_blobBaseFee' });
blobBaseFee = BigInt(blobBaseFeeHex);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I understand we should be increasing the blob base fee to 12.5% per stall time in blocks, as we do with the base fee (see here).

Comment on lines 423 to 428
const bumpPercentage =
gasConfig.priorityFeeRetryBumpPercentage! > MIN_REPLACEMENT_BUMP_PERCENTAGE
? gasConfig.priorityFeeRetryBumpPercentage!
: MIN_REPLACEMENT_BUMP_PERCENTAGE;

blobBaseFee = (previousGasPrice.maxFeePerBlobGas * (100n + bumpPercentage)) / 100n;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we use the priorityFeeRetryBumpPercentage here? I'd expect that we just need to use the MIN_REPLACEMENT_BUMP_PERCENTAGE expected by geth (which comes from here apparently).

Also, we need to account for the current blob base fee, and do something similar to what we do for the calldata fee: use the minimum between the current chain blob base fee (bumped by 12.5% per stall time) and geth's minimum bump (10%) wrt the previous price.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks for that 🙏
I was googling to find if there was such a percentage but couldn't find it so I used this patchy solution.
I should go directly to geth code from now on

Copy link
Collaborator

Choose a reason for hiding this comment

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

I should go directly to geth code from now on

Yup. I learned that the hard way. Anything related to mempool management is out of protocol, so it depends on the clients, and is awfully undocumented.

Comment on lines +356 to +357
// Blob transactions should require more gas
expect(blobEstimate).toBeGreaterThan(baseEstimate);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious: why is this? Does eth_estimateGas return both the execution gas and the blob gas mixed up together?

Copy link
Member Author

@spypsy spypsy Jan 6, 2025

Choose a reason for hiding this comment

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

it seems in our estimateGas, we have to use prepareTransactionRequest to get a full estimation, which does increase a lot compared to estimateGas so I assumed that includes the blob gas

@spypsy spypsy force-pushed the spy/tx-utils-blobs branch from d07b6ed to e7b3f71 Compare January 6, 2025 15:13
Copy link
Collaborator

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

Good find on the blob bump being 100% instead of 10%. But note that the 100% bump is applied to all gas fields, not just maxFeePerBlobGas according to this code. In other words, if the tx has blobs, the minimum bump is 100% for the maxFeePerBlobGas, the maxFeePerGas, and the maxPriorityFeePerGas.

// calculate min blob fee based on previous attempt
const minBlobFee = (previousGasPrice.maxFeePerBlobGas * (100n + bumpPercentage)) / 100n;

// use max between current network values and min required values
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry I didn't catch this one earlier, but I believe we're missing the check to not go over gasConfig.maxGwei with the blob fee. Given we're duplicating it on every attempt, let's make sure it's in there.

@spypsy spypsy changed the title fix: bump blob fees on retries fix: blob fees Jan 9, 2025
Copy link
Contributor

Changes to public function bytecode sizes

Generated at commit: 96056bc940e328b01d9825457ec570d31a75b9d6, compared to commit: 099c17b0c83ef5c0b4368ce2167d3d5422fa0c6e

🧾 Summary (100% most significant diffs)

Program Bytecode size in bytes (+/-) %
NFT::owner_of +426 ❌ +23.36%
NFT::mint +503 ❌ +23.21%
Token::mint_to_public +379 ❌ +16.41%
TokenBlacklist::mint_public +415 ❌ +11.52%
AuthRegistry::public_dispatch +751 ❌ +10.49%
AuthWitTest::public_dispatch +149 ❌ +9.93%
Lending::public_dispatch +2,450 ❌ +9.67%
TokenBlacklist::transfer_public +500 ❌ +9.18%
Lending::get_position +389 ❌ +9.10%
Token::public_dispatch +2,596 ❌ +8.61%
TokenBlacklist::public_dispatch +1,725 ❌ +7.73%
TokenBlacklist::burn_public +379 ❌ +7.55%
TokenBlacklist::shield +392 ❌ +6.82%
StatefulTest::public_dispatch +360 ❌ +6.25%
FPC::public_dispatch +462 ❌ +6.21%
FeeJuice::public_dispatch +271 ❌ +5.85%
NFT::public_dispatch +1,334 ❌ +5.85%
AppSubscription::public_dispatch +215 ❌ +5.34%
Parent::public_dispatch +392 ❌ +5.19%
StaticParent::public_dispatch +288 ❌ +5.12%
DocsExample::public_dispatch +189 ❌ +5.03%
AvmTest::nested_call_to_nothing_recovers +13 ❌ +4.30%
Test::public_dispatch +640 ❌ +3.55%
Benchmarking::public_dispatch +120 ❌ +3.36%
AvmTest::public_dispatch +1,844 ❌ +2.90%
Uniswap::public_dispatch +612 ❌ +2.55%
TokenBridge::public_dispatch +490 ❌ +2.41%
AvmTest::keccak_hash +52 ❌ +2.21%
CardGame::public_dispatch +277 ❌ +1.87%
Test::emit_unencrypted +26 ❌ +1.79%
TestLog::public_dispatch +39 ❌ +1.73%
NFT::finalize_transfer_to_private +91 ❌ +1.71%
NFT::_finalize_transfer_to_private_unsafe +91 ❌ +1.70%
AvmTest::n_storage_writes +26 ❌ +1.60%
Token::finalize_mint_to_private +91 ❌ +1.52%
Token::_finalize_mint_to_private_unsafe +91 ❌ +1.50%
Auth::get_scheduled_authorized +26 ❌ +1.46%
Token::finalize_transfer_to_private +91 ❌ +1.43%
AvmTest::emit_unencrypted_log +39 ❌ +1.42%
Token::_finalize_transfer_to_private_unsafe +91 ❌ +1.42%
Crowdfunding::_publish_donation_receipts +13 ❌ +1.41%
AvmTest::get_args_hash +26 ❌ +1.40%
EasyPrivateVoting::public_dispatch +67 ❌ +1.40%
Auth::get_authorized +26 ❌ +1.38%
AvmTest::external_call_to_divide_by_zero_recovers +39 ❌ +1.36%
Token::complete_refund +91 ❌ +1.33%
CardGame::on_cards_claimed +91 ❌ +1.29%
Lending::get_asset +26 ❌ +1.27%
Test::create_l2_to_l1_message_public +26 ❌ +1.19%
ImportTest::public_dispatch +13 ❌ +1.17%
TestLog::emit_unencrypted_events +13 ❌ +1.15%
Lending::_deposit +26 ❌ +1.10%
Parent::public_nested_static_call +39 ❌ +1.09%
CardGame::on_game_joined +52 ❌ +1.09%
NFT::_store_payload_in_transient_storage_unsafe +13 ❌ +1.08%
Token::_store_payload_in_transient_storage_unsafe +13 ❌ +1.08%
AvmTest::pedersen_commit +13 ❌ +1.02%
AvmTest::sha256_hash +39 ❌ +1.00%
Lending::repay_public +26 ❌ +0.99%
FPC::pull_funds +26 ❌ +0.98%
FPC::constructor +26 ❌ +0.97%
TokenBridge::constructor +26 ❌ +0.95%
CardGame::on_card_played +52 ❌ +0.95%
Lending::deposit_public +26 ❌ +0.94%
Lending::init +26 ❌ +0.94%
AMM::_add_liquidity +78 ❌ +0.93%
Claim::constructor +26 ❌ +0.92%
AvmTest::pedersen_hash_with_index +26 ❌ +0.84%
AvmTest::pedersen_hash +26 ❌ +0.84%
AvmTest::poseidon2_hash +13 ❌ +0.84%
StatefulTest::increment_public_value_no_init_check +13 ❌ +0.83%
AuthRegistry::set_reject_all +13 ❌ +0.83%
Test::consume_message_from_arbitrary_sender_public +65 ❌ +0.83%
AvmTest::read_storage_map +13 ❌ +0.82%
StatefulTest::get_public_value +13 ❌ +0.81%
StatefulTest::increment_public_value +13 ❌ +0.81%
AuthRegistry::is_reject_all +13 ❌ +0.80%
AvmTest::set_storage_map +13 ❌ +0.80%
PriceFeed::get_price +13 ❌ +0.80%
Benchmarking::broadcast +13 ❌ +0.79%
CardGame::start_game +52 ❌ +0.79%
NFT::_finish_transfer_to_public +13 ❌ +0.79%
Token::set_minter +13 ❌ +0.78%
Token::is_minter +13 ❌ +0.78%
NFT::set_minter +13 ❌ +0.78%
NFT::is_minter +13 ❌ +0.78%
PriceFeed::set_price +13 ❌ +0.78%
FeeJuice::balance_of_public +13 ❌ +0.76%
AvmTest::add_storage_map +13 ❌ +0.75%
AMM::_remove_liquidity +52 ❌ +0.75%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 +52 ❌ +0.75%
TokenBlacklist::balance_of_public +13 ❌ +0.73%
Token::balance_of_public +13 ❌ +0.73%
AvmTest::returndata_copy_oracle +13 ❌ +0.73%
Claim::public_dispatch +26 ❌ +0.73%
Test::consume_mint_to_public_message +78 ❌ +0.72%
EasyPrivateVoting::add_to_tally_public +13 ❌ +0.69%
TokenBridge::claim_public +78 ❌ +0.69%
AvmInitializerTest::constructor +13 ❌ +0.68%
AMM::public_dispatch +137 ❌ +0.66%
Auth::get_authorized_delay +13 ❌ +0.65%
Lending::withdraw_public +13 ❌ +0.65%
Lending::borrow_public +13 ❌ +0.65%
FeeJuice::_increase_public_balance +13 ❌ +0.64%
FeeJuice::check_balance +13 ❌ +0.62%
StaticParent::public_nested_static_call +13 ❌ +0.60%
Lending::_withdraw +52 ❌ +0.60%
FPC::pay_refund +13 ❌ +0.60%
TokenBridge::exit_to_l1_public +39 ❌ +0.60%
Benchmarking::increment_balance +13 ❌ +0.58%
Spam::public_spam +13 ❌ +0.58%
TokenBlacklist::_increase_public_balance +13 ❌ +0.56%
Token::_increase_public_balance +13 ❌ +0.56%
Child::public_dispatch +26 ❌ +0.55%
AvmInitializerTest::public_dispatch +13 ❌ +0.49%
TokenBlacklist::get_roles +13 ❌ +0.47%
Lending::_repay +26 ❌ +0.47%
Lending::update_accumulator +26 ❌ +0.47%
PriceFeed::public_dispatch +13 ❌ +0.45%
Spam::public_dispatch +13 ❌ +0.43%
AuthRegistry::consume +13 ❌ +0.43%
AppSubscription::constructor +13 ❌ +0.42%
Uniswap::swap_public +59 ❌ +0.38%
NFT::transfer_in_public +13 ❌ +0.37%
Lending::_borrow +26 ❌ +0.36%
TokenBlacklist::mint_private +13 ❌ +0.35%
NFT::constructor +13 ❌ +0.30%
Token::constructor +13 ❌ +0.30%
Token::transfer_in_public +13 ❌ +0.29%
Crowdfunding::public_dispatch +13 ❌ +0.28%
Auth::set_authorized +13 ❌ +0.26%
Auth::set_authorized_delay +13 ❌ +0.26%
AvmTest::bulk_testing +53 ❌ +0.22%
TokenBlacklist::update_roles +13 ❌ +0.20%
TokenBlacklist::constructor +13 ❌ +0.19%
Auth::public_dispatch -64 ✅ -0.68%
AuthRegistry::is_consumable -26 ✅ -1.47%
AuthRegistry::_set_authorized -26 ✅ -1.48%
AuthRegistry::set_authorized -26 ✅ -1.52%
InclusionProofs::public_dispatch -77 ✅ -1.99%

Full diff report 👇
Program Bytecode size in bytes (+/-) %
NFT::owner_of 2,250 (+426) +23.36%
NFT::mint 2,670 (+503) +23.21%
Token::mint_to_public 2,689 (+379) +16.41%
TokenBlacklist::mint_public 4,016 (+415) +11.52%
AuthRegistry::public_dispatch 7,907 (+751) +10.49%
AuthWitTest::public_dispatch 1,650 (+149) +9.93%
Lending::public_dispatch 27,782 (+2,450) +9.67%
TokenBlacklist::transfer_public 5,949 (+500) +9.18%
Lending::get_position 4,662 (+389) +9.10%
Token::public_dispatch 32,739 (+2,596) +8.61%
TokenBlacklist::public_dispatch 24,039 (+1,725) +7.73%
TokenBlacklist::burn_public 5,401 (+379) +7.55%
TokenBlacklist::shield 6,137 (+392) +6.82%
StatefulTest::public_dispatch 6,124 (+360) +6.25%
FPC::public_dispatch 7,905 (+462) +6.21%
FeeJuice::public_dispatch 4,900 (+271) +5.85%
NFT::public_dispatch 24,129 (+1,334) +5.85%
AppSubscription::public_dispatch 4,243 (+215) +5.34%
Parent::public_dispatch 7,943 (+392) +5.19%
StaticParent::public_dispatch 5,912 (+288) +5.12%
DocsExample::public_dispatch 3,950 (+189) +5.03%
AvmTest::nested_call_to_nothing_recovers 315 (+13) +4.30%
Test::public_dispatch 18,646 (+640) +3.55%
Benchmarking::public_dispatch 3,690 (+120) +3.36%
AvmTest::public_dispatch 65,412 (+1,844) +2.90%
Uniswap::public_dispatch 24,634 (+612) +2.55%
TokenBridge::public_dispatch 20,836 (+490) +2.41%
AvmTest::keccak_hash 2,401 (+52) +2.21%
CardGame::public_dispatch 15,088 (+277) +1.87%
Test::emit_unencrypted 1,479 (+26) +1.79%
TestLog::public_dispatch 2,288 (+39) +1.73%
NFT::finalize_transfer_to_private 5,404 (+91) +1.71%
NFT::_finalize_transfer_to_private_unsafe 5,451 (+91) +1.70%
AvmTest::n_storage_writes 1,649 (+26) +1.60%
Token::finalize_mint_to_private 6,092 (+91) +1.52%
Token::_finalize_mint_to_private_unsafe 6,139 (+91) +1.50%
Auth::get_scheduled_authorized 1,811 (+26) +1.46%
Token::finalize_transfer_to_private 6,444 (+91) +1.43%
AvmTest::emit_unencrypted_log 2,777 (+39) +1.42%
Token::_finalize_transfer_to_private_unsafe 6,491 (+91) +1.42%
Crowdfunding::_publish_donation_receipts 935 (+13) +1.41%
AvmTest::get_args_hash 1,879 (+26) +1.40%
EasyPrivateVoting::public_dispatch 4,863 (+67) +1.40%
Auth::get_authorized 1,906 (+26) +1.38%
AvmTest::external_call_to_divide_by_zero_recovers 2,912 (+39) +1.36%
Token::complete_refund 6,948 (+91) +1.33%
CardGame::on_cards_claimed 7,141 (+91) +1.29%
Lending::get_asset 2,079 (+26) +1.27%
Test::create_l2_to_l1_message_public 2,210 (+26) +1.19%
ImportTest::public_dispatch 1,126 (+13) +1.17%
TestLog::emit_unencrypted_events 1,144 (+13) +1.15%
Lending::_deposit 2,398 (+26) +1.10%
Parent::public_nested_static_call 3,612 (+39) +1.09%
CardGame::on_game_joined 4,844 (+52) +1.09%
NFT::_store_payload_in_transient_storage_unsafe 1,215 (+13) +1.08%
Token::_store_payload_in_transient_storage_unsafe 1,215 (+13) +1.08%
AvmTest::pedersen_commit 1,284 (+13) +1.02%
AvmTest::sha256_hash 3,927 (+39) +1.00%
Lending::repay_public 2,659 (+26) +0.99%
FPC::pull_funds 2,677 (+26) +0.98%
FPC::constructor 2,711 (+26) +0.97%
TokenBridge::constructor 2,750 (+26) +0.95%
CardGame::on_card_played 5,541 (+52) +0.95%
Lending::deposit_public 2,789 (+26) +0.94%
Lending::init 2,789 (+26) +0.94%
AMM::_add_liquidity 8,483 (+78) +0.93%
Claim::constructor 2,846 (+26) +0.92%
AvmTest::pedersen_hash_with_index 3,103 (+26) +0.84%
AvmTest::pedersen_hash 3,103 (+26) +0.84%
AvmTest::poseidon2_hash 1,561 (+13) +0.84%
StatefulTest::increment_public_value_no_init_check 1,577 (+13) +0.83%
AuthRegistry::set_reject_all 1,582 (+13) +0.83%
Test::consume_message_from_arbitrary_sender_public 7,925 (+65) +0.83%
AvmTest::read_storage_map 1,590 (+13) +0.82%
StatefulTest::get_public_value 1,616 (+13) +0.81%
StatefulTest::increment_public_value 1,626 (+13) +0.81%
AuthRegistry::is_reject_all 1,631 (+13) +0.80%
AvmTest::set_storage_map 1,635 (+13) +0.80%
PriceFeed::get_price 1,641 (+13) +0.80%
Benchmarking::broadcast 1,650 (+13) +0.79%
CardGame::start_game 6,613 (+52) +0.79%
NFT::_finish_transfer_to_public 1,666 (+13) +0.79%
Token::set_minter 1,679 (+13) +0.78%
Token::is_minter 1,680 (+13) +0.78%
NFT::set_minter 1,684 (+13) +0.78%
NFT::is_minter 1,685 (+13) +0.78%
PriceFeed::set_price 1,685 (+13) +0.78%
FeeJuice::balance_of_public 1,729 (+13) +0.76%
AvmTest::add_storage_map 1,737 (+13) +0.75%
AMM::_remove_liquidity 6,963 (+52) +0.75%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 6,976 (+52) +0.75%
TokenBlacklist::balance_of_public 1,783 (+13) +0.73%
Token::balance_of_public 1,783 (+13) +0.73%
AvmTest::returndata_copy_oracle 1,793 (+13) +0.73%
Claim::public_dispatch 3,611 (+26) +0.73%
Test::consume_mint_to_public_message 10,886 (+78) +0.72%
EasyPrivateVoting::add_to_tally_public 1,889 (+13) +0.69%
TokenBridge::claim_public 11,406 (+78) +0.69%
AvmInitializerTest::constructor 1,923 (+13) +0.68%
AMM::public_dispatch 20,979 (+137) +0.66%
Auth::get_authorized_delay 2,009 (+13) +0.65%
Lending::withdraw_public 2,011 (+13) +0.65%
Lending::borrow_public 2,011 (+13) +0.65%
FeeJuice::_increase_public_balance 2,055 (+13) +0.64%
FeeJuice::check_balance 2,102 (+13) +0.62%
StaticParent::public_nested_static_call 2,163 (+13) +0.60%
Lending::_withdraw 8,667 (+52) +0.60%
FPC::pay_refund 2,171 (+13) +0.60%
TokenBridge::exit_to_l1_public 6,573 (+39) +0.60%
Benchmarking::increment_balance 2,238 (+13) +0.58%
Spam::public_spam 2,260 (+13) +0.58%
TokenBlacklist::_increase_public_balance 2,314 (+13) +0.56%
Token::_increase_public_balance 2,314 (+13) +0.56%
Child::public_dispatch 4,779 (+26) +0.55%
AvmInitializerTest::public_dispatch 2,681 (+13) +0.49%
TokenBlacklist::get_roles 2,756 (+13) +0.47%
Lending::_repay 5,522 (+26) +0.47%
Lending::update_accumulator 5,573 (+26) +0.47%
PriceFeed::public_dispatch 2,895 (+13) +0.45%
Spam::public_dispatch 3,041 (+13) +0.43%
AuthRegistry::consume 3,062 (+13) +0.43%
AppSubscription::constructor 3,100 (+13) +0.42%
Uniswap::swap_public 15,584 (+59) +0.38%
NFT::transfer_in_public 3,571 (+13) +0.37%
Lending::_borrow 7,269 (+26) +0.36%
TokenBlacklist::mint_private 3,767 (+13) +0.35%
NFT::constructor 4,304 (+13) +0.30%
Token::constructor 4,379 (+13) +0.30%
Token::transfer_in_public 4,451 (+13) +0.29%
Crowdfunding::public_dispatch 4,620 (+13) +0.28%
Auth::set_authorized 4,966 (+13) +0.26%
Auth::set_authorized_delay 5,062 (+13) +0.26%
AvmTest::bulk_testing 23,859 (+53) +0.22%
TokenBlacklist::update_roles 6,572 (+13) +0.20%
TokenBlacklist::constructor 6,839 (+13) +0.19%
Auth::public_dispatch 9,397 (-64) -0.68%
AuthRegistry::is_consumable 1,740 (-26) -1.47%
AuthRegistry::_set_authorized 1,733 (-26) -1.48%
AuthRegistry::set_authorized 1,686 (-26) -1.52%
InclusionProofs::public_dispatch 3,802 (-77) -1.99%

Copy link
Contributor

Changes to circuit sizes

Generated at commit: 96056bc940e328b01d9825457ec570d31a75b9d6, compared to commit: 099c17b0c83ef5c0b4368ce2167d3d5422fa0c6e

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_base_private +393,703 ❌ +240.96% +431,679 ❌ +24.10%
rollup_base_public +445,650 ❌ +110.37% +488,321 ❌ +14.98%
private_kernel_init +5,333 ❌ +23.57% +6,178 ❌ +14.57%
private_kernel_inner +7,715 ❌ +20.01% +8,219 ❌ +10.16%
private_kernel_tail_to_public +2,113 ❌ +14.86% +2,565 ❌ +6.35%
rollup_block_root +135,247 ❌ +23.16% +174,214 ❌ +4.14%
private_kernel_reset_0_0_64_0_0_0_0_0_0 +589 ❌ +4.70% +604 ❌ +1.66%
private_kernel_reset_64_0_0_0_0_0_0_0_0 +589 ❌ +4.70% +604 ❌ +1.66%
private_kernel_tail +150 ❌ +3.02% +166 ❌ +0.61%
rollup_block_merge +7,118 ❌ +22.69% +7,621 ❌ +0.39%
private_kernel_reset_32_4_32_4_4_4_64_64_32 +3,499 ❌ +7.94% +372 ❌ +0.27%
private_kernel_reset_0_0_0_0_64_0_0_0_0 +206 ❌ +1.36% +253 ❌ +0.26%
private_kernel_reset_0_64_0_0_0_0_0_0_0 +589 ❌ +2.00% +604 ❌ +0.23%
private_kernel_reset_0_0_0_64_0_0_0_0_0 +589 ❌ +1.91% +604 ❌ +0.22%
private_kernel_reset_32_16_32_4_4_4_64_64_32 +3,499 ❌ +7.34% +372 ❌ +0.21%
private_kernel_reset_32_4_32_16_4_4_64_64_32 +3,499 ❌ +7.31% +372 ❌ +0.21%
private_kernel_reset_32_16_32_16_4_4_64_64_32 +3,499 ❌ +6.80% +372 ❌ +0.17%
private_kernel_reset_32_4_32_4_4_4_64_64_4 +3,331 ❌ +8.32% +162 ❌ +0.12%
private_kernel_reset_32_4_32_4_4_4_4_64_32 +3,319 ❌ +7.98% +146 ❌ +0.12%
private_kernel_reset_32_4_32_4_4_4_64_4_32 +3,319 ❌ +7.86% +146 ❌ +0.11%
private_kernel_reset_32_16_32_4_4_4_64_64_4 +3,331 ❌ +7.64% +162 ❌ +0.09%
private_kernel_reset_32_4_32_16_4_4_64_64_4 +3,331 ❌ +7.60% +162 ❌ +0.09%
private_kernel_reset_32_16_32_4_4_4_4_64_32 +3,319 ❌ +7.34% +146 ❌ +0.09%
private_kernel_reset_32_4_32_16_4_4_4_64_32 +3,319 ❌ +7.30% +146 ❌ +0.09%
private_kernel_reset_32_16_32_4_4_4_64_4_32 +3,319 ❌ +7.25% +146 ❌ +0.08%
private_kernel_reset_32_4_32_16_4_4_64_4_32 +3,319 ❌ +7.21% +146 ❌ +0.08%
private_kernel_reset_32_16_32_16_4_4_64_64_4 +3,331 ❌ +7.02% +162 ❌ +0.07%
private_kernel_reset_32_16_32_16_4_4_4_64_32 +3,319 ❌ +6.77% +146 ❌ +0.07%
private_kernel_reset_32_16_32_16_4_4_64_4_32 +3,319 ❌ +6.69% +146 ❌ +0.07%
parity_base +18 ❌ +0.51% +20 ❌ +0.07%
rollup_root +7,118 ❌ +22.70% +7,623 ❌ +0.05%
rollup_merge +13 ❌ +0.72% +15 ❌ +0.00%
parity_root +18 ❌ +0.42% +20 ❌ +0.00%
private_kernel_reset_32_16_32_16_4_4_64_4_4 +3,151 ❌ +6.91% -63 ✅ -0.03%
private_kernel_reset_32_16_32_16_4_4_4_64_4 +3,151 ❌ +7.00% -63 ✅ -0.03%
private_kernel_reset_32_4_32_16_4_4_64_4_4 +3,151 ❌ +7.50% -63 ✅ -0.04%
private_kernel_reset_32_16_32_4_4_4_64_4_4 +3,151 ❌ +7.55% -63 ✅ -0.04%
private_kernel_reset_32_16_32_16_4_4_4_4_32 +3,139 ❌ +6.65% -78 ✅ -0.04%
private_kernel_reset_32_4_32_16_4_4_4_64_4 +3,151 ❌ +7.61% -63 ✅ -0.04%
private_kernel_reset_32_16_32_4_4_4_4_64_4 +3,151 ❌ +7.66% -63 ✅ -0.04%
private_kernel_reset_32_4_32_16_4_4_4_4_32 +3,139 ❌ +7.20% -78 ✅ -0.05%
private_kernel_reset_32_16_32_4_4_4_4_4_32 +3,139 ❌ +7.24% -78 ✅ -0.05%
private_kernel_reset_32_4_32_4_4_4_64_4_4 +3,151 ❌ +8.25% -63 ✅ -0.05%
private_kernel_reset_32_4_32_4_4_4_4_64_4 +3,151 ❌ +8.39% -63 ✅ -0.06%
private_kernel_reset_16_16_16_16_16_16_16_16_16 +3,196 ❌ +6.86% -127 ✅ -0.06%
private_kernel_reset_32_32_32_32_32_32_32_32_32 +3,400 ❌ +5.31% -216 ✅ -0.06%
private_kernel_reset_32_4_32_4_4_4_4_4_32 +3,139 ❌ +7.90% -78 ✅ -0.07%
private_kernel_reset_32_16_32_16_4_4_4_4_4 +2,971 ❌ +6.89% -288 ✅ -0.15%
private_kernel_reset_32_4_32_16_4_4_4_4_4 +2,971 ❌ +7.51% -288 ✅ -0.19%
private_kernel_reset_32_16_32_4_4_4_4_4_4 +2,971 ❌ +7.56% -288 ✅ -0.19%
private_kernel_reset +3,332 ❌ +3.53% -1,610 ✅ -0.25%
private_kernel_reset_32_4_32_4_4_4_4_4_4 +2,971 ❌ +8.32% -288 ✅ -0.27%
private_kernel_reset_4_4_4_4_4_4_4_4_4 +2,971 ❌ +8.83% -288 ✅ -0.27%
private_kernel_reset_0_0_0_0_0_64_0_0_0 +1,010 ❌ +3.51% -4,250 ✅ -6.63%
rollup_block_root_empty -1,064 ✅ -51.80% -875,967 ✅ -99.49%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_base_private 557,093 (+393,703) +240.96% 2,222,741 (+431,679) +24.10%
rollup_base_public 849,413 (+445,650) +110.37% 3,749,002 (+488,321) +14.98%
private_kernel_init 27,955 (+5,333) +23.57% 48,587 (+6,178) +14.57%
private_kernel_inner 46,279 (+7,715) +20.01% 89,088 (+8,219) +10.16%
private_kernel_tail_to_public 16,335 (+2,113) +14.86% 42,934 (+2,565) +6.35%
rollup_block_root 719,214 (+135,247) +23.16% 4,379,531 (+174,214) +4.14%
private_kernel_reset_0_0_64_0_0_0_0_0_0 13,114 (+589) +4.70% 36,896 (+604) +1.66%
private_kernel_reset_64_0_0_0_0_0_0_0_0 13,114 (+589) +4.70% 36,896 (+604) +1.66%
private_kernel_tail 5,123 (+150) +3.02% 27,276 (+166) +0.61%
rollup_block_merge 38,484 (+7,118) +22.69% 1,962,780 (+7,621) +0.39%
private_kernel_reset_32_4_32_4_4_4_64_64_32 47,571 (+3,499) +7.94% 136,827 (+372) +0.27%
private_kernel_reset_0_0_0_0_64_0_0_0_0 15,344 (+206) +1.36% 97,090 (+253) +0.26%
private_kernel_reset_0_64_0_0_0_0_0_0_0 30,010 (+589) +2.00% 262,750 (+604) +0.23%
private_kernel_reset_0_0_0_64_0_0_0_0_0 31,356 (+589) +1.91% 274,496 (+604) +0.22%
private_kernel_reset_32_16_32_4_4_4_64_64_32 51,159 (+3,499) +7.34% 179,613 (+372) +0.21%
private_kernel_reset_32_4_32_16_4_4_64_64_32 51,395 (+3,499) +7.31% 181,775 (+372) +0.21%
private_kernel_reset_32_16_32_16_4_4_64_64_32 54,983 (+3,499) +6.80% 224,561 (+372) +0.17%
private_kernel_reset_32_4_32_4_4_4_64_64_4 43,362 (+3,331) +8.32% 130,804 (+162) +0.12%
private_kernel_reset_32_4_32_4_4_4_4_64_32 44,933 (+3,319) +7.98% 120,493 (+146) +0.12%
private_kernel_reset_32_4_32_4_4_4_64_4_32 45,534 (+3,319) +7.86% 130,036 (+146) +0.11%
private_kernel_reset_32_16_32_4_4_4_64_64_4 46,950 (+3,331) +7.64% 173,590 (+162) +0.09%
private_kernel_reset_32_4_32_16_4_4_64_64_4 47,186 (+3,331) +7.60% 175,752 (+162) +0.09%
private_kernel_reset_32_16_32_4_4_4_4_64_32 48,521 (+3,319) +7.34% 163,279 (+146) +0.09%
private_kernel_reset_32_4_32_16_4_4_4_64_32 48,757 (+3,319) +7.30% 165,441 (+146) +0.09%
private_kernel_reset_32_16_32_4_4_4_64_4_32 49,122 (+3,319) +7.25% 172,822 (+146) +0.08%
private_kernel_reset_32_4_32_16_4_4_64_4_32 49,358 (+3,319) +7.21% 174,984 (+146) +0.08%
private_kernel_reset_32_16_32_16_4_4_64_64_4 50,774 (+3,331) +7.02% 218,538 (+162) +0.07%
private_kernel_reset_32_16_32_16_4_4_4_64_32 52,345 (+3,319) +6.77% 208,227 (+146) +0.07%
private_kernel_reset_32_16_32_16_4_4_64_4_32 52,946 (+3,319) +6.69% 217,770 (+146) +0.07%
parity_base 3,557 (+18) +0.51% 29,954 (+20) +0.07%
rollup_root 38,468 (+7,118) +22.70% 14,601,781 (+7,623) +0.05%
rollup_merge 1,821 (+13) +0.72% 1,800,379 (+15) +0.00%
parity_root 4,290 (+18) +0.42% 3,487,877 (+20) +0.00%
private_kernel_reset_32_16_32_16_4_4_64_4_4 48,737 (+3,151) +6.91% 211,747 (-63) -0.03%
private_kernel_reset_32_16_32_16_4_4_4_64_4 48,136 (+3,151) +7.00% 202,204 (-63) -0.03%
private_kernel_reset_32_4_32_16_4_4_64_4_4 45,149 (+3,151) +7.50% 168,961 (-63) -0.04%
private_kernel_reset_32_16_32_4_4_4_64_4_4 44,913 (+3,151) +7.55% 166,799 (-63) -0.04%
private_kernel_reset_32_16_32_16_4_4_4_4_32 50,308 (+3,139) +6.65% 201,437 (-78) -0.04%
private_kernel_reset_32_4_32_16_4_4_4_64_4 44,548 (+3,151) +7.61% 159,418 (-63) -0.04%
private_kernel_reset_32_16_32_4_4_4_4_64_4 44,312 (+3,151) +7.66% 157,256 (-63) -0.04%
private_kernel_reset_32_4_32_16_4_4_4_4_32 46,720 (+3,139) +7.20% 158,651 (-78) -0.05%
private_kernel_reset_32_16_32_4_4_4_4_4_32 46,484 (+3,139) +7.24% 156,489 (-78) -0.05%
private_kernel_reset_32_4_32_4_4_4_64_4_4 41,325 (+3,151) +8.25% 124,013 (-63) -0.05%
private_kernel_reset_32_4_32_4_4_4_4_64_4 40,724 (+3,151) +8.39% 114,470 (-63) -0.06%
private_kernel_reset_16_16_16_16_16_16_16_16_16 49,811 (+3,196) +6.86% 214,450 (-127) -0.06%
private_kernel_reset_32_32_32_32_32_32_32_32_32 67,396 (+3,400) +5.31% 360,369 (-216) -0.06%
private_kernel_reset_32_4_32_4_4_4_4_4_32 42,896 (+3,139) +7.90% 113,703 (-78) -0.07%
private_kernel_reset_32_16_32_16_4_4_4_4_4 46,099 (+2,971) +6.89% 195,413 (-288) -0.15%
private_kernel_reset_32_4_32_16_4_4_4_4_4 42,511 (+2,971) +7.51% 152,627 (-288) -0.19%
private_kernel_reset_32_16_32_4_4_4_4_4_4 42,275 (+2,971) +7.56% 150,465 (-288) -0.19%
private_kernel_reset 97,779 (+3,332) +3.53% 645,994 (-1,610) -0.25%
private_kernel_reset_32_4_32_4_4_4_4_4_4 38,687 (+2,971) +8.32% 107,679 (-288) -0.27%
private_kernel_reset_4_4_4_4_4_4_4_4_4 36,615 (+2,971) +8.83% 105,005 (-288) -0.27%
private_kernel_reset_0_0_0_0_0_64_0_0_0 29,821 (+1,010) +3.51% 59,894 (-4,250) -6.63%
rollup_block_root_empty 990 (-1,064) -51.80% 4,508 (-875,967) -99.49%

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.

Tx fees need to account for blobs
2 participants