Skip to content

Instantly share code, notes, and snippets.

View kilpatty's full-sized avatar
🟧
I may be slow to respond.

Sean Kilgarriff kilpatty

🟧
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kilpatty on github.
  • I am skilgarriff (https://keybase.io/skilgarriff) on keybase.
  • I have a public key ASDkerishz21YR2k-WJUgsvce3Dsqqpviob7BJHAjS9BlAo

To claim this, I am signing this object:

@kilpatty
kilpatty / stratum.md
Last active February 12, 2020 21:21
Stratum Spec For Handshake (WIP)
CC(target) Release/obj.target/bcrypto/src/secp256k1/src/secp256k1.o
In file included from ../src/secp256k1/src/scalar_impl.h:20:0,
from ../src/secp256k1/src/secp256k1.c:12:
../src/secp256k1/src/scalar_4x64_impl.h: In function 'secp256k1_scalar_chacha20':
../src/secp256k1/src/scalar_4x64_impl.h:969:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
memcpy((void *) seed32, (const void *) seed, 32);
^~~~~~
../src/secp256k1/src/scalar_4x64_impl.h:969:5: warning: incompatible implicit declaration of built-in function 'memcpy'
../src/secp256k1/src/scalar_4x64_impl.h:969:5: note: include '<string.h>' or provide a declaration of 'memcpy'
In file included from ../src/secp256k1/src/secp256k1.c:15:0:
@kilpatty
kilpatty / index.js
Created May 15, 2019 18:47
Handshake Serialization test
const { Block } = require("hsd");
let block = new Block();
let block2 = new Block();
block.version = 145;
block2.version = 0145;
const common = require('hsd/lib/mining/common');
function toDifficulty(bits) {
let shift = (bits >>> 24) & 0xff;
let diff = 0x0000ffff / (bits & 0x00ffffff);
while (shift < 29) {
diff *= 256.0;
shift++;
}

Keybase proof

I hereby claim:

  • I am skilgarriff on github.
  • I am skilgarriff (https://keybase.io/skilgarriff) on keybase.
  • I have a public key ASAk7Bxr_n9Ezv4AXiiYQPWcoR_3_Oltpdv8SoLpWpiMCwo

To claim this, I am signing this object:

@kilpatty
kilpatty / dco
Created April 5, 2016 17:58
Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.