Skip to main content

CIP Subgraph

The following sections explain the entities describing information packets inside the Common Interest Protocol. All the data is indexed via the subgraph indexing service and can be accessed by using the subgraph profile.

Mainnet deployment subgraph: Common Interest Protocol Subgraph

Goerli deployment subgraph : Common Interest Protocol Subgraph

cipGlobalValues - Holds global common interest protocol variables and constants

SafeBox - SafeBox smart contract address
solverPass - number of solvers required to complete the key recovery request successfully
numberOfInitialGuardians - Number of initial solvers specified on deployment
totalNumberOfEncryptions - Number of keys backed up inside the common interest protocol
totalNumberOfDecryptionRequests - Total number of decryption requests
totalNumberOfUniqueDecryptionRequests - Total number of unique validators that requested recovery for their key
totalNumberOfDecryptionRequestsFulfilled - Total number of fulfilled decryption requests that led to the key recovery
totalNumberOfGuardianRegistrations - Total number of ECDSA addresses that registered to be solvers
totalNumberOfNonInitialGuardianRegistrations - Total number of guardians that registered during the protocol initialization phase

Query example:

{
cipGlobalValues(first: 1) {
id
SafeBox
solverPass
numberOfInitialGuardians
totalNumberOfEncryptions
totalNumberOfDecryptionRequests
totalNumberOfGuardianRegistrations
totalNumberOfUniqueDecryptionRequests
totalNumberOfDecryptionRequestsFulfilled
totalNumberOfNonInitialGuardianRegistrations
}
}


Guardian - entity keeping track of a CIP solver assisting singing key recovery

id - ECDSA address of the guardian
aesPublicKey - Hybrid public key for CIP network identification for performing the solver duties
guardianIndexPointer - Increasing guardian pointer index inside the CIP network
relinquished - Guardian resignation status yes/no for (true = resigned, false = not resigned)
initial - Marks if the guardian was an initial guardian or not
sharedPublicKey - Public key of solver credentials generated during the DKG procedure

Example query:

guardians(first: 5) {
id
aesPublicKey
guardianIndexPointer
relinquished
sharedPublicKey
}


Encryption - Entity holding information packets describing key backup

id - BLS public key associated with the backup
ciphertext - Ciphertext holding the validation key backup
encryptorAesKey - Hybrid public key of the party performing the signing key backup
encryptor - ECDSA address triggering the encryption
native - Whether the backup was done while onboarding the validator or after the validator onboarding (refreshing the backup). Here true = while onboarding, false = after onboarding

Example Query:

encryptions(first: 10) {
id
ciphertext
encryptorAesKey
encryptor
native
}


DecryptionRequest - Entity holding information about specific decryption request

id - transactionHash concatenated with the transaction nonce
requesters - List of ECDSA addresses initiating the key recovery
stakeHouse - Stakehouse belonging to the validator being recovered
blsPublicKey - BLS public key of the validator being recovered
nonce - Tracker for how many recovery requests did the validator backup received
recipientAesKey - AES key receiving partial decryption solutions provided by the solvers
totalNumberOfPiecesReceived - Total number of decryption solutions provided by the solvers for this particular requests
blockNumber - block number during which the recovery request took place

Example Query:

decryptionRequests(first: 10) {
id
requesters
stakeHouse
blsPublicKey
nonce
recipientAesKey
totalNumberOfPiecesReceived
blockNumber
}


DecryptionPiece - Information about a specific partial decryption solution

id - transaction hash during which the piece was submitted
guardian - ECDSA address of the solver submitting the piece
recipientAesKey - Hybrid public key under which the key recovery is encrypted
blsPublicKey - BLS public key of the validator being recovered
ciphertext - Ciphertext hiding the validator signing key backup
zkProof - ZK proof elements proving the correctness of the decryption piece
nonce - Decryption request tracker

Example Query:

decryptionPieces(first: 10) {
id
guardian
recipientAesKey
blsPublicKey
ciphertext
zkProof
nonce
}