Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve block connection logging #2559

Closed
wants to merge 41 commits into from
Closed
Changes from 4 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1cece1b
logging channel_id of connected txids
Sharmalm Sep 7, 2023
b3c824f
Merge branch 'lightningdevkit:main' into main
Sharmalm Sep 9, 2023
b2236a6
logging confirmed txid
Sharmalm Sep 9, 2023
7272dc5
Merge remote-tracking branch 'refs/remotes/origin/main'
Sharmalm Sep 9, 2023
743f548
logging in channel monitor
Sharmalm Sep 17, 2023
10ea10e
logging all filtered txids
Sharmalm Sep 18, 2023
3477eea
adding txid to filter and logging best_block_update
Sharmalm Sep 27, 2023
8f1e8b6
Handle if funding output is in a coinbase transaction
benthecarman Dec 19, 2022
3b30a80
Support creating coinbase funding transactions in tests
benthecarman Apr 19, 2023
87ac1bf
Add test for coinbase funding transactions
dunxen Sep 1, 2023
fe0a7fc
Add constructor to `RouteParameters`
tnull Aug 31, 2023
203a847
Have `get_route` take `RouteParameters`
tnull Aug 31, 2023
976d077
Have `Route` hold `RouteParameters`
tnull Aug 31, 2023
539d60d
Include overpaid value in `Route::get_total_fees`
tnull Sep 6, 2023
9963e16
Improve `Route::get_total_amount` docs
tnull Sep 6, 2023
40d901f
Log each condition that was violated for a stale monitor
waterson Sep 6, 2023
b874ccf
Fix misspelling, s/and/but/.
waterson Sep 6, 2023
eb593db
logging channel_id of connected txids
Sharmalm Sep 7, 2023
62afba6
logging confirmed txid
Sharmalm Sep 9, 2023
e052324
Add RFC4648 base32 `encode` and `decode` functions
jbesraa Aug 25, 2023
84e3ba6
Move `zbase32` implementation to `base32` file
jbesraa Aug 25, 2023
b401464
Fix indent in `message_signing.rs`
jbesraa Sep 4, 2023
4d31af3
Implement `from_str` trait for `NetAddress`
jbesraa Aug 25, 2023
ef14292
Add `KVStore` interface trait
tnull Aug 1, 2023
e82f427
Update `lightning-persister` crate
tnull Aug 21, 2023
5591d34
Add `test_utils`
tnull Aug 4, 2023
e9321a5
Add `FilesystemStore`
tnull Aug 1, 2023
485cc59
Add `read_channel_monitors` utility
tnull Aug 4, 2023
a7ce0e3
Migrate to `KVStore`/`FilesystemStore`
tnull Aug 1, 2023
20433de
Migrate `FilesystemPersister` tests to `FilesystemStore`
tnull Aug 4, 2023
bc27771
Add benchmarking for `FilesystemStore`
tnull Aug 4, 2023
d731a35
Add `TestStore` implementation of `KVStore`
tnull Aug 21, 2023
446e078
Add an InvoiceRequestFailed event
jkczyz Jul 18, 2023
5c4b7ad
Add PendingOutboundPayment::AwaitingInvoice
jkczyz Jul 17, 2023
1f2d0e7
Move IDEMPOTENCY_TIMEOUT_TICKS to where it is used
jkczyz Sep 6, 2023
9c4739a
Test for removing stale AwaitingInvoice payments
jkczyz Aug 31, 2023
1ce341b
Test removing abandoned AwaitingInvoice payments
jkczyz Sep 6, 2023
2e6a640
Add PendingOutboundPayment::InvoiceReceived
jkczyz Aug 30, 2023
1cfd3c5
Refactor OutboundPayments::retry_payment_internal
jkczyz Sep 1, 2023
eb8b14b
Rename OutboundPayments::retry_payment_internal
jkczyz Sep 6, 2023
c8f1fe6
Merge branch 'main' of https://github.com/Sharmalm/rust-lightning
Sharmalm Oct 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7009,6 +7009,12 @@ where
let timestamp = self.highest_seen_timestamp.load(Ordering::Acquire);
self.do_chain_event(Some(last_best_block_height), |channel| channel.best_block_updated(last_best_block_height, timestamp as u32, self.genesis_hash.clone(), &self.node_signer, &self.default_configuration, &self.logger));
}
// log each confirmed tansaction's Txid.
for tx in txdata.iter() {
let (index, transaction) = tx;
let txid = transaction.txid();
log_trace!(self.logger, "Transaction id {} confirmed in block {}", txid, block_hash);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we should log every transaction, as many users actually connect all transactions in a block. Instead, we should look for transactions we care about, and maybe only actually add logging in ChannelMonitor where we can do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

}
}

fn best_block_updated(&self, header: &BlockHeader, height: u32) {
Expand Down