Skip to content

Commit

Permalink
v0.2.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Nov 1, 2020
1 parent d05e9b3 commit 88600c1
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 19 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
--------------

Expand Down
54 changes: 49 additions & 5 deletions Cargo.lock

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

12 changes: 1 addition & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down Expand Up @@ -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:
# <https://github.com/rust-bitcoin/rust-lightning-invoice/pull/43>
lightning-invoice = { git = "git://github.com/LNP-BP/rust-lightning-invoice", branch = "fix/error" }

[dev-dependencies]
# <https://github.com/LNP-BP/LNPBPs/blob/master/lnpbp-0002.md#deterministic-public-key-extraction-from-bitcoin-script>
# We fix version of miniscript as required by LNPBP-2 specification
Expand Down
4 changes: 2 additions & 2 deletions services/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
10 changes: 9 additions & 1 deletion src/lnp/application/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -49,7 +50,14 @@ impl StrictDecode for Invoice {
#[inline]
fn strict_decode<D: io::Read>(d: D) -> Result<Self, Self::Error> {
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:
// <https://github.com/rust-bitcoin/rust-lightning-invoice/pull/43>
strict_encoding::Error::DataIntegrityError(match e {
ParseOrSemanticError::ParseError(err) => err.to_string(),
ParseOrSemanticError::SemanticError(err) => {
s!("Lightning invoice semantic error")
}
})
})
}
}

0 comments on commit 88600c1

Please sign in to comment.