mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
EIP-7916: ProgressiveList and tests
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -5859,8 +5859,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "milhouse"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "259dd9da2ae5e0278b95da0b7ecef9c18c309d0a2d9e6db57ed33b9e8910c5e7"
|
||||
source = "git+https://github.com/sigp/milhouse?branch=progressive-list#52bae1f50da93519cfb4ec31f7dab19659be4d14"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"arbitrary",
|
||||
|
||||
@@ -285,3 +285,6 @@ debug = true
|
||||
|
||||
[patch.crates-io]
|
||||
quick-protobuf = { git = "https://github.com/sigp/quick-protobuf.git", rev = "681f413312404ab6e51f0b46f39b0075c6f4ebfd" }
|
||||
# FIXME(sproul): REMOVE patch
|
||||
# milhouse = { path = "../milhouse" }
|
||||
milhouse = { git = "https://github.com/sigp/milhouse", branch = "progressive-list" }
|
||||
|
||||
@@ -293,6 +293,6 @@ pub use bls::{
|
||||
};
|
||||
pub use context_deserialize::{ContextDeserialize, context_deserialize};
|
||||
pub use kzg::{KzgCommitment, KzgProof, VERSIONED_HASH_VERSION_KZG};
|
||||
pub use milhouse::{self, List, Vector};
|
||||
pub use milhouse::{self, List, ProgressiveList, Vector};
|
||||
pub use ssz_types::{BitList, BitVector, FixedVector, VariableList, typenum, typenum::Unsigned};
|
||||
pub use superstruct::superstruct;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# To download/extract nightly tests, run:
|
||||
# CONSENSUS_SPECS_TEST_VERSION=nightly make
|
||||
CONSENSUS_SPECS_TEST_VERSION ?= v1.6.0-beta.1
|
||||
CONSENSUS_SPECS_TEST_VERSION ?= v1.6.1
|
||||
REPO_NAME := consensus-spec-tests
|
||||
OUTPUT_DIR := ./$(REPO_NAME)
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ excluded_paths = [
|
||||
"tests/.*/fulu/ssz_static/MatrixEntry/.*",
|
||||
# EIP-7916 is still in draft and hasn't been implemented yet https://eips.ethereum.org/EIPS/eip-7916
|
||||
"tests/general/phase0/ssz_generic/progressive_bitlist",
|
||||
"tests/general/phase0/ssz_generic/basic_progressive_list",
|
||||
"tests/general/phase0/ssz_generic/containers/.*/ProgressiveBitsStruct.*",
|
||||
"tests/general/phase0/ssz_generic/containers/.*/ProgressiveTestStruct.*",
|
||||
"tests/general/phase0/ssz_generic/progressive_containers/.*",
|
||||
|
||||
@@ -10,7 +10,7 @@ use ssz_derive::{Decode, Encode};
|
||||
use tree_hash::TreeHash;
|
||||
use tree_hash_derive::TreeHash;
|
||||
use types::typenum::*;
|
||||
use types::{BitList, BitVector, FixedVector, ForkName, VariableList, Vector};
|
||||
use types::{BitList, BitVector, FixedVector, ForkName, ProgressiveList, VariableList, Vector};
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[context_deserialize(ForkName)]
|
||||
@@ -157,6 +157,17 @@ impl Case for SszGeneric {
|
||||
[length => typenum]
|
||||
)?;
|
||||
}
|
||||
"basic_progressive_list" => {
|
||||
let elem_ty = parts[1];
|
||||
|
||||
type_dispatch!(
|
||||
ssz_generic_test,
|
||||
(&self.path, fork_name),
|
||||
ProgressiveList,
|
||||
<>,
|
||||
[elem_ty => primitive_type]
|
||||
)?;
|
||||
}
|
||||
"bitlist" => {
|
||||
let mut limit = parts[1];
|
||||
|
||||
|
||||
@@ -1135,6 +1135,8 @@ impl<H: TypeName> Handler for SszGenericHandler<H> {
|
||||
// Supported SSZ generic handlers
|
||||
pub struct BasicVector;
|
||||
type_name!(BasicVector, "basic_vector");
|
||||
pub struct BasicProgressiveList;
|
||||
type_name!(BasicProgressiveList, "basic_progressive_list");
|
||||
pub struct Bitlist;
|
||||
type_name!(Bitlist, "bitlist");
|
||||
pub struct Bitvector;
|
||||
|
||||
@@ -733,6 +733,11 @@ fn ssz_generic() {
|
||||
SszGenericHandler::<Containers>::default().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ssz_generic_progressive() {
|
||||
SszGenericHandler::<BasicProgressiveList>::default().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn epoch_processing_justification_and_finalization() {
|
||||
EpochProcessingHandler::<MinimalEthSpec, JustificationAndFinalization>::default().run();
|
||||
|
||||
Reference in New Issue
Block a user