Skip to content

Commit

Permalink
fix mps comments
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless committed Nov 6, 2023
1 parent c0dba4a commit 39fb338
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 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
11 changes: 1 addition & 10 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 @@ -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 39fb338

Please sign in to comment.