Skip to content

Instantly share code, notes, and snippets.

@Reecepbcups
Reecepbcups / validator_update_readiness.py
Created October 13, 2023 00:21
Easy to paste Cosmos chain information for upgrade coordination
# pip install httpx (or use requests)
from httpx import get
# cosmos.directory
API = "https://juno-api.reece.sh"
ENDPOINT = "cosmos/staking/v1beta1/validators?pagination.limit=1000"
URL = f"{API}/{ENDPOINT}"
get_validators = get(URL).json().get("validators", [])

A Tale of Two Name Services

Problem

The name alice can exist on multiple chains, owned by different accounts.

For example, alice.stars can point to a stars address that is associated with a different key than alice.stars on ICNS.

Solution 1: Merge ICNS and Stargaze Names

Liquid Staking Risks and Mitigations

Much has been made about the potential risks of liquid staking.

The work iqlusion has done in the staking module over the last year has been specifically designed to mitigate these risks. This work is covered under ADR-61

Risk of a depeg between ATOM and the liquid staked asset.

During the Three Arrows capital liquidation event, there was a substantial divergence between the price Lido’s staking derivative STETH. Many liquid staking protocols require substantial waits to process withdrawals and final settlement of the underlying stake token collateral. This enables a purely financial event like deleveraging to undermine the strategy tokens and subject liquidity providers to substantial loss.

@yorickdowne
yorickdowne / HallOfBlame.md
Last active May 9, 2024 08:32
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on IOPS, I/O Per Second. Budget SSDs will struggle to an extent, and some won't be able to sync at all.

This document aims to snapshot some known good and known bad models.

For size, 4TB comes recommended as of mid 2024. The smaller 2TB drive should last an Ethereum full node until early 2025 or thereabouts, with crystal ball uncertainty. Remy wrote a migration guide to 4TB.

High-level, QLC and DRAMless are far slower than "mainstream" SSDs. QLC has lower endurance as well. Any savings will be gone when the drive fails early and needs to be replaced.

// usage:
// $ npm install graphql-request table ts-node
// $ npm install -D @types/table
// $ ts-node fields_tvl.ts
import { request, gql } from "graphql-request";
import { table } from "table";
const ASTRO_GENERATOR = "terra1zgrx9jjqrfye8swykfgmd6hpde60j0nszzupp9";
const MARS_RED_BANK = "terra19dtgj9j5j7kyf3pmejqv8vzfpxtejaypgzkz5u";
@joeabbey
joeabbey / README.md
Last active February 28, 2022 20:25
Measuring Osmosis Epoch

Introduction

Osmosis is an automated market maker for interchain assets. Over the past 7 months, the adoption has continued to accelerate with nearly $1.5B in TVL as of the time of writing. Additionally, the AMM supports 33 unique assets and continues to add new assets as new chains join IBC.

Osmosis is unique from other Cosmos Chains with the implementation of an epochs module. The epochs module hooks the incentives and mint keepers to distribute various rewards once a day. With the growth of the network, increase in incentivized pools, the time to compute the epoch block and produce a NewHeight has increased to roughly 20 minutes.

New users are coming to Osmosis everyday and stay for its ease-of-use, access to many new assets, and incredible speed. The epoch block takes new users by surprise, and can be a negative experience. With more AMMs arriving in the IBC ecosystem, giving us

@crundberg
crundberg / gist:a77b22de856e92a7e14c81f40e7a74bd
Last active April 27, 2024 16:51
Setup deCONZ on unprivileged Proxmox container

Setup deCONZ on unprivileged Proxmox container

Preparation on host

First find your Conbee with lsusb and note the ID. The vendor is 1cf1 and the product is 0030.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
Bus 001 Device 003: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
@srimaln91
srimaln91 / rocksdb-install.sh
Last active January 23, 2024 13:29
Install RocksDB on Ubuntu 20.04 (Focal Fossa)
#!/bin/bash
ROCKSDB_VERSION=5.11.3
#Run as a root user
if [ "$EUID" -ne 0 ]
then echo "Please run as root (with sudo command)"
exit
fi
#!/bin/bash
WALLET_PASS=$1
AKASH_PATH='/usr/local/bin'
WALLET=$(echo -e "$WALLET_PASS\n" | $AKASH_PATH/akashctl keys list -n)
while true; do
POWER=$($AKASH_PATH/akashctl status | jq -r '.[] | .voting_power' | tail -1 | sed -e 's/^"//' -e 's/"$//')
#!/bin/bash
#
# 20210119 - Use the new --endpoint flag
# - Added verbose logging
#
# 20200608 - Updated to TzKt API
#
# 20191029 - Added /v3/network back in.
# Thanks to Baking-Bad and their Mystique API