Skip to content

Commit

Permalink
chore: cleanup + various doc improvements (#4282)
Browse files Browse the repository at this point in the history
Fixes #4264
  • Loading branch information
benesjan authored and AztecBot committed Jan 31, 2024
1 parent 1eaf52f commit b524154
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aztec/src/context.nr
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ struct PrivateContext {
new_l2_to_l1_msgs : BoundedVec<Field, MAX_NEW_L2_TO_L1_MSGS_PER_CALL>,
// docs:end:private-context

// Header of a block whose state is used during private execution (not the block the transaction is included in).
historical_header: Header,

// TODO(https://github.com/AztecProtocol/aztec-packages/issues/1165)
Expand Down Expand Up @@ -148,11 +149,14 @@ impl PrivateContext {
self.inputs.call_context.function_selector
}

// Returns the header of a block whose state is used during private execution
// Returns the header of a block whose state is used during private execution (not the block the transaction is
// included in).
pub fn get_header(self) -> Header {
self.historical_header
}

// Returns the header of an arbitrary block whose block number is less than or equal to the block number
// of historical header.
pub fn get_header_at(self, block_number: u32) -> Header {
get_header_at(block_number, self)
}
Expand Down Expand Up @@ -494,6 +498,8 @@ struct PublicContext {
unencrypted_logs_hash: BoundedVec<Field, NUM_FIELDS_PER_SHA256>,
unencrypted_logs_preimages_length: Field,

// Header of a block whose state is used during public execution. Set by sequencer to be a header of a block
// previous to the one in which the tx is included.
historical_header: Header,
prover_address: AztecAddress,
}
Expand Down

0 comments on commit b524154

Please sign in to comment.