Skip to content

Commit

Permalink
Merge pull request #422 from matter-labs/sb-fix-mp-coments
Browse files Browse the repository at this point in the history
Fix comments in boojum-integration
  • Loading branch information
StanislavBreadless authored Nov 6, 2023
2 parents 68be91d + 76eb720 commit e61d9e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion core/lib/multivm/src/versions/vm_latest/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub const OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_OFFSET: usize =

/// One of "worst case" scenarios for the number of state diffs in a batch is when 120kb of pubdata is spent
/// on repeated writes, that are all zeroed out. In this case, the number of diffs is 120k / 5 = 24k. This means that they will have
/// accoomdate 6528000 bytes of calldata for the uncompressed state diffs. Adding 120k on top leaves us with
/// accommodate 6528000 bytes of calldata for the uncompressed state diffs. Adding 120k on top leaves us with
/// roughly 6650000 bytes needed for calldata. 207813 slots are needed to accomodate this amount of data.
/// We round up to 208000 slots just in case.
///
Expand Down
13 changes: 2 additions & 11 deletions core/lib/multivm/src/versions/vm_latest/old_vm/event_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::vm_latest::old_vm::{
oracles::OracleWithHistory,
};
use itertools::Itertools;
use std::{cmp::Ordering, collections::HashMap};
use std::collections::HashMap;
use zk_evm_1_4_0::{
abstractions::EventSink,
aux_structures::{LogQuery, Timestamp},
Expand Down Expand Up @@ -76,16 +76,7 @@ impl<H: HistoryMode> InMemoryEventSink<H> {

// Sort the events by timestamp and rollback flag, basically ensuring that
// if an event has been rolled back, the original event and its rollback will be put together
events.sort_by(|a, b| match a.timestamp.0.cmp(&b.timestamp.0) {
Ordering::Equal => {
if b.rollback {
Ordering::Less
} else {
Ordering::Greater
}
}
r => r,
});
events.sort_by_key(|log| (log.timestamp, log.rollback));

let mut stack = Vec::<LogQuery>::new();
let mut net_history = vec![];
Expand Down

0 comments on commit e61d9e5

Please sign in to comment.