Skip to content

Instantly share code, notes, and snippets.

@rootulp
rootulp / feegrant.sh
Last active March 20, 2024 18:30
Short script to demonstrate feegrant
#!/bin/sh
# Stop script execution if an error is encountered
set -o errexit
# Stop script execution if an undefined variable is used
set -o nounset
CHAIN_ID="private"
KEY_NAME="validator"
KEYRING_BACKEND="test"
@rootulp
rootulp / multisig.sh
Last active March 7, 2024 20:39
tx sign doesn't throw an error when incorrect Ledger is used
#!/bin/sh
# Stop script execution if an error is encountered
set -o errexit
# Stop script execution if an undefined variable is used
set -o nounset
# Prerequisite: prior to running this script, start a single node devnet with ./scripts/single-node.sh
CHAIN_ID="private"
KEY_NAME="validator"
@rootulp
rootulp / convert.go
Created November 29, 2023 20:13
Go playground to conver a quantity of utia to TIA
package main
import "fmt"
// utiaPerTia is the number of utia in one TIA
// see https://docs.celestia.org/learn/tia#tia-display-token
const utiaPerTia = int64(1_000_000)
func main() {
// feel free to modify utia
@rootulp
rootulp / mainnet.sh
Last active May 2, 2024 18:00
Script to start a Celestia full consensus node on mainnet
#!/bin/sh
# Stop script execution if an error is encountered
set -o errexit
# Stop script execution if an undefined variable is used
set -o nounset
CHAIN_ID="celestia"
NODE_NAME="node-name"
SEEDS="e6116822e1a5e283d8a85d3ec38f4d232274eaf3@consensus-full-seed-1.celestia-bootstrap.net:26656,cf7ac8b19ff56a9d47c75551bd4864883d1e24b5@consensus-full-seed-2.celestia-bootstrap.net:26656"
@rootulp
rootulp / govulncheck.txt
Created October 19, 2023 20:01
govulncheck output on celestia-core
$ go1.20 run golang.org/x/vuln/cmd/govulncheck@latest ./...
Scanning your code and 578 packages across 95 dependent modules for known vulnerabilities...
Vulnerability #1: GO-2023-2102
HTTP/2 rapid reset can cause excessive work in net/http
More info: https://pkg.go.dev/vuln/GO-2023-2102
Standard library
Found in: net/http@go1.20
Fixed in: net/http@go1.21.3
Example traces found:
@rootulp
rootulp / genesis.json
Created October 17, 2023 13:28
Example genesis.json for testing
{
"genesis_time": "2023-10-12T15:26:28.328045Z",
"chain_id": "private",
"initial_height": "1",
"consensus_params": {
"block": {
"max_bytes": "1974272",
"max_gas": "-1",
"time_iota_ms": "1"
},
@rootulp
rootulp / config.toml
Last active September 16, 2023 22:34
Notes from testing IBC between mocha-4 and Cosmos hub testnet
[global]
log_level = "info"
[mode.clients]
enabled = true
refresh = true
misbehaviour = true
[mode.connections]
enabled = false
@rootulp
rootulp / README.md
Last active September 16, 2023 18:57
hermes config that works for IBC transfers between Cosmos hub testnet and Osmosis testnet
[global]
log_level = "info"
[mode.clients]
enabled = true
refresh = true
misbehaviour = true
[mode.connections]
enabled = false
@rootulp
rootulp / mocha-4.sh
Last active January 3, 2024 20:28
Script to start a Celestia consensus node on mocha-4
#!/bin/sh
# This script builds the celestia-app repo and attempts to connect to mocha-4.
# This script assumes that it is executed from the root of the celestia-app repo.
# ./scripts/mocha-4.sh
set -o errexit -o nounset
CELESTIA_APP_HOME="$HOME/.celestia-app"
NETWORKS_PATH="$HOME/git/rootulp/celestiaorg/networks"