Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
tx_context.hpp
Go to the documentation of this file.
1#pragma once
2
9
10namespace bb::avm2::simulation {
11
12struct TxContext {
18
19 Gas gas_used = { 0, 0 };
21
23 {
24 auto& side_effects = side_effect_tracker.get_side_effects();
25
26 return {
27 .gas_used = gas_used,
28 .tree_states = merkle_db.get_tree_state(),
29 .written_public_data_slots_tree_snapshot = written_public_data_slots_tree.get_snapshot(),
30 .retrieved_bytecodes_tree_snapshot = retrieved_bytecodes_tree.get_snapshot(),
31 .numUnencryptedLogFields = side_effects.get_num_unencrypted_log_fields(),
32 .numL2ToL1Messages = static_cast<uint32_t>(side_effects.l2_to_l1_messages.size()),
33 .next_context_id = context_provider.get_next_context_id(),
34 };
35 }
36};
37
38} // namespace bb::avm2::simulation
virtual uint32_t get_next_context_id() const =0
virtual TreeStates get_tree_state() const =0
virtual AppendOnlyTreeSnapshot get_snapshot() const =0
virtual const TrackedSideEffects & get_side_effects() const =0
virtual AppendOnlyTreeSnapshot get_snapshot() const =0
TxContextEvent serialize_tx_context_event() const
HighLevelMerkleDBInterface & merkle_db
WrittenPublicDataSlotsTreeCheckInterface & written_public_data_slots_tree
ContextProviderInterface & context_provider
SideEffectTrackerInterface & side_effect_tracker
RetrievedBytecodesTreeCheckInterface & retrieved_bytecodes_tree