Skip to content

Instantly share code, notes, and snippets.

View phm87's full-sized avatar

phm87

View GitHub Profile
@phm87
phm87 / int2lehex.sh
Created July 4, 2020 12:18 — forked from Janaka-Steph/int2lehex.sh
Integer to Little endian hex Conversion Script for Bitcoin Script
#!/bin/bash
if [ -z $1 ];
then
echo "You must include an integer as an argument.";
exit;
fi
if (( $1 > "2147483647" )) || (( $1 < "-2147483647" ));
then
@phm87
phm87 / anonset.md
Created January 5, 2020 22:44 — forked from leto/anonset.md
Hush Shielded Pool stats as of Jan 5th 2020

Hush Shielded Pool stats as of Jan 5th 2020

With zindex enabled, the getchaintxstats RPC returns an immense amount of information about zaddr usage. This RPC did not exist in Bitcoin when Zcash forked, so I ported it from latest BTC Core to Komodo and Hush. In the Hush version of this RPC, the -zindex functionality was added.

By default, the RPC gives stats for the last month. It can be given an arbitrary "block window" to calculate stats for any time period. Some statistics apply to the entire chain and are not specific to the block window, such as those below.

The "anonymity set" (anonset) or "shielded pool size" of Hush mainnet:

@phm87
phm87 / anonset.md
Created January 5, 2020 22:44 — forked from leto/anonset.md
Hush Shielded Pool stats as of Jan 5th 2020

Hush Shielded Pool stats as of Jan 5th 2020

With zindex enabled, the getchaintxstats RPC returns an immense amount of information about zaddr usage. This RPC did not exist in Bitcoin when Zcash forked, so I ported it from latest BTC Core to Komodo and Hush. In the Hush version of this RPC, the -zindex functionality was added.

By default, the RPC gives stats for the last month. It can be given an arbitrary "block window" to calculate stats for any time period. Some statistics apply to the entire chain and are not specific to the block window, such as those below.

The "anonymity set" (anonset) or "shielded pool size" of Hush mainnet:

@phm87
phm87 / zsendmany.sh
Created December 28, 2019 11:46 — forked from leto/zsendmany.sh
hush-zsendmany
#!/bin/bash
FROM=$1
TO=$2
AMOUNT=$3
FEE=$4 || 0.0000
hush-cli z_sendmany $FROM "[{\"address\":\"$TO\",\"amount\":$AMOUNT}]" 1 $FEE