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:
This file contains hidden or 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
# create these functions in some bash file to be imported in the crontab | |
# crontab in macos is weird and cannot load normal zsh functions. | |
# cat ~/.shell_functions | |
function base_run_chain() { | |
chain=$1 | |
port=$2 | |
sync=$3 | |
polkadot --chain $chain \ | |
--sync $sync \ |
This file contains hidden or 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
// rought file paths writte above each item. | |
// pallet-balances::weights.rs | |
trait WieghtInfo { | |
fn transfer() -> u32; | |
} | |
// pallet-balances | |
trait Config { | |
type WeightInfo: weights::WeightInfo; |
This file contains hidden or 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
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 |
This file contains hidden or 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
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"; |
This file contains hidden or 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 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. |
This file contains hidden or 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
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 <[email protected]>, 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 |
This file contains hidden or 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
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 <[email protected]>, 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 |
This file contains hidden or 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
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) |
This file contains hidden or 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
who,role,identity,effective_slash_planck,effective_slash_token | |
CanLB42xJughpTRC1vXStUryjWYkE679emign1af47QnAQC,None,undefined,1060000000000,1.0600 KSM | |
CcKPhXSyZgATZD1wVaRsSk81UfLcQvyuuS2i9FNhsoeQeWr,None,undefined,1060000000000,1.0600 KSM | |
CdEm1ErGKML3waXabLvn3NyqdAGXBQJVngLaM86YM5Yb9dr,None,undefined,1060000000000,1.0600 KSM | |
DMF8a34emwapz9mV5P5PTDcghh1ZR3miH9ad9mHzfAUMSXU,Members,Al scientist w3f,1176666666666,1.1766 KSM | |
DTLcUu92NoQw4gg6VmNgXeYQiNywDhfYMQBPYg2Y1W6AkJF,None,federico,1060000000000,1.0600 KSM | |
DaCSCEQBRmMaBLRQQ5y7swdtfRzjcsewVgCCmngeigwLiax,RunnerUp,POLKAWORLD,12060000000000,12.0600 KSM | |
DfiSM1qqP11ECaekbA64L2ENcsWEpGk8df8wf1LAfV2sBd4,None,CP287-CLOUDWALK,4060000000000,4.0600 KSM | |
ET9SkhNZhY7KT474vkCEJtAjbgJdaqAGW4beeeUJyDQ3SnA,None,undefined,2060000000000,2.0600 KSM | |
FcxNWVy5RESDsErjwyZmPCW6Z8Y3fbfLzmou34YZTrbcraL,Members,0xf09f8dba2047617620f09fa583,3010000000000,3.0100 KSM |
NewerOlder