{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "definitions": {
    "proof_ValidationType": {
      "type": "string",
      "enum": [
        "Quick",
        "Quick_Smell",
        "Full",
        "Model",
        "Challenge",
        "Logits"
      ]
    },
    "proof_ResponseValue": {
      "type": "string",
      "enum": [
        "Quick_OK",
        "Quick_Fail",
        "Quick_OK_Smell_OK",
        "Quick_OK_Smell_Fail",
        "Quick_Fail_Smell_OK",
        "Quick_Fail_Smell_Fail",
        "Full_Green",
        "Full_Amber",
        "Full_Red",
        "Model_OK",
        "Model_Fail",
        "Challenge_OK",
        "Challenge_Fail",
        "Model_Pending_Review",
        "Logits_OK",
        "Logits_Fail"
      ]
    },
    "proof_ValidationUnion": {
      "type": "string",
      "enum": [
        "NONE",
        "BlockValidation",
        "ModelValidation"
      ]
    },
    "proof_FloatArray": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "additionalProperties": false
    },
    "proof_UIntArray": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
          }
        }
      },
      "additionalProperties": false
    },
    "proof_Proof": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "minimum": 0,
          "maximum": 255
        },
        "tick": {
          "type": "integer",
          "minimum": 0,
          "maximum": 18446744073709551615
        },
        "timestamp": {
          "type": "integer",
          "minimum": 0,
          "maximum": 18446744073709551615
        },
        "target": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "vdf": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "hash": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "block_hash": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "header_prefix": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "is_solution": {
          "type": "boolean"
        },
        "model_identifier": {
          "type": "string"
        },
        "compute_precision": {
          "type": "string"
        },
        "ipfs_cid": {
          "type": "string"
        },
        "extra_flags": {
          "type": "string"
        },
        "temperature": {
          "type": "number"
        },
        "top_p": {
          "type": "number"
        },
        "top_k": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "repetition_penalty": {
          "type": "number"
        },
        "chosen_tokens": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
          }
        },
        "chosen_probs": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "sampling_u": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "softmax_normalizers": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "prompt_tokens": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
          }
        },
        "pad_mask": {
          "type": "array",
          "items": {
            "type": "boolean"
          }
        },
        "topk_logits": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/proof_FloatArray"
          }
        },
        "topk_indices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/proof_UIntArray"
          }
        },
        "logsumexp_stats": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/proof_FloatArray"
          }
        }
      },
      "additionalProperties": false
    },
    "proof_BlockValidation": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "hash": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "prev_block_hash": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "merkle_root": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "timestamp": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "bits": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "nonce": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "pow_blob_hash": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "adjusted_bits": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "pow_blob": {
          "$ref": "#/definitions/proof_Proof"
        }
      },
      "additionalProperties": false
    },
    "proof_ModelValidation": {
      "type": "object",
      "properties": {
        "model_name": {
          "type": "string"
        },
        "model_commit": {
          "type": "string"
        },
        "difficulty": {
          "type": "integer",
          "minimum": -9223372036854775808,
          "maximum": 9223372036854775807
        },
        "cid": {
          "type": "string"
        },
        "extra": {
          "type": "string"
        },
        "txid": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "block_hash": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "block_height": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        }
      },
      "additionalProperties": false
    },
    "proof_ValidationRequest": {
      "type": "object",
      "properties": {
        "hash_id": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "validation_type": {
          "$ref": "#/definitions/proof_ValidationType"
        },
        "request_type": {
          "$ref": "#/definitions/proof_ValidationUnion"
        },
        "request": {
          "anyOf": [
            {
              "$ref": "#/definitions/proof_BlockValidation"
            },
            {
              "$ref": "#/definitions/proof_ModelValidation"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "proof_ValidationResponse": {
      "type": "object",
      "properties": {
        "hash_identifier": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 255
          }
        },
        "enum_response": {
          "$ref": "#/definitions/proof_ResponseValue"
        }
      },
      "additionalProperties": false
    }
  },
  "$ref": "#/definitions/proof_ValidationRequest",
  "title": "proof_ValidationRequest"
}
