Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
52 changes: 44 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,56 @@ cargo build --profile=release-smaller
```

### Testing

#### Unit tests (no external infrastructure needed)
```bash
cargo test --lib
```

#### Standard integration tests
Uses the `electrsd` crate to auto-download and spawn `bitcoind` + `electrs` binaries.
To use pre-downloaded binaries, set `BITCOIND_EXE` and `ELECTRS_EXE` env vars.

On macOS, the default file descriptor limit (256) is too low for spawning `bitcoind` +
`electrs`. Raise it before running integration tests:

Test files: `tests/integration_tests_rust.rs`, `tests/reorg_test.rs`,
`tests/multi_address_types_tests.rs`

```bash
# Run all tests
cargo test
ulimit -n 10240 && cargo test
```

# Run a specific test
#### Run a specific test
```bash
cargo test test_name
```

# Run tests with specific features
#### Run tests with UniFFI bindings feature
```bash
cargo test --features "uniffi"
```

#### CLN integration tests
Requires Docker and `socat` for RPC socket forwarding.
```bash
docker compose -f docker-compose-cln.yml up -d
RUSTFLAGS="--cfg cln_test" cargo test --test integration_tests_cln
```

# Integration tests with specific backends
cargo test --cfg cln_test # Core Lightning tests
cargo test --cfg lnd_test # LND tests
cargo test --cfg vss_test # VSS (Versioned Storage Service) tests
#### LND integration tests
Requires Docker and CMake (>=3.5, <4.0) for `lnd_grpc_rust`.
Set `LND_DATA_DIR`, `LND_CERT_PATH`, and `LND_MACAROON_PATH` env vars.
```bash
docker compose -f docker-compose-lnd.yml up -d
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd
```

#### VSS integration tests
Requires PostgreSQL and a running VSS server (from `lightningdevkit/vss-server`).
Set `TEST_VSS_BASE_URL` env var.
```bash
RUSTFLAGS="--cfg vss_test" cargo test --test integration_tests_vss
```

### Code Quality
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.7.0-rc.32 (Synonym Fork)
# 0.7.0-rc.33 (Synonym Fork)

## Bug Fixes
Copy link

Choose a reason for hiding this comment

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

CLAUDE.md compliance: New entry should be under ## Synonym Fork Additions, not ## Bug Fixes

Per AGENTS.md (the source for CLAUDE.md):

All Synonym fork additions go under ONE ## Synonym Fork Additions subsection
New additions should be added at the TOP of the Synonym Fork Additions list

The new channel monitor migration fix entry belongs at the top of a ## Synonym Fork Additions subsection. If that subsection doesn't yet exist, it should be created. All Synonym-fork-specific changes are supposed to be collected there, not in generic ## Bug Fixes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed — moved the entry from ## Bug Fixes to the top of ## Synonym Fork Additions.

See 2df9b0a


Expand Down Expand Up @@ -29,6 +29,11 @@

## Synonym Fork Additions

- Fixed channel monitor migration from filesystem store to KV store overwriting newer state.
During FS→KV migration, the code now checks if the KV store already has a channel monitor
with a newer `update_id` before writing, preventing stale migration data from overwriting
current state on repeated migrations or restarts. Errors reading or deserializing existing
monitors now fail-closed (abort migration) to avoid silent data loss.
- Added `OnchainPayment::calculate_send_all_fee()` to preview the fee for a drain / send-all
transaction before broadcasting (fee-calculation counterpart of `send_all_to_address`)
- Added runtime APIs for dynamic address type management:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude = ["bindings/uniffi-bindgen"]

[package]
name = "ldk-node"
version = "0.7.0-rc.32"
version = "0.7.0-rc.33"
authors = ["Elias Rohrer <dev@tnull.de>"]
homepage = "https://lightningdevkit.org/"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import PackageDescription

let tag = "v0.7.0-rc.32"
let checksum = "89d987f390e0f8fae370c6d549aacd8b8e1c3c95fb0d6e9ccfcf216cbd263b38"
let tag = "v0.7.0-rc.33"
let checksum = "235e276d2a39ed41abb4034b027f72bf876b65eb40a2a584cc1d06208ad7a58a"
let url = "https://github.com/synonymdev/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
group=com.synonym
version=0.7.0-rc.32
version=0.7.0-rc.33
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-jvm/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536m
kotlin.code.style=official
group=com.synonym
version=0.7.0-rc.32
version=0.7.0-rc.33
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ldk_node"
version = "0.7.0-rc.32"
version = "0.7.0-rc.33"
authors = [
{ name="Elias Rohrer", email="dev@tnull.de" },
]
Expand Down
Loading
Loading