lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.15k stars 363 forks source link

Log all sent + received onion messages #2346

Open TheBlueMatt opened 1 year ago

TheBlueMatt commented 1 year ago

Logging every sent + received message is invaluable as a debug tool, we should do the same thing for P2P messages as we currently lack good observability in the OM pipeline.

tnull commented 1 year ago

Logging every sent + received message is invaluable as a debug tool, we should do the same thing for P2P messages as we currently lack good observability in the OM pipeline.

I assume this should happen at the GOSSIP level?

TheBlueMatt commented 1 year ago

I'd think TRACE - in my mind the distinction is GOSSIP will flood your logs and be unreadable, TRACE shouldn't, but a counterparty that wants to spam you totally can. For receive/send OMs I'd expect them to steady-state be pretty quiet.

Sharmalm commented 1 year ago

Can I try this issue?

valentinewallace commented 1 year ago

Can I try this issue?

Go for it @Sharmalm

Sharmalm commented 1 year ago

This line is message processing function. So do i have to log every sent and receive message individually?

jkczyz commented 1 year ago

It isn't clear to me from this issue what is supposed to be logged. We already log both sent and received onion messages in PeerManager, AFAICT, just as we do for other P2P messages.

jkczyz commented 1 year ago

Was the description suppose to say s/P2P messages/onion message payload?

TheBlueMatt commented 12 months ago

Yea, payload really. The issue with the current logging is we have no idea what was in the onion messages, we just log the encrypted data.