Skip to content

Instantly share code, notes, and snippets.

View namuyan's full-sized avatar

namuyang namuyan

View GitHub Profile

4x Nvidia GTX 1080Ti Hashcat Benchmarks

I use leader-telecom cloud GPU for WPA2 cracking test.

4x1080Ti, 4x11GB GPU, 2x2609v4, 64GB RAM

€ 25.23 / day

Session..........: hashcat
Status...........: Running

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 / CannotFindMsvcr140.md
Last active January 29, 2020 15:00
VCをインストールしてもmsvcr140.dllが見つからない

ld.exe: cannot find -lmsvcr140の対処

VCをインストールしてもmsvcr140.dllが見つからない

Warning! その場しのぎのやり方 読み込むDLLのバージョンを下げます。

やり方

  1. テキストエディタで読み込む Lib\distutils\cygwinccompiler.py
  2. function get_msvcr()にて使用するDLL名を返すので編集します。
  3. C:\Windows\System32で検索するmsvcr*.dll
@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 / bsddb.md
Created September 30, 2019 03:30
Windowsでbsddb3(BerkeleyDB)を使いたい方向け資料

概要

bsddb3(BerkeleyDB)のWindowsバイナリビルドサンプル。 修正しないとビルドできないから変更点を参考にする事。 Python本体も少し弄った記憶あります。 古代の遺産で困ってる人が結構いるみたいなので残す。

環境

  • Windows10 64bit
@namuyan
namuyan / bug.md
Created September 28, 2019 11:01
lightningのFoundingTXを検証しない問題

source

https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002174.html https://twitter.com/chaintope/status/1177771818007982081?s=21

abstract

LNの脆弱性は、チャネルオープン時のチェックが問題。 通常、既存のBOLTの仕様でチャネルをオープンする際は、資金提供者がFunding Txを作成し、そのTXIDとアウトプットの番号を受信者に渡す。 受信者はその情報から最初のコミットメントTxの署名を作成し、資金提供者に返す。その後資金提供者はFunding Txをブロードキャストしてチャネルをオープンする。

@namuyan
namuyan / nuitka3-help.sh
Created September 7, 2019 15:53
nuitka3 help commands 0.6.5
Usage: nuitka3 [--module] [--run] [options] main_module.py
Options:
--version show program's version number and exit
-h, --help show this help message and exit
--module Create an extension module executable instead of a
program. Defaults to off.
--standalone Enable standalone mode in build. This allows you to
transfer the created binary to other machines without
it relying on an existing Python installation. It