test
This file contains hidden or 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
What’s the price per kilobyte of Ethereum transaction data? | |
************************************************************* | |
As of October 2016, it's about $0.023 USD per kilobyte (2.3 cents per kilobyte) | |
Step 1: Gas price: | |
================= | |
= 25gigawei per gas (As of October 2016) https://etherscan.io/charts/gasprice | |
Ether unit conversion: | |
25 Gwei = 0.000000025 Ether http://ether.fund/tool/converter |
This file contains hidden or 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
// Call stack hazards in Solidity!! | |
// | |
// This file is *slightly* modified relative to | |
// https://github.com/etherpot/contract/blob/f87501ddf319559346b2983b27770ace22771ad0/app/contracts/lotto.sol | |
// in order to demonstrate a flaw: | |
// Changes: | |
// - function () changed to function send() | |
// - function trigger() added | |
// - blocksPerRound changed from 6800 to 6 | |
// |
This file contains hidden or 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
type 'a once = 'a option ref;; | |
let notyet : unit -> 'a once = fun () -> ref None;; | |
let write : 'a once -> 'a -> unit = | |
fun o a -> match !o with | |
| None -> o := Some a | |
| _ -> failwith "can't overwrite" | |
let read : 'a once -> 'a option = fun o -> !o;; | |
This file contains hidden or 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
// Andrew Miller - monoid.fst | |
// compiles under the school14.1 release of F* | |
// https://github.com/FStarLang/FStar/releases/tag/school14.1 | |
// This is an example of constructive algebra in F*. We're going to define the | |
// class of mathematical objects called "monoids", and give several constructions, | |
// using F* to prove the constructions are sound. | |
// For similar developments in other languages, see: | |
// [Agda] http://people.inf.elte.hu/divip/AgdaTutorial/Application.Algebra.html |
This file contains hidden or 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
amiller@dreyfus:~/projects/netmine$ make | |
./autogen.pl | |
perl: warning: Setting locale failed. | |
perl: warning: Please check that your locale settings: | |
LANGUAGE = (unset), | |
LC_ALL = (unset), | |
LANG = "en_US.UTF-8" | |
are supported and installed on your system. | |
perl: warning: Falling back to the standard locale ("C"). | |
make all -C logserver |
This file contains hidden or 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
One of the main points in this note is that you can use a | |
"proof-of-publication" system to implement an "anti-replay" system. | |
However this isn't true - at least not given the description of | |
proof-of-(non)-publication in 2) and the definition of "anti-replay" | |
given here. | |
In 2), proof-of-*non*-publication allows you to prove that *some | |
specific message* has never been published. You can imagine having a | |
function ProveNotPublished(m), which proves "message m was not | |
published." |
This file contains hidden or 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
<html style="width:100%; height:100%; overflow:hidden"> | |
<head> | |
<script src="https://gist.githubusercontent.com/amiller/11100038/raw/pacman.js"></script> | |
<!-- You can include external scripts here like so... --> | |
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>--> | |
</head> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<div id="pacman"></div> | |
<canvas id="canvas" width="640" height="360" style="display:block"></canvas> |
This file contains hidden or 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
<html style="width:100%; height:100%; overflow:hidden"> | |
<head> | |
<script src="https://gist.githubusercontent.com/amiller/11100038/raw/pacman.js"></script> | |
<!-- You can include external scripts here like so... --> | |
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>--> | |
</head> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<div id="pacman"></div> | |
<canvas id="canvas" width="640" height="360" style="display:block"></canvas> |
This file contains hidden or 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
<html style="width:100%; height:100%; overflow:hidden"> | |
<head> | |
<script src="https://gist.githubusercontent.com/amiller/11100038/raw/pacman.js"></script> | |
<!-- You can include external scripts here like so... --> | |
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>--> | |
</head> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<div id="pacman"></div> | |
<canvas id="canvas" width="640" height="360" style="display:block"></canvas> |