Skip to content

Instantly share code, notes, and snippets.

View kianenigma's full-sized avatar
🦀

Kian Paimani kianenigma

🦀
View GitHub Profile
@kianenigma
kianenigma / gist:6f6cb94f0624fb10911348640da34267
Last active June 17, 2020 14:31
Dump of dangling nominators on Kusama, June 17th 2020
[2020-06-17T14:13:16Z INFO offline_phragmen] total_issuance = 9362701,351KSM (9,362,701,351,556,641,850)
[2020-06-17T14:13:16Z INFO offline_phragmen] connected to [wss://kusama-rpc.polkadot.io]
[2020-06-17T14:13:16Z INFO offline_phragmen] at [0x74dd…8ca0]
[2020-06-17T14:13:18Z DEBUG offline_phragmen::subcommands::dangling_nominators] [0/1235] Nominator 102cda735370293bce834ff3c7a6a6ae73767725906434403836f8e61ee5db56 (5CRuwumC...) Ok. Retaining all 16 votes.
[2020-06-17T14:13:19Z DEBUG offline_phragmen::subcommands::dangling_nominators] [1/1235] Nominator e57b16b0210195cdea03ba37940ddc215e74f5f53a3efbb8b36ea39021aa56a9 (5HFbPSXt...) Ok. Retaining all 16 votes.
[2020-06-17T14:13:20Z DEBUG offline_phragmen::subcommands::dangling_nominators] [2/1235] Nominator 3c4c4c6d63e1428b8450773a851ad4d3eb76c2f5a4fa1722b5d84cf54cf6ba56 (5DRmPuCf...) Ok. Retaining all 16 votes.
[2020-06-17T14:13:21Z DEBUG offline_phragmen::subcommands::dangling_nominators] [3/1235] Nominator a6ff2197e260745daf5ae4c9f73ec52ddb19dd9d9f4a3178
#1 ["Polkadot.pro - Realgar"] - 127a30e486492921e58f2564b36ab1ca21ff630672f0e76920edd601f8f2b89a (CzYgH6Yr...)
#2 ["NO_IDENT"] - 17b7295b2d66adadef5746c793b746bd2443e1da913636625ba95c7ff853bf22 (D7R2fREf...)
#3 ["NO_IDENT"] - 2c2a55b5c69b5e131fb0f65ac7ca707f4bc53e4d991a2d1971ab5e702f69f45c (DaECbfXq...)
#4 ["NO_IDENT"] - aee72821ca00e62304e4f0d858122a65b87c8df4f0eae224ae064b951d39f610 (GXeWyYpL...)
#5 ["WEB3ITALYDOT"] - eee9d5d071a418b51c02b456d5f5cefd6231041ad59b0e8379c59c11ba4a2439 (HyaNsYuW...)
#6 ["NO_IDENT"] - 98b995d8a902881fcb8891ebe35d50318453a0fd745232ff11e8cbcd5b11b700 (G2ZvhQZw...)
#7 ["NO_IDENT"] - c08d5de7a5d97bea2c7ddf516d0635bddc43f326ae2f80e2595b49d4a08c4619 (GvnhvTuQ...)
#8 ["NO_IDENT"] - 3af8b075de8a04f234f06c62ab44ef258be19bce462385f9d03c1244dab2734e (DueAtLnk...)
#9 ["Staker Space"] - f0de782e8bad3c663be60812f0a2ac63464f5da3ec448c73334c07d71ef27f2c (J296bjVR...)
#10 ["NO_IDENT"] - 38c95b31fe81ba229b2e2216f0bf6812ca45dc3ad5c49e15b48e0eef5555bf40 (Drn1oSve...)
@kianenigma
kianenigma / Razer Blade Stealth 13 2019 - Linux Mint Installation
Created March 10, 2019 20:51
Notes on multiple attempts to install Linux Mint 19 on Razer Blade Stealth 2019
Dual booted with windown boot laoder via:
- 100GB / root exe4 journal file system
- 16GB Swap (might be too much --only used over heavy load)
Initial system had the following (annoying issues) + Fixes
- No drivers work properly: Mouse is laggy + wifi is super slow
- Update the kernel immediately
@kianenigma
kianenigma / polkadot-refund.txt
Last active November 25, 2020 11:57
polkadot-refund
who,role,identity,effective_slash_planck,effective_slash_token
1WG3jyNqniQMRZGQUc7QD2kVLT8hkRPGMSqAb5XYQM1UDxN,RunnerUp,DokiaCapital,1252580000000,1.2525 DOT (old)
1dGsgLgFez7gt5WjX2FYzNCJtaCjGG6W9dA42d9cHngDYGg,RunnerUp,0x447261676f6e5374616b6520f09f90b2,1607240000000,1.6072 DOT (old)
1hJdgnAPSjfuHZFHzcorPnFvekSHihK9jdNPWHXgeuL7zaJ,RunnerUp,Listen,1252580000000,1.2525 DOT (old)
1rwgen2jqJNNg7DpUA4jBvMjyepgiFKLLm3Bwt8pKQYP8Xf,RunnerUp,Chevdor,1252580000000,1.2525 DOT (old)
12Vv2LsLCvPKiXdoVGa3QSs2FMF8zx2c8CPTWwLAwfYSFVS1,RunnerUp,Polkascan Foundation,4252580000000,4.2525 DOT (old)
12mP4sjCfKbDyMRAEyLpkeHeoYtS5USY4x34n9NMwQrcEyoh,Members,polkaworld,1202580000000,1.2025 DOT (old)
13pdp6ALhYkfEBqBM98ztL2Xhv4MTkm9rZ9vyjyXSdirJHx6,RunnerUp,Cryptium Labs,2806820000000,2.8068 DOT (old)
15akrup6APpRegG1TtWkYVuWHYc37tJ8XPN61vCuHQUi65Mx,RunnerUp,akru,1407820000000,1.4078 DOT (old)
12Y8b4C9ar162cBgycxYgxxHG7cLVs8gre9Y5xeMjW3izqer,Members,Acala Foundation,1202910000000,1.2029 DOT (old)
@kianenigma
kianenigma / slot
Created January 13, 2021 14:45
slot-backtrace
1 kianenigma@build-host[13:46] ~/substrate-sync (git)-[2ef0f1cb2] % cargo run -- --tmp --dev :(
Finished dev [unoptimized + debuginfo] target(s) in 0.62s
Running `target/debug/substrate --tmp --dev`
2021-01-13 13:46:42 Running in --dev mode, RPC CORS has been disabled.
2021-01-13 13:46:42 Substrate Node
2021-01-13 13:46:42 ✌️ version 2.0.0-2ef0f1cb2-x86_64-linux-gnu
2021-01-13 13:46:42 ❤️ by Parity Technologies <admin@parity.io>, 2017-2021
2021-01-13 13:46:42 📋 Chain specification: Development
2021-01-13 13:46:42 🏷 Node name: quizzical-belief-8596
2021-01-13 13:46:42 👤 Role: AUTHORITY
1 kianenigma@build-host[13:46] ~/substrate-sync (git)-[2ef0f1cb2] % cargo run -- --tmp --dev :(
Finished dev [unoptimized + debuginfo] target(s) in 0.62s
Running `target/debug/substrate --tmp --dev`
2021-01-13 13:47:34 Running in --dev mode, RPC CORS has been disabled.
2021-01-13 13:47:34 Substrate Node
2021-01-13 13:47:34 ✌️ version 2.0.0-2ef0f1cb2-x86_64-linux-gnu
2021-01-13 13:47:34 ❤️ by Parity Technologies <admin@parity.io>, 2017-2021
2021-01-13 13:47:34 📋 Chain specification: Development
2021-01-13 13:47:34 🏷 Node name: raspy-wealth-5222
2021-01-13 13:47:34 👤 Role: AUTHORITY
@kianenigma
kianenigma / bags.rs
Created November 2, 2021 11:56
Simple script to see the status of an account in bags-list. Just paste this in Polkadot JS App's Javascript page.
// This must be a STASH account.
const yourAccount = "xxx";
// This is your node in the bags list. Use `node.prev` and `.next` to see where you are located.
const node = await api.query.bagsList.listNodes(yourAccount);
// This is the bag to which you belong.
const bagUpper = api.createType("Balance", node.toJSON().bagUpper);
// This is the list of all the bags.
const bagThresholds = api.consts.bagsList.bagThresholds.map((x) => api.createType('Balance', x));
//
// This function will always indicate that for an account with stake (aka, weight) `w`, to which bag they belong to.
import { ApiPromise, WsProvider } from "@polkadot/api";
import { BN } from "@polkadot/util";
import axios from "axios";
async function scrapeSubscan(api: ApiPromise) {
const [from, to] = [3899547, 4876134];
const DOTS = new BN(10000000000);
const HUNDRED = new BN(100);
const REFUND = new BN(new BN(495).mul(DOTS).div(HUNDRED))
const key = process.env['API'] || "DEFAULT_KEY";
import { ApiPromise, WsProvider } from "@polkadot/api";
import axios from "axios";
import { writeFileSync } from "fs";
import { strict as assert } from 'assert'
async function findLastNicksBlock(block: number, key: string) {
while (true) {
let next = block + 1;
const data = await axios.post(`https://kusama.api.subscan.io/api/scan/block`, {
"block_num": next
@kianenigma
kianenigma / staking-updates.md
Last active October 5, 2022 00:58
Polkadot's Monthly Staking Update

DEPRECATED: Polkadot Staking Progress Report

I started this gist as an index for all of the staking reports. Almost a year in, we migrated everything to https://polkadot.network/tag/staking-updates/. This page will no longer be updated: