Skip to content

Instantly share code, notes, and snippets.

View rBurgett's full-sized avatar

Ryan rBurgett

View GitHub Profile
@rBurgett
rBurgett / nodewallet_sdk.md
Last active October 17, 2023 18:05
NodeWallet SDK
@rBurgett
rBurgett / cc-provider-api.md
Last active June 9, 2023 22:52
CC Provider API

Community Chains Provider API Documentation

This is a work in progress and subject to change.

/v1/providers/{{PROVIDER_ID}}/unlock

Authenticates the user and provides a token valid for 24 hours which can be used to make calls to the provider API.

Endpoint:

https://api.cc.nodepilot.tech/v1/providers/{{PROVIDER_ID}}/unlock

Method:

POST

@rBurgett
rBurgett / cc_gateway_request_logging.md
Last active February 28, 2023 03:11
CC Gateway Request Logging

We have the first version of our internal relay stats manager live. There were a number of questions about how we collect and record this data, so I wanted to take a moment to give a little insight.

Our haproxy stack consists of three haproxy containers:

         TCP Server
           /    \
HTTP Server 0  HTTP Server 1
  • TCP Server - Despite the name, this server runs in HTTP mode. Its only job is to route traffic to the available HTTP Server 0 or 1.
@rBurgett
rBurgett / cc-gateway-providers.md
Last active January 23, 2023 20:01
Community Chains Gateway Providers

Provider Story:

  • Provider contacts us and gives us
    • email address
    • pokt address
    • for each gateway
      • public IP address of gateway server
      • each supported chain ID and accompanying local endpoint e.g. http://10.10.0.1:9500.
      • SSH login (w/ sudo privileges) via port 39889
      • Direct public ports from 39880-39888 to the gateway server
  • We create a provider account for them which includes
@rBurgett
rBurgett / np_0.16.0_release_notes.md
Created September 20, 2022 23:52
Node Pilot 0.16.0 Release Notes

Features

  • Ethereum 2.0 support
  • Pocket BETA-0.9.x support
  • Ethereum Goerli testnet support
  • Pocket nodes are now served via Node Launcher which allows for one-click updating like other Node Pilot supported chains
  • All Node Pilot functionality is exposed via a JSON-RPC server at port 34417 (temporary documentation can be found here: https://gist.github.com/rBurgett/22605a4880e6f6e1cda15e426d02b299)
  • All key passwords are now encrypted
  • Nodes now automatically restart if they unexpectedly shut down
  • You can shut down Node Pilot while leaving your nodes running
@rBurgett
rBurgett / node_pilot_api_docs.md
Last active December 6, 2022 20:39
Node Pilot JSON-RPC Documentation

Node Pilot JSON-RPC Server Overview

The Node Pilot JSON-RPC server provides API access to every single Node Pilot operation, from initial registration to creating, staking, and updating nodes.

The RPC server is available both via HTTP and via the command line using the Node Pilot CLI.

Accessing the JSON-RPC server via HTTP

The server can be accessed via port 34417 on the host machine at path /v1 e.g. http://localhost:34417/v1. It follows the JSON-RPC 2.0 Specification. All requests must be POST requests sent with a Content-Type of application/json. The payload must be in the following form:

@rBurgett
rBurgett / configure-node-pilot.sh
Created July 20, 2022 23:22
Example script for configuring node pilot via command line arguments
#!/bin/bash
set -e
EMAIL="[email protected]"
PASSWORD="mypassword"
DOMAIN="mysubdomain.mydomain.com"
echo "-> Start Node Pilot"
@rBurgett
rBurgett / script-running.md
Created February 4, 2022 18:47
Running Regular Scripts Easily in Ubuntu

Ubuntu makes it very easy to record scripts into files that can be run anywhere from the command line, allowing you to script out common tasks and easily run them without always having to copy/paste or remember long, very technical commands.

Ubuntu will automatically look to see if there is a ~/.local/bin folder and will allow any script file in there to be run as a command.

For example, you might enter sudo mount /dev/nvme0n1p1 /media/8tb to mount an external drive. You can easily script that to run as a command.

First, check inside the .local folder:

ls ~/.local
@rBurgett
rBurgett / xlite_macos_publish_build_process.md
Created December 6, 2021 21:59
XLite macOS Publish Native Build Procedure
  1. Install git.
  2. Install Node.js v14.
  3. Change npm's default global directory in order to avoid having to run global installs with sudo.
  4. Install Docker.
  5. Clone the repo: git clone https://github.com/blocknetdx/xlite.git
  6. Open the directory: cd xlite
  7. Checkout the appropriate branch e.g. git checkout dev.
  8. Install dependencies: npm install
  9. Run build script: npm run build
  10. Set GH_TOKEN environment variable to a GitHub Token with appropriate permissions for creating releases and pushing release builds.
@rBurgett
rBurgett / js_cheat_sheet.md
Last active June 15, 2021 00:56
Riley Joy JS Cheat Sheet

Variables

// To make a variable that can be changed
let myVariable = 'something';

// To make a variable that does not change
const myConst = 'something else';

Strings