Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
661f8ca
General sweep of Lightning updates
martindale Jun 19, 2025
5f2af9b
Build lightningd from source on Ubuntu
martindale Jun 19, 2025
3dbb7db
Add mako to test action
martindale Jun 19, 2025
d996787
Add numerous lightningd dependencies
martindale Jun 19, 2025
474e6f6
Update Lightning service test
martindale Jun 19, 2025
de3f1f7
Add 2s delay to allow lightningd to perform update
martindale Jun 19, 2025
bedcb2a
Add Rust toolchain to GitHub test action
martindale Jun 19, 2025
d0e585a
Add new network-specific tests
martindale Jun 19, 2025
808c59b
Add bitcoin-cli to GitHub test action
martindale Jun 19, 2025
8399201
Correctly update bitcoin test
martindale Jun 19, 2025
b2c7a8f
Rework GitHub test action
martindale Jun 19, 2025
fbf1591
Compute walletName from rootKey
martindale Jun 23, 2025
a107ee1
Add rpcallowip to Bitcoin configuration
martindale Jun 26, 2025
5070fb8
Use latest packages, fix Bitcoin wallet management
martindale Jul 2, 2025
fefcdd1
Fix several deprecations, add mako to GitHub test action
martindale Jul 2, 2025
80dfb44
Upgrade ZeroMQ
martindale Jul 2, 2025
7c1b153
Update Lightning tests and GitHub action to verify binary
martindale Jul 2, 2025
477e306
Streamline lightning tests, add oxfordJoin function
martindale Jul 2, 2025
e1b6a60
Use latest packages, update install report
martindale Jul 18, 2025
4458ecd
Add PATCH message type
martindale Jul 20, 2025
7373d95
Use latest packages
martindale Jul 20, 2025
58b2308
Use latest packages
martindale Jul 23, 2025
f140fcb
Update a number of dependencies
martindale Jul 23, 2025
98c2657
General snapshot
martindale Oct 11, 2025
1ed4e0c
Add errors.h
martindale Oct 11, 2025
108ced2
Add threads.h
martindale Oct 11, 2025
0df8404
Add scoring.h
martindale Oct 11, 2025
3e26b2f
Add timing_protection.h
martindale Oct 11, 2025
df5834d
Fix peer test failures: prevent double peer event emission and improv…
martindale Oct 11, 2025
d600c23
Add settings/local.js to .gitignore
martindale Oct 11, 2025
472de91
Add secp256k1 to GitHub test action
martindale Oct 11, 2025
e054a0b
Update API.md
martindale Oct 26, 2025
85009a5
Update package-lock.json
martindale Oct 26, 2025
a30fb3b
Add threads.c
martindale Oct 27, 2025
99a98db
Add scoring.c
martindale Oct 27, 2025
1260a2f
Remove extraneous stream definition
martindale Oct 27, 2025
179d23b
Update install report
martindale Oct 28, 2025
55bf5b4
Update return value for threads
martindale Nov 13, 2025
07bbeb4
Cast to void
martindale Nov 13, 2025
5904eee
Simplify implementation
martindale Nov 13, 2025
c31e3cb
Add callback to error macros
martindale Nov 13, 2025
07ba48a
Add protocol.h
martindale Nov 13, 2025
63d246b
Add noise.h
martindale Nov 13, 2025
9dd2f55
Add secure_random.h
martindale Nov 13, 2025
0add481
Add secure_memory.h
martindale Nov 13, 2025
bfbe0c3
Add validation.h
martindale Nov 13, 2025
86bf123
Add datadir.h
martindale Nov 13, 2025
38840ac
Update install report
martindale Nov 18, 2025
5c1d625
Update install report
martindale Nov 23, 2025
22787c2
Begin adding Lightning Message types
martindale Nov 23, 2025
4397339
Revert to ecpair 2.1.0
martindale Dec 5, 2025
e342ae9
Add correct package.json
martindale Dec 5, 2025
e8204f5
Correct package-lock.json for ecpair change
martindale Dec 5, 2025
4c6e58b
Update API
martindale Dec 6, 2025
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
40 changes: 40 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,46 @@ jobs:
else
brew install bitcoin
fi
- name: Install lightningd
run: |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
# Install system dependencies
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
build-essential \
git \
libtool \
python3-dev \
python3-pip \
libsqlite3-dev \
libgmp-dev \
libsodium-dev \
gettext \
protobuf-compiler \
libpq-dev \
postgresql

# Install required Python packages
pip3 install --user \
mako \
grpcio-tools \
protobuf \
pytest \
pytest-timeout \
psycopg2-binary

# Clone and build Core Lightning
git clone https://github.com/ElementsProject/lightning.git
cd lightning
git checkout v24.02.1
./configure
make
sudo make install
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
brew install core-lightning
fi
- name: Generate coverage report
run: npm run report:coverage
- name: Send coverage report
Expand Down
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"report:credits": "license-checker --json > reports/credits.json",
"report:install": "rm -rf node_modules && echo \"\n\" > package-lock.json && echo \"$ npm i\" > reports/install.log && npm i >> reports/install.log",
"report:legal": "license-checker --json > reports/licenses.json",
"report:noisy": "node scripts/analyze-deps.js | tee reports/noisy-deps.txt",
"report:todo": "grep --exclude-dir=.git --exclude-dir=_book --exclude-dir=assets --exclude-dir=node_modules --exclude-dir=reports --exclude-dir=coverage --exclude-dir=docs -rEI \"TODO|FIXME\" . > reports/TODO.txt",
"reports": "npm run report:install && npm run make:coverage && npm run report:todo",
"review:coverage": "npm run make:coverage && http-server -p 8000 reports/coverage",
Expand Down
116 changes: 116 additions & 0 deletions scripts/analyze-deps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#!/usr/bin/env node

const { execSync } = require('child_process');
const path = require('path');
const fs = require('fs');

// Get current dependencies from package.json
function getCurrentDependencies () {
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
const deps = new Set();

// Combine both regular dependencies and devDependencies
Object.keys(packageJson.dependencies || {}).forEach(dep => deps.add(dep));
Object.keys(packageJson.devDependencies || {}).forEach(dep => deps.add(dep));

return deps;
}

// Get all commits that modified package-lock.json
function getPackageLockCommits () {
const cmd = 'git log --format="%H" -- package-lock.json';
return execSync(cmd, { encoding: 'utf-8' })
.trim()
.split('\n');
}

// Get package-lock.json content at a specific commit
function getPackageLockAtCommit (commit) {
try {
const cmd = `git show ${commit}:package-lock.json`;
const content = execSync(cmd, { encoding: 'utf-8' });
return JSON.parse(content);
} catch (err) {
// Skip if package-lock.json didn't exist at this commit
return null;
}
}

// Extract all package versions from package-lock
function extractPackageVersions (lockfile) {
if (!lockfile || !lockfile.packages) return new Map();

const versions = new Map();
for (const [pkg, info] of Object.entries(lockfile.packages)) {
if (pkg === '') continue; // Skip root package
const name = pkg.replace('node_modules/', '');
versions.set(name, info.version);
}
return versions;
}

// Track version changes between commits
function analyzePackageUpdates () {
const commits = getPackageLockCommits();
const updates = new Map(); // package -> update count
let prevVersions = new Map();
const currentDeps = getCurrentDependencies();

for (const commit of commits) {
const lockfile = getPackageLockAtCommit(commit);
if (!lockfile) continue;

const currentVersions = extractPackageVersions(lockfile);

// Compare with previous versions
for (const [pkg, version] of currentVersions) {
// Only track updates for current dependencies
if (!currentDeps.has(pkg)) continue;

const prevVersion = prevVersions.get(pkg);
if (prevVersion && prevVersion !== version) {
updates.set(pkg, (updates.get(pkg) || 0) + 1);
}
}

prevVersions = currentVersions;
}

return updates;
}

// Main execution
try {
console.log('Analyzing package update frequency...\n');

const updates = analyzePackageUpdates();

// Sort packages by update frequency
const sortedUpdates = [...updates.entries()]
.sort(([, a], [, b]) => b - a)
.slice(0, 25); // Get top 25

if (sortedUpdates.length === 0) {
console.log('No updates found for current dependencies.');
process.exit(0);
}

// Calculate max lengths for formatting
const maxNameLength = Math.max(...sortedUpdates.map(([name]) => name.length));
const maxCountLength = Math.max(...sortedUpdates.map(([, count]) => String(count).length));

// Print header
console.log('Most Frequently Updated Current Dependencies:');
console.log('═'.repeat(maxNameLength + maxCountLength + 7));

// Print results in a formatted table
sortedUpdates.forEach(([pkg, count], index) => {
const position = `${index + 1}.`.padEnd(3);
const name = pkg.padEnd(maxNameLength);
const updates = String(count).padStart(maxCountLength);
console.log(`${position} ${name} │ ${updates} updates`);
});
} catch (error) {
console.error('Error analyzing package updates:', error.message);
process.exit(1);
}
4 changes: 2 additions & 2 deletions services/bitcoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ class Bitcoin extends Service {

/**
* Creates an unsigned Bitcoin transaction.
* @param {Object} options
* @param {Object} options Options for the transaction.
* @returns {ContractProposal} Instance of the proposal.
*/
async _createContractProposal (options = {}) {
Expand Down Expand Up @@ -1583,7 +1583,7 @@ class Bitcoin extends Service {
}
}

async _waitForBitcoind (maxAttempts = 10, initialDelay = 2000) {
async _waitForBitcoind (maxAttempts = 32, initialDelay = 2000) {
Copy link

Copilot AI Jun 19, 2025

Choose a reason for hiding this comment

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

Consider extracting magic default values like 32 and 2000 into named constants or configuration options to improve readability and ease future adjustments.

Suggested change
async _waitForBitcoind (maxAttempts = 32, initialDelay = 2000) {
async _waitForBitcoind (maxAttempts = DEFAULT_MAX_ATTEMPTS, initialDelay = DEFAULT_INITIAL_DELAY_MS) {

Copilot uses AI. Check for mistakes.
if (this.settings.debug) console.debug('[FABRIC:BITCOIN]', 'Waiting for bitcoind to be ready...');
let attempts = 0;
let delay = initialDelay;
Expand Down
Loading
Loading