Skip to content

Instantly share code, notes, and snippets.

View AWCrypt's full-sized avatar

Arron AWCrypt

View GitHub Profile
@AWCrypt
AWCrypt / cardano_shelley_staking_node_setup_guide.md
Created December 10, 2019 12:44
Cardano Shelley Node Setup Guide 4newbs (v0.8.0-rc10)

Setup Cardano Shelley staking node (Ubuntu 18.04)

-- DISCLAIMER: This guide is for educational purposes only. Do not use in production with real funds.
-- DISCLAIMER: By using this guide, you assume sole risk and waive any claims of liability against the author.

-- Note: This guide is for running jormungandr on a virtual private server (VPS), running Ubuntu 18.04.
-- Note: This guide assumes your local machine is a Mac, but most instructions are executed on the remote machine.
-- Note: anything preceded by "#" is a comment.
-- Note: anything all-caps in between "<>" is an placeholder; e.g. "<FILENAME>" could be "foo.txt".
-- Note: anything in between "${}" is a variable that will be evaluated by your shell.

#!/bin/bash
cd /home/USERNAME/cardano
BLOCK_HASH=`/home/USERNAME/.cargo/bin/jcli rest v0 node stats get --host http://127.0.0.1:3100/api | grep 'lastBlockHash:' | sed -e 's/^[[:space:]]*//' | sed -e 's/lastBlockHash: //'`
FOUND=`/usr/bin/node /home/USERNAME/cardano/check_for_block.js $BLOCK_HASH`
if [[ "$FOUND" -eq 1 ]]; then
echo "`date`: Block Found!!"
else
@AWCrypt
AWCrypt / SHELLEY_HOWTO.md
Created December 21, 2019 09:50 — forked from ilap/SHELLEY_HOWTO.md
UnOfficial Shelley Cconfig

Introduction

This is a not official recommendations for Linux based pool nodes. This, is my node's config which runs on Ubuntu 18.04.3 LTS (Bionic Beaver) server (/w Jormungandr v0.8.4) and does not have any issues at all, since the changes.

Before the change of the settings to these below, my node was struggling and missed almost all of the leaders' time due to the forks that caused by not having the latest tip/blocks.

After, I changed the settings, I have not missed any schedule for creating blocks.

@AWCrypt
AWCrypt / How to install tcpping on Linux.md
Created December 24, 2019 00:00 — forked from cnDelbert/How to install tcpping on Linux.md
How to install tcpping on Linux

To install tcptraceroute on Debian/Ubuntu:

$ sudo apt-get install tcptraceroute

To install tcptraceroute on CentOS/REHL, first set up RepoForge on your system, and then:

$ sudo yum install tcptraceroute
@AWCrypt
AWCrypt / jormon.sh
Created December 27, 2019 14:06 — forked from michaeljfazio/jormon.sh
Jormungandr Node Monitor
#!/bin/bash
#
# Author: Michael Fazio (sandstone.io)
#
# This script monitors a Jormungandr node for "liveness" and executes a shutdown if the node is determined
# to be "stuck". A node is "stuck" if the time elapsed since last block exceeds the sync tolerance
# threshold. The script does NOT perform a restart on the Jormungandr node. Instead we rely on process
# managers such as systemd to perform restarts.
POLLING_INTERVAL_SECONDS=30
@AWCrypt
AWCrypt / setup_node_mon.bash
Created May 23, 2020 18:21 — forked from ilap/setup_node_mon.bash
Setup Shelley Monitoring (cardano-node)
#!/bin/bash
#---------------------------------------------------------------------
# File: setup_shelley_monitoring.sh
# Created: 2019/10/17
# Creator: ilap
#=====================================================================
# UPDATES:
# - 21/05/2020: Updated to the `cardano-node` i.e. Haskell Shelley
#
# DESCRIPTION:
@AWCrypt
AWCrypt / find-optimal-peers
Created July 3, 2020 23:03 — forked from rcmorano/find-optimal-peers
find alive and close peers for cardano-node (based on traceroute hops)
#!/bin/bash
# apt install -y netcat-traditional mtr jq curl
MAX_PEERS=20
PROBE_CONN_TIMEOUT=1
SOURCE_ROUTE_POINTER=4
TOPOLOGY_JSON_URL=https://explorer.shelley-testnet.dev.cardano.org/relays/topology.json
TOPOLOGY_JSON_FILE=/tmp/topology.json
PROXIMITY_TOPOLOGY_JSON=/tmp/proximity-topology.json
@AWCrypt
AWCrypt / shelley_staking_gen.md
Created December 18, 2020 12:45 — forked from ilap/shelley_staking_gen.md
Extracting Pool Staking keys from Daedalus/Yoroi wallet

Intorduction

DISCLAIMER: NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK

UPDATED: 14:08am AEST 29/Sept/2020, The IDX was incorrectly used. Fixed now

There are two keypairs that are required to register a pool:

  1. reward account (costs and rewards) and
  2. owner stake (pledge) keypair.