Skip to content

Instantly share code, notes, and snippets.

View ryssroad's full-sized avatar
👾

road ryssroad

👾
View GitHub Profile
@ryssroad
ryssroad / union statesync
Created December 2, 2023 07:38
union state sync
peers="cdb11cf19cce0ca6da57a067df86c19b794fcf2b@union-rpc.systemd.run:26656"; \
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.union/config/config.toml
SNAP_RPC="https://union-rpc.systemd.run:443"; \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash); \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
@ryssroad
ryssroad / chgpd readme.me
Last active November 10, 2023 01:33
some-near.me
сделай краткое изложение этого твита
https://twitter.com/NEARProtocol/status/1722276234946826691
The NEAR Foundation and
@0xPolygonLabs
are set to deliver the future of zero-knowledge for WASM based blockchains with zkWASM.
-
Empowering greater security, scalability, developer flexibility, and interoperability in the open web🌐
-
@ryssroad
ryssroad / formatted.sh
Created August 13, 2023 07:21 — forked from marcellodesales/formatted.sh
One-liner REST server using netcat - nc
rm -f out
mkfifo out
trap "rm -f out" EXIT
while true
do
cat out | nc -w1 -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out".
export REQUEST=
while read line
do
line=$(echo "$line" | tr -d '[\r\n]')
@ryssroad
ryssroad / speedometer.sh
Last active August 7, 2023 21:40
network monitor on local
# get speedometer
apt install speedometer
# get external interface name
IF="$(route | grep '^default' | grep -o '[^ ]*$')"
# start speedometer
speedometer -t $IF -r $IF
@ryssroad
ryssroad / dashboard.json
Created August 7, 2023 18:51 — forked from blockpane/dashboard.json
Grafana dashboard for tendermint validators
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@ryssroad
ryssroad / striped.md
Created August 7, 2023 18:47 — forked from blockpane/striped.md
Striped block devices on Digitalocean

LVM Setup on DO for striped block devices:

This example is specifically for my Osmosis seed node, that I run in the cloud, all my other nodes are on hardware, and I use a very different setup on those.

These instructions should work on just about any cloud provider, by striping block devices it's possible to get much higher IOPS and throughput. On Omosis in particular this is important. It doesn't cost any more to use striped volumes, so for example 3 40GB volumes cost the same as a single 120GB, but give (almost) 3x the performance.

After provisioning new block devices (do not format automatically) in the DO console and attaching them, ssh into the droplet and as root follow the directions below. I try to shoot for < 50% usage, so right now with about 120GiB needed, three 90GB volumes will do nicely.

_Note that extending the volume group in the future will require adding exactly the same number and size of volumes. Alternatively you can just use the same procedure here to move the files into a new vol

@ryssroad
ryssroad / firewall.sh
Created August 7, 2023 18:44 — forked from blockpane/firewall.sh
Example of how to setup iptables to correctly filter Docker services
#!/bin/bash
### This is an example script that sets up IP tables with Docker. Many admins are not aware that UFW
### and Docker do not play well together, and accidently expose RPC ports and vulnerable services to
### the network. This replaces UFW with Netfilter-persistent and adds rules to the DOCKER-USER chain
### which is the correct way to filter incoming traffic with docker. This specific example is for a
### Tendermint node running via docker, and wireguard / ssh running directly on the host.
# CHANGE THIS TO ACTUAL PUBLIC INTERFACE!!!!!!!!!!
@ryssroad
ryssroad / authz.md
Created August 7, 2023 18:41 — forked from blockpane/authz.md
AuthZ Cheatsheet

Claims:

Setup:

simd tx distribution set-withdraw-addr <claim_address> -y --from validator
simd tx authz grant <claim_address> generic --msg-type=/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission --from validator
simd tx authz grant <claim_address> generic --msg-type=/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward --from validator

Keybase proof

I hereby claim:

  • I am ryssroad on github.
  • I am systemdrun (https://keybase.io/systemdrun) on keybase.
  • I have a public key whose fingerprint is 1F6B 36D2 35DF 0A4B 78F4 DFD7 5C5F 539E 76C0 7456

To claim this, I am signing this object:

@ryssroad
ryssroad / andromedad_state
Last active March 11, 2023 23:21
Andromeda statesync (12.03.23 int 100)
peers="08da04e20e295f48518d095871ba5c13e58c3dfd@185.209.223.64:36656"; \
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.andromedad/config/config.toml
SNAP_RPC="http://185.209.223.64:36657"; \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 100)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash); \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \