diff --git a/Cargo.lock b/Cargo.lock index fd22013..247d669 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5667,6 +5667,7 @@ dependencies = [ "commonware-runtime", "commonware-storage", "commonware-utils", + "ethereum_ssz", "futures", "governor", "hex", diff --git a/finalizer/Cargo.toml b/finalizer/Cargo.toml index 5a68511..64d339c 100644 --- a/finalizer/Cargo.toml +++ b/finalizer/Cargo.toml @@ -20,6 +20,7 @@ alloy-eips.workspace = true alloy-primitives.workspace = true alloy-rpc-types-engine.workspace = true bytes.workspace = true +ethereum_ssz.workspace = true futures.workspace = true governor.workspace = true rand.workspace = true diff --git a/finalizer/src/archive.rs b/finalizer/src/archive.rs index ba14961..8ee1dc4 100644 --- a/finalizer/src/archive.rs +++ b/finalizer/src/archive.rs @@ -3,7 +3,7 @@ use std::{ os::unix::net::UnixStream, }; -use commonware_codec::Encode as _; +use ssz::Encode; use summit_types::checkpoint::Checkpoint; use tracing::info; @@ -21,7 +21,7 @@ pub(crate) fn backup_with_enclave(epoch: u64, checkpoint: Checkpoint) -> std::io // wait for ack wait_for_ack(&mut stream)?; // send checkpoint length - let checkpoint_bytes = checkpoint.encode(); + let checkpoint_bytes = checkpoint.as_ssz_bytes(); let len = checkpoint_bytes.len() as u32; stream.write_all(&len.to_le_bytes())?;