Skip to content

Instantly share code, notes, and snippets.

View namuyan's full-sized avatar

namuyang namuyan

View GitHub Profile

Opening a channel by using a PSBT

This document describes how to open a channel with c-lightning by using a PSBT as the funding transaction for my learning. If you use lnd please go to here that is well documented. Also, here is the c-lightning offical document for each command that are shown below.

1. Start a funding process

fundchannel_start is a lower level RPC command that allows a user to initiate channel establishment with a connected peer. Assume my node is already connected to 02b861cc95a061d0536a2e6d96992274c284490bc1e3782d5b59004a2aba7767a7. Below the command returns the funding_address and the scriptpubkey for the channel funding output with 200000 sats(=0.002btc).

# dockerのインストール
# https://docs.docker.com/engine/install/ubuntu/
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
@namuyan
namuyan / README.md
Last active April 7, 2020 14:08 — forked from sile/README.md
Optunaを使ったRocksDBのパフォーマンスチューニング (windows)

概要

  • Optunaというハイパーパラメータ最適化ツールを使って、RocksDB(組み込みDB・KVS)のパフォーマンスチューニングを試してみた際の結果メモ
    • 対象となるワークロードに対して、最適な性能を発揮するパラメータ群を自動で見つけ出すのが目的
  • 結果としては、デフォルトパラメータをそのまま使った場合に比べて、かなり良い性能が得られるパラメータ群を見つけることができた:
    • デフォルトでのベンチマークの所要時間: 372秒
    • Optunaによる最適化後のパラメータでの所要時間: 30秒

モチベーション

@namuyan
namuyan / udp_hole_punch_tester.py
Created January 9, 2020 09:57 — forked from tnytown/udp_hole_punch_tester.py
UDP Hole Punching test tool
#!/usr/bin/env python
#
# udp_hole_punch_tester.py - UDP Hole Punching test tool
#
# Usage: udp_hole_punch_tester.py remote_host remote_port
#
# Run this script simultaneously on 2 hosts to test if they can punch
# a UDP hole to each other.
#
# * remote_port should be identical on 2 hosts.
@namuyan
namuyan / rpipypy.md
Last active August 29, 2019 15:42 — forked from troeger/rpipypy.md
Cross-compilation of PyPy for RaspberryPi
@namuyan
namuyan / index.js
Last active February 24, 2020 13:09 — forked from novi/logger.js
node-http-proxyを使ったWebsocket対応Proxy
let https = require('https'),
httpProxy = require('http-proxy'),
fs = require('fs');
var ssl = {
key: fs.readFileSync('/etc/letsencrypt/live/pycontract.tk-0002/privkey.pem', 'utf8'),
cert: fs.readFileSync('/etc/letsencrypt/live/pycontract.tk-0002/fullchain.pem', 'utf8')
};