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
#!/usr/bin/env python3 | |
import bitarray | |
from hashlib import blake2b | |
# POW Constants | |
BASE_EDGE_BITS = 24 | |
PROOFSIZE = 42; | |
# https://github.com/mimblewimble/grin/blob/cccaf984936d4792f8b6c39e6b500ad2e3f08817/core/src/pow/types.rs#L314 |
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
* option to install binaries (if pre-built exist for this arch) | |
* option to build from source | |
* option to install/build a specific branch/tag | |
* option to build debug or release | |
* option to accept wallet seed words to restore from | |
* options where to place/find wallet_data and chain_data | |
* resource validation (ex: warn if not enough disk space to hold chain_data) | |
* option to configure auto-start/keepalive (systemd, supervisord, other) | |
* option to check for updates / install updates | |
- use "release channels"? stable, beta, master |
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
On startup I see this panic message once: "Cannot start a runtime from within a runtime" | |
Full message: | |
20201216 23:20:15.448 INFO grin_util::logger - log4rs is initialized, file level: Info, stdout level: Warn, min. level: Info | |
20201216 23:20:15.448 INFO grin_wallet - Using wallet configuration file at /home/grin/.grin/main/grin-wallet.toml | |
20201216 23:20:15.448 INFO grin_wallet - This is Grin Wallet version 5.0.0-beta.3 (git v5.0.0-beta.3), built for x86_64-unknown-linux-gnu by rustc 1.48.0 (7eac88abb 2020-11-16). | |
20201216 23:20:15.536 WARN grin_wallet_controller::controller - Starting TOR Hidden Service for API listener at address xd5sj6kfqi5r3iuh6hv4frufpijb4mny3byyojemisumwsdwtsvsxbad, binding to 0.0.0.0:3415 | |
20201216 23:20:21.541 WARN grin_wallet_controller::controller - Starting HTTP Foreign listener API server at 0.0.0.0:3415. | |
20201216 23:20:21.541 WARN grin_wallet_controller::controller - HTTP Foreign listener started. |
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
#!/usr/bin/python3 | |
# Start the node: $ grin | |
# Configure Wallet: | |
# owner_api_listen_port = 3420 | |
# api_secret_path = "/home/bdoyle/.grin/main/.owner_api_secret" | |
# Start the wallet owner api: $ grin-wallet owner_api | |
# Install g++ | |
# Install python3 and python3-pip | |
# pip3 install secp256k1 |
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
These steps describe one possible method to create a grin wallet offline and add coins - i.e cold-storage. | |
1) Download the grin-wallet - either the executable or the source code and compile it into an executable | |
2) Partition and format a USB thumb drive (drive 1) | |
3) Copy the grin-wallet executable to the USB thumb drive 1 | |
4) Copy a Grin TX slate file to the USB thumb drive 1 | |
5) On a second USB thumb drive, or a CD/DVD, (drive 2) create a bootable image (https://linuxmint-installation-guide.readthedocs.io/en/latest/burn.html) | |
6) Unplug your network cable | |
7) Boot the image you created on drive 2 | |
8) Insert and mount the drive with grin-wallet and slate file (drive 1) |
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
How to find a transaction on the grin blockchain: | |
------------------------------------------------- | |
If you have the slate file, you can get the shared transaction id with: | |
cat payment_slate.json | jq .id | |
The transaction id will look like this: | |
6d7e9c04-18b4-4b8f-b3a3-b52bd6e9b18a | |
You can then get the status from your wallet: |
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
# MOVED: to https://github.com/grin-pool/nicehash_bot |
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
# This script has been moved into grin-pool/utils repo: | |
# https://github.com/grin-pool/utils |
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
Pool finds block 4300 - https://grinscan.net/block/4300 | |
Secondary scale = 529 | |
scale = factor = Scaling difficulty = | |
for primary pow (cuckatooN solution) where N>=31 = 2^(1+EDGEBITS-24)*N | |
for secondary pow - (cuckatoo29 solution) = variable, retargeted every block, stored as header field "secondary_scaling" | |
Example: Three workers contributed shares: | |
Worker A submitted 50 cuckaroo29 shares | |
Worker B submitted 25 cuckaroo29 shares and |
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 | |
# LetsEncrypt - create or renew certificates on startup and once per day | |
# can be used as nginx docker entrypoint, or standalone via cron | |
# | |
# Ex: | |
# letsencrypt-create-or-renew.sh /usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf | |
# | |
# If used in Dockerfile, I suggest the following: | |
# ENTRYPOINT ["/tini", "--", "/letsencrypt-create-or-renew.sh"] |
NewerOlder