This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <gmp.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define DEBUG | |
/*#define MOREDEBUG*/ | |
#define BITS 1000 | |
#define DIGITS 30 //(BITS/3 - 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import hashlib | |
import binascii | |
import os | |
from trezorlib import log | |
from trezorlib.client import TrezorClient | |
from trezorlib.transport import get_transport | |
from trezorlib.tools import parse_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from random import random | |
# selfish mining simulation | |
# fraction of hash power owned by selfish miner | |
alpha = 0.35 | |
# fraction of honest miners that build on selfish miner block in a tie. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************** | |
* Copyright (c) 2017, Jochen Hoenicke * | |
* * | |
* Compile with: * | |
* gcc -O2 -I secp256k1/src/ -I secp256k1/ break_short.c -lgmp * | |
**********************************************************************/ | |
#include "libsecp256k1-config.h" | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import binascii | |
import trezorlib.types_pb2 as proto_types | |
from trezorlib.client import TrezorClient | |
from trezorlib.tx_api import TxApiBitcoin, TxApiTestnet | |
from trezorlib.transport_hid import HidTransport | |
def main(): |