async fn get_artifacts(
        metadata: &Vec<(u8, JobId)>,
        object_store: &dyn ObjectStore,
    ) -> anyhow::Result<Vec<ZkSyncRecursionProof>> {
        let job_mapping: HashMap<u8, JobId> = metadata
            .clone()
            .into_iter()
            .map(|(leaf_circuit_id, job_id)| {
                (
                    ZkSyncRecursionLayerStorageType::from_leaf_u8_to_basic_u8(leaf_circuit_id),
                    job_id,
                )
            })
            .collect();

        let empty_proof = empty_node_proof().into_inner();

        let mut proofs = Vec::new();
        for circuit_id in BaseLayerCircuitType::as_iter_u8() {
            if job_mapping.contains_key(&circuit_id) {
                let key = *job_mapping.get(&circuit_id).unwrap();
                let fri_proof_wrapper = object_store
                    .get((key.id(), key.chain_id()))
                    .await
                    .unwrap_or_else(|_| {
                        panic!(
                            "Failed to load proof with circuit_id {} for recursion tip",
                            circuit_id
                        )
                    });
                match fri_proof_wrapper {
                    FriProofWrapper::Base(_) => {
                        return Err(anyhow::anyhow!(
                        "Expected only recursive proofs for recursion tip, got Base for circuit {}",
                        circuit_id
                    ));
                    }
                    FriProofWrapper::Recursive(recursive_proof) => {
                        proofs.push(recursive_proof.into_inner());
                    }
                }
            } else {
                proofs.push(empty_proof.clone());
            }
        }
        Ok(proofs)
    }
Loads all proofs for a given recursion tip's job ids.
Note that recursion tip may not have proofs for some specific circuits (because the batch didn't contain them).
In this scenario, we still need to pass a proof, but it won't be taken into account during proving.
For this scenario, we use an empty_proof, but any proof would suffice.
prover/crates/bin/witness_generator/src/rounds/recursion_tip/artifacts.rs