pub(crate) fn get_l2_block_hash(&self) -> H256 {
        let mut digest = L2BlockHasher::new(self.number, self.timestamp, self.prev_block_hash);
        for tx in &self.executed_transactions {
            digest.push_tx_hash(tx.hash);
        }
        digest.finalize(self.protocol_version)
    }
Calculates L2 block hash based on the protocol version.
core/node/state_keeper/src/updates/l2_block_updates.rs