Skip to content

Instantly share code, notes, and snippets.

@thephez
thephez / active-quorum-info.sh
Created August 23, 2022 21:19
Get the height and hash of active quorums returned by "quorum list"
CLI_CMD='/Downloads/dashcore-18.0.1/bin/dash-cli'
CONF_FILE='/home/user/.dashcore/dash.conf'
DASH_CLI="${CLI_CMD} -conf=${CONF_FILE}"
#DASH_CLI="${CLI_CMD} -testnet" #-conf=${CONF_FILE}"
CURRENT_HEIGHT=$(${DASH_CLI} getblockcount)
echo "Current height: $CURRENT_HEIGHT"
function get_quorum_type_names() {
# dash-cli quorum list | jq -r keys[]
  DIP: 0025
  Title: Compressed Block Headers
  Author(s): gabriel-bjg, Thephez, UdjinM6
  Special-Thanks: Will Clark
  Comments-Summary: No comments yet.
  Status: Proposed
  Type: Standard
  Created: 2022-06-06
 License: MIT License
@thephez
thephez / dash_budget_payout_dates.sh
Last active November 4, 2021 19:26 — forked from strophy/dash_budget_payout_dates.sh
estimate future dash budget payout dates
#!/bin/bash
LAST_SB_DATE="2021-10-27T20:33:32+0000"
LAST_SB_HEIGHT=1561904
NEXT_SB_HEIGHT=1578520
SB_BLOCK_INTERVAL=16616
MONTHS_TO_PROJECT=24
D0=$(TZ=UTC date --date="$(date --date="$LAST_SB_DATE")");
for block in `seq $NEXT_SB_HEIGHT $SB_BLOCK_INTERVAL $(($LAST_SB_HEIGHT + ($SB_BLOCK_INTERVAL*$MONTHS_TO_PROJECT)))`;
do DD=$(TZ=UTC date --date="$(date --date="$D0") +727 hours +5 minutes +2 seconds");
# Must be executed from within the dapi-grpc repository folder
# Requires gRPCurl (https://github.com/fullstorydev/grpcurl) to run
BLOCK_HEIGHT=1
TXID=4004d3f9f1b688f2babb1f98ea48e1472be51e29712f942fc379c6e996cdd308
IDENTITY_ID_B64="KVKPajj5rQh5LpoDLZk8dtHFbASadzzPvgLPFm4P9q0="
PUBLIC_KEY_HASHES="Hl3rumcvEF5vBjX6IaZJHUWbjYM="
DATA_CONTRACT_ID="Zgbwte3d6DhC3X1bM3BWgJPWFLAA/Cl3SL5o3lpL+bc="
#DOCUMENT_ID="9ihM7GpC6Em1l5GA3E5tw2HrFvDxFwZea/yoLxMfR6s="
DOCUMENT_TYPE="note"
@thephez
thephez / platform-milestone-prs.py
Created August 31, 2021 20:39
Dash Platform PRs for a milestone
import requests
import json
import pprint
ORG = 'dashevo'
STATE = 'all'
DAPI_MILESTONE = '15' # 15 = v0.21.0; find on https://github.com/dashevo/dapi/milestones
DAPI_CLIENT_MILESTONE = '14' # 14 = v0.21.0; find on https://github.com/dashevo/js-dapi-client/milestones
DAPI_GRPC_MILESTONE = '12' # 12 = v0.21.0; find on https://github.com/dashevo/dapi-grpc/milestones
@thephez
thephez / core-milestone-prs.py
Created August 31, 2021 20:37
Dash Core PRs for a milestone
import requests
import json
import pprint
ORG = 'dashpay'
REPO = 'dash'
MILESTONE = '28' # 28 = v0.18.0; find on https://github.com/dashpay/dash/milestones
STATE = 'all'
@thephez
thephez / electrumx.sh
Created March 31, 2021 20:27 — forked from UdjinM6/electrumx.sh
ElectrumX setup for Dash
#!/bin/sh
# ElectrumX setup for Dash
# NOTE: with this setup ElectrumX will be running under root (to simplify things),
# modify it accordingly if you want to run it under some specific user
# NOTE: this script itself is not enough, you'll have to edit a couple of files manually,
# pls read comments below
# python3.7 is requried for ElectrumX,
@thephez
thephez / vps-mn-boostratp-prep.sh
Last active November 22, 2021 14:07
Vultr boot startup script - mn-bootstrap prep
#!/bin/sh
# Based on instructions from
# https://docs.dash.org/en/stable/masternodes/setup-testnet.html
#
# See https://www.vultr.com/docs/vultr-startup-scripts-quickstart-guide
# for details of using Vultr startup scripts
# Add new user
USERNAME=yourusernamehere # Username to create
@thephez
thephez / tenderdash-get-tx.py
Last active February 11, 2021 22:14
Get error info about invalid tenderdash transactions from a local full node
import requests
import json
import pprint
import time
def get_contract_name(contract_id):
if contract_id == '2DAncD4YTjfhSQZYrsQ659xbM7M5dNEkyfBEAg9SsS3W':
return 'Dashpay' # ({})'.format(contract_id)
elif contract_id == '36ez8VqoDbR8NkdXwFaf9Tp8ukBdQxN8eYs8JNMnUyKz':
return 'DPNS' # ({})'.format(contract_id)
@thephez
thephez / bitwalletrecover.py
Created October 20, 2020 18:04 — forked from UdjinM6/bitwalletrecover.py
bitwalletrecover.py - recover compressed private keys from your bitcoin/litecoin/darkcoin wallet. Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), and base58 (https://pypi.python.org/pypi/base58).
## bitwalletrecover.py - recover private keys from your darkcoin wallet
## (this version was not tested with bitcoin/litecoin).
## Requires python3, pycoin (https://pypi.python.org/pypi/pycoin),
## and base58 (https://pypi.python.org/pypi/base58).
##
## Starting with Python 3.4, pip is included by default with the Python binary
## installers. To install pip for older versions 3.x:
##
## sudo apt-get install python3-setuptools
## sudo easy_install3 pip