diff --git a/crates/blockifier/resources/versioned_constants_0_13_0.json b/crates/blockifier/resources/versioned_constants_0_13_0.json index 3e1b7703e05..494ec005ebc 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_0.json +++ b/crates/blockifier/resources/versioned_constants_0_13_0.json @@ -8,6 +8,7 @@ "segment_arena_cells": true, "disable_cairo0_redeclaration": false, "enable_stateful_compression": false, + "ignore_inner_events_resources": false, "enable_reverts": false, "tx_event_limits": { "max_data_length": 1000000000, diff --git a/crates/blockifier/resources/versioned_constants_0_13_1.json b/crates/blockifier/resources/versioned_constants_0_13_1.json index 3a12982a716..6dbd38d476b 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_1.json +++ b/crates/blockifier/resources/versioned_constants_0_13_1.json @@ -41,6 +41,7 @@ "segment_arena_cells": true, "disable_cairo0_redeclaration": false, "enable_stateful_compression": false, + "ignore_inner_events_resources": true, "enable_reverts": false, "os_constants": { "nop_entry_point_offset": -1, diff --git a/crates/blockifier/resources/versioned_constants_0_13_1_1.json b/crates/blockifier/resources/versioned_constants_0_13_1_1.json index 533d2c5cb89..57b30c05ad5 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_1_1.json +++ b/crates/blockifier/resources/versioned_constants_0_13_1_1.json @@ -41,6 +41,7 @@ "segment_arena_cells": true, "disable_cairo0_redeclaration": false, "enable_stateful_compression": false, + "ignore_inner_events_resources": false, "enable_reverts": false, "os_constants": { "nop_entry_point_offset": -1, diff --git a/crates/blockifier/resources/versioned_constants_0_13_2.json b/crates/blockifier/resources/versioned_constants_0_13_2.json index cb35171d913..7462757e878 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_2.json +++ b/crates/blockifier/resources/versioned_constants_0_13_2.json @@ -39,6 +39,7 @@ }, "disable_cairo0_redeclaration": true, "enable_stateful_compression": false, + "ignore_inner_events_resources": false, "enable_reverts": false, "max_recursion_depth": 50, "segment_arena_cells": false, diff --git a/crates/blockifier/resources/versioned_constants_0_13_2_1.json b/crates/blockifier/resources/versioned_constants_0_13_2_1.json index fdda72b43b3..94c1216a558 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_2_1.json +++ b/crates/blockifier/resources/versioned_constants_0_13_2_1.json @@ -39,6 +39,7 @@ }, "disable_cairo0_redeclaration": true, "enable_stateful_compression": false, + "ignore_inner_events_resources": false, "max_recursion_depth": 50, "enable_reverts": false, "segment_arena_cells": false, diff --git a/crates/blockifier/resources/versioned_constants_0_13_3.json b/crates/blockifier/resources/versioned_constants_0_13_3.json index fdda72b43b3..94c1216a558 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_3.json +++ b/crates/blockifier/resources/versioned_constants_0_13_3.json @@ -39,6 +39,7 @@ }, "disable_cairo0_redeclaration": true, "enable_stateful_compression": false, + "ignore_inner_events_resources": false, "max_recursion_depth": 50, "enable_reverts": false, "segment_arena_cells": false, diff --git a/crates/blockifier/resources/versioned_constants_0_13_4.json b/crates/blockifier/resources/versioned_constants_0_13_4.json index eac76d6a7a0..7ef3094d790 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_4.json +++ b/crates/blockifier/resources/versioned_constants_0_13_4.json @@ -39,6 +39,7 @@ }, "disable_cairo0_redeclaration": true, "enable_stateful_compression": true, + "ignore_inner_events_resources": false, "enable_reverts": true, "max_recursion_depth": 50, "segment_arena_cells": false, diff --git a/crates/blockifier/src/execution/call_info.rs b/crates/blockifier/src/execution/call_info.rs index 02a9740680a..cf3cd1e8b14 100644 --- a/crates/blockifier/src/execution/call_info.rs +++ b/crates/blockifier/src/execution/call_info.rs @@ -168,7 +168,7 @@ impl CallInfo { event_summary } - pub fn summarize(&self, _versioned_constants: &VersionedConstants) -> ExecutionSummary { + pub fn summarize(&self, versioned_constants: &VersionedConstants) -> ExecutionSummary { let mut executed_class_hashes: HashSet<ClassHash> = HashSet::new(); let mut visited_storage_entries: HashSet<StorageEntry> = HashSet::new(); let mut event_summary = EventSummary::default(); @@ -196,8 +196,16 @@ impl CallInfo { .map(|message| message.message.payload.0.len()), ); - // Events. - event_summary += call_info.specific_event_summary(); + // Events: all event resources in the execution tree, unless executing a 0.13.1 block. + if !versioned_constants.ignore_inner_events_resources { + event_summary += call_info.specific_event_summary(); + } + } + + if versioned_constants.ignore_inner_events_resources { + // For reexecution of 0.13.1 blocks, we ignore inner events resources - only outermost + // event data will be processed. + event_summary = self.specific_event_summary(); } ExecutionSummary { diff --git a/crates/blockifier/src/versioned_constants.rs b/crates/blockifier/src/versioned_constants.rs index d2d6eb72377..8102db06865 100644 --- a/crates/blockifier/src/versioned_constants.rs +++ b/crates/blockifier/src/versioned_constants.rs @@ -173,6 +173,7 @@ pub struct VersionedConstants { // Transactions settings. pub disable_cairo0_redeclaration: bool, pub enable_stateful_compression: bool, + pub ignore_inner_events_resources: bool, // Compiler settings. pub enable_reverts: bool,