Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View garethtdavies's full-sized avatar

Gareth Davies garethtdavies

View GitHub Profile
@garethtdavies
garethtdavies / mip1.py
Last active May 17, 2023 02:27
An analysis of MIP1 results
# This script replicates the Granola dashboard
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
# Select your transport with a defined url endpoint
transport = AIOHTTPTransport(url="https://graphql.minaexplorer.com")
# Create a GraphQL client using the defined transport
client = Client(transport=transport, fetch_schema_from_transport=True)
@garethtdavies
garethtdavies / delegation-program-epoch-32.txt
Created July 20, 2022 21:28
Delegation Program Payouts Epoch 32
+---------------------------------------------------------+-------------------+---------------------------------------------------------+--------------------+-----------+------------+---------------------------------------------------------+--------------+------+
| publicKey | balance | delegate | delegationTotal | blocksWon | payout | coinbaseReceiver | receiverSame | paid |
+---------------------------------------------------------+-------------------+---------------------------------------------------------+--------------------+-----------+------------+---------------------------------------------------------+--------------+------+
| B62qjWrka3sHmyX9E3LLk7DYwTkD3xpVxJVWeC1jWesvUCw98jzwLEb | 998358.556781594 | B62qmvuzJ1q3FcPSvYMYMeBhYt9H9FLZCW5Kyioi7jiSzy2z39SSyC2 | 4329508.416582901 | 26 | 4100.88326 | B62qmvuzJ1q3FcPSvYMYMeBhYt9H9FLZCW5Kyioi7jiSzy2z
@garethtdavies
garethtdavies / delegation-program-payouts.py
Created July 20, 2022 20:22
Delegation Program Epoch 32 Payout Script
# This script determines which accounts have satisfied the Foundation requirements
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
from tabulate import tabulate
# Select your transport with a defined url endpoint
transport = AIOHTTPTransport(url="https://graphql.minaexplorer.com")
# Create a GraphQL client using the defined transport
client = Client(transport=transport, fetch_schema_from_transport=True)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@garethtdavies
garethtdavies / foundation-delegations.txt
Last active April 20, 2021 18:16
Foundation Delegations Epoch 0
+---------------------------------------------------------+------------------+---------------------------------------------------------+--------------------+-----------+-------------+-------------+-----------+
| publicKey | balance | delegate | delegationTotal | blocksWon | payout | received | fullyPaid |
+---------------------------------------------------------+------------------+---------------------------------------------------------+--------------------+-----------+-------------+-------------+-----------+
| B62qjWrka3sHmyX9E3LLk7DYwTkD3xpVxJVWeC1jWesvUCw98jzwLEb | 502777.775 | B62qkd4tZQGe9mo5tK3wQi5PUoMdtUGtLWps6Se9o1qWdwNwuUtdWdr | 3771636.6277516503 | 35 | 3191.32014 | 5379.65395 | True |
| B62qr11GnajdtFtYHLB25VfR2HisWw9gQTtswLT9UDuBDupwxnP8Qtm | 502777.775 | B62qidz67vVjRUWi4QWBhE6i6JAs5i55YP1CuRsSNB8CjM4nttrRS4q | 3837636.6277516503 | 19 | 1702.63644 |
@garethtdavies
garethtdavies / promtail_docker_logs.md
Created February 4, 2021 05:19 — forked from ruanbekker/promtail_docker_logs.md
Docker Container Logging using Promtail
@garethtdavies
garethtdavies / all_transactions.txt
Last active April 24, 2022 08:18
MinaExplorer GraphQL API
{
transactions(
limit: 25
sortBy: DATETIME_DESC
query: {OR: [{to: "B62qqHM1bihHNvju89PFYugLw73PYRb7pGwp82CpEmWfSYVJiQAppaC"}, {from: "B62qqHM1bihHNvju89PFYugLw73PYRb7pGwp82CpEmWfSYVJiQAppaC"}], AND: {canonical: true, dateTime_gte: "2021-01-15T00:00:00Z"}}
) {
fee
canonical
from
to

Here are the instructions for creating your own multi-node network on your local machine:

Run the following commands on Debian9

  1. sudo apt-get install -y curl make bubblewrap pkg-config postgresql m4 libgmp-dev libffi-dev libjemalloc-dev libpq-dev libssl-dev libsodium-dev cargo lib32z1-dev python3 python3-pip git unzip libbz2-dev psmisc apt-transport-https ca-certificates curl software-properties-common gnupg2 bc
  2. curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
  3. sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
  4. sudo apt update
  5. sudo apt install -y docker-ce
  6. sudo usermod -aG docker ${USER}
@garethtdavies
garethtdavies / coinbase.json
Created July 29, 2020 17:25
Zcash Shielded Coinbase Transaction
{
"txid": "51a4cd59d445463292f3fe0bcaec252577f2c5b483ed753aecf4bf4455a9e725",
"overwintered": true,
"version": 4,
"versiongroupid": "892f2085",
"locktime": 0,
"expiryheight": 0,
"vin": [
{
"coinbase": "0389260f0102",
@garethtdavies
garethtdavies / coda-vrf.txt
Created July 14, 2020 15:22
Example Coda VRF output
Jul 12 23:54:05 ae9f09595a4f [Info] Checking VRF evaluations at epoch: 34, slot: 359
Jul 12 23:54:05 ae9f09595a4f [Info] Checking VRF evaluations at epoch: 34, slot: 360
Jul 12 23:54:05 ae9f09595a4f [Info] Checking VRF evaluations at epoch: 34, slot: 361
Jul 12 23:54:05 ae9f09595a4f [Info] Checking VRF evaluations at epoch: 34, slot: 362
Jul 12 23:54:05 ae9f09595a4f [Info] Checking VRF evaluations at epoch: 34, slot: 363
Jul 12 23:54:05 ae9f09595a4f [Info] Checking VRF evaluations at epoch: 34, slot: 364
Jul 12 23:54:05 ae9f09595a4f [Info] Checking VRF evaluations at epoch: 34, slot: 365
Jul 12 23:54:05 ae9f09595a4f [Info] Producing block in 137 slots