Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ void AvmTraceBuilder::pay_fee()
// TS equivalent:
// computeFeePayerBalanceStorageSlot(fee_payer);
std::vector<FF> slot_hash_inputs = { FEE_JUICE_BALANCES_SLOT, public_inputs.fee_payer };
const auto balance_slot = poseidon2_trace_builder.poseidon2_hash(slot_hash_inputs, clk, Poseidon2Caller::SILO);
// TODO: do constrained slot derivations!
// const auto balance_slot = poseidon2_trace_builder.poseidon2_hash(slot_hash_inputs, clk, Poseidon2Caller::SILO);
const auto balance_slot = Poseidon2::hash(slot_hash_inputs);

Comment on lines 324 to 328

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was broken! I think because this was calling the poseidon gadget without an execution trace row. I can throw this in another PR if this PR ends up being at all controversial/long-lived.

// ** Read the balance before fee payment **
// TS equivalent:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,14 @@ contract AvmTest {
* be optimized away.
************************************************************************/
#[public]
fn bulk_testing(args_field: [Field; 10], args_u8: [u8; 10]) {
fn bulk_testing(
args_field: [Field; 10],
args_u8: [u8; 10],
get_instance_for_address: AztecAddress,
expected_deployer: AztecAddress,
expected_class_id: ContractClassId,
expected_initialization_hash: Field,
) {
dep::aztec::oracle::debug_log::debug_log("set_storage_single");
set_storage_single(30);
dep::aztec::oracle::debug_log::debug_log("set_storage_list");
Expand All @@ -692,9 +699,12 @@ contract AvmTest {
dep::aztec::oracle::debug_log::debug_log("pedersen_hash_with_index");
let _ = pedersen_hash_with_index(args_field);
dep::aztec::oracle::debug_log::debug_log("test_get_contract_instance");
// address should match yarn-project/simulator/src/public/fixtures/index.ts's
// MockedAvmTestContractDataSource.otherContractInstance
test_get_contract_instance(AztecAddress::from_field(0x4444));
test_get_contract_instance_matches(
get_instance_for_address,
expected_deployer,
expected_class_id,
expected_initialization_hash,
);
dep::aztec::oracle::debug_log::debug_log("get_address");
let _ = get_address();
dep::aztec::oracle::debug_log::debug_log("get_sender");
Expand Down
2 changes: 2 additions & 0 deletions yarn-project/bb-prover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"devDependencies": {
"@aztec/ethereum": "workspace:^",
"@aztec/kv-store": "workspace:^",
"@aztec/noir-contracts.js": "workspace:^",
"@aztec/protocol-contracts": "workspace:^",
Comment thread
dbanks12 marked this conversation as resolved.
"@aztec/types": "workspace:^",
"@jest/globals": "^29.5.0",
"@types/jest": "^29.5.0",
Expand Down
Loading