1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
// Copyright 2018 Parity Technologies (UK) Ltd. // This file is part of Substrate Shasper. // Substrate is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // Substrate is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Substrate. If not, see <http://www.gnu.org/licenses/>. #[derive(Clone, PartialEq, Eq, Debug)] /// Error type for beacon chain. pub enum Error { /// Deposit index mismatch. DepositIndexMismatch, /// Deposit merkle is invalid. DepositMerkleInvalid, /// Deposit proof is invalid. DepositProofInvalid, /// Deposit withdrawal credentials does not match. DepositWithdrawalCredentialsMismatch, /// Duplicate indexes. DuplicateIndexes, /// Duplicate transfer. DuplicateTransfer, /// Index is out of range. IndexOutOfRange, /// Epoch is out of range. EpochOutOfRange, /// Slot is out of range. SlotOutOfRange, /// Attestation shard is invalid. AttestationShardInvalid, /// Attestation bitfield is invalid. AttestationBitFieldInvalid, /// Validator is not yet withdrawable. ValidatorNotWithdrawable, /// Validator's attestation not found. ValidatorAttestationNotFound, /// Block state root is invalid. BlockStateRootInvalid, /// Block slot is invalid. BlockSlotInvalid, /// Block proposer has been slashed. BlockProposerSlashed, /// Block previous root is invalid. BlockPreviousRootInvalid, /// Block signature is invalid. BlockSignatureInvalid, /// Randao signature is invalid. RandaoSignatureInvalid, /// Proposer slashing contains invalid proposer index. ProposerSlashingInvalidProposerIndex, /// Proposer slashing contains invalid slot. ProposerSlashingInvalidSlot, /// Proposer slashing is on same header. ProposerSlashingSameHeader, /// Proposer slahsing has already been slashed. ProposerSlashingAlreadySlashed, /// Proposer slahsing contains invalid signature. ProposerSlashingInvalidSignature, /// Attester slashing is on same attestation. AttesterSlashingSameAttestation, /// Attester slashing is not slashable. AttesterSlashingNotSlashable, /// Attester slashing is invalid. AttesterSlashingInvalid, /// Attester slashing is on empty indices. AttesterSlashingEmptyIndices, /// Attestation is too far in the past. AttestationTooFarInHistory, /// Attestation submitted to quickly. AttestationSubmittedTooQuickly, /// Attestation contains incorrect justified epoch or block root. AttestationIncorrectJustifiedEpochOrBlockRoot, /// Attestation contains incorrect crosslink data. AttestationIncorrectCrosslinkData, /// Attestation has empty aggregation. AttestationEmptyAggregation, /// Attestation has empty custody. AttestationEmptyCustody, /// Attestation data is invalid. AttestationInvalidData, /// Attestation is on invalid shard. AttestationInvalidShard, /// Attestation has invalid custody. AttestationInvalidCustody, /// Attestation has invalid signature. AttestationInvalidSignature, /// Attestation has invalid crosslink. AttestationInvalidCrosslink, /// Voluntary exit has already exited. VoluntaryExitAlreadyExited, /// Voluntary exit has already been initiated. VoluntaryExitAlreadyInitiated, /// Voluntary exit is not yet valid. VoluntaryExitNotYetValid, /// Voluntary exit is not long enough. VoluntaryExitNotLongEnough, /// Voluntary exit contains invalid signature. VoluntaryExitInvalidSignature, /// Transfer does not have enough fund. TransferNoFund, /// Transfer is not on valid slot. TransferNotValidSlot, /// Transfer is not withdrawable. TransferNotWithdrawable, /// Transfer has invalid public key. TransferInvalidPublicKey, /// Transfer has invalid signature. TransferInvalidSignature, /// Too many proposer slashings in a block. TooManyProposerSlashings, /// Too many attester slashings in a block. TooManyAttesterSlashings, /// Too many attestations in a block. TooManyAttestations, /// Too many deposits in a block. TooManyDeposits, /// Too many voluntary exits in a block. TooManyVoluntaryExits, /// Too many transfers in a block. TooManyTransfers, /// Invalid eth1 data. InvalidEth1Data, }