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: mock data for IVC #9893

Merged
merged 12 commits into from
Nov 12, 2024
Merged

feat: mock data for IVC #9893

merged 12 commits into from
Nov 12, 2024

Conversation

ledwards2225
Copy link
Contributor

@ledwards2225 ledwards2225 commented Nov 11, 2024

Incremental work towards a write_vk flow for kernel circuits. kernel circuits are generated from acir via the method acir_format::create_kernel_circuit() which takes as input the raw acir data plus a ClientIvc instance containing the proofs to be recursively verified in that circuit (Oink/PG + merge). In the context of VK generation, those proofs are not yet known, so the IVC state has to be mocked. This PR adds such functionality but only for the oink case (i.e. the state of the IVC after accumulating the first app which only calls the pink prover). Equivalent logic for mocking the state after subsequent accumulations will be handled in a follow on.

@ledwards2225 ledwards2225 marked this pull request as ready for review November 11, 2024 23:19
@ledwards2225 ledwards2225 self-assigned this Nov 12, 2024
{
size_t total_size = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this being 0 was just a bug that never showed up in any tests since +1 never made a difference in the dyadic size

Copy link
Contributor

Choose a reason for hiding this comment

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

interesting. I guess we need more tests for borderline circuit sizes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I only caught it because I accidentally propagated it to Ultra where we do just happen to have a case that's right on the line

for (auto block : this->get()) {
total_size += block.get_fixed_size();
}
return total_size;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just an update to allow this method to compute the dyadic size itself since this is how it was always being used

@@ -75,39 +76,11 @@ class IvcRecursionConstraintTest : public ::testing::Test {
};
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing this test because it was a pain to keep updating and is also no longer relevant because the kernel circuits will not do anything with public inputs anymore since the introduction of the databus.

Copy link
Contributor

Changes to public function bytecode sizes

Generated at commit: 38c1d47ab50ca6f777762bba3344b59063579bd8, compared to commit: e305f488b1502630f299bb03cf169770f2f6af09

🧾 Summary (100% most significant diffs)

Program Bytecode size in bytes (+/-) %
TokenBridge::public_dispatch +670 ❌ +3.05%
Benchmarking::public_dispatch +28 ❌ +0.49%
Uniswap::public_dispatch +32 ❌ +0.13%
AvmTest::bulk_testing -12 ✅ -0.05%
Uniswap::swap_public -12 ✅ -0.08%
TokenBridge::claim_public -12 ✅ -0.10%
Test::consume_mint_public_message -12 ✅ -0.11%
Lending::_withdraw -12 ✅ -0.13%
Lending::_borrow -12 ✅ -0.13%
TokenBridge::exit_to_l1_public -12 ✅ -0.15%
Test::consume_message_from_arbitrary_sender_public -12 ✅ -0.15%
TokenBlacklist::constructor -12 ✅ -0.15%
CardGame::public_dispatch -25 ✅ -0.15%
TokenBlacklist::update_roles -12 ✅ -0.16%
Token::_finalize_transfer_to_private_unsafe -12 ✅ -0.16%
CardGame::on_cards_claimed -12 ✅ -0.16%
Token::finalize_transfer_to_private -12 ✅ -0.16%
Token::_finalize_mint_to_private_unsafe -12 ✅ -0.17%
Token::finalize_mint_to_private -12 ✅ -0.17%
CardGame::start_game -12 ✅ -0.17%
NFT::_finalize_transfer_to_private_unsafe -12 ✅ -0.18%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 -12 ✅ -0.19%
NFT::finalize_transfer_to_private -12 ✅ -0.19%
TokenBlacklist::shield -12 ✅ -0.19%
TokenBlacklist::transfer_public -12 ✅ -0.19%
Lending::_repay -12 ✅ -0.19%
Token::complete_refund -12 ✅ -0.20%
Auth::set_authorized -12 ✅ -0.20%
CardGame::on_card_played -12 ✅ -0.20%
Auth::set_authorized_delay -12 ✅ -0.20%
TokenBlacklist::burn_public -12 ✅ -0.20%
Lending::update_accumulator -12 ✅ -0.21%
StatefulTest::public_dispatch -17 ✅ -0.21%
Lending::get_position -12 ✅ -0.23%
Token::shield -12 ✅ -0.23%
Token::constructor -12 ✅ -0.23%
CardGame::on_game_joined -12 ✅ -0.24%
Token::transfer_public -12 ✅ -0.25%
NFT::constructor -12 ✅ -0.25%
Token::burn_public -12 ✅ -0.26%
TokenBlacklist::mint_public -12 ✅ -0.26%
TokenBlacklist::mint_private -12 ✅ -0.28%
AvmTest::sha256_hash -12 ✅ -0.31%
StatefulTest::public_constructor -12 ✅ -0.31%
FPC::public_dispatch -27 ✅ -0.32%
NFT::transfer_in_public -12 ✅ -0.32%
Benchmarking::increment_balance -12 ✅ -0.32%
Test::public_dispatch -64 ✅ -0.32%
AppSubscription::constructor -12 ✅ -0.32%
Crowdfunding::init -12 ✅ -0.34%
Token::mint_public -12 ✅ -0.34%
Token::mint_private_old -12 ✅ -0.35%
NFT::mint -12 ✅ -0.36%
Parent::public_nested_static_call -12 ✅ -0.36%
Claim::constructor -12 ✅ -0.37%
EasyPrivateVoting::constructor -12 ✅ -0.37%
AuthRegistry::consume -12 ✅ -0.37%
Lending::init -12 ✅ -0.37%
FPC::constructor -12 ✅ -0.38%
Auth::constructor -12 ✅ -0.39%
Uniswap::constructor -12 ✅ -0.39%
Lending::_deposit -12 ✅ -0.39%
AvmTest::emit_unencrypted_log -12 ✅ -0.40%
AvmTest::pedersen_hash -12 ✅ -0.41%
AvmTest::pedersen_hash_with_index -12 ✅ -0.41%
TokenBlacklist::_increase_public_balance -12 ✅ -0.42%
Token::_increase_public_balance -12 ✅ -0.42%
TokenBlacklist::public_dispatch -107 ✅ -0.42%
NFT::owner_of -12 ✅ -0.43%
Spam::public_spam -12 ✅ -0.43%
TokenBlacklist::get_roles -12 ✅ -0.43%
AvmTest::keccak_hash -12 ✅ -0.44%
EasyPrivateVoting::public_dispatch -27 ✅ -0.44%
InclusionProofs::constructor -12 ✅ -0.46%
FeeJuice::_increase_public_balance -12 ✅ -0.46%
Crowdfunding::public_dispatch -29 ✅ -0.46%
EasyPrivateVoting::add_to_tally_public -12 ✅ -0.47%
AvmInitializerTest::constructor -12 ✅ -0.47%
Lending::deposit_public -12 ✅ -0.47%
FeeJuice::check_balance -12 ✅ -0.49%
Lending::repay_public -12 ✅ -0.49%
StaticParent::public_nested_static_call -12 ✅ -0.49%
Auth::get_authorized_delay -12 ✅ -0.50%
AvmTest::add_storage_map -12 ✅ -0.52%
Lending::get_asset -12 ✅ -0.54%
Lending::public_dispatch -154 ✅ -0.54%
NFT::set_minter -12 ✅ -0.54%
Token::set_minter -12 ✅ -0.54%
Token::public_dispatch -201 ✅ -0.54%
StatefulTest::increment_public_value -12 ✅ -0.56%
AuthRegistry::is_consumable -12 ✅ -0.56%
TokenBlacklist::balance_of_public -12 ✅ -0.56%
Token::balance_of_public -12 ✅ -0.56%
StatefulTest::increment_public_value_no_init_check -12 ✅ -0.57%
FeeJuice::balance_of_public -12 ✅ -0.58%
NFT::public_dispatch -153 ✅ -0.58%
AuthRegistry::_set_authorized -12 ✅ -0.58%
Auth::get_authorized -12 ✅ -0.58%
FPC::pay_refund -12 ✅ -0.59%
Test::create_l2_to_l1_message_public -12 ✅ -0.59%
NFT::is_minter -12 ✅ -0.59%
Token::is_minter -12 ✅ -0.59%
AuthRegistry::set_authorized -12 ✅ -0.59%
AvmTest::returndata_copy_oracle -12 ✅ -0.60%
Benchmarking::broadcast -12 ✅ -0.60%
PriceFeed::get_price -12 ✅ -0.60%
FPC::prepare_fee -12 ✅ -0.60%
AuthRegistry::is_reject_all -12 ✅ -0.61%
StatefulTest::get_public_value -12 ✅ -0.61%
AvmTest::set_storage_map -12 ✅ -0.61%
PriceFeed::set_price -12 ✅ -0.61%
Auth::get_scheduled_authorized -12 ✅ -0.61%
AvmTest::read_storage_map -12 ✅ -0.62%
NFT::_finish_transfer_to_public -12 ✅ -0.62%
Lending::withdraw_public -12 ✅ -0.63%
Lending::borrow_public -12 ✅ -0.63%
TestLog::emit_unencrypted_events -12 ✅ -0.64%
InclusionProofs::public_dispatch -27 ✅ -0.64%
AuthRegistry::set_reject_all -12 ✅ -0.65%
AvmTest::get_args_hash -12 ✅ -0.66%
AvmTest::poseidon2_hash -12 ✅ -0.69%
Test::emit_unencrypted -12 ✅ -0.70%
NFT::_store_payload_in_transient_storage_unsafe -12 ✅ -0.85%
Token::_store_payload_in_transient_storage_unsafe -12 ✅ -0.85%
Crowdfunding::_publish_donation_receipts -12 ✅ -0.86%
AvmTest::u128_addition_overflow -12 ✅ -0.90%
AvmTest::debug_logging -12 ✅ -0.93%
Auth::public_dispatch -103 ✅ -0.95%
AvmTest::pedersen_commit -12 ✅ -0.97%
Child::set_value_twice_with_nested_first -12 ✅ -0.98%
Child::set_value_twice_with_nested_last -12 ✅ -0.98%
Parent::public_static_call -12 ✅ -1.05%
StaticParent::public_static_call -12 ✅ -1.05%
Token::_reduce_total_supply -12 ✅ -1.07%
TokenBlacklist::_reduce_total_supply -12 ✅ -1.07%
Uniswap::_assert_token_is_same -12 ✅ -1.07%
Child::set_value_with_two_nested_calls -12 ✅ -1.08%
Router::public_dispatch -29 ✅ -1.11%
FeeJuice::set_portal -12 ✅ -1.11%
FeeJuice::public_dispatch -74 ✅ -1.17%
DocsExample::get_shared_immutable_constrained_public_indirect -12 ✅ -1.17%
Router::_check_timestamp -12 ✅ -1.21%
Parent::pub_entry_point_twice -12 ✅ -1.21%
AuthRegistry::public_dispatch -103 ✅ -1.22%
AvmTest::nested_call_to_assert_same -12 ✅ -1.23%
AvmTest::nested_call_to_add -12 ✅ -1.23%
AvmTest::nested_static_call_to_add -12 ✅ -1.23%
Router::_check_block_number -12 ✅ -1.23%
StaticParent::public_get_value_from_child -12 ✅ -1.24%
AvmTest::nested_call_to_add_with_gas -12 ✅ -1.26%
DocsExample::initialize_public_immutable -12 ✅ -1.27%
DocsExample::initialize_shared_immutable -12 ✅ -1.27%
AppSubscription::public_dispatch -64 ✅ -1.27%
Lending::get_assets -12 ✅ -1.31%
AvmTest::external_call_to_divide_by_zero -12 ✅ -1.31%
Child::pub_inc_value_internal -12 ✅ -1.38%
StaticChild::pub_illegal_inc_value -12 ✅ -1.39%
Parent::public_dispatch -119 ✅ -1.40%
Child::pub_inc_value -12 ✅ -1.46%
StaticChild::pub_inc_value -12 ✅ -1.46%
AvmTest::u128_from_integer_overflow -12 ✅ -1.47%
NFT::set_admin -12 ✅ -1.47%
Token::set_admin -12 ✅ -1.47%
EasyPrivateVoting::end_vote -12 ✅ -1.47%
Claim::public_dispatch -64 ✅ -1.49%
DocsExample::get_shared_immutable_constrained_public_multiple -12 ✅ -1.52%
TokenBlacklist::total_supply -12 ✅ -1.61%
Token::total_supply -12 ✅ -1.61%
StaticParent::public_dispatch -119 ✅ -1.62%
AvmTest::set_read_storage_single -12 ✅ -1.64%
Spam::public_dispatch -64 ✅ -1.67%
AvmTest::elliptic_curve_add_and_double -12 ✅ -1.68%
AvmTest::read_storage_list -12 ✅ -1.71%
TokenBridge::get_portal_address_public -12 ✅ -1.81%
TokenBridge::_assert_token_is_same -12 ✅ -1.81%
Token::public_get_decimals -12 ✅ -1.86%
NFT::public_get_name -12 ✅ -1.90%
NFT::get_admin -12 ✅ -1.90%
Token::public_get_name -12 ✅ -1.90%
Token::public_get_symbol -12 ✅ -1.90%
DocsExample::get_shared_immutable_constrained_public -12 ✅ -1.90%
AuthWitTest::consume_public -12 ✅ -1.92%
NFT::public_get_symbol -12 ✅ -1.92%
TokenBridge::get_token -12 ✅ -1.92%
Token::get_admin -12 ✅ -1.92%
TestLog::public_dispatch -64 ✅ -1.95%
AvmInitializerTest::read_storage_immutable -12 ✅ -2.05%
Parent::pub_entry_point -12 ✅ -2.06%
StaticParent::public_call -12 ✅ -2.06%
AvmTest::elliptic_curve_add -12 ✅ -2.07%
Child::public_dispatch -134 ✅ -2.19%
AvmTest::assert_calldata_copy -12 ✅ -2.26%
AvmTest::read_storage_single -12 ✅ -2.26%
AvmTest::create_different_nullifier_in_nested_call -12 ✅ -2.41%
AvmTest::keccak_f1600 -12 ✅ -2.41%
AvmTest::create_same_nullifier_in_nested_call -12 ✅ -2.46%
ImportTest::pub_call_public_fn -12 ✅ -2.48%
AvmTest::nested_static_call_to_set_storage -12 ✅ -2.49%
AvmTest::external_call_to_assertion_failure -12 ✅ -2.56%
AvmTest::variable_base_msm -12 ✅ -2.58%
AvmTest::test_get_contract_instance -12 ✅ -2.62%
AvmTest::test_get_contract_instance_matches -12 ✅ -2.65%
PriceFeed::public_dispatch -111 ✅ -2.74%
AvmTest::to_radix_le -12 ✅ -2.85%
AvmTest::revert_oracle -12 ✅ -2.88%
Child::pub_set_value -12 ✅ -2.94%
StaticChild::pub_set_value -12 ✅ -2.94%
Test::assert_public_global_vars -12 ✅ -3.00%
AvmTest::public_dispatch -1,869 ✅ -3.01%
DocsExample::update_leader -12 ✅ -3.08%
AuthWitTest::public_dispatch -64 ✅ -3.25%
AvmInitializerTest::public_dispatch -116 ✅ -3.37%
AvmTest::set_storage_list -12 ✅ -3.61%
DocsExample::public_dispatch -228 ✅ -3.76%
StaticChild::public_dispatch -119 ✅ -3.78%
AvmTest::set_storage_single -12 ✅ -3.85%
TokenBridge::constructor -130 ✅ -3.87%
ImportTest::public_dispatch -64 ✅ -3.96%
AvmTest::add_u128 -12 ✅ -4.74%
AvmTest::check_selector -12 ✅ -5.29%
AvmTest::assertion_failure -12 ✅ -5.58%
StaticChild::pub_get_value -12 ✅ -5.61%
InclusionProofs::test_nullifier_inclusion_from_public -12 ✅ -5.97%
AvmTest::get_function_selector -12 ✅ -6.25%
InclusionProofs::push_nullifier_public -12 ✅ -6.86%
AvmTest::assert_same -12 ✅ -7.06%
AvmTest::emit_nullifier_and_check -12 ✅ -7.06%
Child::pub_get_value -12 ✅ -7.14%
AvmTest::assert_nullifier_exists -12 ✅ -7.23%
AvmTest::assert_timestamp -12 ✅ -7.27%
Test::dummy_public_call -12 ✅ -7.64%
Test::is_time_equal -12 ✅ -7.64%
AvmTest::set_opcode_really_big_field -12 ✅ -7.79%
AvmTest::set_opcode_big_field -12 ✅ -7.79%
AvmTest::modulo2 -12 ✅ -8.33%
AvmTest::note_hash_exists -12 ✅ -8.51%
AvmTest::l1_to_l2_msg_exists -12 ✅ -8.51%
AvmTest::nullifier_exists -12 ✅ -8.57%
AvmTest::add_args_return -12 ✅ -8.70%
AvmTest::set_opcode_small_field -12 ✅ -8.70%
AvmTest::divide_by_zero -12 ✅ -8.82%
DocsExample::spend_public_authwit -12 ✅ -9.09%
AvmTest::set_opcode_u64 -12 ✅ -9.23%
AvmTest::send_l2_to_l1_msg -12 ✅ -9.30%
Test::create_l2_to_l1_message_arbitrary_recipient_public -12 ✅ -9.30%
AvmTest::set_opcode_u32 -12 ✅ -9.52%
AvmTest::nullifier_collision -12 ✅ -9.60%
AvmTest::get_fee_per_da_gas -12 ✅ -9.84%
AvmTest::get_l2_gas_left -12 ✅ -9.84%
AvmTest::get_block_number -12 ✅ -9.84%
AvmTest::get_timestamp -12 ✅ -9.84%
AvmTest::get_address -12 ✅ -9.84%
AvmTest::get_chain_id -12 ✅ -9.84%
AvmTest::set_opcode_u8 -12 ✅ -9.84%
AvmTest::get_fee_per_l2_gas -12 ✅ -9.84%
AvmTest::get_sender -12 ✅ -9.84%
AvmTest::get_transaction_fee -12 ✅ -9.84%
AvmTest::get_da_gas_left -12 ✅ -9.84%
AvmTest::get_version -12 ✅ -9.84%
AvmTest::new_note_hash -12 ✅ -9.92%
AvmTest::new_nullifier -12 ✅ -9.92%
Test::emit_nullifier_public -12 ✅ -9.92%
AvmTest::return_oracle -64 ✅ -15.31%

Full diff report 👇
Program Bytecode size in bytes (+/-) %
TokenBridge::public_dispatch 22,625 (+670) +3.05%
Benchmarking::public_dispatch 5,687 (+28) +0.49%
Uniswap::public_dispatch 25,046 (+32) +0.13%
AvmTest::bulk_testing 25,497 (-12) -0.05%
Uniswap::swap_public 15,701 (-12) -0.08%
TokenBridge::claim_public 12,458 (-12) -0.10%
Test::consume_mint_public_message 10,606 (-12) -0.11%
Lending::_withdraw 9,273 (-12) -0.13%
Lending::_borrow 9,009 (-12) -0.13%
TokenBridge::exit_to_l1_public 8,214 (-12) -0.15%
Test::consume_message_from_arbitrary_sender_public 7,955 (-12) -0.15%
TokenBlacklist::constructor 7,916 (-12) -0.15%
CardGame::public_dispatch 16,234 (-25) -0.15%
TokenBlacklist::update_roles 7,677 (-12) -0.16%
Token::_finalize_transfer_to_private_unsafe 7,362 (-12) -0.16%
CardGame::on_cards_claimed 7,338 (-12) -0.16%
Token::finalize_transfer_to_private 7,315 (-12) -0.16%
Token::_finalize_mint_to_private_unsafe 7,152 (-12) -0.17%
Token::finalize_mint_to_private 7,105 (-12) -0.17%
CardGame::start_game 6,982 (-12) -0.17%
NFT::_finalize_transfer_to_private_unsafe 6,482 (-12) -0.18%
Uniswap::_approve_bridge_and_exit_input_asset_to_L1 6,451 (-12) -0.19%
NFT::finalize_transfer_to_private 6,435 (-12) -0.19%
TokenBlacklist::shield 6,416 (-12) -0.19%
TokenBlacklist::transfer_public 6,311 (-12) -0.19%
Lending::_repay 6,179 (-12) -0.19%
Token::complete_refund 6,044 (-12) -0.20%
Auth::set_authorized 6,032 (-12) -0.20%
CardGame::on_card_played 5,947 (-12) -0.20%
Auth::set_authorized_delay 5,946 (-12) -0.20%
TokenBlacklist::burn_public 5,878 (-12) -0.20%
Lending::update_accumulator 5,764 (-12) -0.21%
StatefulTest::public_dispatch 8,122 (-17) -0.21%
Lending::get_position 5,238 (-12) -0.23%
Token::shield 5,222 (-12) -0.23%
Token::constructor 5,143 (-12) -0.23%
CardGame::on_game_joined 5,046 (-12) -0.24%
Token::transfer_public 4,797 (-12) -0.25%
NFT::constructor 4,787 (-12) -0.25%
Token::burn_public 4,689 (-12) -0.26%
TokenBlacklist::mint_public 4,611 (-12) -0.26%
TokenBlacklist::mint_private 4,294 (-12) -0.28%
AvmTest::sha256_hash 3,878 (-12) -0.31%
StatefulTest::public_constructor 3,860 (-12) -0.31%
FPC::public_dispatch 8,362 (-27) -0.32%
NFT::transfer_in_public 3,714 (-12) -0.32%
Benchmarking::increment_balance 3,713 (-12) -0.32%
Test::public_dispatch 19,751 (-64) -0.32%
AppSubscription::constructor 3,690 (-12) -0.32%
Crowdfunding::init 3,535 (-12) -0.34%
Token::mint_public 3,525 (-12) -0.34%
Token::mint_private_old 3,454 (-12) -0.35%
NFT::mint 3,364 (-12) -0.36%
Parent::public_nested_static_call 3,364 (-12) -0.36%
Claim::constructor 3,269 (-12) -0.37%
EasyPrivateVoting::constructor 3,223 (-12) -0.37%
AuthRegistry::consume 3,222 (-12) -0.37%
Lending::init 3,192 (-12) -0.37%
FPC::constructor 3,152 (-12) -0.38%
Auth::constructor 3,097 (-12) -0.39%
Uniswap::constructor 3,056 (-12) -0.39%
Lending::_deposit 3,041 (-12) -0.39%
AvmTest::emit_unencrypted_log 2,995 (-12) -0.40%
AvmTest::pedersen_hash 2,923 (-12) -0.41%
AvmTest::pedersen_hash_with_index 2,923 (-12) -0.41%
TokenBlacklist::_increase_public_balance 2,855 (-12) -0.42%
Token::_increase_public_balance 2,855 (-12) -0.42%
TokenBlacklist::public_dispatch 25,197 (-107) -0.42%
NFT::owner_of 2,796 (-12) -0.43%
Spam::public_spam 2,796 (-12) -0.43%
TokenBlacklist::get_roles 2,773 (-12) -0.43%
AvmTest::keccak_hash 2,737 (-12) -0.44%
EasyPrivateVoting::public_dispatch 6,085 (-27) -0.44%
InclusionProofs::constructor 2,621 (-12) -0.46%
FeeJuice::_increase_public_balance 2,586 (-12) -0.46%
Crowdfunding::public_dispatch 6,212 (-29) -0.46%
EasyPrivateVoting::add_to_tally_public 2,547 (-12) -0.47%
AvmInitializerTest::constructor 2,545 (-12) -0.47%
Lending::deposit_public 2,543 (-12) -0.47%
FeeJuice::check_balance 2,441 (-12) -0.49%
Lending::repay_public 2,426 (-12) -0.49%
StaticParent::public_nested_static_call 2,413 (-12) -0.49%
Auth::get_authorized_delay 2,398 (-12) -0.50%
AvmTest::add_storage_map 2,316 (-12) -0.52%
Lending::get_asset 2,209 (-12) -0.54%
Lending::public_dispatch 28,339 (-154) -0.54%
NFT::set_minter 2,205 (-12) -0.54%
Token::set_minter 2,200 (-12) -0.54%
Token::public_dispatch 36,704 (-201) -0.54%
StatefulTest::increment_public_value 2,147 (-12) -0.56%
AuthRegistry::is_consumable 2,137 (-12) -0.56%
TokenBlacklist::balance_of_public 2,122 (-12) -0.56%
Token::balance_of_public 2,122 (-12) -0.56%
StatefulTest::increment_public_value_no_init_check 2,098 (-12) -0.57%
FeeJuice::balance_of_public 2,068 (-12) -0.58%
NFT::public_dispatch 26,233 (-153) -0.58%
AuthRegistry::_set_authorized 2,054 (-12) -0.58%
Auth::get_authorized 2,041 (-12) -0.58%
FPC::pay_refund 2,038 (-12) -0.59%
Test::create_l2_to_l1_message_public 2,030 (-12) -0.59%
NFT::is_minter 2,024 (-12) -0.59%
Token::is_minter 2,024 (-12) -0.59%
AuthRegistry::set_authorized 2,007 (-12) -0.59%
AvmTest::returndata_copy_oracle 1,998 (-12) -0.60%
Benchmarking::broadcast 1,994 (-12) -0.60%
PriceFeed::get_price 1,988 (-12) -0.60%
FPC::prepare_fee 1,983 (-12) -0.60%
AuthRegistry::is_reject_all 1,970 (-12) -0.61%
StatefulTest::get_public_value 1,960 (-12) -0.61%
AvmTest::set_storage_map 1,956 (-12) -0.61%
PriceFeed::set_price 1,946 (-12) -0.61%
Auth::get_scheduled_authorized 1,941 (-12) -0.61%
AvmTest::read_storage_map 1,929 (-12) -0.62%
NFT::_finish_transfer_to_public 1,929 (-12) -0.62%
Lending::withdraw_public 1,891 (-12) -0.63%
Lending::borrow_public 1,891 (-12) -0.63%
TestLog::emit_unencrypted_events 1,853 (-12) -0.64%
InclusionProofs::public_dispatch 4,169 (-27) -0.64%
AuthRegistry::set_reject_all 1,845 (-12) -0.65%
AvmTest::get_args_hash 1,804 (-12) -0.66%
AvmTest::poseidon2_hash 1,734 (-12) -0.69%
Test::emit_unencrypted 1,702 (-12) -0.70%
NFT::_store_payload_in_transient_storage_unsafe 1,403 (-12) -0.85%
Token::_store_payload_in_transient_storage_unsafe 1,403 (-12) -0.85%
Crowdfunding::_publish_donation_receipts 1,391 (-12) -0.86%
AvmTest::u128_addition_overflow 1,325 (-12) -0.90%
AvmTest::debug_logging 1,280 (-12) -0.93%
Auth::public_dispatch 10,782 (-103) -0.95%
AvmTest::pedersen_commit 1,223 (-12) -0.97%
Child::set_value_twice_with_nested_first 1,216 (-12) -0.98%
Child::set_value_twice_with_nested_last 1,216 (-12) -0.98%
Parent::public_static_call 1,130 (-12) -1.05%
StaticParent::public_static_call 1,130 (-12) -1.05%
Token::_reduce_total_supply 1,112 (-12) -1.07%
TokenBlacklist::_reduce_total_supply 1,107 (-12) -1.07%
Uniswap::_assert_token_is_same 1,106 (-12) -1.07%
Child::set_value_with_two_nested_calls 1,100 (-12) -1.08%
Router::public_dispatch 2,583 (-29) -1.11%
FeeJuice::set_portal 1,066 (-12) -1.11%
FeeJuice::public_dispatch 6,261 (-74) -1.17%
DocsExample::get_shared_immutable_constrained_public_indirect 1,013 (-12) -1.17%
Router::_check_timestamp 981 (-12) -1.21%
Parent::pub_entry_point_twice 976 (-12) -1.21%
AuthRegistry::public_dispatch 8,363 (-103) -1.22%
AvmTest::nested_call_to_assert_same 967 (-12) -1.23%
AvmTest::nested_call_to_add 967 (-12) -1.23%
AvmTest::nested_static_call_to_add 967 (-12) -1.23%
Router::_check_block_number 964 (-12) -1.23%
StaticParent::public_get_value_from_child 953 (-12) -1.24%
AvmTest::nested_call_to_add_with_gas 942 (-12) -1.26%
DocsExample::initialize_public_immutable 935 (-12) -1.27%
DocsExample::initialize_shared_immutable 935 (-12) -1.27%
AppSubscription::public_dispatch 4,973 (-64) -1.27%
Lending::get_assets 905 (-12) -1.31%
AvmTest::external_call_to_divide_by_zero 904 (-12) -1.31%
Child::pub_inc_value_internal 855 (-12) -1.38%
StaticChild::pub_illegal_inc_value 850 (-12) -1.39%
Parent::public_dispatch 8,381 (-119) -1.40%
Child::pub_inc_value 809 (-12) -1.46%
StaticChild::pub_inc_value 809 (-12) -1.46%
AvmTest::u128_from_integer_overflow 805 (-12) -1.47%
NFT::set_admin 803 (-12) -1.47%
Token::set_admin 803 (-12) -1.47%
EasyPrivateVoting::end_vote 802 (-12) -1.47%
Claim::public_dispatch 4,227 (-64) -1.49%
DocsExample::get_shared_immutable_constrained_public_multiple 775 (-12) -1.52%
TokenBlacklist::total_supply 732 (-12) -1.61%
Token::total_supply 732 (-12) -1.61%
StaticParent::public_dispatch 7,220 (-119) -1.62%
AvmTest::set_read_storage_single 718 (-12) -1.64%
Spam::public_dispatch 3,765 (-64) -1.67%
AvmTest::elliptic_curve_add_and_double 701 (-12) -1.68%
AvmTest::read_storage_list 688 (-12) -1.71%
TokenBridge::get_portal_address_public 651 (-12) -1.81%
TokenBridge::_assert_token_is_same 651 (-12) -1.81%
Token::public_get_decimals 634 (-12) -1.86%
NFT::public_get_name 619 (-12) -1.90%
NFT::get_admin 619 (-12) -1.90%
Token::public_get_name 619 (-12) -1.90%
Token::public_get_symbol 619 (-12) -1.90%
DocsExample::get_shared_immutable_constrained_public 618 (-12) -1.90%
AuthWitTest::consume_public 614 (-12) -1.92%
NFT::public_get_symbol 614 (-12) -1.92%
TokenBridge::get_token 614 (-12) -1.92%
Token::get_admin 614 (-12) -1.92%
TestLog::public_dispatch 3,219 (-64) -1.95%
AvmInitializerTest::read_storage_immutable 573 (-12) -2.05%
Parent::pub_entry_point 570 (-12) -2.06%
StaticParent::public_call 570 (-12) -2.06%
AvmTest::elliptic_curve_add 568 (-12) -2.07%
Child::public_dispatch 5,981 (-134) -2.19%
AvmTest::assert_calldata_copy 519 (-12) -2.26%
AvmTest::read_storage_single 519 (-12) -2.26%
AvmTest::create_different_nullifier_in_nested_call 486 (-12) -2.41%
AvmTest::keccak_f1600 486 (-12) -2.41%
AvmTest::create_same_nullifier_in_nested_call 476 (-12) -2.46%
ImportTest::pub_call_public_fn 471 (-12) -2.48%
AvmTest::nested_static_call_to_set_storage 470 (-12) -2.49%
AvmTest::external_call_to_assertion_failure 456 (-12) -2.56%
AvmTest::variable_base_msm 453 (-12) -2.58%
AvmTest::test_get_contract_instance 446 (-12) -2.62%
AvmTest::test_get_contract_instance_matches 441 (-12) -2.65%
PriceFeed::public_dispatch 3,947 (-111) -2.74%
AvmTest::to_radix_le 409 (-12) -2.85%
AvmTest::revert_oracle 404 (-12) -2.88%
Child::pub_set_value 396 (-12) -2.94%
StaticChild::pub_set_value 396 (-12) -2.94%
Test::assert_public_global_vars 388 (-12) -3.00%
AvmTest::public_dispatch 60,132 (-1,869) -3.01%
DocsExample::update_leader 378 (-12) -3.08%
AuthWitTest::public_dispatch 1,907 (-64) -3.25%
AvmInitializerTest::public_dispatch 3,326 (-116) -3.37%
AvmTest::set_storage_list 320 (-12) -3.61%
DocsExample::public_dispatch 5,838 (-228) -3.76%
StaticChild::public_dispatch 3,033 (-119) -3.78%
AvmTest::set_storage_single 300 (-12) -3.85%
TokenBridge::constructor 3,232 (-130) -3.87%
ImportTest::public_dispatch 1,551 (-64) -3.96%
AvmTest::add_u128 241 (-12) -4.74%
AvmTest::check_selector 215 (-12) -5.29%
AvmTest::assertion_failure 203 (-12) -5.58%
StaticChild::pub_get_value 202 (-12) -5.61%
InclusionProofs::test_nullifier_inclusion_from_public 189 (-12) -5.97%
AvmTest::get_function_selector 180 (-12) -6.25%
InclusionProofs::push_nullifier_public 163 (-12) -6.86%
AvmTest::assert_same 158 (-12) -7.06%
AvmTest::emit_nullifier_and_check 158 (-12) -7.06%
Child::pub_get_value 156 (-12) -7.14%
AvmTest::assert_nullifier_exists 154 (-12) -7.23%
AvmTest::assert_timestamp 153 (-12) -7.27%
Test::dummy_public_call 145 (-12) -7.64%
Test::is_time_equal 145 (-12) -7.64%
AvmTest::set_opcode_really_big_field 142 (-12) -7.79%
AvmTest::set_opcode_big_field 142 (-12) -7.79%
AvmTest::modulo2 132 (-12) -8.33%
AvmTest::note_hash_exists 129 (-12) -8.51%
AvmTest::l1_to_l2_msg_exists 129 (-12) -8.51%
AvmTest::nullifier_exists 128 (-12) -8.57%
AvmTest::add_args_return 126 (-12) -8.70%
AvmTest::set_opcode_small_field 126 (-12) -8.70%
AvmTest::divide_by_zero 124 (-12) -8.82%
DocsExample::spend_public_authwit 120 (-12) -9.09%
AvmTest::set_opcode_u64 118 (-12) -9.23%
AvmTest::send_l2_to_l1_msg 117 (-12) -9.30%
Test::create_l2_to_l1_message_arbitrary_recipient_public 117 (-12) -9.30%
AvmTest::set_opcode_u32 114 (-12) -9.52%
AvmTest::nullifier_collision 113 (-12) -9.60%
AvmTest::get_fee_per_da_gas 110 (-12) -9.84%
AvmTest::get_l2_gas_left 110 (-12) -9.84%
AvmTest::get_block_number 110 (-12) -9.84%
AvmTest::get_timestamp 110 (-12) -9.84%
AvmTest::get_address 110 (-12) -9.84%
AvmTest::get_chain_id 110 (-12) -9.84%
AvmTest::set_opcode_u8 110 (-12) -9.84%
AvmTest::get_fee_per_l2_gas 110 (-12) -9.84%
AvmTest::get_sender 110 (-12) -9.84%
AvmTest::get_transaction_fee 110 (-12) -9.84%
AvmTest::get_da_gas_left 110 (-12) -9.84%
AvmTest::get_version 110 (-12) -9.84%
AvmTest::new_note_hash 109 (-12) -9.92%
AvmTest::new_nullifier 109 (-12) -9.92%
Test::emit_nullifier_public 109 (-12) -9.92%
AvmTest::return_oracle 354 (-64) -15.31%

Copy link
Contributor

@lucasxia01 lucasxia01 left a comment

Choose a reason for hiding this comment

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

not fully understanding what's going on here, but seems fine.

// Construct kernel consisting only of the kernel completion logic
AcirProgram program = construct_mock_kernel_program(ivc.verification_queue, { num_app_public_inputs });
Builder kernel = acir_format::create_kernel_circuit(program.constraints, ivc);
// WORKTODO: this would normally happen in accumulate()
Copy link
Contributor

Choose a reason for hiding this comment

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

unresolved

{
size_t total_size = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

interesting. I guess we need more tests for borderline circuit sizes

Builder app_circuit = construct_mock_app_circuit(ivc);
ivc.accumulate(app_circuit);
// Test generation of "init" kernel VK via dummy IVC data
TEST_F(IvcRecursionConstraintTest, GenerateVKFromConstraints)
Copy link
Contributor

Choose a reason for hiding this comment

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

what's missing from this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure what you mean - I wouldn't say anything is missing, its just that right now I'm only supporting the mocking of the IVC state after accumulation of the first app. All that's needed I suppose is functionality to mock fold proofs which shouldn't be hard

@ledwards2225 ledwards2225 merged commit 9325f6f into master Nov 12, 2024
48 checks passed
@ledwards2225 ledwards2225 deleted the lde/dummy_proofs branch November 12, 2024 21:39
TomAFrench added a commit that referenced this pull request Nov 13, 2024
* master:
  git subrepo push --branch=master noir-projects/aztec-nr
  git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]
  chore: replace relative paths to noir-protocol-circuits
  git subrepo push --branch=master barretenberg
  feat: mock data for IVC (#9893)
  refactor: final token cleanup (#9864)
  chore: delete accidentally added file (#9912)
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.

2 participants