2019-08-29 01:34:25 +00:00
|
|
|
use super::signature_sets::Error as SignatureSetError;
|
2020-02-04 01:43:04 +00:00
|
|
|
use merkle_proof::MerkleTreeError;
|
2019-03-06 05:24:56 +00:00
|
|
|
use types::*;
|
2019-03-05 23:22:19 +00:00
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
/// The error returned from the `per_block_processing` function. Indicates that a block is either
|
|
|
|
/// invalid, or we were unable to determine it's validity (we encountered an unexpected error).
|
|
|
|
///
|
|
|
|
/// Any of the `...Error` variants indicate that at some point during block (and block operation)
|
|
|
|
/// verification, there was an error. There is no indication as to _where_ that error happened
|
|
|
|
/// (e.g., when processing attestations instead of when processing deposits).
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-08-29 01:34:25 +00:00
|
|
|
pub enum BlockProcessingError {
|
|
|
|
RandaoSignatureInvalid,
|
|
|
|
BulkSignatureVerificationFailed,
|
|
|
|
StateRootMismatch,
|
|
|
|
DepositCountInvalid {
|
|
|
|
expected: usize,
|
|
|
|
found: usize,
|
|
|
|
},
|
|
|
|
HeaderInvalid {
|
|
|
|
reason: HeaderInvalid,
|
|
|
|
},
|
|
|
|
ProposerSlashingInvalid {
|
|
|
|
index: usize,
|
|
|
|
reason: ProposerSlashingInvalid,
|
|
|
|
},
|
|
|
|
AttesterSlashingInvalid {
|
|
|
|
index: usize,
|
|
|
|
reason: AttesterSlashingInvalid,
|
|
|
|
},
|
|
|
|
IndexedAttestationInvalid {
|
|
|
|
index: usize,
|
|
|
|
reason: IndexedAttestationInvalid,
|
|
|
|
},
|
|
|
|
AttestationInvalid {
|
|
|
|
index: usize,
|
|
|
|
reason: AttestationInvalid,
|
|
|
|
},
|
|
|
|
DepositInvalid {
|
|
|
|
index: usize,
|
|
|
|
reason: DepositInvalid,
|
|
|
|
},
|
|
|
|
ExitInvalid {
|
|
|
|
index: usize,
|
|
|
|
reason: ExitInvalid,
|
|
|
|
},
|
|
|
|
BeaconStateError(BeaconStateError),
|
|
|
|
SignatureSetError(SignatureSetError),
|
|
|
|
SszTypesError(ssz_types::Error),
|
2020-02-04 01:43:04 +00:00
|
|
|
MerkleTreeError(MerkleTreeError),
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
impl From<BeaconStateError> for BlockProcessingError {
|
|
|
|
fn from(e: BeaconStateError) -> Self {
|
|
|
|
BlockProcessingError::BeaconStateError(e)
|
|
|
|
}
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
impl From<SignatureSetError> for BlockProcessingError {
|
|
|
|
fn from(e: SignatureSetError) -> Self {
|
|
|
|
BlockProcessingError::SignatureSetError(e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<ssz_types::Error> for BlockProcessingError {
|
|
|
|
fn from(error: ssz_types::Error) -> Self {
|
|
|
|
BlockProcessingError::SszTypesError(error)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl From<BlockOperationError<HeaderInvalid>> for BlockProcessingError {
|
|
|
|
fn from(e: BlockOperationError<HeaderInvalid>) -> BlockProcessingError {
|
|
|
|
match e {
|
|
|
|
BlockOperationError::Invalid(reason) => BlockProcessingError::HeaderInvalid { reason },
|
|
|
|
BlockOperationError::BeaconStateError(e) => BlockProcessingError::BeaconStateError(e),
|
|
|
|
BlockOperationError::SignatureSetError(e) => BlockProcessingError::SignatureSetError(e),
|
|
|
|
BlockOperationError::SszTypesError(e) => BlockProcessingError::SszTypesError(e),
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
2019-08-29 01:34:25 +00:00
|
|
|
}
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2019-03-06 05:24:56 +00:00
|
|
|
/// A conversion that consumes `self` and adds an `index` variable to resulting struct.
|
|
|
|
///
|
|
|
|
/// Used here to allow converting an error into an upstream error that points to the object that
|
|
|
|
/// caused the error. For example, pointing to the index of an attestation that caused the
|
|
|
|
/// `AttestationInvalid` error.
|
2019-03-06 04:22:45 +00:00
|
|
|
pub trait IntoWithIndex<T>: Sized {
|
2019-03-06 05:24:56 +00:00
|
|
|
fn into_with_index(self, index: usize) -> T;
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
macro_rules! impl_into_block_processing_error_with_index {
|
|
|
|
($($type: ident),*) => {
|
|
|
|
$(
|
|
|
|
impl IntoWithIndex<BlockProcessingError> for BlockOperationError<$type> {
|
|
|
|
fn into_with_index(self, index: usize) -> BlockProcessingError {
|
|
|
|
match self {
|
|
|
|
BlockOperationError::Invalid(reason) => BlockProcessingError::$type {
|
|
|
|
index,
|
|
|
|
reason
|
|
|
|
},
|
|
|
|
BlockOperationError::BeaconStateError(e) => BlockProcessingError::BeaconStateError(e),
|
|
|
|
BlockOperationError::SignatureSetError(e) => BlockProcessingError::SignatureSetError(e),
|
|
|
|
BlockOperationError::SszTypesError(e) => BlockProcessingError::SszTypesError(e),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)*
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
impl_into_block_processing_error_with_index!(
|
|
|
|
ProposerSlashingInvalid,
|
|
|
|
AttesterSlashingInvalid,
|
|
|
|
IndexedAttestationInvalid,
|
|
|
|
AttestationInvalid,
|
|
|
|
DepositInvalid,
|
2019-11-21 00:47:30 +00:00
|
|
|
ExitInvalid
|
2019-08-29 01:34:25 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
pub type HeaderValidationError = BlockOperationError<HeaderInvalid>;
|
|
|
|
pub type AttesterSlashingValidationError = BlockOperationError<AttesterSlashingInvalid>;
|
|
|
|
pub type ProposerSlashingValidationError = BlockOperationError<ProposerSlashingInvalid>;
|
|
|
|
pub type AttestationValidationError = BlockOperationError<AttestationInvalid>;
|
|
|
|
pub type DepositValidationError = BlockOperationError<DepositInvalid>;
|
|
|
|
pub type ExitValidationError = BlockOperationError<ExitInvalid>;
|
2019-03-06 04:22:45 +00:00
|
|
|
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-08-29 01:34:25 +00:00
|
|
|
pub enum BlockOperationError<T> {
|
|
|
|
Invalid(T),
|
2019-03-06 04:22:45 +00:00
|
|
|
BeaconStateError(BeaconStateError),
|
2019-08-29 01:34:25 +00:00
|
|
|
SignatureSetError(SignatureSetError),
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
SszTypesError(ssz_types::Error),
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
impl<T> BlockOperationError<T> {
|
|
|
|
pub fn invalid(reason: T) -> BlockOperationError<T> {
|
|
|
|
BlockOperationError::Invalid(reason)
|
|
|
|
}
|
|
|
|
}
|
2019-03-06 04:22:45 +00:00
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
impl<T> From<BeaconStateError> for BlockOperationError<T> {
|
|
|
|
fn from(e: BeaconStateError) -> Self {
|
|
|
|
BlockOperationError::BeaconStateError(e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
impl<T> From<SignatureSetError> for BlockOperationError<T> {
|
|
|
|
fn from(e: SignatureSetError) -> Self {
|
|
|
|
BlockOperationError::SignatureSetError(e)
|
|
|
|
}
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
}
|
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
impl<T> From<ssz_types::Error> for BlockOperationError<T> {
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
fn from(error: ssz_types::Error) -> Self {
|
2019-08-29 01:34:25 +00:00
|
|
|
BlockOperationError::SszTypesError(error)
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
}
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-08-29 01:34:25 +00:00
|
|
|
pub enum HeaderInvalid {
|
|
|
|
ProposalSignatureInvalid,
|
|
|
|
StateSlotMismatch,
|
|
|
|
ParentBlockRootMismatch { state: Hash256, block: Hash256 },
|
|
|
|
ProposerSlashed(usize),
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-08-29 01:34:25 +00:00
|
|
|
pub enum ProposerSlashingInvalid {
|
|
|
|
/// The proposer index is not a known validator.
|
|
|
|
ProposerUnknown(u64),
|
2019-11-21 00:47:30 +00:00
|
|
|
/// The two proposal have different slots.
|
2019-08-29 01:34:25 +00:00
|
|
|
///
|
|
|
|
/// (proposal_1_slot, proposal_2_slot)
|
2019-11-21 00:47:30 +00:00
|
|
|
ProposalSlotMismatch(Slot, Slot),
|
2019-08-29 01:34:25 +00:00
|
|
|
/// The proposals are identical and therefore not slashable.
|
|
|
|
ProposalsIdentical,
|
|
|
|
/// The specified proposer cannot be slashed because they are already slashed, or not active.
|
|
|
|
ProposerNotSlashable(u64),
|
|
|
|
/// The first proposal signature was invalid.
|
|
|
|
BadProposal1Signature,
|
|
|
|
/// The second proposal signature was invalid.
|
|
|
|
BadProposal2Signature,
|
|
|
|
}
|
2019-03-06 04:22:45 +00:00
|
|
|
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-08-29 01:34:25 +00:00
|
|
|
pub enum AttesterSlashingInvalid {
|
|
|
|
/// The attestations were not in conflict.
|
|
|
|
NotSlashable,
|
|
|
|
/// The first `IndexedAttestation` was invalid.
|
|
|
|
IndexedAttestation1Invalid(BlockOperationError<IndexedAttestationInvalid>),
|
|
|
|
/// The second `IndexedAttestation` was invalid.
|
|
|
|
IndexedAttestation2Invalid(BlockOperationError<IndexedAttestationInvalid>),
|
|
|
|
/// The validator index is unknown. One cannot slash one who does not exist.
|
|
|
|
UnknownValidator(u64),
|
|
|
|
/// The specified validator has already been withdrawn.
|
|
|
|
ValidatorAlreadyWithdrawn(u64),
|
|
|
|
/// There were no indices able to be slashed.
|
|
|
|
NoSlashableIndices,
|
2019-03-05 23:22:19 +00:00
|
|
|
}
|
|
|
|
|
2019-03-06 05:24:56 +00:00
|
|
|
/// Describes why an object is invalid.
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-03-05 23:22:19 +00:00
|
|
|
pub enum AttestationInvalid {
|
2019-11-21 00:47:30 +00:00
|
|
|
/// Commmittee index exceeds number of committees in that slot.
|
|
|
|
BadCommitteeIndex,
|
2019-03-06 05:24:56 +00:00
|
|
|
/// Attestation included before the inclusion delay.
|
2019-03-17 01:25:37 +00:00
|
|
|
IncludedTooEarly {
|
|
|
|
state: Slot,
|
|
|
|
delay: u64,
|
|
|
|
attestation: Slot,
|
|
|
|
},
|
2019-03-06 05:24:56 +00:00
|
|
|
/// Attestation slot is too far in the past to be included in a block.
|
2019-03-17 01:25:37 +00:00
|
|
|
IncludedTooLate { state: Slot, attestation: Slot },
|
2020-02-10 23:19:36 +00:00
|
|
|
/// Attestation target epoch does not match attestation slot.
|
|
|
|
TargetEpochSlotMismatch {
|
|
|
|
target_epoch: Epoch,
|
|
|
|
slot_epoch: Epoch,
|
|
|
|
},
|
2019-05-21 06:38:16 +00:00
|
|
|
/// Attestation target epoch does not match the current or previous epoch.
|
|
|
|
BadTargetEpoch,
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
/// Attestation justified checkpoint doesn't match the state's current or previous justified
|
|
|
|
/// checkpoint.
|
2019-03-06 05:24:56 +00:00
|
|
|
///
|
2019-03-17 01:25:37 +00:00
|
|
|
/// `is_current` is `true` if the attestation was compared to the
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
/// `state.current_justified_checkpoint`, `false` if compared to `state.previous_justified_checkpoint`.
|
|
|
|
WrongJustifiedCheckpoint {
|
|
|
|
state: Checkpoint,
|
|
|
|
attestation: Checkpoint,
|
2019-03-17 01:25:37 +00:00
|
|
|
is_current: bool,
|
|
|
|
},
|
2019-03-06 05:24:56 +00:00
|
|
|
/// There are no set bits on the attestation -- an attestation must be signed by at least one
|
|
|
|
/// validator.
|
2019-03-05 23:22:19 +00:00
|
|
|
AggregationBitfieldIsEmpty,
|
2019-03-06 05:24:56 +00:00
|
|
|
/// The aggregation bitfield length is not the smallest possible size to represent the committee.
|
2019-03-17 01:25:37 +00:00
|
|
|
BadAggregationBitfieldLength {
|
|
|
|
committee_len: usize,
|
|
|
|
bitfield_len: usize,
|
|
|
|
},
|
2019-11-21 00:47:30 +00:00
|
|
|
/// The validator index was unknown.
|
|
|
|
UnknownValidator(u64),
|
2019-03-06 05:24:56 +00:00
|
|
|
/// The attestation signature verification failed.
|
2019-03-05 23:22:19 +00:00
|
|
|
BadSignature,
|
2019-05-21 06:38:16 +00:00
|
|
|
/// The indexed attestation created from this attestation was found to be invalid.
|
|
|
|
BadIndexedAttestation(IndexedAttestationInvalid),
|
2019-03-05 23:22:19 +00:00
|
|
|
}
|
|
|
|
|
2019-08-29 01:34:25 +00:00
|
|
|
impl From<BlockOperationError<IndexedAttestationInvalid>>
|
|
|
|
for BlockOperationError<AttestationInvalid>
|
|
|
|
{
|
|
|
|
fn from(e: BlockOperationError<IndexedAttestationInvalid>) -> Self {
|
|
|
|
match e {
|
|
|
|
BlockOperationError::Invalid(e) => {
|
|
|
|
BlockOperationError::invalid(AttestationInvalid::BadIndexedAttestation(e))
|
|
|
|
}
|
|
|
|
BlockOperationError::BeaconStateError(e) => BlockOperationError::BeaconStateError(e),
|
|
|
|
BlockOperationError::SignatureSetError(e) => BlockOperationError::SignatureSetError(e),
|
|
|
|
BlockOperationError::SszTypesError(e) => BlockOperationError::SszTypesError(e),
|
|
|
|
}
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-05-13 07:28:04 +00:00
|
|
|
pub enum IndexedAttestationInvalid {
|
2019-05-21 06:38:16 +00:00
|
|
|
/// The number of indices exceeds the global maximum.
|
|
|
|
///
|
|
|
|
/// (max_indices, indices_given)
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
MaxIndicesExceed(usize, usize),
|
2019-03-06 05:24:56 +00:00
|
|
|
/// The validator indices were not in increasing order.
|
|
|
|
///
|
2019-07-26 19:26:06 +00:00
|
|
|
/// The error occurred between the given `index` and `index + 1`
|
2019-03-06 05:24:56 +00:00
|
|
|
BadValidatorIndicesOrdering(usize),
|
|
|
|
/// The validator index is unknown. One cannot slash one who does not exist.
|
|
|
|
UnknownValidator(u64),
|
2019-05-21 06:38:16 +00:00
|
|
|
/// The indexed attestation aggregate signature was not valid.
|
2019-03-06 04:22:45 +00:00
|
|
|
BadSignature,
|
2019-08-29 01:34:25 +00:00
|
|
|
/// There was an error whilst attempting to get a set of signatures. The signatures may have
|
|
|
|
/// been invalid or an internal error occurred.
|
|
|
|
SignatureSetError(SignatureSetError),
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-03-06 04:22:45 +00:00
|
|
|
pub enum DepositInvalid {
|
2019-05-22 08:54:26 +00:00
|
|
|
/// The signature (proof-of-possession) does not match the given pubkey.
|
|
|
|
BadSignature,
|
2019-08-29 01:34:25 +00:00
|
|
|
/// The signature or pubkey does not represent a valid BLS point.
|
|
|
|
BadBlsBytes,
|
2019-03-07 22:26:03 +00:00
|
|
|
/// The specified `branch` and `index` did not form a valid proof that the deposit is included
|
|
|
|
/// in the eth1 deposit root.
|
|
|
|
BadMerkleProof,
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|
|
|
|
|
2020-01-07 23:24:44 +00:00
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
2019-03-06 04:22:45 +00:00
|
|
|
pub enum ExitInvalid {
|
2019-05-22 01:41:15 +00:00
|
|
|
/// The specified validator is not active.
|
|
|
|
NotActive(u64),
|
2019-03-06 05:24:56 +00:00
|
|
|
/// The specified validator is not in the state's validator registry.
|
|
|
|
ValidatorUnknown(u64),
|
2019-03-17 01:25:37 +00:00
|
|
|
/// The specified validator has a non-maximum exit epoch.
|
|
|
|
AlreadyExited(u64),
|
|
|
|
/// The specified validator has already initiated exit.
|
2019-11-12 05:09:33 +00:00
|
|
|
AlreadyInitiatedExit(u64),
|
2019-03-06 05:24:56 +00:00
|
|
|
/// The exit is for a future epoch.
|
2019-03-17 01:25:37 +00:00
|
|
|
FutureEpoch { state: Epoch, exit: Epoch },
|
|
|
|
/// The validator has not been active for long enough.
|
Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8
* state_processing: epoch processing v0.8.0
* state_processing: block processing v0.8.0
* tree_hash_derive: support generics in SignedRoot
* types v0.8: update to use ssz_types
* state_processing v0.8: use ssz_types
* ssz_types: add bitwise methods and from_elem
* types: fix v0.8 FIXMEs
* ssz_types: add bitfield shift_up
* ssz_types: iterators and DerefMut for VariableList
* types,state_processing: use VariableList
* ssz_types: fix BitVector Decode impl
Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!
* types: fix test modules for v0.8 update
* types: remove slow type-level arithmetic
* state_processing: fix tests for v0.8
* op_pool: update for v0.8
* ssz_types: Bitfield difference length-independent
Allow computing the difference of two bitfields of different lengths.
* Implement compact committee support
* epoch_processing: committee & active index roots
* state_processing: genesis state builder v0.8
* state_processing: implement v0.8.1
* Further improve tree_hash
* Strip examples, tests from cached_tree_hash
* Update TreeHash, un-impl CachedTreeHash
* Update bitfield TreeHash, un-impl CachedTreeHash
* Update FixedLenVec TreeHash, unimpl CachedTreeHash
* Update update tree_hash_derive for new TreeHash
* Fix TreeHash, un-impl CachedTreeHash for ssz_types
* Remove fixed_len_vec, ssz benches
SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)
* Remove boolean_bitfield crate
* Fix fake_crypto BLS compile errors
* Update ef_tests for new v.8 type params
* Update ef_tests submodule to v0.8.1 tag
* Make fixes to support parsing ssz ef_tests
* `compact_committee...` to `compact_committees...`
* Derive more traits for `CompactCommittee`
* Flip bitfield byte-endianness
* Fix tree_hash for bitfields
* Modify CLI output for ef_tests
* Bump ssz crate version
* Update ssz_types doc comment
* Del cached tree hash tests from ssz_static tests
* Tidy SSZ dependencies
* Rename ssz_types crate to eth2_ssz_types
* validator_client: update for v0.8
* ssz_types: update union/difference for bit order swap
* beacon_node: update for v0.8, EthSpec
* types: disable cached tree hash, update min spec
* state_processing: fix slot bug in committee update
* tests: temporarily disable fork choice harness test
See #447
* committee cache: prevent out-of-bounds access
In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.
* fix bug in get_indexed_attestation and simplify
There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.
* state_proc: workaround for compact committees bug
https://github.com/ethereum/eth2.0-specs/issues/1315
* v0.8: updates to make the EF tests pass
* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
the spec.
* rustfmt
* ef_tests: add new epoch processing tests
* Integrate v0.8 into master (compiles)
* Remove unused crates, fix clippy lints
* Replace v0.6.3 tags w/ v0.8.1
* Remove old comment
* Ensure lmd ghost tests only run in release
* Update readme
2019-07-30 02:44:51 +00:00
|
|
|
TooYoungToExit {
|
|
|
|
current_epoch: Epoch,
|
|
|
|
earliest_exit_epoch: Epoch,
|
|
|
|
},
|
2019-03-06 05:24:56 +00:00
|
|
|
/// The exit signature was not signed by the validator.
|
2019-03-06 04:22:45 +00:00
|
|
|
BadSignature,
|
2019-08-29 01:34:25 +00:00
|
|
|
/// There was an error whilst attempting to get a set of signatures. The signatures may have
|
|
|
|
/// been invalid or an internal error occurred.
|
|
|
|
SignatureSetError(SignatureSetError),
|
2019-03-06 04:22:45 +00:00
|
|
|
}
|