Skip to content

Instantly share code, notes, and snippets.

View PierreRochard's full-sized avatar
🍯

Pierre Rochard PierreRochard

🍯
View GitHub Profile
@PierreRochard
PierreRochard / grpc_windows_csharp.md
Last active September 22, 2018 13:31
gRPC Windows C# Command

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
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
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 //
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
@PierreRochard
PierreRochard / debugging_bitcoin.txt
Last active April 13, 2019 17:41
Debugging Bitcoin
./configure --enable-debug
make
lldb $HOME/src/bitcoinmaster/src/qt/bitcoin-qt
breakpoint set -f rpcwallet.cpp -l 202
run -conf=/Volumes/Mac\ Storage/bitcoin-mainnet/bitcoin.conf -datadir=/Volumes/Mac\ Storage/bitcoin-mainnet
@PierreRochard
PierreRochard / gist:04fc1c1257e15884a330af95c3d8f147
Last active April 9, 2018 12:17
Explaining the Bitcoin software
Q: Bitcoin has two aspects to it that make it unique - software and economics.
Can you explain a bit about the software to us folks that can’t code?
A: A protocol is a set of rules that participants agree to. For example,
when playing a sport, the rules of the game would be the protocol.
Bitcoin is a protocol enforced by software that can be run by anyone.
You can run a node that connects to other nodes over the internet.
Nodes verify that transactions (sending and receiving bitcoins)
follow the protocol rules, and reject the ones that don’t.
➜ enterprisebitcoin git:(odb) ✗ make
Making all in src
CXXLD test/test_bitcoin
Undefined symbols for architecture x86_64:
"typeinfo for odb::pgsql::object_statements_base", referenced from:
typeinfo for odb::pgsql::object_statements<etransactions> in libbitcoin_wallet.a(libbitcoin_wallet_a-transactions-odb.o)
"odb::pgsql::object_statements_base::~object_statements_base()", referenced from:
odb::pgsql::object_statements<etransactions>::object_statements(odb::pgsql::connection&) in libbitcoin_wallet.a(libbitcoin_wallet_a-transactions-odb.o)
odb::pgsql::object_statements<etransactions>::~object_statements() in libbitcoin_wallet.a(libbitcoin_wallet_a-transactions-odb.o)
"odb::pgsql::insert_statement::insert_statement(odb::pgsql::connection&, char const*, char const*, bool, unsigned int const*, unsigned long, odb::pgsql::binding&, odb::pgsql::native_binding&, odb::pgsql::binding*, bool)", referenced from:
➜ enterprisebitcoin git:(odb) ✗ make
Making all in src
CXX wallet/libbitcoin_wallet_a-walletdb.o
In file included from wallet/walletdb.cpp:19:
./wallet/enterprise/database.h:14:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
char *argv[] = {"./driver", "--user", "odb_test", "--database", "odb_test"};
^
./wallet/enterprise/database.h:14:33: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
char *argv[] = {"./driver", "--user", "odb_test", "--database", "odb_test"};
^
➜ enterprisebitcoin git:(odb) ✗ make
Making all in src
CXX wallet/libbitcoin_wallet_a-walletdb.o
In file included from wallet/walletdb.cpp:18:
./wallet/sql/database.h:14:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
char *argv[] = {"./driver", "--user", "odb_test", "--database", "odb_test"};
^
./wallet/sql/database.h:14:33: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
char *argv[] = {"./driver", "--user", "odb_test", "--database", "odb_test"};
^

Keybase proof

I hereby claim:

  • I am pierrerochard on github.
  • I am rochard (https://keybase.io/rochard) on keybase.
  • I have a public key whose fingerprint is D58A 53CB 2FA2 75E3 D8F8 8281 CBFD 5CFA 2A9F E37F

To claim this, I am signing this object: