aztec-packages icon indicating copy to clipboard operation
aztec-packages copied to clipboard

draft: eccvm translator zk sumcheck

Open iakovenkos opened this issue 1 year ago โ€ข 2 comments

Please read contributing guidelines and remove this line.

iakovenkos avatar Oct 11 '24 16:10 iakovenkos

Changes to public function bytecode sizes

Generated at commit: b7e7dae79b6b09f4556a6395a46efb2b58424312, compared to commit: 3a1a62cb84dc9457b58104e01ac358a2820159cb

๐Ÿงพ Summary (100% most significant diffs)

Program Bytecode size in bytes (+/-) %
Uniswap::swap_public +1,973 โŒ +16.01%
AvmTest::pedersen_hash +286 โŒ +10.44%
AvmTest::pedersen_hash_with_index +286 โŒ +10.44%
AvmTest::sha256_hash +245 โŒ +9.13%
Parent::public_nested_static_call +270 โŒ +7.91%
Test::create_l2_to_l1_message_public +140 โŒ +7.53%
Uniswap::public_dispatch +1,499 โŒ +6.81%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 +321 โŒ +6.00%
TokenBridge::exit_to_l1_public +251 โŒ +3.87%
Parent::public_dispatch +264 โŒ +3.40%
Lending::_borrow +227 โŒ +3.20%
Lending::_withdraw +227 โŒ +3.17%
Lending::public_dispatch +767 โŒ +3.12%
TokenBridge::claim_public +291 โŒ +3.03%
Test::public_dispatch +490 โŒ +2.93%
Test::consume_mint_public_message +242 โŒ +2.91%
Test::consume_message_from_arbitrary_sender_public +147 โŒ +2.32%
AvmTest::keccak_f1600 +7 โŒ +1.52%
TokenBridge::public_dispatch +268 โŒ +1.38%
AvmTest::bulk_testing +141 โŒ +0.60%
CardGame::on_cards_claimed +26 โŒ +0.39%
AvmTest::keccak_hash +7 โŒ +0.27%
AvmTest::public_dispatch +135 โŒ +0.25%
NFT::finalize_transfer_to_private +9 โŒ +0.17%
Child::public_dispatch -8 โœ… -0.15%
TestLog::emit_unencrypted_events -4 โœ… -0.24%
StaticChild::public_dispatch -8 โœ… -0.29%
Router::public_dispatch -8 โœ… -0.29%
DocsExample::public_dispatch -16 โœ… -0.32%
AuthWitTest::public_dispatch -8 โœ… -0.39%
TokenBlacklist::public_dispatch -202 โœ… -0.82%
CardGame::public_dispatch -131 โœ… -0.89%
TokenBlacklist::update_roles -64 โœ… -0.91%
Auth::public_dispatch -106 โœ… -0.99%
NFT::public_dispatch -219 โœ… -1.02%
StaticParent::public_dispatch -58 โœ… -1.02%
Token::public_dispatch -293 โœ… -1.06%
AuthRegistry::public_dispatch -88 โœ… -1.14%
Auth::set_authorized -64 โœ… -1.17%
Auth::set_authorized_delay -64 โœ… -1.18%
TokenBlacklist::constructor -98 โœ… -1.21%
TokenBlacklist::transfer_public -81 โœ… -1.34%
Token::transfer_public -64 โœ… -1.38%
Token::burn_public -64 โœ… -1.41%
TokenBlacklist::burn_public -81 โœ… -1.44%
TokenBlacklist::mint_public -64 โœ… -1.53%
Lending::_repay -81 โœ… -1.56%
FPC::public_dispatch -148 โœ… -1.60%
FeeJuice::public_dispatch -97 โœ… -1.70%
Lending::get_position -81 โœ… -1.72%
Crowdfunding::public_dispatch -114 โœ… -1.75%
Token::constructor -98 โœ… -1.76%
TestLog::public_dispatch -55 โœ… -1.83%
NFT::constructor -98 โœ… -1.88%
AppSubscription::public_dispatch -106 โœ… -1.94%
ImportTest::public_dispatch -34 โœ… -2.05%
AuthRegistry::consume -64 โœ… -2.20%
Lending::update_accumulator -120 โœ… -2.29%
EasyPrivateVoting::public_dispatch -148 โœ… -2.31%
AppSubscription::constructor -98 โœ… -2.33%
Crowdfunding::init -98 โœ… -2.41%
StatefulTest::public_dispatch -192 โœ… -2.43%
Benchmarking::public_dispatch -123 โœ… -2.54%
TokenBlacklist::shield -157 โœ… -2.54%
AvmInitializerTest::public_dispatch -98 โœ… -2.54%
Token::mint_public -81 โœ… -2.55%
TokenBlacklist::get_roles -64 โœ… -2.57%
Spam::public_dispatch -89 โœ… -2.59%
CardGame::start_game -162 โœ… -2.59%
EasyPrivateVoting::constructor -98 โœ… -2.60%
NFT::mint -81 โœ… -2.70%
Auth::constructor -98 โœ… -2.70%
Benchmarking::increment_balance -81 โœ… -2.71%
FPC::constructor -98 โœ… -2.72%
Uniswap::constructor -98 โœ… -2.72%
Token::shield -140 โœ… -2.76%
AvmTest::test_get_contract_instance -34 โœ… -2.83%
Lending::init -81 โœ… -2.84%
NFT::transfer_in_public -108 โœ… -2.97%
AvmInitializerTest::constructor -98 โœ… -3.13%
TokenBlacklist::_increase_public_balance -81 โœ… -3.19%
Token::_increase_public_balance -81 โœ… -3.19%
Token::complete_refund -91 โœ… -3.23%
Spam::public_spam -81 โœ… -3.24%
NFT::owner_of -81 โœ… -3.26%
Claim::public_dispatch -156 โœ… -3.29%
PriceFeed::public_dispatch -123 โœ… -3.37%
FeeJuice::_increase_public_balance -81 โœ… -3.49%
Token::assert_minter_and_mint -81 โœ… -3.53%
Lending::_deposit -81 โœ… -3.54%
StatefulTest::public_constructor -142 โœ… -3.57%
EasyPrivateVoting::add_to_tally_public -81 โœ… -3.58%
FeeJuice::check_balance -81 โœ… -3.77%
Auth::get_authorized_delay -81 โœ… -3.81%
CardGame::on_game_joined -173 โœ… -3.85%
Claim::constructor -148 โœ… -3.88%
TokenBridge::constructor -148 โœ… -3.90%
CardGame::on_card_played -215 โœ… -4.07%
Lending::get_asset -81 โœ… -4.10%
InclusionProofs::public_dispatch -197 โœ… -4.22%
AuthRegistry::is_consumable -81 โœ… -4.23%
InclusionProofs::constructor -137 โœ… -4.26%
PrivateFPC::public_dispatch -200 โœ… -4.33%
TokenBlacklist::balance_of_public -81 โœ… -4.34%
Token::balance_of_public -81 โœ… -4.34%
AuthRegistry::_set_authorized -81 โœ… -4.42%
FeeJuice::balance_of_public -81 โœ… -4.42%
Auth::get_authorized -81 โœ… -4.44%
AuthRegistry::set_authorized -81 โœ… -4.48%
NFT::is_minter -81 โœ… -4.53%
Token::is_minter -81 โœ… -4.53%
Benchmarking::broadcast -81 โœ… -4.53%
TokenBlacklist::mint_private -179 โœ… -4.54%
PriceFeed::get_price -81 โœ… -4.57%
AvmTest::set_storage_map -81 โœ… -4.60%
AuthRegistry::is_reject_all -81 โœ… -4.61%
StatefulTest::get_public_value -81 โœ… -4.64%
AvmTest::read_storage_map -81 โœ… -4.67%
PriceFeed::set_price -81 โœ… -4.67%
Auth::get_scheduled_authorized -81 โœ… -4.68%
NFT::_finish_transfer_to_public -81 โœ… -4.78%
TokenBlacklist::_reduce_total_supply -44 โœ… -4.78%
AuthRegistry::set_reject_all -81 โœ… -4.90%
AvmTest::get_args_hash -81 โœ… -4.92%
AvmTest::poseidon2_hash -81 โœ… -5.15%
PrivateFPC::constructor -192 โœ… -5.19%
Token::_reduce_total_supply -49 โœ… -5.29%
AvmTest::elliptic_curve_add_and_double -37 โœ… -5.64%
Child::set_value_twice_with_nested_last -54 โœ… -5.84%
Child::set_value_twice_with_nested_first -54 โœ… -5.84%
AvmTest::add_storage_map -125 โœ… -5.97%
DocsExample::initialize_shared_immutable -49 โœ… -6.09%
DocsExample::initialize_public_immutable -49 โœ… -6.09%
Token::set_minter -120 โœ… -6.15%
Token::mint_private -196 โœ… -6.21%
StatefulTest::increment_public_value -120 โœ… -6.25%
StatefulTest::increment_public_value_no_init_check -120 โœ… -6.35%
NFT::set_minter -125 โœ… -6.39%
Child::pub_inc_value_internal -49 โœ… -6.77%
StaticChild::pub_illegal_inc_value -49 โœ… -6.82%
AvmTest::elliptic_curve_add -37 โœ… -6.99%
Child::pub_inc_value -49 โœ… -7.01%
StaticChild::pub_inc_value -49 โœ… -7.01%
NFT::set_admin -49 โœ… -7.37%
Token::set_admin -49 โœ… -7.37%
EasyPrivateVoting::end_vote -49 โœ… -7.38%
AvmTest::set_read_storage_single -49 โœ… -7.88%

Full diff report ๐Ÿ‘‡
Program Bytecode size in bytes (+/-) %
Uniswap::swap_public 14,297ย (+1,973) +16.01%
AvmTest::pedersen_hash 3,026ย (+286) +10.44%
AvmTest::pedersen_hash_with_index 3,026ย (+286) +10.44%
AvmTest::sha256_hash 2,929ย (+245) +9.13%
Parent::public_nested_static_call 3,682ย (+270) +7.91%
Test::create_l2_to_l1_message_public 2,000ย (+140) +7.53%
Uniswap::public_dispatch 23,506ย (+1,499) +6.81%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 5,674ย (+321) +6.00%
TokenBridge::exit_to_l1_public 6,738ย (+251) +3.87%
Parent::public_dispatch 8,021ย (+264) +3.40%
Lending::_borrow 7,321ย (+227) +3.20%
Lending::_withdraw 7,377ย (+227) +3.17%
Lending::public_dispatch 25,384ย (+767) +3.12%
TokenBridge::claim_public 9,899ย (+291) +3.03%
Test::public_dispatch 17,228ย (+490) +2.93%
Test::consume_mint_public_message 8,553ย (+242) +2.91%
Test::consume_message_from_arbitrary_sender_public 6,491ย (+147) +2.32%
AvmTest::keccak_f1600 467ย (+7) +1.52%
TokenBridge::public_dispatch 19,686ย (+268) +1.38%
AvmTest::bulk_testing 23,832ย (+141) +0.60%
CardGame::on_cards_claimed 6,676ย (+26) +0.39%
AvmTest::keccak_hash 2,555ย (+7) +0.27%
AvmTest::public_dispatch 54,100ย (+135) +0.25%
NFT::finalize_transfer_to_private 5,236ย (+9) +0.17%
Child::public_dispatch 5,383ย (-8) -0.15%
TestLog::emit_unencrypted_events 1,680ย (-4) -0.24%
StaticChild::public_dispatch 2,763ย (-8) -0.29%
Router::public_dispatch 2,719ย (-8) -0.29%
DocsExample::public_dispatch 5,003ย (-16) -0.32%
AuthWitTest::public_dispatch 2,034ย (-8) -0.39%
TokenBlacklist::public_dispatch 24,383ย (-202) -0.82%
CardGame::public_dispatch 14,659ย (-131) -0.89%
TokenBlacklist::update_roles 6,950ย (-64) -0.91%
Auth::public_dispatch 10,613ย (-106) -0.99%
NFT::public_dispatch 21,309ย (-219) -1.02%
StaticParent::public_dispatch 5,612ย (-58) -1.02%
Token::public_dispatch 27,254ย (-293) -1.06%
AuthRegistry::public_dispatch 7,657ย (-88) -1.14%
Auth::set_authorized 5,429ย (-64) -1.17%
Auth::set_authorized_delay 5,349ย (-64) -1.18%
TokenBlacklist::constructor 7,984ย (-98) -1.21%
TokenBlacklist::transfer_public 5,955ย (-81) -1.34%
Token::transfer_public 4,582ย (-64) -1.38%
Token::burn_public 4,475ย (-64) -1.41%
TokenBlacklist::burn_public 5,553ย (-81) -1.44%
TokenBlacklist::mint_public 4,114ย (-64) -1.53%
Lending::_repay 5,108ย (-81) -1.56%
FPC::public_dispatch 9,121ย (-148) -1.60%
FeeJuice::public_dispatch 5,604ย (-97) -1.70%
Lending::get_position 4,637ย (-81) -1.72%
Crowdfunding::public_dispatch 6,384ย (-114) -1.75%
Token::constructor 5,456ย (-98) -1.76%
TestLog::public_dispatch 2,953ย (-55) -1.83%
NFT::constructor 5,113ย (-98) -1.88%
AppSubscription::public_dispatch 5,363ย (-106) -1.94%
ImportTest::public_dispatch 1,627ย (-34) -2.05%
AuthRegistry::consume 2,849ย (-64) -2.20%
Lending::update_accumulator 5,115ย (-120) -2.29%
EasyPrivateVoting::public_dispatch 6,251ย (-148) -2.31%
AppSubscription::constructor 4,113ย (-98) -2.33%
Crowdfunding::init 3,966ย (-98) -2.41%
StatefulTest::public_dispatch 7,721ย (-192) -2.43%
Benchmarking::public_dispatch 4,723ย (-123) -2.54%
TokenBlacklist::shield 6,018ย (-157) -2.54%
AvmInitializerTest::public_dispatch 3,756ย (-98) -2.54%
Token::mint_public 3,098ย (-81) -2.55%
TokenBlacklist::get_roles 2,430ย (-64) -2.57%
Spam::public_dispatch 3,347ย (-89) -2.59%
CardGame::start_game 6,086ย (-162) -2.59%
EasyPrivateVoting::constructor 3,674ย (-98) -2.60%
NFT::mint 2,920ย (-81) -2.70%
Auth::constructor 3,531ย (-98) -2.70%
Benchmarking::increment_balance 2,912ย (-81) -2.71%
FPC::constructor 3,511ย (-98) -2.72%
Uniswap::constructor 3,511ย (-98) -2.72%
Token::shield 4,935ย (-140) -2.76%
AvmTest::test_get_contract_instance 1,168ย (-34) -2.83%
Lending::init 2,774ย (-81) -2.84%
NFT::transfer_in_public 3,531ย (-108) -2.97%
AvmInitializerTest::constructor 3,030ย (-98) -3.13%
TokenBlacklist::_increase_public_balance 2,460ย (-81) -3.19%
Token::_increase_public_balance 2,460ย (-81) -3.19%
Token::complete_refund 2,729ย (-91) -3.23%
Spam::public_spam 2,422ย (-81) -3.24%
NFT::owner_of 2,401ย (-81) -3.26%
Claim::public_dispatch 4,585ย (-156) -3.29%
PriceFeed::public_dispatch 3,528ย (-123) -3.37%
FeeJuice::_increase_public_balance 2,241ย (-81) -3.49%
Token::assert_minter_and_mint 2,215ย (-81) -3.53%
Lending::_deposit 2,209ย (-81) -3.54%
StatefulTest::public_constructor 3,832ย (-142) -3.57%
EasyPrivateVoting::add_to_tally_public 2,184ย (-81) -3.58%
FeeJuice::check_balance 2,068ย (-81) -3.77%
Auth::get_authorized_delay 2,046ย (-81) -3.81%
CardGame::on_game_joined 4,322ย (-173) -3.85%
Claim::constructor 3,671ย (-148) -3.88%
TokenBridge::constructor 3,650ย (-148) -3.90%
CardGame::on_card_played 5,070ย (-215) -4.07%
Lending::get_asset 1,893ย (-81) -4.10%
InclusionProofs::public_dispatch 4,476ย (-197) -4.22%
AuthRegistry::is_consumable 1,833ย (-81) -4.23%
InclusionProofs::constructor 3,080ย (-137) -4.26%
PrivateFPC::public_dispatch 4,417ย (-200) -4.33%
TokenBlacklist::balance_of_public 1,785ย (-81) -4.34%
Token::balance_of_public 1,785ย (-81) -4.34%
AuthRegistry::_set_authorized 1,752ย (-81) -4.42%
FeeJuice::balance_of_public 1,752ย (-81) -4.42%
Auth::get_authorized 1,742ย (-81) -4.44%
AuthRegistry::set_authorized 1,726ย (-81) -4.48%
NFT::is_minter 1,708ย (-81) -4.53%
Token::is_minter 1,708ย (-81) -4.53%
Benchmarking::broadcast 1,706ย (-81) -4.53%
TokenBlacklist::mint_private 3,761ย (-179) -4.54%
PriceFeed::get_price 1,693ย (-81) -4.57%
AvmTest::set_storage_map 1,678ย (-81) -4.60%
AuthRegistry::is_reject_all 1,675ย (-81) -4.61%
StatefulTest::get_public_value 1,665ย (-81) -4.64%
AvmTest::read_storage_map 1,655ย (-81) -4.67%
PriceFeed::set_price 1,653ย (-81) -4.67%
Auth::get_scheduled_authorized 1,650ย (-81) -4.68%
NFT::_finish_transfer_to_public 1,615ย (-81) -4.78%
TokenBlacklist::_reduce_total_supply 877ย (-44) -4.78%
AuthRegistry::set_reject_all 1,573ย (-81) -4.90%
AvmTest::get_args_hash 1,566ย (-81) -4.92%
AvmTest::poseidon2_hash 1,492ย (-81) -5.15%
PrivateFPC::constructor 3,508ย (-192) -5.19%
Token::_reduce_total_supply 877ย (-49) -5.29%
AvmTest::elliptic_curve_add_and_double 619ย (-37) -5.64%
Child::set_value_twice_with_nested_last 870ย (-54) -5.84%
Child::set_value_twice_with_nested_first 870ย (-54) -5.84%
AvmTest::add_storage_map 1,970ย (-125) -5.97%
DocsExample::initialize_shared_immutable 755ย (-49) -6.09%
DocsExample::initialize_public_immutable 755ย (-49) -6.09%
Token::set_minter 1,831ย (-120) -6.15%
Token::mint_private 2,958ย (-196) -6.21%
StatefulTest::increment_public_value 1,799ย (-120) -6.25%
StatefulTest::increment_public_value_no_init_check 1,771ย (-120) -6.35%
NFT::set_minter 1,831ย (-125) -6.39%
Child::pub_inc_value_internal 675ย (-49) -6.77%
StaticChild::pub_illegal_inc_value 670ย (-49) -6.82%
AvmTest::elliptic_curve_add 492ย (-37) -6.99%
Child::pub_inc_value 650ย (-49) -7.01%
StaticChild::pub_inc_value 650ย (-49) -7.01%
NFT::set_admin 616ย (-49) -7.37%
Token::set_admin 616ย (-49) -7.37%
EasyPrivateVoting::end_vote 615ย (-49) -7.38%
AvmTest::set_read_storage_single 573ย (-49) -7.88%

github-actions[bot] avatar Oct 24 '24 12:10 github-actions[bot]

Changes to circuit sizes

Generated at commit: b7e7dae79b6b09f4556a6395a46efb2b58424312, compared to commit: 3a1a62cb84dc9457b58104e01ac358a2820159cb

๐Ÿงพ Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
parity_base +387 โŒ +7.76% +198 โŒ +0.62%
private_kernel_init +36 โŒ +0.15% +28 โŒ +0.09%
rollup_base +4,515 โŒ +0.94% +2,722 โŒ +0.08%
private_kernel_inner +36 โŒ +0.08% +28 โŒ +0.05%
rollup_merge +258 โŒ +6.66% +131 โŒ +0.01%
parity_root +387 โŒ +6.77% +198 โŒ +0.01%
rollup_block_root +258 โŒ +5.73% +132 โŒ +0.00%
rollup_root +129 โŒ +1.72% +66 โŒ +0.00%
rollup_block_merge +129 โŒ +1.72% +66 โŒ +0.00%
public_kernel_inner -206 โœ… -0.08% -240 โœ… -0.05%

Full diff report ๐Ÿ‘‡
Program ACIR opcodes (+/-) % Circuit size (+/-) %
parity_base 5,371ย (+387) +7.76% 32,293ย (+198) +0.62%
private_kernel_init 24,129ย (+36) +0.15% 31,697ย (+28) +0.09%
rollup_base 483,401ย (+4,515) +0.94% 3,359,692ย (+2,722) +0.08%
private_kernel_inner 42,855ย (+36) +0.08% 55,600ย (+28) +0.05%
rollup_merge 4,134ย (+258) +6.66% 1,904,170ย (+131) +0.01%
parity_root 6,104ย (+387) +6.77% 3,790,716ย (+198) +0.01%
rollup_block_root 4,760ย (+258) +5.73% 2,849,089ย (+132) +0.00%
rollup_root 7,612ย (+129) +1.72% 1,907,325ย (+66) +0.00%
rollup_block_merge 7,628ย (+129) +1.72% 1,907,339ย (+66) +0.00%
public_kernel_inner 264,286ย (-206) -0.08% 508,771ย (-240) -0.05%

github-actions[bot] avatar Oct 24 '24 12:10 github-actions[bot]