OP_HASH160
0x14
<hash160 of alice's secret>
OP_EQUAL
OP_TOALTSTACK
OP_HASH160
0x14
contract MyContract { | |
uint counter = 0; | |
function Count() { | |
counter++; | |
} | |
function CallCount() { | |
Count(); | |
} |
Some notes on remote debugging mac builds on Travisci. It's hard to tell when something hangs what the cause it. Trial and error via commits is tedious. And on Mac , sometimes it's the gui asking for input. So I worked my around to get the access I needed for faster debugging a build. | |
################################################# | |
# Enable remote ssh access to travisci build for debugging | |
################################################# | |
# Add a key so we can login to travisci vm | |
- cat ssh/travisci.pub >> ~/.ssh/authorized_keys | |
- chmod 600 ssh/travisci | |
# Install netcat |
java.lang.ClassNotFoundException: javafx.util.Pair
happens because javafx.util.Pair
and other classes from javafx.util
are not included in OpenJDK. Options for resolving:
Map.Entry<K, V>
from java.util
is similar to javafx.util.Pair
.
Install java-openjfx
through your package manager. (or whatever means you used to install Java on your machine) Note that java-openjfx
is compatible with OpenJDK8, not previous versions.
After installing java-openjfx
, you may have to add it manually to your IDE SDK classpath. Eg in IntelliJ, you may have to go to Project Structure
| SDKs
| <select your SDK>
| Classpath
| +
(the Classpath +
, not the SDKs +
) | and add /usr/lib/jvm/java-8-openjdk/jre/lib/ext/jfxrt.jar
(which should be there now that java-openjfx
has been installed) | OK
This gist tries to come up with a back-of-the-envelope estimate for how much it costs a miner to create larger, rather than smaller, blocks. An economically rational miner will only include transactions with enough fees to cover the cost to the miner of processing the transaction.
I hope this analysis helps solo miners and mining pool operators to reason about their transaction fee policies, and helps them estimate their 'charity cost' if they decide to include fee-free transactions in the blocks they create to promote more use of Bitcoin.
Uncertain numbers in this document are rounded to one digit of precision; this is meant to be an order-of-magnitude estimate; when I say that 100K of free transactions costs about $1, you should assume that the real number might be anywhere between 10 cents and 10 dollars.
#include "merkle.h" | |
#include <assert.h> | |
#include <string.h> | |
#include <stdio.h> | |
void merkle_init(merkle_ctx* ctx){ | |
ctx->size = 0; | |
ctx->mutated = false; | |
} |
import ecdsa | |
import ecdsa.ellipticcurve as EC | |
curve = ecdsa.SECP256k1 | |
x = int('11db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5c', 16) | |
y = int('b2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3', 16) | |
point = EC.Point(curve.curve, x, y) | |
pubkey = ecdsa.VerifyingKey.from_public_point(point, curve) | |
hash1 = 90774958364900180671716888080665726921328827653065727390791155349203800699667 |
Put links inside codeblocks on GitHub:
<pre>
import { assign, map } from '<a href="https://www.npmjs.com/package/lodash" title="Lodash on npm">lodash</a>';
<a href="https://lodash.com/docs#assign" title="assign documentation">assign</a>({ 'a': 1 }, { 'b': 2 }, { 'c': 3 });
// → { 'a': 1, 'b': 2, 'c': 3 }
<a href="https://lodash.com/docs#map" title="map documentation">map</a>([1, 2, 3], function(n) { return n * 3; });
// → [3, 6, 9]
name: Code Style | |
on: | |
pull_request: | |
branches: [ "master" ] | |
push: | |
branches: [ "master" ] | |
tags: [ "*.*.*" ] | |
jobs: |
{-# LANGUAGE CPP #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-} | |
{-# LANGUAGE DataKinds, GADTs, KindSignatures, TypeOperators, UndecidableInstances #-} | |
#if __GLASGOW_HASKELL__ < 708 | |
#error "requires GHC 7.10 or newer" | |
#endif | |
module Main (main) where |