Skip to content

Commit

Permalink
chore: debug messages in setup Ceremony
Browse files Browse the repository at this point in the history
  • Loading branch information
glamperd committed Sep 23, 2024
1 parent 06c8692 commit 4d91ce6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/backend/src/functions/ceremony.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export const setupCeremony = functions
let vmInstanceId: string = ""

// Get a new circuit document.
const circuitDoc = await firestore.collection(getCircuitsCollectionPath(ceremonyDoc.ref.id)).doc().get()
const ccp = getCircuitsCollectionPath(ceremonyDoc.ref.id)
printLog(`CircuitsCollectionPath = ${ccp}`, LogLevel.DEBUG)
const circuitDoc = await firestore.collection(ccp).doc().get()

// Check if using the VM approach for contribution verification.
if (circuit.verification.cfOrVm === CircuitContributionVerificationMechanism.VM) {
Expand Down Expand Up @@ -206,13 +208,15 @@ export const setupCeremony = functions
// Encode circuit data.
const encodedCircuit = htmlEncodeCircuitData(circuit)

printLog(`writing circuit data...`, LogLevel.DEBUG)
// Prepare tx to write circuit data.
batch.create(circuitDoc.ref, {
...encodedCircuit,
lastUpdated: getCurrentServerTimestampInMillis()
})
}

printLog(`Done handling circuits...`, LogLevel.DEBUG)
// Send txs in a batch (to avoid race conditions).
await batch.commit()

Expand Down

0 comments on commit 4d91ce6

Please sign in to comment.