Skip to content

Instantly share code, notes, and snippets.

View arno01's full-sized avatar
🎯
Focusing

Andrey Arapov arno01

🎯
Focusing
View GitHub Profile
---
version: "2.0"
services:
app:
image: ubuntu:22.04
env:
# Optional: set your ssh key if you want to ssh into this deployment; otherwise remove this line.
- 'SSH_PUBKEY=ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINNFxqDbY0BlEjJ2y9B2IKUUoimOq6oAC7WcsQT8qmII'
command:
# 1. Set your public ssh key via SSH_PUBKEY variable
# 2. Deploy it
# 3. SSH into it (via the mapped node port)
# 4. Run Hummingbot: conda activate hummingbot && /home/hummingbot/bin/hummingbot_quickstart.py 2>> /home/hummingbot/logs/errors.log
---
version: "2.0"
services:
hummingbot:

I've updated the Akash CLI Booster tool so it can display all the balances now, including the IBC ones, converting their long ibc/<HEX> name into the short, human-readable base_name. As well as one can check the balances for the specific base_denom (e.g. uausdc or uakt).

Repo: https://github.com/arno01/akash-tools

Example

tested in sandbox-01

@arno01
arno01 / partially-reconstruct-manifests-akash-provider.md
Last active September 12, 2023 07:46
Partially reconstruct manifests in the event you lost them

Partially reconstruct manifests in the event you lost them

Here is how you can partially reconstruct the deleted manifests to make sure your provider will keep monitoring them, withdrawing from their leases as well as allow users to re-send their deployment manifest (without redeploying) to restore it & their ingresses (uri's), avoiding the Pod restart, hence keeping the ephemeral data on a Pod.

You can also reconstruct the manifests even when the deployments were gone (but bid/lease are still active/open). This requires the tenants to re-submit their manifests.

1. Partially reconstruct missing manifests

This reconstruction is based on existing namespaces, there is no way to entirely reconstruct the manifests unless they were manually backed up.

List all regions

$ akash query provider list --limit 1000 -o json | jq -r '.providers[] | (.attributes[] | select(.key == "region") | .value)' | sort | uniq -c | sort -n
      1 ap-northeast-1
      1 ap-southeast
      1 australia-east-akash-provider
      1 Chicago
      1 cz-prague
      1 cz-prague2
@arno01
arno01 / akash-provider-safeguard-script.md
Last active August 2, 2022 09:25
Akash provider safeguard script against freeloaders

Akash Provider safeguard script against freeloaders

This script issues akash tx market lease withdraw only against leases which ran out of balance.

Motivation

The deployment gets automatically closed when it runs out of balance in escrow account. But the balance settlement occurs only after a lease withdraw transaction.

Without timely withdrawal from the escrow accounts freeloaders can deploy an expensive deployment

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x15380b3]

goroutine 112 [running]:
github.com/cosmos/cosmos-sdk/x/upgrade.BeginBlocker({{0xc00013ab80, 0xc}, 0xc00113fda0, {0x308b7f0, 0xc00131ef60}, {0x311ffd8, 0xc00131f110}, 0xc001380f90, {0x3070bc0, 0xc001185520}, ...}, ...)
	github.com/cosmos/[email protected]/x/upgrade/abci.go:38 +0x1093
github.com/cosmos/cosmos-sdk/x/upgrade.AppModule.BeginBlock(...)
	github.com/cosmos/[email protected]/x/upgrade/module.go:130
github.com/cosmos/cosmos-sdk/types/module.(*Manager).BeginBlock(_, {{0x30d4468, 0xc0000520c0}, {0x3127000, 0xc004213900}, {{0xb, 0x0}, {0xc003ae5060, 0xa}, 0x5548a6, ...}, ...}, ...)
---
version: "2.0"

services:
  ssh:
    image: ubuntu:22.04
    env:
      - 'SSH_PUBKEY=ssh-rsa AAAAB3Nza......'
    command: