From 8d4f71543d0f57246b76bb20268f2c645fe33d22 Mon Sep 17 00:00:00 2001 From: michael1011 Date: Tue, 14 Jan 2025 23:35:10 +0100 Subject: [PATCH 1/3] chore: log when enabling profiler --- boltzr/src/profiling.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/boltzr/src/profiling.rs b/boltzr/src/profiling.rs index ae8c5e57..f647d446 100644 --- a/boltzr/src/profiling.rs +++ b/boltzr/src/profiling.rs @@ -2,7 +2,7 @@ use crate::config::GlobalConfig; use pyroscope::pyroscope::PyroscopeAgentRunning; use pyroscope::PyroscopeAgent; use pyroscope_pprofrs::{pprof_backend, PprofConfig}; -use tracing::{error, warn}; +use tracing::{error, info, warn}; pub fn start(config: &GlobalConfig) -> Option> { let endpoint = match &config.profiling_endpoint { @@ -24,7 +24,10 @@ pub fn start(config: &GlobalConfig) -> Option match agent.start() { - Ok(agent) => return Some(agent), + Ok(agent) => { + info!("Enabling profiler"); + return Some(agent); + } Err(err) => err, }, Err(err) => err, From 6818345b6ae85f7a82d8489d1626459d55435343 Mon Sep 17 00:00:00 2001 From: michael1011 Date: Wed, 15 Jan 2025 13:36:56 +0100 Subject: [PATCH 2/3] fix: failure rates for custom expirations --- lib/db/repositories/StatsRepository.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/db/repositories/StatsRepository.ts b/lib/db/repositories/StatsRepository.ts index 70b76d0a..2e8cd7e5 100644 --- a/lib/db/repositories/StatsRepository.ts +++ b/lib/db/repositories/StatsRepository.ts @@ -159,13 +159,13 @@ ORDER BY year, month, pair NULLS FIRST; // language=PostgreSQL ` WITH data AS ( - SELECT pair, 'submarine' AS type, status, referral, "createdAt" + SELECT pair, 'submarine' AS type, status, "failureReason", referral, "createdAt" FROM swaps UNION ALL - SELECT pair, 'reverse' AS type, status, referral, "createdAt" + SELECT pair, 'reverse' AS type, status, "failureReason",referral, "createdAt" FROM "reverseSwaps" UNION ALL - SELECT pair, 'chain' AS type, status, referral, "createdAt" + SELECT pair, 'chain' AS type, status, "failureReason", referral, "createdAt" FROM "chainSwaps" ) SELECT @@ -174,6 +174,7 @@ SELECT type, COUNT(*) FILTER ( WHERE status IN (?) + AND "failureReason" NOT IN (?) ) / CAST(COUNT(*) AS REAL) AS "failureRate" FROM data WHERE @@ -389,6 +390,7 @@ GROUP BY pair, type; SwapUpdateEvent.InvoiceFailedToPay, SwapUpdateEvent.TransactionRefunded, ], + ['invoice expired', 'swap expired'], referral, referral, minYear, From 287257f898916a0826e7957474b6e17e43167815 Mon Sep 17 00:00:00 2001 From: michael1011 Date: Wed, 15 Jan 2025 13:46:23 +0100 Subject: [PATCH 3/3] chore: fix hold invoice plugin build --- .github/workflows/ci.yml | 18 ++++++++++-------- .github/workflows/docker-publish.yml | 6 ++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2b2f5c7..cdc03bc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,14 @@ name: CI -on: [ push, pull_request ] +on: [push, pull_request] jobs: build: strategy: matrix: - platform: [ ubuntu-latest ] - node-version: [ 20 ] - rust-version: [ stable ] + platform: [ubuntu-latest] + node-version: [20] + rust-version: [stable] runs-on: ${{ matrix.platform }} @@ -33,7 +33,9 @@ jobs: matrix.rust-version }} - name: Install build dependencies - run: sudo apt-get update && sudo apt-get -y install protobuf-compiler + run: + sudo apt-get update && sudo apt-get -y install protobuf-compiler + libsqlite3-dev - name: Install Node.js dependencies run: npm ci @@ -80,9 +82,9 @@ jobs: build-rust: strategy: matrix: - platform: [ ubuntu-latest ] - node-version: [ 20 ] - rust-version: [ stable, nightly ] + platform: [ubuntu-latest] + node-version: [20] + rust-version: [stable, nightly] runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 4abb2892..316710c9 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -3,7 +3,7 @@ name: Docker on: workflow_dispatch: push: - branches: ["master"] + branches: ['master'] jobs: push: @@ -29,4 +29,6 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Push backend image - run: ./docker/build.py buildx --platform linux/amd64 --no-latest --branch ${GITHUB_REF##*/} boltz + run: + ./docker/build.py buildx --platform linux/amd64 --no-latest --branch + ${GITHUB_REF##*/} boltz