Merge remote-tracking branch 'origin/unstable' into tree-states-update

This commit is contained in:
Michael Sproul
2024-03-11 15:29:03 +11:00
78 changed files with 1517 additions and 1601 deletions

View File

@@ -7,7 +7,6 @@ edition = { workspace = true }
[features]
# `ef_tests` feature must be enabled to actually run the tests
ef_tests = []
milagro = ["bls/milagro"]
fake_crypto = ["bls/fake_crypto"]
portable = ["beacon_chain/portable"]

View File

@@ -31,10 +31,6 @@ impl Case for BlsEthAggregatePubkeys {
{
return Ok(());
}
#[cfg(feature = "milagro")]
Err(bls::Error::MilagroError(_)) if self.output.is_none() => {
return Ok(());
}
Err(e) => return Err(Error::FailedToParseTest(format!("{:?}", e))),
};

View File

@@ -71,9 +71,7 @@ where
f(&bytes).map_err(|e| {
match e {
// NOTE: this is a bit hacky, but seemingly better than the alternatives
ssz::DecodeError::BytesInvalid(message)
if message.contains("Blst") || message.contains("Milagro") =>
{
ssz::DecodeError::BytesInvalid(message) if message.contains("Blst") => {
Error::InvalidBLSInput(message)
}
e => Error::FailedToParseTest(format!(

View File

@@ -4,12 +4,12 @@ version = "0.1.0"
edition = { workspace = true }
[dependencies]
async-channel = { workspace = true }
tempfile = { workspace = true }
serde_json = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true }
futures = { workspace = true }
exit-future = { workspace = true }
environment = { workspace = true }
execution_layer = { workspace = true }
sensitive_url = { workspace = true }
@@ -24,4 +24,4 @@ fork_choice = { workspace = true }
logging = { workspace = true }
[features]
portable = ["types/portable"]
portable = ["types/portable"]

View File

@@ -42,7 +42,7 @@ pub struct TestRig<E, T: EthSpec = MainnetEthSpec> {
ee_a: ExecutionPair<E, T>,
ee_b: ExecutionPair<E, T>,
spec: ChainSpec,
_runtime_shutdown: exit_future::Signal,
_runtime_shutdown: async_channel::Sender<()>,
}
/// Import a private key into the execution engine and unlock it so that we can
@@ -111,7 +111,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
.build()
.unwrap(),
);
let (runtime_shutdown, exit) = exit_future::signal();
let (runtime_shutdown, exit) = async_channel::bounded(1);
let (shutdown_tx, _) = futures::channel::mpsc::channel(1);
let executor = TaskExecutor::new(Arc::downgrade(&runtime), exit, log.clone(), shutdown_tx);
let mut spec = TEST_FORK.make_genesis_spec(MainnetEthSpec::default_spec());

View File

@@ -8,6 +8,7 @@ edition = { workspace = true }
[dependencies]
[dev-dependencies]
async-channel = { workspace = true }
eth2_keystore = { workspace = true }
types = { workspace = true }
tempfile = { workspace = true }
@@ -17,7 +18,6 @@ url = { workspace = true }
validator_client = { workspace = true }
slot_clock = { workspace = true }
futures = { workspace = true }
exit-future = { workspace = true }
task_executor = { workspace = true }
environment = { workspace = true }
account_utils = { workspace = true }

View File

@@ -307,7 +307,7 @@ mod tests {
validator_store: Arc<ValidatorStore<TestingSlotClock, E>>,
_validator_dir: TempDir,
runtime: Arc<tokio::runtime::Runtime>,
_runtime_shutdown: exit_future::Signal,
_runtime_shutdown: async_channel::Sender<()>,
using_web3signer: bool,
}
@@ -340,7 +340,7 @@ mod tests {
.build()
.unwrap(),
);
let (runtime_shutdown, exit) = exit_future::signal();
let (runtime_shutdown, exit) = async_channel::bounded(1);
let (shutdown_tx, _) = futures::channel::mpsc::channel(1);
let executor =
TaskExecutor::new(Arc::downgrade(&runtime), exit, log.clone(), shutdown_tx);