Skip to content

Instantly share code, notes, and snippets.

@timxor
timxor / bn_128_add_benchmark.md
Created August 9, 2017 10:19
bn_128_add_benchmark.md

I started by using bn_128_mul as a model to work off of.

#[bench]
fn bn_128_mul(b: &mut Bencher) {
	use bn::{AffineG1, G1, Fr, Group};

	// StdRng is a random number generator
	let mut rng = StdRng::new().unwrap();
	let p: G1 = G1::random(&mut rng);
@timxor
timxor / How to run tims parity benchmarks on your computer(linux.ubuntu).md
Last active August 11, 2017 13:49
How to run tims parity benchmarks on your computer (linux/ubuntu)
git clone https://github.com/tcsiwula/parity -b tims_benchmarks
cd parity
rustup override set nightly

Next command takes 5/10 minutes or so to compile:

@timxor
timxor / tims_terminal.md
Last active August 18, 2017 18:04
Setting up C++ Ethereum on a new MacBook
=>pwd
/Users/tim.siwula/Dropbox/Projects/cpp-ethereum/build
=>clang --version
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

=>benchc
@timxor
timxor / tims_rinkeby_address
Created August 18, 2017 18:24
tims_rinkeby_address
0x3dBdB73fD55a2f295CE4FDA32F3574dE7198cC05
@timxor
timxor / quorum_tests_august.md
Created August 21, 2017 16:25
tims quorum tests august
➜  quorum git:(master) ✗ sudo make test
Password:
build/env.sh go run build/ci.go install
>>> /usr/local/Cellar/go/1.8.3/libexec/bin/go install -ldflags -X main.gitCommit=aae37169380c2c75af33f7bd736486894bbc8459 -v ./...
build/env.sh go run build/ci.go test
>>> /usr/local/Cellar/go/1.8.3/libexec/bin/go test -p 1 github.com/ethereum/go-ethereum github.com/ethereum/go-ethereum/accounts github.com/ethereum/go-ethereum/accounts/abi github.com/ethereum/go-ethereum/accounts/abi/bind github.com/ethereum/go-ethereum/accounts/abi/bind/backends github.com/ethereum/go-ethereum/cmd/abigen github.com/ethereum/go-ethereum/cmd/bootnode github.com/ethereum/go-ethereum/cmd/disasm github.com/ethereum/go-ethereum/cmd/ethtest github.com/ethereum/go-ethereum/cmd/evm github.com/ethereum/go-ethereum/cmd/geth github.com/ethereum/go-ethereum/cmd/gethrpctest github.com/ethereum/go-ethereum/cmd/rlpdump github.com/ethereum/go-ethereum/cmd/utils github.com/ethereum/go-ethereum/common github.com/ethereum/go-ethereum/common/compiler g
@timxor
timxor / azure_on_mac_quickstart.md
Created August 22, 2017 00:27
azure_on_mac_quickstart_by_tim
brew install azure-cli

@timxor
timxor / bench_august.md
Last active August 23, 2017 22:07
tims_geth_benchmarks_august

August 23rd *** macbook *** results:

➜  vm git:(master) ✗ go test -bench BenchmarkPrecompiled -benchtime 5s
BenchmarkPrecompiledEcrecover/-Gas=3000-8         	   50000	    144319 ns/op
BenchmarkPrecompiledSha256/128-Gas=108-8          	20000000	       578 ns/op
BenchmarkPrecompiledRipeMD/128-Gas=1080-8         	 5000000	      1662 ns/op
BenchmarkPrecompiledIdentity/128-Gas=27-8         	500000000	        15.3 ns/op
BenchmarkPrecompiledModExp/eip_example1-Gas=2611-8         	  300000	     29852 ns/op
BenchmarkPrecompiledModExp/eip_example2-Gas=2611-8         	 1000000	      7569 ns/op
BenchmarkPrecompiledModExp/nagydani-1-square-Gas=40-8      	 3000000	      2236 ns/op
@timxor
timxor / tim_cpp_benchmarks.md
Created August 23, 2017 23:36
tim_cpp_eth_benchmarks_august

*** :-/ ***

➜  performance git:(develop) ✗ git rev-parse HEAD
1f06a79fd6ee189a3d935201b77cbaf10fc511a7
➜  performance git:(develop) ✗ git pull upstream develop
From https://github.com/ethereum/cpp-ethereum
 * branch                develop    -> FETCH_HEAD
Already up-to-date.
➜ performance git:(develop) ✗ git rev-parse HEAD
@timxor
timxor / zcash.conf
Last active June 11, 2018 21:43
~/Library/Application\ Support/Zcash/zcash.conf config file not detected/updating on mac
# on macos in directory:
# ~/Library/Application\ Support/Zcash/zcash.conf
rpcuser=username
rpcpassword=`head -c 32 /dev/urandom | base64`
### connect to main network
# mainnet=1
# addnode=mainnet.z.cash
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate rocket;
extern crate dotenv;
#[macro_use] extern crate rocket_contrib;
#[macro_use] extern crate diesel;
extern crate payment_api;
extern crate r2d2;
extern crate r2d2_diesel;