Skip to content

Conversation

@enigbe
Copy link
Owner

@enigbe enigbe commented Dec 11, 2024

What this PR does:

  • Local PR to confirm the changes to configurable logging before creating on main repo.

@enigbe enigbe force-pushed the 2024-11-configurable-logging-system branch 3 times, most recently from 7fa2928 to 283fe85 Compare December 16, 2024 00:32
@enigbe enigbe force-pushed the 2024-11-configurable-logging-system branch 4 times, most recently from 0660dfa to 6766c60 Compare December 19, 2024 21:54
tnull added 11 commits January 13, 2025 10:18
Recently, `rustls` bumped their MSRV to 1.71. As we depend on them and
don't want to continuously pin this security-critical dependency back,
we're looking to bump our MSRV to a version >= 1.71, too.

Here, we propose to bump the MSRV to rustc version 1.75, which was
chosen because:

a) it's > 1 year old
b) it provides a buffer to 1.71, i.e., if some crate bumped to a version
> 1.71, there is a chance we don't immediately have to react again
c) it stabilized `async fn`s in traits (see
https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html),
which might become handy for related crates.
Previously, we decided to continue parsing any fields if we failed to
parse a known (i.e., `lightning` or `lno`) parameter failed to parse.
This however just hides the error and is a bit anti-idiomatic even
though allowing to use *some* URI fields even in the face of
incompatible formats for others.

Here we therefore opt to fail parsing the URI if any field fails.
…-ldk

Update BDK to 1.0.0 and LDK to 0.1.0
Previously, we would cast `FeeRate::to_sat_per_kwu` to `u32`, which
however might result in `u32::max_value` being used if our fee
estimation source delivers huge bogus data. Here, we make sure to use
the fallback rate if we would do so otherwise.
So far, we did not verify gossip data received via the peer-to-peer
network. As a small fix in the latest LDK release allows us properly set
the gossip verifier, we do so, and start verifying gossip when the
bitcoind RPC gossip source is set.
…al-fee-rate-conversion-overflow

 Default to fallbacks for huge bogus values in fee estimation conversion
@enigbe enigbe force-pushed the 2024-11-configurable-logging-system branch from 2a80510 to d6dde2c Compare January 20, 2025 21:48
…ying-gossip

Start verifying gossip data via bitcoind RPC
@enigbe enigbe force-pushed the 2024-11-configurable-logging-system branch 2 times, most recently from 3b71223 to a61455a Compare January 21, 2025 15:01
joostjager and others added 8 commits January 23, 2025 13:07
…ption-hash

Extend API to allow invoice creation with a description hash
We simply check that converting back-and-forth between hash types
nothing is lost.
…ty-back-main

Bump Rust version number to v0.4.3 and update CHANGELOG
We allow to override our fee estimator in the `send_to_address` and
`send_all_to_address` API methods. To this end, we implement a
bindings-compatible wrapper around `bitcoin::FeeRate`.
tnull added 2 commits January 25, 2025 11:47
Even small changes to item visibility during fixes might introduce
SemVer violations (see
https://doc.rust-lang.org/cargo/reference/semver.html#change-categories
for a list of changs that would be considered major/minor).

To make sure we don't accidentally introduce such changes, we here add a
new semver-checks CI job that utilizes cargo-semver-checks
(https://github.com/obi1kenobi/cargo-semver-checks), and have it run on
any push or pull requests.
We bump the version number on `main` to the next-planned minor release
(mod `+git` metadata tag). This aligns what we're planning to do in LDK
(see lightningdevkit/rust-lightning#3546) and
allows us to run SemVer checks on PRs towards `main`.
@enigbe enigbe force-pushed the 2024-11-configurable-logging-system branch from f06097b to c43fe47 Compare January 27, 2025 10:40
tnull and others added 5 commits January 27, 2025 17:05
…erride-feerate

Allow to override fee rates for onchain payments
…checks

Add SemVer compatibility checks to CI
We add the previously-omitted `short_channel_id`, `inbound_scid_alias`,
`outbound_scid_alias` types to `ChannelDetails`.
* Add flexible log writer interface for multiple destinations
* Implement filesystem writing capability via FilesystemLogger
* Prefix LDK-based objects with 'Ldk' for consistency
* Add configuration options for log file path and log level
@enigbe enigbe force-pushed the 2024-11-configurable-logging-system branch 2 times, most recently from 241bfcc to 96522d9 Compare January 29, 2025 19:56
- modify tests to forward logs to mock in-memory
  `log` logger
- correct "Forwards" spelling error
* Add support for user-provided custom logger to
  write logs to, allowing users to provide any logger
  that implements LogWriter
* Add test to cover this use case, implementing Log-
  Writer for the mock, in-memory MockLogger.
* Fix setting log's global logger twice.
* Revert the renaming of LogLevel to LdkLevel.
This commit addresses a series of fixes, refactors,
and documentation changes meant to optimize the new
logging system to be better with:

- Improved memory usage by eliminating unnecessary data
  allocations and improving log record handling.

- Enhanced logging system with support for foreign
  implementations (as tested with Kotlin).

- Improved documentation across board.

- Cleaner refactors and simpler code that improve
  clarity.

- Streamlined logging configuration.

- Pre-existing bug fixes.
@enigbe enigbe force-pushed the 2024-11-configurable-logging-system branch from 96522d9 to e509cf8 Compare January 30, 2025 12:24
@enigbe enigbe closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants