// See Source Here https://github.com/Chia-Network/chia-blockchain/blob/main/chia/util/errors.py
#[derive(serde::Deserialize)]
pub enum ChiaError {
    DoesNotExtend = -1,
    BadHeaderSignature = -2,
    MissingFromStorage = -3,
    InvalidProtocolMessage = -4,
    SelfConnection = -5,
    InvalidHandshake = -6,
    InvalidAck = -7,
    IncompatibleProtocolVersion = -8,
    DuplicateConnection = -9,
    BlockNotInBlockchain = -10,
    NoProofOfSpaceFound = -11,
    PeersDontHaveBlock = -12,
    MaxInboundConnectionsReached = -13,
    UNKNOWN = 1,
    InvalidBlockSolution = 2,
    InvalidCoinSolution = 3,
    DuplicateOutput = 4,
    DoubleSpend = 5,
    UnknownUnspent = 6,
    BadAggregateSignature = 7,
    WrongPuzzleHash = 8,
    BadFarmerCoinAmount = 9,
    InvalidCondition = 10,
    AssertMyCoinIdFailed = 11,
    AssertAnnounceConsumedFailed = 12,
    AssertHeightRelativeFailed = 13,
    AssertHeightAbsoluteFailed = 14,
    AssertSecondsAbsoluteFailed = 15,
    CoinAmountExceedsMaximum = 16,
    SexpError = 17,
    InvalidFeeLowFee = 18,
    MempoolConflict = 19,
    MintingCoin = 20,
    ExtendsUnknownBlock = 21,
    CoinbaseNotYetSpendable = 22,
    BlockCostExceedsMax = 23,
    BadAdditionRoot = 24,
    BadRemovalRoot = 25,
    InvalidPospaceHash = 26,
    InvalidCoinbaseSignature = 27,
    InvalidPlotSignature = 28,
    TimestampTooFarInPast = 29,
    TimestampTooFarInFuture = 30,
    InvalidTransactionsFilterHash = 31,
    InvalidPospaceChallenge = 32,
    InvalidPospace = 33,
    InvalidHeight = 34,
    InvalidCoinbaseAmount = 35,
    InvalidMerkleRoot = 36,
    InvalidBlockFeeAmount = 37,
    InvalidWeight = 38,
    InvalidTotalIters = 39,
    BlockIsNotFinished = 40,
    InvalidNumIterations = 41,
    InvalidPot = 42,
    InvalidPotChallenge = 43,
    InvalidTransactionsGeneratorHash = 44,
    InvalidPoolTarget = 45,
    InvalidCoinbaseParent = 46,
    InvalidFeesCoinParent = 47,
    ReserveFeeConditionFailed = 48,
    NotBlockButHasData = 49,
    IsTransactionBlockButNoData = 50,
    InvalidPrevBlockHash = 51,
    InvalidTransactionsInfoHash = 52,
    InvalidFoliageBlockHash = 53,
    InvalidRewardCoins = 54,
    InvalidBlockCost = 55,
    NoEndOfSlotInfo = 56,
    InvalidPrevChallengeSlotHash = 57,
    InvalidSubEpochSummaryHash = 58,
    NoSubEpochSummaryHash = 59,
    ShouldNotMakeChallengeBlock = 60,
    ShouldMakeChallengeBlock = 61,
    InvalidChallengeChainData = 62,
    InvalidCcEosVdf = 65,
    InvalidRcEosVdf = 66,
    InvalidChallengeSlotHashRc = 67,
    InvalidPriorPointRc = 68,
    InvalidDeficit = 69,
    InvalidSubEpochSummary = 70,
    InvalidPrevSubEpochSummaryHash = 71,
    InvalidRewardChainHash = 72,
    InvalidSubEpochOverflow = 73,
    InvalidNewDifficulty = 74,
    InvalidNewSubSlotIters = 75,
    InvalidCcSpVdf = 76,
    InvalidRcSpVdf = 77,
    InvalidCcSignature = 78,
    InvalidRcSignature = 79,
    CannotMakeCcBlock = 80,
    InvalidRcSpPrevIp = 81,
    InvalidRcIpPrevIp = 82,
    InvalidIsTransactionBlock = 83,
    InvalidUrsbHash = 84,
    OldPoolTarget = 85,
    InvalidPoolSignature = 86,
    InvalidFoliageBlockPresence = 87,
    InvalidCcIpVdf = 88,
    InvalidRcIpVdf = 89,
    IpShouldBeNone = 90,
    InvalidRewardBlockHash = 91,
    InvalidMadeNonOverflowInfusions = 92,
    NoOverflowsInFirstSubSlotNewEpoch = 93,
    MempoolNotInitialized = 94,
    ShouldNotHaveIcc = 95,
    ShouldHaveIcc = 96,
    InvalidIccVdf = 97,
    InvalidIccHashCc = 98,
    InvalidIccHashRc = 99,
    InvalidIccEosVdf = 100,
    InvalidSpIndex = 101,
    TooManyBlocks = 102,
    InvalidCcChallenge = 103,
    InvalidPrefarm = 104,
    AssertSecondsRelativeFailed = 105,
    BadCoinbaseSignature = 106,
    //INITIAL_TRANSACTION_FREEZE = 107 // removed
    NoTransactionsWhileSyncing = 108,
    AlreadyIncludingTransaction = 109,
    IncompatibleNetworkId = 110,
    PreSoftForkMaxGeneratorSize = 111,
    InvalidRequiredIters = 112,
    TooManyGeneratorRefs = 113,
    AssertMyParentIdFailed = 114,
    AssertMyPuzzlehashFailed = 115,
    AssertMyAmountFailed = 116,
    GeneratorRuntimeError = 117,
    InvalidCostResult = 118,
    InvalidTransactionsGeneratorRefsRoot = 119,
    FutureGeneratorRefs = 120,
    GeneratorRefHasNoGenerator = 121,
    DoubleSpendInFork = 122,
    InvalidFeeTooCloseToZero = 123,
    CoinAmountNegative = 124,
    InternalProtocolError = 125,
    InvalidSpendBundle = 126,
    FailedGettingGeneratorMultiprocessing = 127,
}
