Skip to content

Instantly share code, notes, and snippets.

View jonatack's full-sized avatar

Jon Atack jonatack

View GitHub Profile
@hebasto
hebasto / bitcoincore-hmp.md
Created April 4, 2020 09:59
The Bitcoin Core on Heterogeneous Multi-Processing platforms

The Bitcoin Core on Heterogeneous Multi-Processing platforms

Consider a system on the heterogeneous computing ARM big.LITTLE architecture, e.g., ODROID-HC1 powered by Samsung Exynos 5 Octa 5422.

As the Bitcoin Core is a highly computationally intensive application, the usage of ultra-low power and slower LITTLE cores could lead to a substantial lagging and errors (see: bitcoin/bitcoin#16008).

Also there are report about other flaws in LITTLE cores design.

The suggested solution of the described problem is to force the CPU core affinity of the Bitcoin Core processes. On Linux this could be achieved by the [taskset](https://linux.die.net/man/1/t

Background: Currently, a node will only rebroadcast a transaction if it is the originating wallet. This is awful for privacy.

PR #16698 reworks the rebroadcast logic to significantly improve privacy.

Overview of changes

  • Instead of the wallet directly relaying transactions to peers, the wallet will submit unconfirmed txns to the node, and the node will apply logic to trigger txn rebroadcasts.
  • The node will apply rebroadcast conditions to all transactions.
  • The wallet will attempt to resubmit unconfirmed transactions to the node on a scheduled timer. This is only useful if the txn is dropped from the local mempool before it gets mined.
  • The mempool tracks locally submitted transactions (wallet & rpc) to ensure they are succesfully rebroadcast. Success is defined as receiving a GETDATA for the txn.
@jnewbery
jnewbery / git-br.py
Created May 29, 2019 18:57
git tools
#!/usr/bin/env python3
import subprocess
import os
if os.name == 'posix':
RED = "\033[1;31m"
BLUE = "\033[0;34m"
CYAN = "\033[0;36m"
GREEN = "\033[0;32m"
RESET = "\033[0;0m"
@niftynei
niftynei / dot.txt
Created September 5, 2019 17:39
notes from outputs investigation
wallet/db.c -> table schemas + migrations
wallet/wallet.c -> SQL statements
table: outputs
question: what are the values for 'status'
output_state_available= 0,
output_state_reserved = 1,
output_state_spent = 2,
/* Output has been included in a signed funding tx that we've shared
* with a peer; not yet mempooled. Eligible for burning */
@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 |
+------------------------------------------------+
|
|
|
|
@mflaxman
mflaxman / trezor_recovery.py
Created August 15, 2017 13:50
Proof you can recover your Trezor funds without a Trezor (if it breaks and/or the company goes out of business)
from bitmerchant.wallet import Wallet
from mnemonic import Mnemonic
# put in whatever Trezor generates for you here (or backup from this empty/insecure one as a test)
mnemonic = 'clean health food open blood network differ female lion eagle rough upon update zone antique defense venture uncover mobile charge actress film vocal enough'
passphrase = '' # empty string or whatever you actually choose
path = "m/44'/0'/0'/0/0" # whatever shows up on the UI for that account (everything will start with m/44'/0' since it's bip44)
child = Wallet.from_master_secret(Mnemonic('english').to_seed(mnemonic, passphrase)).get_child_for_path(path)
child.to_address() # '18K9axbPpwqZgngB58nuwsYevL2z6ey4YG' (confirm this matches what Trezor is showing you)
; https://z0ltan.wordpress.com/2018/08/04/simple-expression-evaluator-comparison-between-haskell-rust-and-common-lisp/
; this version: 2018, Rainer Joswig, joswig@lisp.de
; we create a bunch of structures for the expression types
; each structure defines a constructor of the same name
; each expression knows the corresponding Lisp function
(defstruct (val (:constructor val (e))) e)
(defstruct (bop :conc-name) e1 e2 op)

Ces informations sont issues du document "Rédaction des offres d’emploi : le cadre juridique, Guide pratique pour la rédaction des offres d’emploi", 2010, Pôle emploi

La mention discriminatoire liée au sexe

La discrimination fondée sur le sexe est prohibée de façon explicite par trois articles :

  • article 225-1 du Code pénal
  • articles L 1132-1 et L 1142-1 du Code du travail
@carwin
carwin / private.xml
Last active July 27, 2017 15:06
Programmer's Shift Keys: Remapping parens, brackets and braces for to because nerd.
<?xml version="1.0"?>
<root>
<item>
<name>Programmer's Shift Keys</name>
<!--
Author: Carwin Young (@carwin)
Last Updated: 2014.07.18
v.1.1
Programmer's Shift Keys
; https://z0ltan.wordpress.com/2017/02/24/a-piglatin-translator-in-common-lisp-and-contrasting-it-with-the-racket-version/
#|
(defpackage #:piglatin
(:use :cl :cl-user))
; using CL-USER makes no sense, it usually does not export anything.
(in-package #:piglatin)