async fn slow(
            storage: &mut Connection<'_, Core>,
            l1_batch_number: L1BatchNumber,
        ) -> Option<Self> {
            let header = storage
                .blocks_dal()
                .get_l1_batch_header(l1_batch_number)
                .await
                .unwrap()?;
            let protective_reads = storage
                .storage_logs_dedup_dal()
                .get_protective_reads_for_l1_batch(l1_batch_number)
                .await
                .unwrap();
            let touched_slots = storage
                .storage_logs_dal()
                .get_touched_slots_for_executed_l1_batch(l1_batch_number)
                .await
                .unwrap();

            let mut storage_logs = BTreeMap::new();

            let hashed_keys: Vec<_> = protective_reads
                .iter()
                .chain(touched_slots.keys())
                .map(StorageKey::hashed_key)
                .collect();
            let previous_values = storage
                .storage_logs_dal()
                .get_previous_storage_values(&hashed_keys, l1_batch_number)
                .await
                .unwrap();
            let l1_batches_for_initial_writes = storage
                .storage_logs_dal()
                .get_l1_batches_and_indices_for_initial_writes(&hashed_keys)
                .await
                .unwrap();

            for storage_key in protective_reads {
                let previous_value = previous_values[&storage_key.hashed_key()].unwrap_or_default();
                // Sanity check: value must not change for slots that require protective reads.
                if let Some(value) = touched_slots.get(&storage_key) {
                    assert_eq!(
                        previous_value, *value,
                        "Value was changed for slot that requires protective read"
                    );
                }

                storage_logs.insert(
                    storage_key,
                    TreeInstruction::Read(storage_key.hashed_key_u256()),
                );
            }

            for (storage_key, value) in touched_slots {
                let previous_value = previous_values[&storage_key.hashed_key()].unwrap_or_default();
                if previous_value != value {
                    let (_, leaf_index) = l1_batches_for_initial_writes[&storage_key.hashed_key()];
                    storage_logs.insert(
                        storage_key,
                        TreeInstruction::write(storage_key.hashed_key_u256(), leaf_index, value),
                    );
                }
            }

            Some(Self {
                stats: header.into(),
                storage_logs: storage_logs.into_values().collect(),
                mode: MerkleTreeMode::Full,
            })
        }
Old, slower method of loading storage logs. We want to test its equivalence to the new implementation.
core/node/metadata_calculator/src/helpers.rs