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: Stop with HeapVector #9810

Merged
merged 12 commits into from
Nov 12, 2024
Merged

feat: Stop with HeapVector #9810

merged 12 commits into from
Nov 12, 2024

Conversation

sirasistant
Copy link
Collaborator

@sirasistant sirasistant commented Nov 7, 2024

Updates the Brillig stop opcode to return a HeapVector (pointer + dynamic size). Also changes the transpiler, simulator and witness gen of the AVM to support it.

@sirasistant
Copy link
Collaborator Author

Removing from draft to get size metrics

@sirasistant sirasistant marked this pull request as ready for review November 7, 2024 17:37
Copy link
Contributor

github-actions bot commented Nov 7, 2024

Changes to public function bytecode sizes

Generated at commit: f553dc75c8fe03dc241c8264fe515d7d93f86324, compared to commit: 79719748602571779e93084828603436bdf06b28

🧾 Summary (100% most significant diffs)

Program Bytecode size in bytes (+/-) %
AvmTest::return_oracle +64 ❌ +18.08%
AvmTest::new_note_hash +12 ❌ +11.01%
AvmTest::new_nullifier +12 ❌ +11.01%
Test::emit_nullifier_public +12 ❌ +11.01%
AvmTest::get_version +12 ❌ +10.91%
AvmTest::get_fee_per_da_gas +12 ❌ +10.91%
AvmTest::get_sender +12 ❌ +10.91%
AvmTest::get_l2_gas_left +12 ❌ +10.91%
AvmTest::set_opcode_u8 +12 ❌ +10.91%
AvmTest::get_block_number +12 ❌ +10.91%
AvmTest::get_address +12 ❌ +10.91%
AvmTest::get_chain_id +12 ❌ +10.91%
AvmTest::get_timestamp +12 ❌ +10.91%
AvmTest::get_da_gas_left +12 ❌ +10.91%
AvmTest::get_transaction_fee +12 ❌ +10.91%
AvmTest::get_fee_per_l2_gas +12 ❌ +10.91%
AvmTest::nullifier_collision +12 ❌ +10.62%
AvmTest::set_opcode_u32 +12 ❌ +10.53%
AvmTest::send_l2_to_l1_msg +12 ❌ +10.26%
Test::create_l2_to_l1_message_arbitrary_recipient_public +12 ❌ +10.26%
AvmTest::set_opcode_u64 +12 ❌ +10.17%
DocsExample::spend_public_authwit +12 ❌ +10.00%
AvmTest::divide_by_zero +12 ❌ +9.68%
AvmTest::add_args_return +12 ❌ +9.52%
AvmTest::set_opcode_small_field +12 ❌ +9.52%
AvmTest::nullifier_exists +12 ❌ +9.38%
AvmTest::l1_to_l2_msg_exists +12 ❌ +9.30%
AvmTest::note_hash_exists +12 ❌ +9.30%
AvmTest::modulo2 +12 ❌ +9.09%
AvmTest::set_opcode_really_big_field +12 ❌ +8.45%
AvmTest::set_opcode_big_field +12 ❌ +8.45%
Test::dummy_public_call +12 ❌ +8.28%
Test::is_time_equal +12 ❌ +8.28%
AvmTest::assert_timestamp +12 ❌ +7.84%
AvmTest::assert_nullifier_exists +12 ❌ +7.79%
Child::pub_get_value +12 ❌ +7.69%
AvmTest::emit_nullifier_and_check +12 ❌ +7.59%
AvmTest::assert_same +12 ❌ +7.59%
InclusionProofs::push_nullifier_public +12 ❌ +7.36%
AvmTest::get_function_selector +12 ❌ +6.67%
InclusionProofs::test_nullifier_inclusion_from_public +12 ❌ +6.35%
StaticChild::pub_get_value +12 ❌ +5.94%
AvmTest::assertion_failure +12 ❌ +5.91%
AvmTest::check_selector +12 ❌ +5.58%
AvmTest::add_u128 +12 ❌ +4.98%
ImportTest::public_dispatch +64 ❌ +4.13%
AvmTest::set_storage_single +12 ❌ +4.00%
StaticChild::public_dispatch +119 ❌ +3.92%
DocsExample::public_dispatch +228 ❌ +3.91%
AvmTest::set_storage_list +12 ❌ +3.75%
AvmInitializerTest::public_dispatch +116 ❌ +3.49%
AuthWitTest::public_dispatch +64 ❌ +3.36%
DocsExample::update_leader +12 ❌ +3.17%
AvmTest::public_dispatch +1,869 ❌ +3.11%
Test::assert_public_global_vars +12 ❌ +3.09%
Child::pub_set_value +12 ❌ +3.03%
StaticChild::pub_set_value +12 ❌ +3.03%
AvmTest::revert_oracle +12 ❌ +2.97%
AvmTest::to_radix_le +12 ❌ +2.93%
PriceFeed::public_dispatch +111 ❌ +2.81%
AvmTest::test_get_contract_instance_matches +12 ❌ +2.72%
AvmTest::test_get_contract_instance +12 ❌ +2.69%
AvmTest::variable_base_msm +12 ❌ +2.65%
AvmTest::external_call_to_assertion_failure +12 ❌ +2.63%
AvmTest::nested_static_call_to_set_storage +12 ❌ +2.55%
ImportTest::pub_call_public_fn +12 ❌ +2.55%
AvmTest::create_same_nullifier_in_nested_call +12 ❌ +2.52%
AvmTest::create_different_nullifier_in_nested_call +12 ❌ +2.47%
AvmTest::keccak_f1600 +12 ❌ +2.47%
AvmTest::read_storage_single +12 ❌ +2.31%
AvmTest::assert_calldata_copy +12 ❌ +2.31%
Child::public_dispatch +134 ❌ +2.24%
AvmTest::elliptic_curve_add +12 ❌ +2.11%
Parent::pub_entry_point +12 ❌ +2.11%
StaticParent::public_call +12 ❌ +2.11%
AvmInitializerTest::read_storage_immutable +12 ❌ +2.09%
TestLog::public_dispatch +64 ❌ +1.99%
AuthWitTest::consume_public +12 ❌ +1.95%
NFT::public_get_symbol +12 ❌ +1.95%
TokenBridge::get_token +12 ❌ +1.95%
Token::get_admin +12 ❌ +1.95%
DocsExample::get_shared_immutable_constrained_public +12 ❌ +1.94%
NFT::public_get_name +12 ❌ +1.94%
NFT::get_admin +12 ❌ +1.94%
Token::public_get_name +12 ❌ +1.94%
Token::public_get_symbol +12 ❌ +1.94%
Token::public_get_decimals +12 ❌ +1.89%
TokenBridge::_assert_token_is_same +12 ❌ +1.84%
TokenBridge::get_portal_address_public +12 ❌ +1.84%
AvmTest::read_storage_list +12 ❌ +1.74%
AvmTest::elliptic_curve_add_and_double +12 ❌ +1.71%
Spam::public_dispatch +64 ❌ +1.70%
AvmTest::set_read_storage_single +12 ❌ +1.67%
StaticParent::public_dispatch +119 ❌ +1.65%
TokenBlacklist::total_supply +12 ❌ +1.64%
Token::total_supply +12 ❌ +1.64%
DocsExample::get_shared_immutable_constrained_public_multiple +12 ❌ +1.55%
Claim::public_dispatch +64 ❌ +1.51%
EasyPrivateVoting::end_vote +12 ❌ +1.50%
NFT::set_admin +12 ❌ +1.49%
Token::set_admin +12 ❌ +1.49%
AvmTest::u128_from_integer_overflow +12 ❌ +1.49%
Child::pub_inc_value +12 ❌ +1.48%
StaticChild::pub_inc_value +12 ❌ +1.48%
Parent::public_dispatch +119 ❌ +1.42%
StaticChild::pub_illegal_inc_value +12 ❌ +1.41%
Child::pub_inc_value_internal +12 ❌ +1.40%
AvmTest::external_call_to_divide_by_zero +12 ❌ +1.33%
Lending::get_assets +12 ❌ +1.33%
AppSubscription::public_dispatch +64 ❌ +1.29%
DocsExample::initialize_shared_immutable +12 ❌ +1.28%
DocsExample::initialize_public_immutable +12 ❌ +1.28%
AvmTest::nested_call_to_add_with_gas +12 ❌ +1.27%
StaticParent::public_get_value_from_child +12 ❌ +1.26%
Router::_check_block_number +12 ❌ +1.24%
AvmTest::nested_call_to_assert_same +12 ❌ +1.24%
AvmTest::nested_static_call_to_add +12 ❌ +1.24%
AvmTest::nested_call_to_add +12 ❌ +1.24%
AuthRegistry::public_dispatch +103 ❌ +1.23%
Parent::pub_entry_point_twice +12 ❌ +1.23%
Router::_check_timestamp +12 ❌ +1.22%
TokenBridge::_call_mint_on_token +12 ❌ +1.22%
DocsExample::get_shared_immutable_constrained_public_indirect +12 ❌ +1.18%
FeeJuice::public_dispatch +74 ❌ +1.18%
FeeJuice::set_portal +12 ❌ +1.13%
Router::public_dispatch +29 ❌ +1.12%
Child::set_value_with_two_nested_calls +12 ❌ +1.09%
Uniswap::_assert_token_is_same +12 ❌ +1.08%
TokenBlacklist::_reduce_total_supply +12 ❌ +1.08%
Token::_reduce_total_supply +12 ❌ +1.08%
Parent::public_static_call +12 ❌ +1.06%
StaticParent::public_static_call +12 ❌ +1.06%
Child::set_value_twice_with_nested_first +12 ❌ +0.99%
Child::set_value_twice_with_nested_last +12 ❌ +0.99%
AvmTest::pedersen_commit +12 ❌ +0.98%
Auth::public_dispatch +103 ❌ +0.96%
AvmTest::debug_logging +12 ❌ +0.94%
AvmTest::u128_addition_overflow +12 ❌ +0.91%
Crowdfunding::_publish_donation_receipts +12 ❌ +0.86%
NFT::_store_payload_in_transient_storage_unsafe +12 ❌ +0.86%
Token::_store_payload_in_transient_storage_unsafe +12 ❌ +0.86%
Test::emit_unencrypted +12 ❌ +0.71%
AvmTest::poseidon2_hash +12 ❌ +0.69%
AvmTest::get_args_hash +12 ❌ +0.67%
AuthRegistry::set_reject_all +12 ❌ +0.65%
InclusionProofs::public_dispatch +27 ❌ +0.65%
TestLog::emit_unencrypted_events +12 ❌ +0.65%
Lending::borrow_public +12 ❌ +0.63%
Lending::withdraw_public +12 ❌ +0.63%
AvmTest::read_storage_map +12 ❌ +0.62%
NFT::_finish_transfer_to_public +12 ❌ +0.62%
Auth::get_scheduled_authorized +12 ❌ +0.62%
PriceFeed::set_price +12 ❌ +0.62%
AvmTest::set_storage_map +12 ❌ +0.61%
StatefulTest::get_public_value +12 ❌ +0.61%
AuthRegistry::is_reject_all +12 ❌ +0.61%
FPC::prepare_fee +12 ❌ +0.61%
PriceFeed::get_price +12 ❌ +0.60%
Benchmarking::broadcast +12 ❌ +0.60%
AvmTest::returndata_copy_oracle +12 ❌ +0.60%
AuthRegistry::set_authorized +12 ❌ +0.60%
NFT::is_minter +12 ❌ +0.59%
Token::is_minter +12 ❌ +0.59%
Test::create_l2_to_l1_message_public +12 ❌ +0.59%
FPC::pay_refund +12 ❌ +0.59%
Auth::get_authorized +12 ❌ +0.59%
AuthRegistry::_set_authorized +12 ❌ +0.58%
NFT::public_dispatch +153 ❌ +0.58%
FeeJuice::balance_of_public +12 ❌ +0.58%
StatefulTest::increment_public_value_no_init_check +12 ❌ +0.57%
TokenBlacklist::balance_of_public +12 ❌ +0.57%
Token::balance_of_public +12 ❌ +0.57%
AuthRegistry::is_consumable +12 ❌ +0.56%
StatefulTest::increment_public_value +12 ❌ +0.56%
Token::public_dispatch +201 ❌ +0.55%
Token::set_minter +12 ❌ +0.55%
NFT::set_minter +12 ❌ +0.54%
Lending::public_dispatch +154 ❌ +0.54%
Lending::get_asset +12 ❌ +0.54%
AvmTest::add_storage_map +12 ❌ +0.52%
Auth::get_authorized_delay +12 ❌ +0.50%
StaticParent::public_nested_static_call +12 ❌ +0.50%
Lending::repay_public +12 ❌ +0.49%
FeeJuice::check_balance +12 ❌ +0.49%
Lending::deposit_public +12 ❌ +0.47%
AvmInitializerTest::constructor +12 ❌ +0.47%
EasyPrivateVoting::add_to_tally_public +12 ❌ +0.47%
Crowdfunding::public_dispatch +29 ❌ +0.47%
FeeJuice::_increase_public_balance +12 ❌ +0.46%
InclusionProofs::constructor +12 ❌ +0.46%
EasyPrivateVoting::public_dispatch +27 ❌ +0.44%
AvmTest::keccak_hash +12 ❌ +0.44%
TokenBlacklist::get_roles +12 ❌ +0.43%
NFT::owner_of +12 ❌ +0.43%
Spam::public_spam +12 ❌ +0.43%
TokenBlacklist::public_dispatch +107 ❌ +0.42%
TokenBlacklist::_increase_public_balance +12 ❌ +0.42%
Token::_increase_public_balance +12 ❌ +0.42%
AvmTest::pedersen_hash_with_index +12 ❌ +0.41%
AvmTest::pedersen_hash +12 ❌ +0.41%
AvmTest::emit_unencrypted_log +12 ❌ +0.40%
Lending::_deposit +12 ❌ +0.39%
Uniswap::constructor +12 ❌ +0.39%
Auth::constructor +12 ❌ +0.39%
FPC::constructor +12 ❌ +0.38%
Lending::init +12 ❌ +0.38%
AuthRegistry::consume +12 ❌ +0.37%
EasyPrivateVoting::constructor +12 ❌ +0.37%
TokenBridge::constructor +12 ❌ +0.37%
Claim::constructor +12 ❌ +0.37%
NFT::mint +12 ❌ +0.36%
Parent::public_nested_static_call +12 ❌ +0.36%
Token::mint_private_old +12 ❌ +0.35%
Token::mint_public +12 ❌ +0.34%
Crowdfunding::init +12 ❌ +0.34%
AppSubscription::constructor +12 ❌ +0.33%
Test::public_dispatch +64 ❌ +0.32%
Benchmarking::increment_balance +12 ❌ +0.32%
NFT::transfer_in_public +12 ❌ +0.32%
FPC::public_dispatch +27 ❌ +0.32%
StatefulTest::public_constructor +12 ❌ +0.31%
AvmTest::sha256_hash +12 ❌ +0.31%
TokenBlacklist::mint_private +12 ❌ +0.28%
TokenBlacklist::mint_public +12 ❌ +0.26%
Token::burn_public +12 ❌ +0.26%
NFT::constructor +12 ❌ +0.25%
Token::transfer_public +12 ❌ +0.25%
CardGame::on_game_joined +12 ❌ +0.24%
Token::constructor +12 ❌ +0.23%
Token::shield +12 ❌ +0.23%
Lending::get_position +12 ❌ +0.23%
StatefulTest::public_dispatch +17 ❌ +0.21%
Lending::update_accumulator +12 ❌ +0.21%
TokenBlacklist::burn_public +12 ❌ +0.20%
Auth::set_authorized_delay +12 ❌ +0.20%
CardGame::on_card_played +12 ❌ +0.20%
Auth::set_authorized +12 ❌ +0.20%
Token::complete_refund +12 ❌ +0.20%
Lending::_repay +12 ❌ +0.19%
TokenBlacklist::transfer_public +12 ❌ +0.19%
TokenBlacklist::shield +12 ❌ +0.19%
NFT::finalize_transfer_to_private +12 ❌ +0.19%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 +12 ❌ +0.19%
NFT::_finalize_transfer_to_private_unsafe +12 ❌ +0.19%
CardGame::start_game +12 ❌ +0.17%
Token::finalize_mint_to_private +12 ❌ +0.17%
Token::_finalize_mint_to_private_unsafe +12 ❌ +0.17%
Token::finalize_transfer_to_private +12 ❌ +0.16%
CardGame::on_cards_claimed +12 ❌ +0.16%
Token::_finalize_transfer_to_private_unsafe +12 ❌ +0.16%
TokenBlacklist::update_roles +12 ❌ +0.16%
CardGame::public_dispatch +25 ❌ +0.15%
TokenBlacklist::constructor +12 ❌ +0.15%
Test::consume_message_from_arbitrary_sender_public +12 ❌ +0.15%
TokenBridge::exit_to_l1_public +12 ❌ +0.15%
Lending::_borrow +12 ❌ +0.13%
Lending::_withdraw +12 ❌ +0.13%
Test::consume_mint_public_message +12 ❌ +0.11%
TokenBridge::claim_public +12 ❌ +0.10%
Uniswap::swap_public +12 ❌ +0.08%
TokenBridge::public_dispatch +11 ❌ +0.05%
AvmTest::bulk_testing +12 ❌ +0.05%
Uniswap::public_dispatch -32 ✅ -0.13%
Benchmarking::public_dispatch -28 ✅ -0.49%

Full diff report 👇
Program Bytecode size in bytes (+/-) %
AvmTest::return_oracle 418 (+64) +18.08%
AvmTest::new_note_hash 121 (+12) +11.01%
AvmTest::new_nullifier 121 (+12) +11.01%
Test::emit_nullifier_public 121 (+12) +11.01%
AvmTest::get_version 122 (+12) +10.91%
AvmTest::get_fee_per_da_gas 122 (+12) +10.91%
AvmTest::get_sender 122 (+12) +10.91%
AvmTest::get_l2_gas_left 122 (+12) +10.91%
AvmTest::set_opcode_u8 122 (+12) +10.91%
AvmTest::get_block_number 122 (+12) +10.91%
AvmTest::get_address 122 (+12) +10.91%
AvmTest::get_chain_id 122 (+12) +10.91%
AvmTest::get_timestamp 122 (+12) +10.91%
AvmTest::get_da_gas_left 122 (+12) +10.91%
AvmTest::get_transaction_fee 122 (+12) +10.91%
AvmTest::get_fee_per_l2_gas 122 (+12) +10.91%
AvmTest::nullifier_collision 125 (+12) +10.62%
AvmTest::set_opcode_u32 126 (+12) +10.53%
AvmTest::send_l2_to_l1_msg 129 (+12) +10.26%
Test::create_l2_to_l1_message_arbitrary_recipient_public 129 (+12) +10.26%
AvmTest::set_opcode_u64 130 (+12) +10.17%
DocsExample::spend_public_authwit 132 (+12) +10.00%
AvmTest::divide_by_zero 136 (+12) +9.68%
AvmTest::add_args_return 138 (+12) +9.52%
AvmTest::set_opcode_small_field 138 (+12) +9.52%
AvmTest::nullifier_exists 140 (+12) +9.38%
AvmTest::l1_to_l2_msg_exists 141 (+12) +9.30%
AvmTest::note_hash_exists 141 (+12) +9.30%
AvmTest::modulo2 144 (+12) +9.09%
AvmTest::set_opcode_really_big_field 154 (+12) +8.45%
AvmTest::set_opcode_big_field 154 (+12) +8.45%
Test::dummy_public_call 157 (+12) +8.28%
Test::is_time_equal 157 (+12) +8.28%
AvmTest::assert_timestamp 165 (+12) +7.84%
AvmTest::assert_nullifier_exists 166 (+12) +7.79%
Child::pub_get_value 168 (+12) +7.69%
AvmTest::emit_nullifier_and_check 170 (+12) +7.59%
AvmTest::assert_same 170 (+12) +7.59%
InclusionProofs::push_nullifier_public 175 (+12) +7.36%
AvmTest::get_function_selector 192 (+12) +6.67%
InclusionProofs::test_nullifier_inclusion_from_public 201 (+12) +6.35%
StaticChild::pub_get_value 214 (+12) +5.94%
AvmTest::assertion_failure 215 (+12) +5.91%
AvmTest::check_selector 227 (+12) +5.58%
AvmTest::add_u128 253 (+12) +4.98%
ImportTest::public_dispatch 1,615 (+64) +4.13%
AvmTest::set_storage_single 312 (+12) +4.00%
StaticChild::public_dispatch 3,152 (+119) +3.92%
DocsExample::public_dispatch 6,066 (+228) +3.91%
AvmTest::set_storage_list 332 (+12) +3.75%
AvmInitializerTest::public_dispatch 3,442 (+116) +3.49%
AuthWitTest::public_dispatch 1,971 (+64) +3.36%
DocsExample::update_leader 390 (+12) +3.17%
AvmTest::public_dispatch 62,001 (+1,869) +3.11%
Test::assert_public_global_vars 400 (+12) +3.09%
Child::pub_set_value 408 (+12) +3.03%
StaticChild::pub_set_value 408 (+12) +3.03%
AvmTest::revert_oracle 416 (+12) +2.97%
AvmTest::to_radix_le 421 (+12) +2.93%
PriceFeed::public_dispatch 4,058 (+111) +2.81%
AvmTest::test_get_contract_instance_matches 453 (+12) +2.72%
AvmTest::test_get_contract_instance 458 (+12) +2.69%
AvmTest::variable_base_msm 465 (+12) +2.65%
AvmTest::external_call_to_assertion_failure 468 (+12) +2.63%
AvmTest::nested_static_call_to_set_storage 482 (+12) +2.55%
ImportTest::pub_call_public_fn 483 (+12) +2.55%
AvmTest::create_same_nullifier_in_nested_call 488 (+12) +2.52%
AvmTest::create_different_nullifier_in_nested_call 498 (+12) +2.47%
AvmTest::keccak_f1600 498 (+12) +2.47%
AvmTest::read_storage_single 531 (+12) +2.31%
AvmTest::assert_calldata_copy 531 (+12) +2.31%
Child::public_dispatch 6,115 (+134) +2.24%
AvmTest::elliptic_curve_add 580 (+12) +2.11%
Parent::pub_entry_point 582 (+12) +2.11%
StaticParent::public_call 582 (+12) +2.11%
AvmInitializerTest::read_storage_immutable 585 (+12) +2.09%
TestLog::public_dispatch 3,283 (+64) +1.99%
AuthWitTest::consume_public 626 (+12) +1.95%
NFT::public_get_symbol 626 (+12) +1.95%
TokenBridge::get_token 626 (+12) +1.95%
Token::get_admin 626 (+12) +1.95%
DocsExample::get_shared_immutable_constrained_public 630 (+12) +1.94%
NFT::public_get_name 631 (+12) +1.94%
NFT::get_admin 631 (+12) +1.94%
Token::public_get_name 631 (+12) +1.94%
Token::public_get_symbol 631 (+12) +1.94%
Token::public_get_decimals 646 (+12) +1.89%
TokenBridge::_assert_token_is_same 663 (+12) +1.84%
TokenBridge::get_portal_address_public 663 (+12) +1.84%
AvmTest::read_storage_list 700 (+12) +1.74%
AvmTest::elliptic_curve_add_and_double 713 (+12) +1.71%
Spam::public_dispatch 3,829 (+64) +1.70%
AvmTest::set_read_storage_single 730 (+12) +1.67%
StaticParent::public_dispatch 7,339 (+119) +1.65%
TokenBlacklist::total_supply 744 (+12) +1.64%
Token::total_supply 744 (+12) +1.64%
DocsExample::get_shared_immutable_constrained_public_multiple 787 (+12) +1.55%
Claim::public_dispatch 4,291 (+64) +1.51%
EasyPrivateVoting::end_vote 814 (+12) +1.50%
NFT::set_admin 815 (+12) +1.49%
Token::set_admin 815 (+12) +1.49%
AvmTest::u128_from_integer_overflow 817 (+12) +1.49%
Child::pub_inc_value 821 (+12) +1.48%
StaticChild::pub_inc_value 821 (+12) +1.48%
Parent::public_dispatch 8,500 (+119) +1.42%
StaticChild::pub_illegal_inc_value 862 (+12) +1.41%
Child::pub_inc_value_internal 867 (+12) +1.40%
AvmTest::external_call_to_divide_by_zero 916 (+12) +1.33%
Lending::get_assets 917 (+12) +1.33%
AppSubscription::public_dispatch 5,037 (+64) +1.29%
DocsExample::initialize_shared_immutable 947 (+12) +1.28%
DocsExample::initialize_public_immutable 947 (+12) +1.28%
AvmTest::nested_call_to_add_with_gas 954 (+12) +1.27%
StaticParent::public_get_value_from_child 965 (+12) +1.26%
Router::_check_block_number 976 (+12) +1.24%
AvmTest::nested_call_to_assert_same 979 (+12) +1.24%
AvmTest::nested_static_call_to_add 979 (+12) +1.24%
AvmTest::nested_call_to_add 979 (+12) +1.24%
AuthRegistry::public_dispatch 8,466 (+103) +1.23%
Parent::pub_entry_point_twice 988 (+12) +1.23%
Router::_check_timestamp 993 (+12) +1.22%
TokenBridge::_call_mint_on_token 998 (+12) +1.22%
DocsExample::get_shared_immutable_constrained_public_indirect 1,025 (+12) +1.18%
FeeJuice::public_dispatch 6,335 (+74) +1.18%
FeeJuice::set_portal 1,078 (+12) +1.13%
Router::public_dispatch 2,612 (+29) +1.12%
Child::set_value_with_two_nested_calls 1,112 (+12) +1.09%
Uniswap::_assert_token_is_same 1,118 (+12) +1.08%
TokenBlacklist::_reduce_total_supply 1,119 (+12) +1.08%
Token::_reduce_total_supply 1,124 (+12) +1.08%
Parent::public_static_call 1,142 (+12) +1.06%
StaticParent::public_static_call 1,142 (+12) +1.06%
Child::set_value_twice_with_nested_first 1,228 (+12) +0.99%
Child::set_value_twice_with_nested_last 1,228 (+12) +0.99%
AvmTest::pedersen_commit 1,235 (+12) +0.98%
Auth::public_dispatch 10,885 (+103) +0.96%
AvmTest::debug_logging 1,292 (+12) +0.94%
AvmTest::u128_addition_overflow 1,337 (+12) +0.91%
Crowdfunding::_publish_donation_receipts 1,403 (+12) +0.86%
NFT::_store_payload_in_transient_storage_unsafe 1,415 (+12) +0.86%
Token::_store_payload_in_transient_storage_unsafe 1,415 (+12) +0.86%
Test::emit_unencrypted 1,714 (+12) +0.71%
AvmTest::poseidon2_hash 1,746 (+12) +0.69%
AvmTest::get_args_hash 1,816 (+12) +0.67%
AuthRegistry::set_reject_all 1,857 (+12) +0.65%
InclusionProofs::public_dispatch 4,196 (+27) +0.65%
TestLog::emit_unencrypted_events 1,865 (+12) +0.65%
Lending::borrow_public 1,903 (+12) +0.63%
Lending::withdraw_public 1,903 (+12) +0.63%
AvmTest::read_storage_map 1,941 (+12) +0.62%
NFT::_finish_transfer_to_public 1,941 (+12) +0.62%
Auth::get_scheduled_authorized 1,953 (+12) +0.62%
PriceFeed::set_price 1,958 (+12) +0.62%
AvmTest::set_storage_map 1,968 (+12) +0.61%
StatefulTest::get_public_value 1,972 (+12) +0.61%
AuthRegistry::is_reject_all 1,982 (+12) +0.61%
FPC::prepare_fee 1,995 (+12) +0.61%
PriceFeed::get_price 2,000 (+12) +0.60%
Benchmarking::broadcast 2,006 (+12) +0.60%
AvmTest::returndata_copy_oracle 2,010 (+12) +0.60%
AuthRegistry::set_authorized 2,019 (+12) +0.60%
NFT::is_minter 2,036 (+12) +0.59%
Token::is_minter 2,036 (+12) +0.59%
Test::create_l2_to_l1_message_public 2,042 (+12) +0.59%
FPC::pay_refund 2,050 (+12) +0.59%
Auth::get_authorized 2,053 (+12) +0.59%
AuthRegistry::_set_authorized 2,066 (+12) +0.58%
NFT::public_dispatch 26,386 (+153) +0.58%
FeeJuice::balance_of_public 2,080 (+12) +0.58%
StatefulTest::increment_public_value_no_init_check 2,110 (+12) +0.57%
TokenBlacklist::balance_of_public 2,134 (+12) +0.57%
Token::balance_of_public 2,134 (+12) +0.57%
AuthRegistry::is_consumable 2,149 (+12) +0.56%
StatefulTest::increment_public_value 2,159 (+12) +0.56%
Token::public_dispatch 36,905 (+201) +0.55%
Token::set_minter 2,212 (+12) +0.55%
NFT::set_minter 2,217 (+12) +0.54%
Lending::public_dispatch 28,493 (+154) +0.54%
Lending::get_asset 2,221 (+12) +0.54%
AvmTest::add_storage_map 2,328 (+12) +0.52%
Auth::get_authorized_delay 2,410 (+12) +0.50%
StaticParent::public_nested_static_call 2,425 (+12) +0.50%
Lending::repay_public 2,438 (+12) +0.49%
FeeJuice::check_balance 2,453 (+12) +0.49%
Lending::deposit_public 2,555 (+12) +0.47%
AvmInitializerTest::constructor 2,557 (+12) +0.47%
EasyPrivateVoting::add_to_tally_public 2,559 (+12) +0.47%
Crowdfunding::public_dispatch 6,241 (+29) +0.47%
FeeJuice::_increase_public_balance 2,598 (+12) +0.46%
InclusionProofs::constructor 2,633 (+12) +0.46%
EasyPrivateVoting::public_dispatch 6,112 (+27) +0.44%
AvmTest::keccak_hash 2,749 (+12) +0.44%
TokenBlacklist::get_roles 2,785 (+12) +0.43%
NFT::owner_of 2,808 (+12) +0.43%
Spam::public_spam 2,808 (+12) +0.43%
TokenBlacklist::public_dispatch 25,304 (+107) +0.42%
TokenBlacklist::_increase_public_balance 2,867 (+12) +0.42%
Token::_increase_public_balance 2,867 (+12) +0.42%
AvmTest::pedersen_hash_with_index 2,935 (+12) +0.41%
AvmTest::pedersen_hash 2,935 (+12) +0.41%
AvmTest::emit_unencrypted_log 3,007 (+12) +0.40%
Lending::_deposit 3,053 (+12) +0.39%
Uniswap::constructor 3,068 (+12) +0.39%
Auth::constructor 3,109 (+12) +0.39%
FPC::constructor 3,164 (+12) +0.38%
Lending::init 3,204 (+12) +0.38%
AuthRegistry::consume 3,234 (+12) +0.37%
EasyPrivateVoting::constructor 3,235 (+12) +0.37%
TokenBridge::constructor 3,244 (+12) +0.37%
Claim::constructor 3,281 (+12) +0.37%
NFT::mint 3,376 (+12) +0.36%
Parent::public_nested_static_call 3,376 (+12) +0.36%
Token::mint_private_old 3,466 (+12) +0.35%
Token::mint_public 3,537 (+12) +0.34%
Crowdfunding::init 3,547 (+12) +0.34%
AppSubscription::constructor 3,702 (+12) +0.33%
Test::public_dispatch 19,815 (+64) +0.32%
Benchmarking::increment_balance 3,725 (+12) +0.32%
NFT::transfer_in_public 3,726 (+12) +0.32%
FPC::public_dispatch 8,389 (+27) +0.32%
StatefulTest::public_constructor 3,872 (+12) +0.31%
AvmTest::sha256_hash 3,890 (+12) +0.31%
TokenBlacklist::mint_private 4,306 (+12) +0.28%
TokenBlacklist::mint_public 4,623 (+12) +0.26%
Token::burn_public 4,701 (+12) +0.26%
NFT::constructor 4,799 (+12) +0.25%
Token::transfer_public 4,809 (+12) +0.25%
CardGame::on_game_joined 5,058 (+12) +0.24%
Token::constructor 5,155 (+12) +0.23%
Token::shield 5,234 (+12) +0.23%
Lending::get_position 5,250 (+12) +0.23%
StatefulTest::public_dispatch 8,139 (+17) +0.21%
Lending::update_accumulator 5,776 (+12) +0.21%
TokenBlacklist::burn_public 5,890 (+12) +0.20%
Auth::set_authorized_delay 5,958 (+12) +0.20%
CardGame::on_card_played 5,959 (+12) +0.20%
Auth::set_authorized 6,044 (+12) +0.20%
Token::complete_refund 6,056 (+12) +0.20%
Lending::_repay 6,191 (+12) +0.19%
TokenBlacklist::transfer_public 6,323 (+12) +0.19%
TokenBlacklist::shield 6,428 (+12) +0.19%
NFT::finalize_transfer_to_private 6,447 (+12) +0.19%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 6,463 (+12) +0.19%
NFT::_finalize_transfer_to_private_unsafe 6,494 (+12) +0.19%
CardGame::start_game 6,994 (+12) +0.17%
Token::finalize_mint_to_private 7,117 (+12) +0.17%
Token::_finalize_mint_to_private_unsafe 7,164 (+12) +0.17%
Token::finalize_transfer_to_private 7,327 (+12) +0.16%
CardGame::on_cards_claimed 7,350 (+12) +0.16%
Token::_finalize_transfer_to_private_unsafe 7,374 (+12) +0.16%
TokenBlacklist::update_roles 7,689 (+12) +0.16%
CardGame::public_dispatch 16,259 (+25) +0.15%
TokenBlacklist::constructor 7,928 (+12) +0.15%
Test::consume_message_from_arbitrary_sender_public 7,967 (+12) +0.15%
TokenBridge::exit_to_l1_public 8,226 (+12) +0.15%
Lending::_borrow 9,021 (+12) +0.13%
Lending::_withdraw 9,285 (+12) +0.13%
Test::consume_mint_public_message 10,618 (+12) +0.11%
TokenBridge::claim_public 12,470 (+12) +0.10%
Uniswap::swap_public 15,713 (+12) +0.08%
TokenBridge::public_dispatch 22,636 (+11) +0.05%
AvmTest::bulk_testing 25,509 (+12) +0.05%
Uniswap::public_dispatch 25,014 (-32) -0.13%
Benchmarking::public_dispatch 5,659 (-28) -0.49%

@sirasistant sirasistant added the e2e-all CI: Enables this CI job. label Nov 8, 2024
memory.checkTag(TypeTag.UINT32, returnSizeOffset);
const returnSize = memory.get(returnSizeOffset).toNumber();
context.machineState.consumeGas(this.gasCost(returnSize));

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we are missing a check enforcing tag FF on the return memory range, stgh like:
memory.checkTagsRange(TypeTag.FIELD, returnOffset, returnSize);

Copy link
Contributor

Choose a reason for hiding this comment

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

Same in .cpp, but as I am working exactly on that I will do it as part of my PR.

@sirasistant
Copy link
Collaborator Author

I think tests should be passing now

@sirasistant sirasistant changed the title feat: Stop with HeapVector (WIP) feat: Stop with HeapVector Nov 8, 2024
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

Looks good to me. One question on whether you intended to remove usage of "external stop" entirely.

Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

blocking temporarily as there's annoying conflicts on the sync which I don't want to worsen.

@sirasistant sirasistant merged commit 52ae4e1 into master Nov 12, 2024
104 checks passed
@sirasistant sirasistant deleted the arv/stop_with_memory branch November 12, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e-all CI: Enables this CI job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants