async fn apply_status_changes(
        &self,
        cursor: &mut UpdaterCursor,
        changes: StatusChanges,
    ) -> anyhow::Result<()> {
        let total_latency = EN_METRICS.batch_status_updater_loop_iteration.start();
        let mut connection = self.pool.connection_tagged("sync_layer").await?;
        let mut transaction = connection.start_transaction().await?;
        let last_sealed_batch = transaction
            .blocks_dal()
            .get_sealed_l1_batch_number()
            .await?
            .context("L1 batches disappeared from Postgres")?;

        for change in &changes.commit {
            tracing::info!(
                "Commit status change: number {}, hash {}, happened at {}, on chainID {:?}",
                change.number,
                change.l1_tx_hash,
                change.happened_at,
                change.sl_chain_id
            );
            anyhow::ensure!(
                change.number <= last_sealed_batch,
                "Incorrect update state: unknown batch marked as committed"
            );
            // TODO mark finality status correspondingly
            transaction
                .eth_sender_dal()
                .insert_bogus_confirmed_eth_tx(
                    change.number,
                    AggregatedActionType::Commit,
                    change.l1_tx_hash,
                    change.happened_at,
                    change.sl_chain_id,
                    EthTxFinalityStatus::Finalized,
                )
                .await?;
            cursor.last_committed_l1_batch = change.number;
        }

        for change in &changes.prove {
            tracing::info!(
                "Prove status change: number {}, hash {}, happened at {}, on chainID {:?}",
                change.number,
                change.l1_tx_hash,
                change.happened_at,
                change.sl_chain_id
            );
            anyhow::ensure!(
                change.number <= cursor.last_committed_l1_batch,
                "Incorrect update state: proven batch must be committed"
            );
            // TODO mark finality status correspondingly
            transaction
                .eth_sender_dal()
                .insert_bogus_confirmed_eth_tx(
                    change.number,
                    AggregatedActionType::PublishProofOnchain,
                    change.l1_tx_hash,
                    change.happened_at,
                    change.sl_chain_id,
                    EthTxFinalityStatus::Finalized,
                )
                .await?;
            cursor.last_proven_l1_batch = change.number;
        }

        for change in &changes.execute {
            tracing::info!(
                "Execute status change: number {}, hash {}, happened at {}, on chainID {:?}",
                change.number,
                change.l1_tx_hash,
                change.happened_at,
                change.sl_chain_id
            );
            anyhow::ensure!(
                change.number <= cursor.last_proven_l1_batch,
                "Incorrect update state: executed batch must be proven"
            );
            // TODO mark finality status correspondingly
            transaction
                .eth_sender_dal()
                .insert_bogus_confirmed_eth_tx(
                    change.number,
                    AggregatedActionType::Execute,
                    change.l1_tx_hash,
                    change.happened_at,
                    change.sl_chain_id,
                    EthTxFinalityStatus::Finalized,
                )
                .await?;
            cursor.last_executed_l1_batch = change.number;
        }
        transaction.commit().await?;
        total_latency.observe();

        #[cfg(test)]
        self.changes_sender.send(changes).ok();
        Ok(())
    }
Inserts the provided status changes into the database.
The status changes are applied to the database by inserting bogus confirmed transactions (with
some fields missing/substituted) only to satisfy API needs; this component doesn't expect the updated
tables to be ever accessed by the `eth_sender` module.
core/node/node_sync/src/batch_status_updater/mod.rs