pub async fn set_replica_state(&mut self, state: &validator::ReplicaState) -> DalResult<()> {
        let state_json = zksync_protobuf::serde::Serialize
            .proto_fmt(state, serde_json::value::Serializer)
            .unwrap();
        sqlx::query!(
            r#"
            UPDATE consensus_replica_state
            SET
                state = $1
            WHERE
                fake_key
            "#,
            state_json
        )
        .instrument("set_replica_state")
        .report_latency()
        .with_arg("state.view", &state.view)
        .execute(self.storage)
        .await?;
        Ok(())
    }
Sets the current BFT replica state.
core/lib/dal/src/consensus_dal/mod.rs