Skip to content

Instantly share code, notes, and snippets.

View brunopgalvao's full-sized avatar
🚀

Bruno Galvao brunopgalvao

🚀
View GitHub Profile
@al3mart
al3mart / recover_para_info.py
Last active September 8, 2022 11:10
Recover onboarded parachain state from a relay chain node.
# Usage python /parachain_info.py wss://relay-rpc.url [local_directory_name]
import sys
# install with `pip install substrate-interface
from substrateinterface import SubstrateInterface
def get_parachain_head(node_client, para_id):
return str(node_client.query('Paras', 'Heads', params=[para_id]))
@lovelaced
lovelaced / parachain_devops.md
Last active April 8, 2024 11:54
Best practices: administrate a Substrate-based chain

Best practices for maintaining & running substrate-based (para)chain (wip)

  • Ensure all of your systems are kept up-to-date, especially with security updates.
  • Ensure you can fully bootstrap a new system from scratch easily if needed.
  • Upload archive chain backups frequently. Potentially make these available to the community down the road.
  • Have database recovery methods in place.
  • Use infrastructure as code. Never modify anything manually on your servers.
  • Ensure you have a monitoring stack set up WITH alerts (alertmanager/grafana alerts/bots etc).
  • Keep alerts actionable, otherwise they become noise.
  • If a service crashes, make sure it automatically restarts in some way (via systemd or kubernetes).