Bitcoin legacy transactions (and Zcash transparent sends) use "ScriptSigs" to prove authorization. A ScriptSig contains the user's signature andm maybe some other information. They let the protocol check that the tx came from someone allowed to spend those Bitcoin. Most users never interact with them directly, and with the advent of SegWit, they're slowly being phased out of Bitcoin. But it's still worth knowing how they work.
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
SELECT alltxs.block_timestamp_month, fulltxs.fully_shielded_count, 100*fulltxs.fully_shielded_count/alltxs.count AS fully_shielded_percent FROM | |
(SELECT | |
block_timestamp_month, count(distinct `hash`) AS fully_shielded_count | |
FROM | |
`bigquery-public-data.crypto_zcash.transactions` AS zec_txs | |
WHERE | |
NOT EXISTS (SELECT 1 FROM UNNEST(zec_txs.inputs) WHERE NOT type = 'shielded') | |
AND NOT EXISTS (SELECT 1 FROM UNNEST(zec_txs.outputs) WHERE NOT type = 'shielded') | |
GROUP BY block_timestamp_month) fulltxs | |
INNER JOIN |
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
/* Count the number of fully-shielded Zcash transactions per month */ | |
SELECT FORMAT_DATE("%E4Y-%m", Date(block_timestamp)) as month, count(distinct `hash`) as fully_shielded_tx FROM | |
( | |
SELECT /* fully shielded transactions with 0 fee */ | |
`hash`, | |
block_timestamp, | |
fee | |
FROM | |
`bigquery-public-data.crypto_zcash.transactions` |
- Install the Rust compiler. A version from a year ago will work but the recent one is fine too.
- Download the transcript from the Powers of Tau MPC. (See the links here.)
- Download the
params
file from the Sapling MPC. - Check out the attestations for the Powers of Tau MPC. (Similar can be found for the Sapling MPC but participants chose various ways to distribute their attestations, they have not been coalesced into a single repository.)
This is a script written in Python intended to run alongside a Zcash node and export statistics for monitoring purposes. It assumes the existence of zcash-cli in the PATH and access to the RPC interface over localhost.
It tracks stuff like: block height, difficulty, number of peers, network solutions per second, errors, mempool size, size of recent blocks, number of transactions within blocks, chaintips, total bytes received and sent, transaction inputs and outputs, and the make-up of transactions in terms of JoinSplits, shielded, unshielded or mixed. These Zcash metrics are refreshed once every 2 minutes.
Prometheus is a monitoring system and time-series database.
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
#!/bin/bash | |
# Raspberry Pi ZRAM script | |
# Tuned for quad core, 1 GB RAM models | |
# put me in /etc/init.d/zram.sh and make me executable | |
# then run "sudo update-rc.d zram.sh defaults" | |
modprobe zram | |
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams | |
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm |