profile
viewpoint

ariard/altnet-proposals 4

Documentation for Bitcoin's AltNet proposal

ariard/dlcspecs 1

Specification for Discreet Log Contracts

ariard/42sh 0

42sh: a full fledged shell built in C including dynamic completion, control flow, job control

ariard/bips 0

Bitcoin Improvement Proposals

ariard/bitcoin 0

Bitcoin Core integration/staging tree

ariard/bitcoin-development 0

Various notes and ideas for development work on Bitcoin

ariard/bitcoinops.github.io 0

Bitcoin Optech website

ariard/bitcoin_hashes 0

Simple library which implements a few hashes and does nothing else

ariard/bridge-layer 0

A bitcoind Altnet to CL bridge.

pull request commentdiscreetlogcontracts/dlcspecs

Introduce first version of ECDSA adaptor signature spec

What is the verification_key?

LLFourn

comment created time in 17 hours

pull request commentdiscreetlogcontracts/dlcspecs

Introduce first version of ECDSA adaptor signature spec

@LLFourn trying to make your test pass:

First vector

036c2f34833942e6eebb9e01b71c1d5f6ea185e7af607805ab5a39a829ad7a30400220f57f812e043e0f5b5c8c22a5c6efe6f76cdaa71490f7b3a3adb7a39101bf7ad4ee4d049e573adee6647ab7d97445d87c4252d91a627935269e99703a7d4161a5b4e2675d09e0da65deb2ed6210e5e99244153e9600ed17d90f6f31853e2c5ff8680adcbd1393d1ae8eed5cd8a8e396275be95506bf40a20ac22f66ca875bf4

It seems to fail here

https://github.com/nkohen/secp256k1/commit/33834591c81616b2e4fde1b0c0a2ae7f88af1147#diff-af7e1bf67c999123aba5f3f14622539c6ac8eb6ce92676ccaa1f5c418bed6574R39

Basically the first FE seems to be too big?

LLFourn

comment created time in 19 hours

pull request commentrust-bitcoin/rust-lightning

Add a new method `read_chan_signer` to `KeysInterface`

What's the intention behind the throwaway OnlyReadsKeysInterface {}? https://github.com/lightning-signer/rust-lightning/pull/1 would benefit from having the real one during the read...

TheBlueMatt

comment created time in 2 days

pull request commentrust-bitcoin/rust-lightning

Add a new method `read_chan_signer` to `KeysInterface`

ChannelManager::read still seems to read the Channel and therefore the signer, directly, bypassing read_chan_signer.

TheBlueMatt

comment created time in 2 days

pull request commentrust-bitcoin/rust-lightning

Add a new method `read_chan_signer` to `KeysInterface`

Codecov Report

Merging #761 (a1aca64) into main (a008464) will decrease coverage by 0.02%. The diff coverage is 89.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #761      +/-   ##
==========================================
- Coverage   91.33%   91.31%   -0.03%     
==========================================
  Files          37       37              
  Lines       22423    22456      +33     
==========================================
+ Hits        20481    20506      +25     
- Misses       1942     1950       +8     
Impacted Files Coverage Δ
lightning/src/chain/keysinterface.rs 93.99% <0.00%> (-0.86%) :arrow_down:
lightning/src/lib.rs 100.00% <ø> (ø)
lightning/src/ln/channel.rs 87.42% <0.00%> (-0.04%) :arrow_down:
lightning/src/util/test_utils.rs 87.27% <66.66%> (-1.37%) :arrow_down:
lightning/src/chain/channelmonitor.rs 95.54% <100.00%> (+0.09%) :arrow_up:
lightning/src/ln/chanmon_update_fail_tests.rs 97.56% <100.00%> (ø)
lightning/src/ln/functional_test_utils.rs 95.13% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 96.91% <100.00%> (ø)
lightning/src/ln/onchaintx.rs 93.92% <100.00%> (+0.14%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a008464...a1aca64. Read the comment docs.

TheBlueMatt

comment created time in 2 days

PR opened rust-bitcoin/rust-lightning

Add a new method `read_chan_signer` to `KeysInterface`

This adds a new method to the general cross-channel KeysInterface which requires it to handle the deserialization of per-channel signer objects. This allows the deserialization of per-channel signers to have more context available, which, in the case of the C bindings, includes the actual KeysInterface information itself.

I have bindings updates to go with this as well, but will run them as a separate PR. Those bindings updates (and this) are required to get ChannelMonitor deserialization working in bindings, so tagging 0.0.13.

+154 -88

0 comment

12 changed files

pr created time in 2 days

Pull request review commentrust-bitcoin/rust-lightning

ChannelManager persistence

 pub struct ChannelManager<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, 	/// Taken first everywhere where we are making changes before any other locks. 	total_consistency_lock: RwLock<()>, +	/// Used to signal to the ChannelManager persister that the manager needs to be re-persisted to+	/// disk/backups.+	pub persistence_lock: Arc<(Mutex<bool>, Condvar)>,

Added this, I think it made it way nicer

valentinewallace

comment created time in 2 days

pull request commentrust-bitcoin/rust-lightning

ChannelManager persistence

Making some changes, I'll update this comment when this is good for review again.

valentinewallace

comment created time in 2 days

push eventrust-bitcoin/rust-lightning

Matt Corallo

commit sha f3774050aa54cd83a81773e3c8fa1c8b86f463e9

Bump lightning-net-tokio crate version.

view details

Matt Corallo

commit sha a008464417b7351f23f27fec5e977fccb4b72095

Merge pull request #760 from TheBlueMatt/2020-11-0.0.12 Bump lightning-net-tokio crate version.

view details

push time in 3 days

PR merged rust-bitcoin/rust-lightning

Bump lightning-net-tokio crate version.

Forgot to do this one. Already uploaded all the other crates to crates.io, though, so just gonna do this locally to match and upload.

+1 -1

1 comment

1 changed file

TheBlueMatt

pr closed time in 3 days

pull request commentrust-bitcoin/rust-lightning

Bump lightning-net-tokio crate version.

Codecov Report

Merging #760 (f377405) into main (773c2d1) will decrease coverage by 0.06%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #760      +/-   ##
==========================================
- Coverage   91.40%   91.33%   -0.07%     
==========================================
  Files          37       37              
  Lines       22423    22423              
==========================================
- Hits        20495    20481      -14     
- Misses       1928     1942      +14     
Impacted Files Coverage Δ
lightning/src/ln/functional_tests.rs 96.91% <0.00%> (-0.25%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 773c2d1...f377405. Read the comment docs.

TheBlueMatt

comment created time in 3 days

PR opened rust-bitcoin/rust-lightning

Bump lightning-net-tokio crate version.

Forgot to do this one. Already uploaded all the other crates to crates.io, though, so just gonna do this locally to match and upload.

+1 -1

0 comment

1 changed file

pr created time in 3 days

release rust-bitcoin/rust-lightning

v0.0.12

released time in 3 days

created tagrust-bitcoin/rust-lightning

tagv0.0.12

A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

created time in 3 days

push eventrust-bitcoin/rust-lightning

Matt Corallo

commit sha 50b348c4fa7079dcb008d3d5cf8ebc18e5200874

[router] Fix + test routing via next/last-hop hints only We had code in the router to support sending a payment via a single hop across channels exclusively provided by the next-/last-hop hints. However, in updating the fuzzer, I noted that this case not only didn't work, but paniced in some cases. Here, we both fix the panic, as well as write a new test which ensures we don't break support for such routing in the future.

view details

Matt Corallo

commit sha 423073dfe53ee56b464fa042fe9b8f635a78c2f1

[netgraph] Do not allow capacity_sats * 1000 to overflow-panic In updating the router fuzzer, it discovered that a remote peer can cause us to overflow while multiplying the channel capacity value. Since the value should never exceed 21 million BTC, we just add a check for that.

view details

Matt Corallo

commit sha c53d8a3596930afa2d75b663013501e8b8fdd838

Expose manual-update methods in NetworkGraph. These functions were created but previously not exported, however they are useful if we want to skip signature checking when accepting routing messages (which we really should be doing in the routing fuzzer).

view details

Matt Corallo

commit sha b56b4add6ae0625271a66a8a1a48058c7f542352

[fuzz] Make router_target a bit easier for fuzzers to explore It turns out (somewhat obviously) that expecting a fuzzer to correctly build multiple signatures which verify against multiple public keys in the same message was a bit too daunting, so we now skip message signatures in routing messages. We also take this opportunity to simplify the target itself somewhat, avoiding reading public keys over and over and instead generating routes to all the public keys that appeared in messages while running.

view details

Matt Corallo

commit sha fc7df54f8dc3baf710371e2ad2beb862946d5b1c

Merge pull request #748 from TheBlueMatt/2020-11-router-fuzzer Make router_target a bit easier for fuzzers to explore and fix two found bugs

view details

Matt Corallo

commit sha 9642356d9a2af94a5c6995cbe2dd9b1a3aa7dec3

Finally drop travis entirely. It seems travis isn't even bothering to spawn our jobs anymore, and Github CI has been pretty stable, so just drop Travis entirely.

view details

Matt Corallo

commit sha d9c03f26f9d52ca96bc889eae64087a690ff1a22

Move UTXO-lookup into pub utility function from RoutingMsgHandler This makes the public utility methods in `NetworkGraph` able to do UTXO lookups ala `NetworkMsgHandler`'s `RoutingMessageHandler` implementation, slightly simplifying the public interface. We also take this opportunity to verify signatures before calling out to UTXO lookups, under the "do actions in order of cheapest-to-most-expensive to reduce DoS surface" principle.

view details

Matt Corallo

commit sha 3b6f7f1199a2e3a3f69583a2eaf501c403fe1a53

Split `NetworkGraph` message handling fns into unsigned and signed This takes the now-public `NetworkGraph` message handling functions and splits them all into two methods - one which takes a required Secp256k1 context and verifies signatures and one which takes only the unsigned part of the message and does not take a Secp256k1 context. This both clarifies the public API as well as simplifies it, all without duplicating code. Finally, this adds an assertion in the Router fuzzer to make sure the constants used for message deserialization are correct.

view details

Matt Corallo

commit sha 4aa8e9cda761fab2d4b2ac18d590de7a22dd9285

Bump version to 0.0.12

view details

Matt Corallo

commit sha ccd4a7acaaee6cc05998d89ccd24b296ddb3ee0e

Update auto-generated bindings with new NetworkGraph API

view details

Matt Corallo

commit sha 84716ff4819424819789355664b4efd9ae20c7b6

Merge pull request #758 from TheBlueMatt/2020-11-bindings-fix Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

view details

Matt Corallo

commit sha 773c2d1dc3805b4724c72887cf6436ccf088c6a5

Merge pull request #759 from TheBlueMatt/2020-11-0.0.12 Bump version to 0.0.12

view details

push time in 3 days

push eventrust-bitcoin/rust-lightning

Matt Corallo

commit sha 4aa8e9cda761fab2d4b2ac18d590de7a22dd9285

Bump version to 0.0.12

view details

Matt Corallo

commit sha 773c2d1dc3805b4724c72887cf6436ccf088c6a5

Merge pull request #759 from TheBlueMatt/2020-11-0.0.12 Bump version to 0.0.12

view details

push time in 3 days

PR merged rust-bitcoin/rust-lightning

Bump version to 0.0.12

Just bump the versions.

+5 -5

0 comment

4 changed files

TheBlueMatt

pr closed time in 3 days

push eventrust-bitcoin/rust-lightning

Matt Corallo

commit sha 9642356d9a2af94a5c6995cbe2dd9b1a3aa7dec3

Finally drop travis entirely. It seems travis isn't even bothering to spawn our jobs anymore, and Github CI has been pretty stable, so just drop Travis entirely.

view details

Matt Corallo

commit sha d9c03f26f9d52ca96bc889eae64087a690ff1a22

Move UTXO-lookup into pub utility function from RoutingMsgHandler This makes the public utility methods in `NetworkGraph` able to do UTXO lookups ala `NetworkMsgHandler`'s `RoutingMessageHandler` implementation, slightly simplifying the public interface. We also take this opportunity to verify signatures before calling out to UTXO lookups, under the "do actions in order of cheapest-to-most-expensive to reduce DoS surface" principle.

view details

Matt Corallo

commit sha 3b6f7f1199a2e3a3f69583a2eaf501c403fe1a53

Split `NetworkGraph` message handling fns into unsigned and signed This takes the now-public `NetworkGraph` message handling functions and splits them all into two methods - one which takes a required Secp256k1 context and verifies signatures and one which takes only the unsigned part of the message and does not take a Secp256k1 context. This both clarifies the public API as well as simplifies it, all without duplicating code. Finally, this adds an assertion in the Router fuzzer to make sure the constants used for message deserialization are correct.

view details

Matt Corallo

commit sha ccd4a7acaaee6cc05998d89ccd24b296ddb3ee0e

Update auto-generated bindings with new NetworkGraph API

view details

Matt Corallo

commit sha 84716ff4819424819789355664b4efd9ae20c7b6

Merge pull request #758 from TheBlueMatt/2020-11-bindings-fix Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

view details

push time in 3 days

PR merged rust-bitcoin/rust-lightning

Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

Val noted in 748 (https://github.com/rust-bitcoin/rust-lightning/pull/748#discussion_r529101471) that exposing the existing functions as public was a bit lazy. I indicated I'd handle it in a follow-up post-0.0.12, but realized that 0.0.12 didn't actually pass bindings checks because the newly-exposed APIs required additional features in the bindings. Thus, I went ahead and did the fixup here as well as updated the auto-generated bindings successfully.

As a bonus, this drops Travis CI.

+363 -203

2 comments

7 changed files

TheBlueMatt

pr closed time in 3 days

PR opened rust-bitcoin/rust-lightning

Bump version to 0.0.12

Just bump the versions.

+5 -5

0 comment

4 changed files

pr created time in 3 days

pull request commentrust-bitcoin/rust-lightning

Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

Only changed the minor nits from @jkczyz.

TheBlueMatt

comment created time in 3 days

Pull request review commentrust-bitcoin/rust-lightning

Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

 pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) { 					msgs::DecodeError::ShortRead => panic!("We picked the length..."), 					msgs::DecodeError::Io(e) => panic!(format!("{}", e)), 				}-			}+			};+			assert_eq!(reader.position(), $len as u64);+			msg

Consider moving this to the Ok arm of the match.

TheBlueMatt

comment created time in 3 days

Pull request review commentrust-bitcoin/rust-lightning

Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

 impl NetworkGraph { 		} 	} -	/// For an already known (from announcement) channel, update info about one of the directions of a channel.+	/// For an already known (from announcement) channel, update info about one of the directions+	/// of a channel.

s/a/the ?

TheBlueMatt

comment created time in 3 days

pull request commentrust-bitcoin/rust-lightning

Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

Codecov Report

Merging #758 (2ec7475) into main (fc7df54) will decrease coverage by 0.06%. The diff coverage is 90.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #758      +/-   ##
==========================================
- Coverage   91.41%   91.34%   -0.07%     
==========================================
  Files          37       37              
  Lines       22411    22423      +12     
==========================================
- Hits        20486    20482       -4     
- Misses       1925     1941      +16     
Impacted Files Coverage Δ
lightning/src/routing/network_graph.rs 91.30% <90.58%> (-0.19%) :arrow_down:
lightning/src/ln/functional_tests.rs 96.91% <0.00%> (-0.23%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fc7df54...2ec7475. Read the comment docs.

TheBlueMatt

comment created time in 3 days

PR opened rust-bitcoin/rust-lightning

Split `NetworkGraph` message handling fns into unsigned and signed (+update bindings)

Val noted in 748 (https://github.com/rust-bitcoin/rust-lightning/pull/748#discussion_r529101471) that exposing the existing functions as public was a bit lazy. I indicated I'd handle it in a follow-up post-0.0.12, but realized that 0.0.12 didn't actually pass bindings checks because the newly-exposed APIs required additional features in the bindings. Thus, I went ahead and did the fixup here as well as updated the auto-generated bindings successfully.

As a bonus, this drops Travis CI.

+342 -182

0 comment

6 changed files

pr created time in 3 days

delete tag rust-bitcoin/rust-lightning

delete tag : v0.0.12

delete time in 3 days

created tagrust-bitcoin/rust-lightning

tagv0.0.12

A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

created time in 3 days

push eventrust-bitcoin/rust-lightning

Matt Corallo

commit sha 50b348c4fa7079dcb008d3d5cf8ebc18e5200874

[router] Fix + test routing via next/last-hop hints only We had code in the router to support sending a payment via a single hop across channels exclusively provided by the next-/last-hop hints. However, in updating the fuzzer, I noted that this case not only didn't work, but paniced in some cases. Here, we both fix the panic, as well as write a new test which ensures we don't break support for such routing in the future.

view details

Matt Corallo

commit sha 423073dfe53ee56b464fa042fe9b8f635a78c2f1

[netgraph] Do not allow capacity_sats * 1000 to overflow-panic In updating the router fuzzer, it discovered that a remote peer can cause us to overflow while multiplying the channel capacity value. Since the value should never exceed 21 million BTC, we just add a check for that.

view details

Matt Corallo

commit sha c53d8a3596930afa2d75b663013501e8b8fdd838

Expose manual-update methods in NetworkGraph. These functions were created but previously not exported, however they are useful if we want to skip signature checking when accepting routing messages (which we really should be doing in the routing fuzzer).

view details

Matt Corallo

commit sha b56b4add6ae0625271a66a8a1a48058c7f542352

[fuzz] Make router_target a bit easier for fuzzers to explore It turns out (somewhat obviously) that expecting a fuzzer to correctly build multiple signatures which verify against multiple public keys in the same message was a bit too daunting, so we now skip message signatures in routing messages. We also take this opportunity to simplify the target itself somewhat, avoiding reading public keys over and over and instead generating routes to all the public keys that appeared in messages while running.

view details

Matt Corallo

commit sha fc7df54f8dc3baf710371e2ad2beb862946d5b1c

Merge pull request #748 from TheBlueMatt/2020-11-router-fuzzer Make router_target a bit easier for fuzzers to explore and fix two found bugs

view details

push time in 3 days

PR merged rust-bitcoin/rust-lightning

Make router_target a bit easier for fuzzers to explore and fix two found bugs

Our router_target fuzzer has gotten a bit stale of late, especially since it now requires several parallel signatures to pass. Here, we update it somewhat and fix two bugs which were found in the process.

+155 -72

3 comments

3 changed files

TheBlueMatt

pr closed time in 3 days

Pull request review commentrust-bitcoin/rust-lightning

Make router_target a bit easier for fuzzers to explore and fix two found bugs

 impl NetworkGraph { 		} 	} -	/// For an already known node (from channel announcements), update its stored properties from a given node announcement+	/// For an already known node (from channel announcements), update its stored properties from a given node announcement.+	///+	/// You probably don't want to call this directly, instead relying on a NetGraphMsgHandler's+	/// RoutingMessageHandler implementation to call it indirectly. This may be useful to accept+	/// routing messages without checking their signatures.+	/// 	/// Announcement signatures are checked here only if Secp256k1 object is provided.-	fn update_node_from_announcement(&mut self, msg: &msgs::NodeAnnouncement, secp_ctx: Option<&Secp256k1<secp256k1::VerifyOnly>>) -> Result<bool, LightningError> {+	pub fn update_node_from_announcement<T: secp256k1::Verification>(&mut self, msg: &msgs::NodeAnnouncement, secp_ctx: Option<&Secp256k1<T>>) -> Result<bool, LightningError> {

I'll follow up on this in a separate PR.

TheBlueMatt

comment created time in 3 days

more