-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
42 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
yarn-project/noir-protocol-circuits/src/crates/public-kernel-lib/src/common.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
yarn-project/noir-protocol-circuits/src/crates/types/src/abis/private_call_stack_item.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use crate::abis::{ | ||
function_data::FunctionData, | ||
private_circuit_public_inputs::PrivateCircuitPublicInputs, | ||
}; | ||
use crate::address::AztecAddress; | ||
use crate::constants::GENERATOR_INDEX__CALL_STACK_ITEM; | ||
use crate::traits::Hash; | ||
|
||
struct PrivateCallStackItem { | ||
// This is the _actual_ contract address relating to where this function's code resides in the | ||
// contract tree. Regardless of whether this is a call or delegatecall, this | ||
// `contract_address` _does not change_. Amongst other things, it's used as a lookup for | ||
// getting the correct code from the tree. There is a separate `storage_contract_address` | ||
// within a CallStackItem which varies depending on whether this is a call or delegatecall. | ||
contract_address: AztecAddress, | ||
public_inputs: PrivateCircuitPublicInputs, | ||
function_data: FunctionData, | ||
// Not really needed for PrivateCallStackItem. | ||
is_execution_request: bool, | ||
} | ||
|
||
impl Hash for PrivateCallStackItem { | ||
fn hash(self) -> Field { | ||
dep::std::hash::pedersen_hash_with_separator([ | ||
self.contract_address.to_field(), | ||
self.function_data.hash(), | ||
self.public_inputs.hash(), | ||
], GENERATOR_INDEX__CALL_STACK_ITEM) | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ject/noir-protocol-circuits/src/crates/types/src/abis/private_kernel/private_call_data.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
yarn-project/noir-protocol-circuits/src/crates/types/src/abis/public_call_data.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 1 addition & 27 deletions
28
.../crates/types/src/abis/call_stack_item.nr → .../types/src/abis/public_call_stack_item.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
yarn-project/noir-protocol-circuits/src/crates/types/src/tests/private_call_data_builder.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters