diff --git a/yarn-project/noir-contracts/src/contracts/liquidity_mining_contract/src/main.nr b/yarn-project/noir-contracts/src/contracts/liquidity_mining_contract/src/main.nr index ef690f770439..d94ed4e77154 100644 --- a/yarn-project/noir-contracts/src/contracts/liquidity_mining_contract/src/main.nr +++ b/yarn-project/noir-contracts/src/contracts/liquidity_mining_contract/src/main.nr @@ -95,6 +95,9 @@ contract LiquidityMining { // 1.c) let block_data = get_block_data(block_number); + + // TODO: This should be injected directly from kernel --> GETTING IT FROM ORACLE IS NOT SAFE! + let blocks_tree_root = block_data.blocks_tree_root; // TODO: Seems to make sense to move the following to `HistoricBlockData` struct. // TODO: Would make sense to unify the ordering in `HistoricBlockData::serialize` function and the ordering @@ -118,7 +121,7 @@ contract LiquidityMining { // In our test case this should be tree root at the latest block and should correspond to the membership // witness we obtain from oracle assert( - block_data.blocks_tree_root == compute_merkle_root(block_hash, witness.index, witness.path), + blocks_tree_root == compute_merkle_root(block_hash, witness.index, witness.path), "Proving membership of a block in blocks tree failed" ); diff --git a/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr b/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr index 65cf52e96b5b..1bb62e9f3f6f 100644 --- a/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr +++ b/yarn-project/noir-contracts/src/contracts/test_contract/src/interface.nr @@ -1,5 +1,5 @@ /* Autogenerated file, do not edit! */ - + use dep::std; use dep::aztec::context::{ PrivateContext, PublicContext }; use dep::aztec::constants_gen::RETURN_VALUES_LENGTH; @@ -26,6 +26,7 @@ struct ManyNotesADeepStructTestCodeGenStruct { secret_hash: Field, } + // Interface for calling Test functions from a private context struct TestPrivateContextInterface { address: Field, @@ -241,6 +242,9 @@ impl TestPrivateContextInterface { } } + + + // Interface for calling Test functions from a public context struct TestPublicContextInterface { @@ -326,4 +330,5 @@ impl TestPublicContextInterface { } } - + +