Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c8cbaf2
DROPME: Bump LDK for async store migration
tnull Jun 3, 2026
4cf3666
Move BDK wallet helpers onto async KV storage
tnull Jun 3, 2026
bec0719
Use async KV storage for static invoices
tnull Jun 3, 2026
7bfdd0d
f Simplify
tnull Jun 3, 2026
cbf87bb
Move peer persistence onto async KV storage
tnull Jun 3, 2026
8c949ff
f - Serialize peer store persistence updates
tnull Jun 4, 2026
a7c4cbe
Move DataStore persistence onto async KV storage
tnull Jun 3, 2026
ff489f2
Move node metrics persistence onto async KV storage
tnull Jun 3, 2026
d71fb06
f - Move on-chain wallet update helper out of macro
tnull Jun 3, 2026
1ecafce
f - Serialize node metrics persistence updates
tnull Jun 4, 2026
a454ce1
Use BDK's async wallet persister
tnull Jun 3, 2026
de48a60
Use async KVStore migration for filesystem stores
tnull Jun 3, 2026
0b95f04
Move test InMemoryStore into shared module
tnull Jun 3, 2026
45d52bb
f - Preserve moved InMemoryStore code exactly
tnull Jun 3, 2026
d781d91
Move test store checks onto async KV storage
tnull Jun 3, 2026
fe2f09f
Remove blocking KV store support
tnull Jun 3, 2026
55e0d03
f - Await async VSS store test helper
tnull Jun 3, 2026
393f078
Add shared store runtime wrapper
tnull Jun 5, 2026
b454e5a
Isolate VSS persistence from the node runtime
tnull Jun 4, 2026
88eb0fb
Isolate PostgreSQL persistence from the node runtime
tnull Jun 4, 2026
be2b74d
Enable Tokio eager handoff for node runtimes
tnull Jun 5, 2026
eaae260
Centralize PostgreSQL test URL env var
benthecarman Jun 4, 2026
8f4556e
Add database persistence benchmarks
benthecarman May 28, 2026
6bc815c
Benchmark payments across stores
benthecarman May 28, 2026
c97cb28
Wait for return payment in benches
benthecarman Jun 3, 2026
890eb51
Add forwarding operations benchmark
benthecarman Jun 3, 2026
21b9896
Add channel open operations benchmark
benthecarman Jun 3, 2026
17d423c
Implement migratable database stores
benthecarman Jun 5, 2026
fedeaf4
Add seeded startup operations benchmark
benthecarman Jun 5, 2026
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
18 changes: 17 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ jobs:
runs-on: ubuntu-latest
env:
TOOLCHAIN: stable
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout source code
uses: actions/checkout@v6
Expand Down Expand Up @@ -42,5 +56,7 @@ jobs:
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Run benchmarks
env:
TEST_POSTGRES_URL: "host=localhost user=postgres password=postgres"
run: |
cargo bench
RUSTFLAGS="--cfg tokio_unstable" cargo test --benches --features "bench postgres"
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Test on Rust ${{ matrix.toolchain }}
if: "matrix.platform != 'windows-latest'"
run: |
RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test
RUSTFLAGS="--cfg no_download --cfg cycle_tests --cfg tokio_unstable" cargo test
- name: Test with UniFFI support on Rust ${{ matrix.toolchain }}
if: "matrix.platform != 'windows-latest' && matrix.build-uniffi"
run: |
Expand Down Expand Up @@ -114,4 +114,4 @@ jobs:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs
- run: cargo docs-rs
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk

# Env file used in benches
.env

# Ignore generated swift related files
.swiftpm/
LDKNodeFFI.*
Expand Down
25 changes: 25 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ panic = 'abort' # Abort on panic

[features]
default = []
bench = []
postgres = ["dep:tokio-postgres", "dep:native-tls", "dep:postgres-native-tls"]

[dependencies]
Expand Down Expand Up @@ -96,6 +97,7 @@ rand = { version = "0.9.2", default-features = false, features = ["std", "thread
proptest = "1.0.0"
regex = "1.5.6"
criterion = { version = "0.7.0", features = ["async_tokio"] }
dotenvy = "0.15"
ldk-node-062 = { package = "ldk-node", version = "=0.6.2" }
ldk-node-070 = { package = "ldk-node", version = "=0.7.0" }

Expand Down Expand Up @@ -140,6 +142,15 @@ check-cfg = [
name = "payments"
harness = false

[[bench]]
name = "operations"
harness = false

[[bench]]
name = "database"
harness = false
required-features = ["bench"]

#[patch.crates-io]
#lightning = { path = "../rust-lightning/lightning" }
#lightning-types = { path = "../rust-lightning/lightning-types" }
Expand Down Expand Up @@ -196,3 +207,17 @@ harness = false
#lightning-liquidity = { path = "../rust-lightning/lightning-liquidity" }
#lightning-macros = { path = "../rust-lightning/lightning-macros" }
#lightning-dns-resolver = { path = "../rust-lightning/lightning-dns-resolver" }

[patch."https://github.com/lightningdevkit/rust-lightning"]
lightning = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-types = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-persister = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-block-sync = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-liquidity = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-macros = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
lightning-dns-resolver = { git = "https://github.com/tnull/rust-lightning", rev = "2611766e6a5913d6e33afdc1932485575ee8ea4e" }
Loading