The circuit registry represents a secure facility for storing compiled circuit artifacts and related proving and verifying key material. The circuit registry uses Vault for key management and stores proving and verifying keys as secrets within Vault.
Circuit
type Prover struct {
provide.Model
// Artifacts, i.e., r1cs, ABI, etc
ABI []byte `json:"abi,omitempty"`
Binary []byte `gorm:"column:bin" json:"-"`
// Vault and the vault secret identifiers for the encryption/decryption key and proving/verifying keys, SRS
VaultID *uuid.UUID `json:"vault_id"`
EncryptionKeyID *uuid.UUID `json:"encryption_key_id"`
ProvingKeyID *uuid.UUID `json:"proving_key_id"`
VerifyingKeyID *uuid.UUID `json:"verifying_key_id"`
// Associations
ApplicationID *uuid.UUID `sql:"type:uuid" json:"-"`
OrganizationID *uuid.UUID `sql:"type:uuid" json:"-"`
UserID *uuid.UUID `sql:"type:uuid" json:"-"`
Name *string `json:"name"`
Description *string `json:"description"`
Identifier *string `json:"identifier"`
Provider *string `json:"provider"`
ProvingScheme *string `json:"proving_scheme"`
Curve *string `json:"curve"`
Status *string `sql:"not null;default:'init'" json:"status"`
// SRS (structured reference string) is protocol-specific and may be nil depending on the proving scheme
StructuredReferenceStringID *uuid.UUID `gorm:"column:srs_id" json:"srs_id,omitempty"`
// storage for encrypted notes and nullifier trees
NoteStoreID *uuid.UUID `sql:"type:uuid" json:"note_store_id"`
NullifierStoreID *uuid.UUID `sql:"type:uuid" json:"nullifier_store_id"`
// artifacts
Artifacts map[string]interface{} `sql:"-" json:"artifacts,omitempty"`
// optional on-chain artifact (i.e., verifier contract)
VerifierContract map[string]interface{} `sql:"-" json:"verifier_contract,omitempty"