Skip to content

Instantly share code, notes, and snippets.

@Commoneffort
Commoneffort / gist:ed729fed8dd3ef3499d976efc66ac2c0
Created October 28, 2024 22:53
Read Solana validator related accounts and balances
#!/bin/bash
# Define universal paths
CONFIG_DIR="/home/owl/.config/solana"
SOLANA_DIR="/home/owl/solana"
# List of account JSON files using the universal paths
accounts=(
"$CONFIG_DIR/id.json"
"$SOLANA_DIR/identity.json"
@Commoneffort
Commoneffort / lattice-mpc.js
Created September 20, 2024 21:15
Lattice-based quantum-resistant MPC game
import crypto from 'crypto';
import bigInt from 'big-integer';
import fs from 'fs';
import Dilithium from 'dilithium-crystals-js';
// Helper functions
function sha3(data) {
return crypto.createHash('sha3-256').update(data).digest('hex');
}
@Commoneffort
Commoneffort / X1val
Last active October 13, 2024 21:29
X1 validator installation and setup
#!/bin/bash
# Exit on any error
set -e
# Define variables
RELEASE_TAG="v1.18.23"
BIN_DIR="$HOME/.local/share/solana/bin"
SOLANA_INSTALL_DIR="$HOME/.local/share/solana/install/active_release"
SYSCTL_CONF_FILE="/etc/sysctl.d/21-solana-validator.conf"
-This Constitution is a multi-party contract entered into by the Members by virtue of their use of this blockchain.
-
-# Article I - No Initiation of Violence
-Members shall not initiate violence or the threat of violence against another Member.
-
-# Article II - No Perjury
-Members shall be liable for losses caused by false or misleading attestations and shall forfeit any profit gained thereby.
-
-# Article III - Rights
-The Members grant the right of contract and of private property to each other, therefore no property shall change hands except with the consent of the owner, by a valid Arbitrator’s order, or via community referendum. This Constitution creates no positive rights for or between any Members.