Architecture

  1. A dapp on the src chain requests message transmission to the Operator module of the C2CC Messaging Infra.

    (destChainId, destAddressBytes, destData)
  2. It triggers the following message:

    Message = (destChainId, (srcAddress, destAddressBytes, destData))
  3. Message Based on the generated Message Event, the challenger collects the block data that includes this event.

    The challenger verifies the block header of that block.

  4. Based on the generated Message Event, the notifier collects the list of transactions that include this event.

  5. It gathers the proof for the collected transactions from the src chain and constructs the ReceiptPayload.

    struct ReceiptPayload

    struct ReceitPayload {
      uint16 srcChainId;
      bytes rlpBlock;
      bytes rlpReceipt;
      bytes rlpIndex;
      bytes rlpStack;
      uint256[] logIndexes;
    }
  6. Records the verified block header information in the destination chain’s c2cc node.

  7. The notifier catches the verified block.

  8. For each verified block, the notifier sends the Messages to the verifier.

  9. The verifier checks the validity of the transaction (specifically, based on the receipt) and requests the operator to forward the message if valid.

    If it is an unverified block, it will be ruthlessly reverted during the proof verification process.

  10. The operator transmits the following message to the destAddress contract by executing a function.

    (srcChainId, srcAddressBytes, destData)

Last updated