Skip to content

Commit

Permalink
fix: remove git dependencies for release (#623)
Browse files Browse the repository at this point in the history
* fix(gadget-runners): removed eigensdk git dep

* fix!: switch to tnt-bls and tnt-core-bytecode releases

* fix: mbsm test deployment
  • Loading branch information
Tjemmmic authored Jan 31, 2025
1 parent 765b3e5 commit c7d4fac
Show file tree
Hide file tree
Showing 21 changed files with 1,433 additions and 513 deletions.
204 changes: 91 additions & 113 deletions Cargo.lock

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ members = [
"blueprints/*",
"crates/*",
]
exclude = [
"blueprints/incredible-squaring-symbiotic",
"blueprints/examples"
]

[workspace.package]
authors = ["Tangle Network"]
Expand Down Expand Up @@ -44,6 +48,9 @@ blueprint-metadata = { version = "0.2.1", path = "./crates/blueprint/metadata",
blueprint-build-utils = { version = "0.1.0", path = "./crates/blueprint/build-utils", default-features = false }
gadget-blueprint-serde = { version = "0.3.1", path = "./crates/blueprint/serde", default-features = false }

# Bindings
gadget-eigenlayer-bindings = { version = "0.1.0", path = "./crates/eigenlayer-bindings", default-features = false }

# Crypto
gadget-crypto-core = { version = "0.1.0", path = "./crates/crypto/core", default-features = false }
gadget-crypto-k256 = { version = "0.1.0", path = "./crates/crypto/k256", default-features = false }
Expand Down Expand Up @@ -119,7 +126,7 @@ gadget-rpc-calls = { version = "0.1.0", path = "./crates/metrics/rpc-calls", def

cargo-tangle = { version = "0.1.0", path = "./cli", default-features = false }
cargo_metadata = { version = "0.18.1" }
tnt-core-bytecode = { git = "https://github.com/tangle-network/tnt-core.git", default-features = false, branch = "donovan/bytecode" }
tnt-core-bytecode = { version = "0.2.0", default-features = false }

# Tangle-related dependencies
tangle-subxt = { version = "0.9.0", default-features = false }
Expand Down Expand Up @@ -157,7 +164,7 @@ rand = { version = "0.8.5", default-features = false }
schnorrkel = { version = "0.11.4", default-features = false }
sha2 = { version = "0.10.8", default-features = false }
sha3 = { version = "0.10.8", default-features = false }
w3f-bls = { git = "https://github.com/drewstone/bls.git", branch = "drew/bump-ark-versions", default-features = false }
tnt-bls = { version = "0.1.8", default-features = false }

# Data Structures & Serialization
bincode = { version = "1.3.3", default-features = false }
Expand Down Expand Up @@ -252,7 +259,7 @@ rayon = { version = "1", default-features = false }
zeroize = { version = "1.8.1", default-features = false }

# Eigenlayer
eigensdk = { git = "https://github.com/Layr-Labs/eigensdk-rs.git", rev = "6ab2674cf19e2f2c78218de706975af1244dad9c", default-features = false }
eigensdk = { version = "0.1.3", default-features = false }
rust-bls-bn254 = { version = "0.2.1", default-features = false }
testcontainers = { version = "0.23.1", default-features = false }

Expand Down
48 changes: 26 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,32 @@ Tangle Network's Gadget SDK is a modular framework designed to simplify the deve
## 🛠 Project Structure

```
tangle-network-gadget-workspace/
├── cli/ # Command-line interface tools
│ ├── src/ # CLI implementation
│ └── README.md # CLI documentation
├── crates/ # Core functionality crates
│ ├── benchmarking/ # Performance testing tools
│ ├── blueprint/ # Blueprint core system
│ │ ├── manager/ # Blueprint lifecycle management
│ │ ├── metadata/ # Blueprint metadata handling
│ │ └── serde/ # Serialization utilities
│ ├── clients/ # Network clients
│ │ ├── core/ # Shared client functionality
│ │ ├── eigenlayer/ # EigenLayer integration
│ │ ├── evm/ # Ethereum Virtual Machine client
│ │ └── tangle/ # Tangle Network client
│ ├── crypto/ # Cryptographic implementations
│ ├── event-listeners/ # Event handling system
│ ├── keystore/ # Key management
│ ├── networking/ # P2P networking
│ ├── runners/ # Execution environments
│ └── utils/ # Shared utilities
└── .config/ # Configuration files
tangle-network-gadget-workspace
├── blueprints # Blueprint examples and templates
├── cli # Cargo-tangle Command-line interface tool
├── crates # Core functionality crates
│ ├── benchmarking # Performance testing tools
│ ├── blueprint # Blueprint core system and utilities
│ ├── clients # Network clients (Tangle, EVM, EigenLayer)
│ ├── config # Configuration management
│ ├── contexts # Execution contexts
│ ├── crypto # Cryptographic implementations
│ ├── eigenlayer-bindings # EigenLayer smart contract bindings
│ ├── event-listeners # Event handling system
│ ├── executor # Task execution system
│ ├── keystore # Key management and storage
│ ├── logging # Logging infrastructure
│ ├── macros # Procedural and derive macros
│ ├── metrics # Performance and monitoring metrics
│ ├── networking # P2P networking and communication
│ ├── runners # Execution environments
│ ├── sdk # Software Development Kit
│ ├── std # Standard library extensions
│ ├── stores # Storage implementations
│ ├── testing-utils # Testing utilities and helpers
│ └── utils # Common utilities and helpers
├── .config # Configuration files
└── rust-toolchain.toml # Rust version and components
```

## 📋 Prerequisites
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ gadget-crypto-core = { workspace = true, features = ["clap"] }
gadget-keystore = { workspace = true }

# Optional crypto dependencies
w3f-bls = { workspace = true, optional = true }
tnt-bls = { workspace = true, optional = true }

# Optional dependencies based on features
tangle-subxt = { workspace = true, features = ["std"], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/clients/eigenlayer/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl EigenlayerClient {
pub async fn get_slasher_address(&self, delegation_manager_addr: Address) -> Result<Address> {
let provider = self.get_provider_http();
let delegation_manager =
eigensdk::utils::middleware::delegationmanager::DelegationManager::DelegationManagerInstance::new(
eigensdk::utils::core::delegationmanager::DelegationManager::DelegationManagerInstance::new(
delegation_manager_addr,
provider,
);
Expand Down
16 changes: 0 additions & 16 deletions crates/clients/tangle/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ where
/// # Errors
///
/// Returns an error if the Blueprint could not be fetched
// TODO: @donovan this method is equivalent to `current_blueprint`. Should we remove it?
pub async fn get_blueprint_by_id(
&self,
at: [u8; 32],
Expand Down Expand Up @@ -85,21 +84,6 @@ where
Ok(ret)
}

/// Get the current Blueprint information
pub async fn current_blueprint(
&self,
at: [u8; 32],
blueprint_id: u64,
) -> Result<ServiceBlueprint> {
let call = api::storage().services().blueprints(blueprint_id);
let at = BlockRef::from_hash(H256::from_slice(&at));
let ret = self.rpc_client.storage().at(at).fetch(&call).await?;
match ret {
Some(blueprints) => Ok(blueprints.1),
None => Err(Error::Other("Blueprint not found".to_string())),
}
}

/// Query the current Blueprint owner
pub async fn current_blueprint_owner(
&self,
Expand Down
6 changes: 3 additions & 3 deletions crates/crypto/bls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "gadget-crypto-bls"
version = "0.1.0"
description = "w3f-bls crypto primitives for Tangle Blueprints"
description = "tnt-bls crypto primitives for Tangle Blueprints"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -11,7 +11,7 @@ repository.workspace = true
[dependencies]
gadget-crypto-core = { workspace = true, features = ["bls"] }
gadget-std = { workspace = true }
w3f-bls = { workspace = true }
tnt-bls = { workspace = true }
serde = { workspace = true }
serde_bytes = { workspace = true, features = ["alloc"] }
ark-serialize = { workspace = true }
Expand All @@ -32,5 +32,5 @@ std = [
"serde/std",
"serde_json/std",
"serde_bytes/std",
"w3f-bls/std",
"tnt-bls/std",
]
2 changes: 1 addition & 1 deletion crates/crypto/bls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ macro_rules! define_bls_key {
use crate::from_bytes;
use gadget_crypto_core::{KeyType, KeyTypeId, KeyEncoding};
use gadget_std::{UniformRand, string::{String, ToString}};
use w3f_bls::{Message, PublicKey, SecretKey, SerializableToBytes, Signature, [<Tiny $ty:upper>]};
use tnt_bls::{Message, PublicKey, SecretKey, SerializableToBytes, Signature, [<Tiny $ty:upper>]};

#[doc = $ty:upper]
/// key type
Expand Down
4 changes: 2 additions & 2 deletions crates/crypto/bls/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod bls381_crypto_tests {

mod bls377_tests {
use super::*;
use ::w3f_bls::SerializableToBytes;
use ::tnt_bls::SerializableToBytes;
use gadget_crypto_hashing::sha2_256;

#[test]
Expand Down Expand Up @@ -110,7 +110,7 @@ mod bls377_tests {

mod bls381_tests {
use super::*;
use ::w3f_bls::SerializableToBytes;
use ::tnt_bls::SerializableToBytes;
use gadget_crypto_hashing::sha2_256;

#[test]
Expand Down
1 change: 1 addition & 0 deletions crates/eigenlayer-bindings/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod ecdsa_stake_registry;
pub mod incredible_squaring_task_manager;
pub mod ipauser_registry;
pub mod pauser_registry;
pub mod registry_coordinator;
Loading

0 comments on commit c7d4fac

Please sign in to comment.