From 88600c16fcb329578ee25ca4f713332224fc997b Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 1 Nov 2020 19:28:05 +0100 Subject: [PATCH] v0.2.0-beta.1 --- CHANGELOG.md | 18 +++++++++++++ Cargo.lock | 54 ++++++++++++++++++++++++++++++++++---- Cargo.toml | 12 +-------- services/Cargo.toml | 4 +-- src/lnp/application/mod.rs | 10 ++++++- 5 files changed, 79 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3efab81..e6c2173f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,24 @@ Change Log ========== +v0.2.0-beta.1 +------------- + +### LNP/BP Core Library +- LN messaging & LNPWP: Lightning network peer wire protocol (BOLT-1pt2, BOLT-2) +- BOLT-8 noise encryptor and handshake implementation +- Improvements to LN-specific data types +- LNP socket and node addressing large-scale refactoring +- More serde and strict encoding implementations for data types across the + library + +### LNP/BP Derivation Library +- Implementation of strict derive macros for enums + +### LNP/BP Services Library +- Debugging and display logging improvements with LNP/BP Services library +- ESB functionality improvements in LNP/BP Services libraru + v0.2.0-alpha.3 -------------- diff --git a/Cargo.lock b/Cargo.lock index dc4ae06a..d779864a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -713,7 +713,8 @@ checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" [[package]] name = "lightning-invoice" version = "0.3.0" -source = "git+git://github.com/LNP-BP/rust-lightning-invoice?branch=fix/error#fb82978b39e2d237be9d7caabc594ae427598b3a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0a8e3f3dcb1bf88550e6d2cc2b831779f8f4f7b2462573c2be0a1b28a59e82" dependencies = [ "bech32", "bitcoin_hashes 0.7.6", @@ -755,7 +756,39 @@ dependencies = [ "inflate", "lazy_static", "lightning-invoice", - "lnpbp_derive", + "lnpbp_derive 0.2.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "miniscript", + "num-derive", + "num-traits 0.2.14", + "serde 1.0.117", + "serde_with", + "tokio", + "torut", + "url", + "zmq", +] + +[[package]] +name = "lnpbp" +version = "0.2.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95dee9e61c3d20c401ede8d5c32e865a2cdbf4687a3ef20ffc29d8d3a93e2cd3" +dependencies = [ + "amplify", + "amplify_derive", + "async-trait", + "bech32", + "bitcoin", + "bitcoin_hashes 0.9.4", + "chacha20poly1305", + "chrono", + "deflate", + "ed25519-dalek", + "grin_secp256k1zkp", + "inflate", + "lazy_static", + "lightning-invoice", + "lnpbp_derive 0.2.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", "miniscript", "num-derive", "num-traits 0.2.14", @@ -772,7 +805,18 @@ name = "lnpbp_derive" version = "0.2.0-beta.1" dependencies = [ "amplify", - "lnpbp", + "lnpbp 0.2.0-beta.1", + "quote 1.0.7", + "syn 1.0.48", +] + +[[package]] +name = "lnpbp_derive" +version = "0.2.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "280d91ec1ed2a26f8307380647d97e861b3a6f1d72accc0e55b7f64ff11d7c73" +dependencies = [ + "amplify", "quote 1.0.7", "syn 1.0.48", ] @@ -787,8 +831,8 @@ dependencies = [ "config", "dotenv", "env_logger", - "lnpbp", - "lnpbp_derive", + "lnpbp 0.2.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lnpbp_derive 0.2.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", "log", "serde 1.0.117", "serde_with", diff --git a/Cargo.toml b/Cargo.toml index be60eab4..da76db98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ crate-type = ["dylib", "rlib", "staticlib"] # ----------------------------------------- amplify = { version = "~2.2.1", features = ["stringly_conversions"] } amplify_derive = "~2.2.1" -lnpbp_derive = { path = "derive" } +lnpbp_derive = "=0.2.0-beta.1" # Dependencies on core rust-bitcoin ecosystem projects # ---------------------------------------------------- bitcoin = { version = "~0.25.1", features = ["rand"] } @@ -86,16 +86,6 @@ num-derive = "~0.3.0" async-trait = { version = "~0.1.30", optional = true } torut = { version = "~0.1.6", features = ["v2", "v3"] } -[patch.crates-io] -# Use this for Android builds -# Remove this once https://github.com/jean-airoldie/zeromq-src-rs/pull/15 got merged -# zeromq-src = { git = "https://github.com/LNP-BP/zeromq-src-rs", branch = "fix/cmake" } - -# This fixing Display implementation for ParseOrSemanticError and must be -# removed once the corresponding PR will be merged: -# -lightning-invoice = { git = "git://github.com/LNP-BP/rust-lightning-invoice", branch = "fix/error" } - [dev-dependencies] # # We fix version of miniscript as required by LNPBP-2 specification diff --git a/services/Cargo.toml b/services/Cargo.toml index 05998421..940bab6f 100644 --- a/services/Cargo.toml +++ b/services/Cargo.toml @@ -14,8 +14,8 @@ edition = "2018" # LNP/BP libraries amplify = "~2.2.1" amplify_derive = "~2.2.1" -lnpbp = { path = ".." } -lnpbp_derive = { path = "../derive" } +lnpbp = "=0.2.0-beta.1" +lnpbp_derive = "=0.2.0-beta.1" # Serialization & parsing serde_crate = { package = "serde", version = "~1.0.106", features = ["derive"], optional = true } serde_with = { version = "~1.5.1", optional = true, features = ["hex"] } diff --git a/src/lnp/application/mod.rs b/src/lnp/application/mod.rs index 5eef0e5e..c3fae8d0 100644 --- a/src/lnp/application/mod.rs +++ b/src/lnp/application/mod.rs @@ -34,6 +34,7 @@ use invoice::Invoice; use std::io; use std::str::FromStr; +use self::invoice::ParseOrSemanticError; use crate::strict_encoding::{self, StrictDecode, StrictEncode}; impl StrictEncode for Invoice { @@ -49,7 +50,14 @@ impl StrictDecode for Invoice { #[inline] fn strict_decode(d: D) -> Result { Self::from_str(&String::strict_decode(d)?).map_err(|e| { - strict_encoding::Error::DataIntegrityError(e.to_string()) + // TODO: (v0.3) this can be improved once PR got merged: + // + strict_encoding::Error::DataIntegrityError(match e { + ParseOrSemanticError::ParseError(err) => err.to_string(), + ParseOrSemanticError::SemanticError(err) => { + s!("Lightning invoice semantic error") + } + }) }) } }