Skip to content

Commit

Permalink
feat: LightClientSnapshot (#58)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Chataigner <[email protected]>
  • Loading branch information
tchataigner committed Jul 1, 2024
1 parent e29a5e7 commit fa39963
Show file tree
Hide file tree
Showing 15 changed files with 401 additions and 6 deletions.
169 changes: 165 additions & 4 deletions ethereum/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ resolver = "2"
members = ["core", "ethereum-programs", "light-client"]

[workspace.dependencies]
anyhow = "1.0.86"
glob = "0.3.1"
getset = "0.1.2"
thiserror = "1.0.61"
# Crypto dependencies
bls12_381 = { git = "https://github.com/lurk-lab/bls12_381.git", branch = "zkvm" }
# Sphinx dependencies
Expand Down
8 changes: 7 additions & 1 deletion ethereum/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
homepage = "https://github.com/wormhole-foundation/example-zk-light-clients"
repository = "https://github.com/wormhole-foundation/example-zk-light-clients"
repository = "https://github.com/wormhole-foundation/example-zk-light-clients"

[dependencies]
anyhow = { workspace = true }
bls12_381 = { workspace = true }
getset = { workspace = true }
thiserror = { workspace = true }
14 changes: 14 additions & 0 deletions ethereum/core/src/crypto/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Yatima, Inc.
// SPDX-License-Identifier: APACHE-2.0

use thiserror::Error;

/// The error type for the `crypto` module.
#[derive(Debug, Error)]
pub enum CryptoError {
#[error("Internal error occurred: {source}")]
Internal {
#[source]
source: Box<dyn std::error::Error + Sync + Send>,
},
}
17 changes: 17 additions & 0 deletions ethereum/core/src/crypto/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Yatima, Inc.
// SPDX-License-Identifier: APACHE-2.0

//! # Cryptographic Utilities for the Aptos Light Client
//!
//! This module contains cryptographic utilities used by the light client.
//! It is divided into several sub-modules, each with its own specific functionality.
//!
//! ## Sub-modules
//!
//! - `sig`: This sub-module contains the `Signature` and `PublicKey` structures and their associated methods.
//! - `error`: This sub-module contains the ``CryptoError` error type used throughout the `crypto` module.
//!
//! For more detailed information, users should refer to the specific documentation for each sub-module.
pub mod error;
pub mod sig;
Loading

0 comments on commit fa39963

Please sign in to comment.