wip: zone sdk

This commit is contained in:
gusto 2026-03-08 20:26:34 +02:00
parent 1e3b60feae
commit 7b488d2bb5
No known key found for this signature in database
14 changed files with 83 additions and 107 deletions

129
Cargo.lock generated
View File

@ -1212,10 +1212,7 @@ dependencies = [
"futures",
"humantime-serde",
"log",
"logos-blockchain-chain-broadcast-service",
"logos-blockchain-chain-service",
"logos-blockchain-common-http-client",
"logos-blockchain-core",
"logos-blockchain-zone-sdk",
"reqwest",
"serde",
"tokio-retry",
@ -1756,7 +1753,7 @@ dependencies = [
"bytesize",
"hex",
"log",
"logos-blockchain-common-http-client",
"logos-blockchain-zone-sdk",
"nssa",
"nssa_core",
"reqwest",
@ -1826,9 +1823,9 @@ dependencies = [
[[package]]
name = "const-hex"
version = "1.17.0"
version = "1.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bb320cac8a0750d7f25280aa97b09c26edfe161164238ecbbb31092b079e735"
checksum = "531185e432bb31db1ecda541e9e7ab21468d4d844ad7505e0546a49b4945d49b"
dependencies = [
"cfg-if",
"cpufeatures",
@ -3750,7 +3747,7 @@ dependencies = [
"futures",
"humantime-serde",
"log",
"logos-blockchain-core",
"logos-blockchain-zone-sdk",
"nssa",
"nssa_core",
"serde",
@ -4672,8 +4669,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
[[package]]
name = "logos-blockchain-blend-crypto"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"blake2",
"logos-blockchain-groth16",
@ -4686,8 +4682,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-blend-message"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"blake2",
"derivative",
@ -4708,11 +4703,11 @@ dependencies = [
[[package]]
name = "logos-blockchain-blend-proofs"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"ed25519-dalek",
"generic-array 1.3.5",
"hex",
"logos-blockchain-blend-crypto",
"logos-blockchain-groth16",
"logos-blockchain-pol",
@ -4725,8 +4720,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-chain-broadcast-service"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"derivative",
@ -4741,8 +4735,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-chain-service"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"bytes",
@ -4771,8 +4764,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-circuits-prover"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"logos-blockchain-circuits-utils",
"tempfile",
@ -4780,16 +4772,14 @@ dependencies = [
[[package]]
name = "logos-blockchain-circuits-utils"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"dirs",
]
[[package]]
name = "logos-blockchain-common-http-client"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"futures",
"hex",
@ -4808,8 +4798,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-core"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"ark-ff 0.4.2",
"bincode",
@ -4838,8 +4827,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-cryptarchia-engine"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"cfg_eval",
"logos-blockchain-pol",
@ -4854,8 +4842,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-cryptarchia-sync"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"bytes",
"futures",
@ -4871,8 +4858,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-groth16"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"ark-bn254 0.4.0",
"ark-ec 0.4.2",
@ -4889,8 +4875,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-http-api-common"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"axum 0.7.9",
"logos-blockchain-core",
@ -4903,8 +4888,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-key-management-system-keys"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"bytes",
@ -4929,8 +4913,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-key-management-system-macros"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"proc-macro2",
"quote",
@ -4939,8 +4922,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-key-management-system-operators"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"logos-blockchain-blend-proofs",
@ -4955,8 +4937,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-key-management-system-service"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"log",
@ -4971,8 +4952,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-ledger"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"derivative",
"logos-blockchain-blend-crypto",
@ -4995,8 +4975,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-network-service"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"futures",
@ -5011,8 +4990,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-poc"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"logos-blockchain-circuits-prover",
"logos-blockchain-circuits-utils",
@ -5027,8 +5005,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-pol"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"astro-float",
"logos-blockchain-circuits-prover",
@ -5046,8 +5023,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-poq"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"logos-blockchain-circuits-prover",
"logos-blockchain-circuits-utils",
@ -5063,8 +5039,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-poseidon2"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"ark-bn254 0.4.0",
"ark-ff 0.4.2",
@ -5074,8 +5049,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-services-utils"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"futures",
@ -5089,8 +5063,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-storage-service"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"bytes",
@ -5106,8 +5079,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-time-service"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"futures",
@ -5124,8 +5096,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-utils"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"async-trait",
"blake2",
@ -5141,8 +5112,7 @@ dependencies = [
[[package]]
name = "logos-blockchain-utxotree"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"ark-ff 0.4.2",
"logos-blockchain-groth16",
@ -5155,16 +5125,14 @@ dependencies = [
[[package]]
name = "logos-blockchain-witness-generator"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"tempfile",
]
[[package]]
name = "logos-blockchain-zksign"
version = "0.1.0"
source = "git+https://github.com/logos-blockchain/logos-blockchain.git#81192877116cbc3eedf6688b85fab6dd0e448290"
version = "0.2.1"
dependencies = [
"logos-blockchain-circuits-prover",
"logos-blockchain-circuits-utils",
@ -5178,6 +5146,24 @@ dependencies = [
"tracing",
]
[[package]]
name = "logos-blockchain-zone-sdk"
version = "0.2.1"
dependencies = [
"futures",
"logos-blockchain-chain-broadcast-service",
"logos-blockchain-chain-service",
"logos-blockchain-common-http-client",
"logos-blockchain-core",
"logos-blockchain-key-management-system-service",
"reqwest",
"rpds",
"serde",
"thiserror 2.0.18",
"tokio",
"tracing",
]
[[package]]
name = "lru-slab"
version = "0.1.2"
@ -5872,7 +5858,7 @@ checksum = "8c04f5d74368e4d0dfe06c45c8627c81bd7c317d52762d118fb9b3076f6420fd"
[[package]]
name = "overwatch"
version = "0.1.0"
source = "git+https://github.com/logos-co/Overwatch?rev=f5a9902#f5a99022f389d65adbd55e51f1e3f9eead62432a"
source = "git+https://github.com/logos-co/Overwatch?rev=448c192#448c192895b8311c742b1726a1bb12ee314ad95c"
dependencies = [
"async-trait",
"futures",
@ -5887,7 +5873,7 @@ dependencies = [
[[package]]
name = "overwatch-derive"
version = "0.1.0"
source = "git+https://github.com/logos-co/Overwatch?rev=f5a9902#f5a99022f389d65adbd55e51f1e3f9eead62432a"
source = "git+https://github.com/logos-co/Overwatch?rev=448c192#448c192895b8311c742b1726a1bb12ee314ad95c"
dependencies = [
"convert_case 0.8.0",
"proc-macro-error2",
@ -7463,8 +7449,7 @@ dependencies = [
"humantime-serde",
"jsonrpsee",
"log",
"logos-blockchain-core",
"logos-blockchain-key-management-system-service",
"logos-blockchain-zone-sdk",
"mempool",
"nssa",
"nssa_core",

View File

@ -110,11 +110,7 @@ tokio-retry = "0.3.0"
schemars = "1.2.0"
async-stream = "0.3.6"
logos-blockchain-common-http-client = { git = "https://github.com/logos-blockchain/logos-blockchain.git" }
logos-blockchain-key-management-system-service = { git = "https://github.com/logos-blockchain/logos-blockchain.git" }
logos-blockchain-core = { git = "https://github.com/logos-blockchain/logos-blockchain.git" }
logos-blockchain-chain-broadcast-service = { git = "https://github.com/logos-blockchain/logos-blockchain.git" }
logos-blockchain-chain-service = { git = "https://github.com/logos-blockchain/logos-blockchain.git" }
logos-blockchain-zone-sdk = { path = "../logos-blockchain/zone-sdk" }
rocksdb = { version = "0.24.0", default-features = false, features = [
"snappy",

View File

@ -14,7 +14,4 @@ futures.workspace = true
log.workspace = true
serde.workspace = true
humantime-serde.workspace = true
logos-blockchain-common-http-client.workspace = true
logos-blockchain-core.workspace = true
logos-blockchain-chain-broadcast-service.workspace = true
logos-blockchain-chain-service.workspace = true
logos-blockchain-zone-sdk.workspace = true

View File

@ -6,10 +6,11 @@ use futures::{Stream, TryFutureExt};
#[expect(clippy::single_component_path_imports, reason = "Satisfy machete")]
use humantime_serde;
use log::{info, warn};
pub use logos_blockchain_chain_broadcast_service::BlockInfo;
use logos_blockchain_chain_service::CryptarchiaInfo;
pub use logos_blockchain_common_http_client::{CommonHttpClient, Error};
pub use logos_blockchain_core::{block::Block, header::HeaderId, mantle::SignedMantleTx};
use logos_blockchain_zone_sdk::chain::CryptarchiaInfo;
pub use logos_blockchain_zone_sdk::http::{CommonHttpClient, Error};
use logos_blockchain_zone_sdk::BasicAuthCredentials;
pub use logos_blockchain_zone_sdk::BlockInfo;
pub use logos_blockchain_zone_sdk::{block::Block, header::HeaderId, mantle::SignedMantleTx};
use reqwest::{Client, Url};
use serde::{Deserialize, Serialize};
use tokio_retry::Retry;
@ -50,9 +51,7 @@ impl BedrockClient {
.build()
.context("Failed to build HTTP client")?;
let auth = auth.map(|a| {
logos_blockchain_common_http_client::BasicAuthCredentials::new(a.username, a.password)
});
let auth = auth.map(|a| BasicAuthCredentials::new(a.username, a.password));
let http_client = CommonHttpClient::new_with_client(client, auth);
Ok(Self {

View File

@ -21,5 +21,5 @@ borsh.workspace = true
bytesize.workspace = true
base64.workspace = true
url.workspace = true
logos-blockchain-common-http-client.workspace = true
tokio-retry.workspace = true
logos-blockchain-zone-sdk.workspace = true

View File

@ -2,7 +2,7 @@
use std::str::FromStr;
use logos_blockchain_common_http_client::BasicAuthCredentials;
use logos_blockchain_zone_sdk::BasicAuthCredentials;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]

View File

@ -5,6 +5,7 @@ edition = "2024"
license = { workspace = true }
[dependencies]
logos-blockchain-zone-sdk.workspace = true
common.workspace = true
bedrock_client.workspace = true
nssa.workspace = true
@ -19,6 +20,5 @@ tokio.workspace = true
borsh.workspace = true
futures.workspace = true
url.workspace = true
logos-blockchain-core.workspace = true
serde_json.workspace = true
async-stream.workspace = true

View File

@ -12,7 +12,7 @@ use common::{
config::BasicAuth,
};
use humantime_serde;
pub use logos_blockchain_core::mantle::ops::channel::ChannelId;
pub use logos_blockchain_zone_sdk::mantle::ops::channel::ChannelId;
use serde::{Deserialize, Serialize};
use url::Url;

View File

@ -6,7 +6,7 @@ use common::block::{Block, HashableBlockData};
// ToDo: Remove after testnet
use common::{HashType, PINATA_BASE58};
use log::{debug, error, info};
use logos_blockchain_core::mantle::{
use logos_blockchain_zone_sdk::mantle::{
Op, SignedMantleTx,
ops::channel::{ChannelId, inscribe::InscriptionOp},
};

View File

@ -5,6 +5,7 @@ edition = "2024"
license = { workspace = true }
[dependencies]
logos-blockchain-zone-sdk.workspace = true
nssa.workspace = true
nssa_core.workspace = true
common.workspace = true
@ -21,8 +22,6 @@ tempfile.workspace = true
chrono.workspace = true
log.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
logos-blockchain-key-management-system-service.workspace = true
logos-blockchain-core.workspace = true
rand.workspace = true
borsh.workspace = true
bytesize.workspace = true

View File

@ -1,13 +1,13 @@
use anyhow::{Context, Result};
use bedrock_client::BedrockClient;
pub use common::block::Block;
pub use logos_blockchain_core::mantle::{MantleTx, SignedMantleTx, ops::channel::MsgId};
use logos_blockchain_core::mantle::{
pub use logos_blockchain_zone_sdk::mantle::{MantleTx, SignedMantleTx, ops::channel::MsgId};
use logos_blockchain_zone_sdk::mantle::{
Op, OpProof, Transaction, TxHash, ledger,
ops::channel::{ChannelId, inscribe::InscriptionOp},
};
pub use logos_blockchain_key_management_system_service::keys::Ed25519Key;
use logos_blockchain_key_management_system_service::keys::Ed25519PublicKey;
pub use logos_blockchain_zone_sdk::kms::keys::Ed25519Key;
use logos_blockchain_zone_sdk::kms::keys::Ed25519PublicKey;
use crate::config::BedrockConfig;
@ -61,7 +61,7 @@ pub trait BlockSettlementClientTrait: Clone {
.sign_payload(tx_hash.as_signing_bytes().as_ref())
.to_bytes();
let signature =
logos_blockchain_key_management_system_service::keys::Ed25519Signature::from_bytes(
logos_blockchain_zone_sdk::kms::keys::Ed25519Signature::from_bytes(
&signature_bytes,
);
@ -120,7 +120,7 @@ impl BlockSettlementClientTrait for BlockSettlementClient {
fn empty_ledger_signature(
tx_hash: &TxHash,
) -> logos_blockchain_key_management_system_service::keys::ZkSignature {
logos_blockchain_key_management_system_service::keys::ZkKey::multi_sign(&[], tx_hash.as_ref())
) -> logos_blockchain_zone_sdk::kms::keys::ZkSignature {
logos_blockchain_zone_sdk::kms::keys::ZkKey::multi_sign(&[], tx_hash.as_ref())
.expect("multi-sign with empty key set works")
}

View File

@ -13,7 +13,7 @@ use common::{
config::BasicAuth,
};
use humantime_serde;
use logos_blockchain_core::mantle::ops::channel::ChannelId;
use logos_blockchain_zone_sdk::mantle::ops::channel::ChannelId;
use serde::{Deserialize, Serialize};
use url::Url;

View File

@ -11,7 +11,7 @@ use common::{
};
use config::SequencerConfig;
use log::{error, info, warn};
use logos_blockchain_key_management_system_service::keys::{ED25519_SECRET_KEY_SIZE, Ed25519Key};
use logos_blockchain_zone_sdk::kms::keys::{ED25519_SECRET_KEY_SIZE, Ed25519Key};
use mempool::{MemPool, MemPoolHandle};
use crate::{
@ -368,7 +368,7 @@ mod tests {
block::AccountInitialData, test_utils::sequencer_sign_key_for_testing,
transaction::NSSATransaction,
};
use logos_blockchain_core::mantle::ops::channel::ChannelId;
use logos_blockchain_zone_sdk::mantle::ops::channel::ChannelId;
use mempool::MemPoolHandle;
use nssa::{AccountId, PrivateKey};

View File

@ -1,7 +1,7 @@
use anyhow::{Result, anyhow};
use bedrock_client::SignedMantleTx;
use logos_blockchain_core::mantle::ops::channel::ChannelId;
use logos_blockchain_key_management_system_service::keys::Ed25519Key;
use logos_blockchain_zone_sdk::mantle::ops::channel::ChannelId;
use logos_blockchain_zone_sdk::kms::keys::Ed25519Key;
use url::Url;
use crate::{