Skip to content

Instantly share code, notes, and snippets.

View PierreRochard's full-sized avatar
🍯

Pierre Rochard PierreRochard

🍯
View GitHub Profile
The object we are estimating is the probability that a just-found honest
block is orphaned immediately when the attacker has no private lead. In the
Nakamoto Poisson race, a minority attacker must find two blocks before the
honest side finds one. The chance of "attacker then attacker" is p^2, where
p is the attacker's hash share. That is the baseline result from the
whitepaper-style catch-up analysis and the backbone literature. It is a
timing statement about who finds the next two blocks, not about fee levels
or miner opinions.
If you want to model miners who sometimes follow the attacker in a tie, the
Bitcoin’s Cost of Counter-Censorship
When miners or outside sponsors attempt to suppress transactions, Bitcoin’s
defense is not a committee vote but a market response. The network raises a
price for inclusion on the honest tip and stretches the time an attacker must
sustain losses. The cost of counter-censorship is what users and miners
collectively spend to make the next parent-confirming block the higher-paying
choice. It is not a permanent stipend. It is elastic and appears exactly when
censorship or reorg risk appears.
bitcoin-s {
datadir = ${HOME}/.bitcoin-s
network = mainnet # regtest, testnet3, mainnet
logging {
level = WARN # trace, debug, info, warn, error, off
# You can also tune specific module loggers.
# They each take the same levels as above.
# If they are commented out (as they are
from twython import Twython
api_key = input('Enter the API key: ')
print('\n')
api_secret = input('Enter the API secret: ')
print('\n')
twitter = Twython(api_key, api_secret)
auth = twitter.get_authentication_tokens()
print(auth['auth_url'])
query($prNumber: Int = 15024){
rateLimit {
limit
cost
remaining
resetAt
}
repository(owner: "bitcoin", name: "bitcoin") {
pullRequest(number: $prNumber) {
id

Archive or remove?

@PierreRochard
PierreRochard / your_lightning_commitment_transaction_with_htlcs
Created May 9, 2019 21:34
Your version of the commitment transaction that you are holding off-chain (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 |
+------------------------------------------------+
|
|
|
|
// 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';
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
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