Linking of hat trees can freeze hat operations
Hats support tree-linking, where hats from one node link to the first level of a different domain. This way, the amount of levels for the linked-to tree increases by the linked-from level count. This is generally fine, however lack of checking of the new total level introduces severe risks.\\n```\\n        /// @notice Identifies the level a given hat in its hat tree\\n        /// @param _hatId the id of the hat in question\\n        /// @return level (0 to type(uint8).max)\\n     function getHatLevel(uint256 _hatId) public view returns (uint8) {\\n```\\n\\nThe `getHatLevel()` function can only return up to level 255. It is used by the `checkAdmin()` call used in many of the critical functions in the Hats contract. Therefore, if for example, 17 hat domains are joined together in the most stretched way possible, It would result in a correct hat level of 271, making this calculation revert:\\n```\\n        if (treeAdmin != 0) {\\n                 return 1 + uint8(i) + getHatLevel(treeAdmin);\\n            }\\n```\\n\\nThe impact is that intentional or accidental linking that creates too many levels would freeze the higher hat levels from any interaction with the contract.
It is recommended to add a check in `_linkTopHatToTree()`, that the new accumulated level can fit in uint8. Another option would be to change the maximum level type to uint32.
```\\n        /// @notice Identifies the level a given hat in its hat tree\\n        /// @param _hatId the id of the hat in question\\n        /// @return level (0 to type(uint8).max)\\n     function getHatLevel(uint256 _hatId) public view returns (uint8) {\\n```\\n