Skip to content

Instantly share code, notes, and snippets.

:shipit:
Ship it!

Pierre Rochard PierreRochard

:shipit:
Ship it!
Block or report user

Report or block PierreRochard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bitcoin_pr_query.graphql
query($prNumber: Int = 15024){
rateLimit {
limit
cost
remaining
resetAt
}
repository(owner: "bitcoin", name: "bitcoin") {
pullRequest(number: $prNumber) {
id
@PierreRochard
PierreRochard / your_lightning_commitment_transaction_with_htlcs
Created May 9, 2019
Your version of the commitment transaction that you are holding off-chain (with HTLCs)
View your_lightning_commitment_transaction_with_htlcs
# Based on a diagram posted by @pm47 https://github.com/lightningnetwork/lightning-rfc/issues/553#issuecomment-455641943
+------------------------------------------------+
| 2-of-2 multi-sig funding tx confirmed on-chain |
+------------------------------------------------+
|
|
|
|
View lnd.js
// npm init -f
// npm install grpc --save
// npm install @grpc/proto-loader --save
const grpc = require('grpc');
const fs = require('fs');
const protoLoader = require('@grpc/proto-loader');
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
View lnd_crash.txt
2018-11-03 12:34:10.500 [INF] DISC: Broadcasting batch of 2 new announcements
2018-11-03 12:34:40.501 [INF] DISC: Broadcasting batch of 4 new announcements
2018-11-03 12:35:10.500 [INF] DISC: Broadcasting batch of 3 new announcements
2018-11-03 12:35:40.499 [INF] DISC: Broadcasting batch of 1 new announcements
2018-11-03 12:36:21.474 [INF] RPCS: [listchannels] fetched 3 channels from DB
2018-11-03 12:36:21.474 [INF] RPCS: [listchannels] fetched 3 channels from DB
2018-11-03 12:36:42.041 [INF] RPCS: [listchannels] fetched 3 channels from DB
2018-11-03 12:36:47.475 [INF] RPCS: [newaddress] addr=tb1qfs02pqxf4jq30x5wmeevtsm9jddtus7luhep3j
2018-11-03 12:36:56.303 [INF] RPCS: [sendcoins] addr=tb1qfs02pqxf4jq30x5wmeevtsm9jddtus7luhep3j, amt=0.0018 BTC, sat/kw=253
2018-11-03 12:36:56.316 [INF] LNWL: Inserting unconfirmed transaction 29b4a9242652c10a71c31eb252a2324b662da8dc2d5eebecf7772f2ce057e635
View gist:6a1c3ec7ec333996b977a309ac9e893a
PS C:\Users\pierre> .\Documents\lnd-neutrino.bat
C:\Users\pierre>C:\Users\pierre\Documents\lnd.exe --bitcoin.active --bitcoin.testnet --autopilot.active --autopilot.allocation=1 --autopilot.minchansize=600000 --autopilot.maxchannels=10 --autopilot.private --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community --debuglevel=debug
2018-10-28 07:22:23.715 [WRN] LTND: open C:\Users\pierre\AppData\Local\Lnd\lnd.conf: The system cannot find the file specified.
2018-10-28 07:22:23.716 [INF] LTND: Version 0.5.0-beta commit=3b2c807288b1b7f40d609533c1e96a510ac5fa6d
2018-10-28 07:22:23.718 [INF] LTND: Active chain: Bitcoin (network=testnet)
2018-10-28 07:22:23.721 [INF] CHDB: Checking for schema update: latest_version=6, db_version=6
2018-10-28 07:22:23.739 [INF] RPCS: password RPC server listening on 127.0.0.1:10009
2018-10-28 07:22:23.739 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080
2018-10-28 07:22:23.740 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create a w
@PierreRochard
PierreRochard / grpc_windows_csharp.md
Last active Sep 22, 2018
gRPC Windows C# Command
View grpc_windows_csharp.md

From https://grpc.io/docs/quickstart/csharp.html C:\Users\pierre.nuget\packages\grpc.tools\1.14.1\tools\windows_x64\protoc.exe -I./protos .\protos\helloworld.proto --csharp_out .\csharp\Helloworld\Greeter\ --grpc_out .\csharp\Helloworld\Greeter\ --plugin=protoc-gen-grpc=C:\Users\pierre.nuget \packages\grpc.tools\1.14.1\tools\windows_x64\grpc_csharp_plugin.exe

From https://grpc.io/docs/tutorials/basic/csharp.html C:\Users\pierre.nuget\packages\grpc.tools\1.14.1\tools\windows_x64\protoc.exe -I.\protos --csharp_out .\csharp\RouteGuide\RouteGuide --grpc_out .\csharp\RouteGuide\RouteGuide .\protos\route_guide.proto --plugin=protoc-gen-grpc=C:\Users\pierre.nuget\packages\grpc.tools\1.14.1\tools\windows_x64\grpc_csharp_plugin.exe

For LND gRPC:

  1. git clone https://github.com/protocolbuffers/protobuf
  2. git clone https://github.com/googleapis/googleapis
View WindowsLightning.txt
Download the latest 64 bit Windows version of Bitcoin Core https://bitcoincore.org/en/download/
Install it but don't run it
Testnet:
& 'C:\Program Files\Bitcoin\bitcoin-qt.exe' -testnet=1 -txindex=1 -zmqpubrawblock=tcp://127.0.0.1:18501 -zmqpubrawtx=tcp://127.0.0.1:18502 -rpcuser=test_user -rpcpassword=test_password -server=1
Mainnet:
& 'C:\Program Files\Bitcoin\bitcoin-qt.exe' -testnet=0 -txindex=1 -zmqpubrawblock=tcp://127.0.0.1:18503 -zmqpubrawtx=tcp://127.0.0.1:18504 -rpcuser=test_user -rpcpassword=test_password -server=1
Let it sync
Download the latest 64 bit Windows version of LND https://github.com/lightningnetwork/lnd/releases
View berkeley_environment_bug.cpp
Process 94602 stopped
* thread #24, name = 'bitcoin-httpworker', stop reason = breakpoint 1.1
frame #0: 0x0000000100367524 bitcoin-qt`GetWalletEnv(wallet_path=0x00007000059890a8, database_filename="regtest3.dat") at db.cpp:79 [opt]
76 // emplace function if the key already exists. This is a little inefficient,
77 // but not a big concern since the map will be changed in the future to hold
78 // pointers instead of objects, anyway.
-> 79 return &g_dbenvs.emplace(std::piecewise_construct, std::forward_as_tuple(env_directory.string()), std::forward_as_tuple(env_directory)).first->second;
80 }
81
82 //
View bitcoin_acks_v1.txt
Based on website traffic logs and positive feedback from frequent
contributors to Bitcoin Core, BitcoinACKs.com is already finding
"product/market fit", so I'm bringing it out of beta and releasing it as
version 1!
Contributing to open source software does not begin and end with writing
code. There is a collaborative process between contributors to ensure
that the software and its codebase evolve in a satisfactory direction.
Participating in this process is rewarding because contributors
accomplish together much more than they could in isolation, both due to
You can’t perform that action at this time.