Skip to content

Commit

Permalink
remove logs from pubdata
Browse files Browse the repository at this point in the history
  • Loading branch information
toni-calvin committed Jan 16, 2024
1 parent c5fe842 commit af78a40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/lib/types/src/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ impl L1BatchWithMetadata {
pub fn construct_pubdata(&self, validium_mode: bool) -> Vec<u8> {
let mut res: Vec<u8> = vec![];

// Process and Pack Logs
res.extend((self.header.l2_to_l1_logs.len() as u32).to_be_bytes());
for l2_to_l1_log in &self.header.l2_to_l1_logs {
res.extend(l2_to_l1_log.0.to_bytes());
}

// We do not want to publish L2->L1 msgs, bytecodes, and state diffs in validium mode.
if !validium_mode {
// Process and Pack Logs
res.extend((self.header.l2_to_l1_logs.len() as u32).to_be_bytes());
for l2_to_l1_log in &self.header.l2_to_l1_logs {
res.extend(l2_to_l1_log.0.to_bytes());
}

// Process and Pack Msgs
res.extend((self.header.l2_to_l1_messages.len() as u32).to_be_bytes());
for msg in &self.header.l2_to_l1_messages {
Expand Down
1 change: 1 addition & 0 deletions era-contracts-lambda
Submodule era-contracts-lambda added at 648773

0 comments on commit af78a40

Please sign in to comment.