{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xcim.invalid/ietf/an01/schemas/finality-policy.schema.json",
  "title": "AN01-F01 finality-policy",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "policy_id",
    "adapter_profile",
    "chain_id",
    "network_genesis_block_hash",
    "accepted_consensus_checkpoint",
    "node_stack",
    "bor_version",
    "heimdall_version",
    "require_finalized_tag",
    "require_ancestry",
    "require_blockhash_state",
    "allow_two_rpc_fallback",
    "allow_latest_fallback",
    "max_header_age",
    "max_local_cache_age",
    "rpc_deadline"
  ],
  "properties": {
    "policy_id": {
      "const": "amoy-milestone-receiver-node-01"
    },
    "adapter_profile": {
      "const": "xcim-as01-evm-amoy-milestone-01"
    },
    "chain_id": {
      "const": 80002
    },
    "network_genesis_block_hash": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hex32"
    },
    "accepted_consensus_checkpoint": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/hex32"
    },
    "node_stack": {
      "const": [
        "Bor",
        "Heimdall"
      ]
    },
    "bor_version": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/id"
    },
    "heimdall_version": {
      "$ref": "https://xcim.invalid/ietf/an01/schemas/common.schema.json#/$defs/id"
    },
    "require_finalized_tag": {
      "const": true
    },
    "require_ancestry": {
      "const": true
    },
    "require_blockhash_state": {
      "const": true
    },
    "allow_two_rpc_fallback": {
      "const": false
    },
    "allow_latest_fallback": {
      "const": false
    },
    "max_header_age": {
      "type": "integer",
      "minimum": 1,
      "maximum": 120
    },
    "max_local_cache_age": {
      "type": "integer",
      "minimum": 1,
      "maximum": 30
    },
    "rpc_deadline": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    }
  }
}
