Skip to content

Instantly share code, notes, and snippets.

View sainoe's full-sized avatar
🏠
Working from home

Simon Noetzlin sainoe

🏠
Working from home
  • GVA Switzerland
View GitHub Profile
@sainoe
sainoe / ccv-upgrade.sh
Created February 2, 2024 13:58
Gaia upgrade with CCV enabled
#!/bin/bash
set -eux
pkill -f cosmovisor interchain hermes &> /dev/null || true
./setup.sh
sleep 5
@sainoe
sainoe / evidence.json
Created December 8, 2023 14:51
examples of double voting evidence json files
{
"vote_a": {
"type": 1,
"height": 25,
"round": 0,
"block_id": {
"hash": "tBBWTqjECl31S/clZGoxLdDqs93kTvy3qhpPqET/laY=",
"part_set_header": {
"total": 1,
"hash": "ai2qCLgVZAFph4FJ4Cqw5QW1GZKR4zjOv0bI/Um5AIc="
@sainoe
sainoe / evidence.json
Created November 20, 2023 17:02
Pupmos tests
{
"vote_a": {
"type": 2,
"height": 1909052,
"round": 0,
"block_id": {
"hash": "",
"part_set_header": {
"total": 0,
"hash": ""
{
"signed_header": {
"header": {
"version": {
"block": 11,
"app": 2
},
"chain_id": "testchain2",
"height": 22,
"time": "2020-01-02T00:07:00Z",
#!/bin/bash
set -eux
diag() {
echo ">>
>> $@
>>" 1>&2
}
@sainoe
sainoe / local-testnet-3-vals-sybil-consumer.sh
Last active October 5, 2023 15:33
consumer double signing and light client attacks
#!/bin/bash
set -eux
# User balance of stake tokens
USER_COINS="100000000000stake"
# Amount of stake tokens staked
STAKE="100000000stake"
# Node IP address
NODE_IP="127.0.0.1"
@sainoe
sainoe / whale_validator_issue.sh
Last active June 29, 2023 15:26
Cannot a start chain using one whale validator with 2/3+ voting power
#!/bin/bash
set -eux
# User balance of stake tokens
USER_COINS="100000000000stake"
# Amount of stake tokens staked
STAKE="100000000stake"
# Amount of stake tokens staked
STAKE2="4000000stake"
# Node IP address
@sainoe
sainoe / local-test.sh
Created June 29, 2023 13:05
Big validator issue
#!/bin/bash
set -eux
# User balance of stake tokens
USER_COINS="100000000000stake"
# Amount of stake tokens staked
STAKE="100000000stake"
# Amount of stake tokens staked
STAKE2="4000000stake"
# Node IP address
#!/bin/bash
set -e
export GAIA_HOME=$HOME/.gaia
export UPGRADE_NAME_LOWERCASE=v10
export UPGRADE_HEIGHT=12
export OLDBINARY_HOME=$GAIA_HOME/cosmovisor/genesis/bin
export NEWBINARY_HOME=$GAIA_HOME/cosmovisor/upgrades/${UPGRADE_NAME_LOWERCASE}/bin
@sainoe
sainoe / change_voting_period
Last active October 17, 2022 15:59
testnet-scripts
#!/bin/bash
set -eux
```
tee ${PROV_NODE_DIR}/change-voting-period.json<<EOF
{
"title": "Change voting period",
"description": "Voting period",
"changes": [