Skip to content

Instantly share code, notes, and snippets.

@talalashraf
Last active July 19, 2024 18:10
Show Gist options
  • Save talalashraf/f11efab6303c8cb7185c62ca0830889b to your computer and use it in GitHub Desktop.
Save talalashraf/f11efab6303c8cb7185c62ca0830889b to your computer and use it in GitHub Desktop.
Consensus params on block size for cosmos chains

Block Parameters for Cosmos Chains

Generated on: 2024-07-19 14:07:36

Chain Name RPC URL Max Bytes Max Gas
terra https://terra-classic-rpc.publicnode.com:443 2M 100000000
gitopia https://gitopia-rpc.polkachu.com:443 21M -1
zetachain https://zetachain.blockpi.network/rpc/v1/public 21M 500000000
decentr https://poseidon.mainnet.decentr.xyz 21M -1
realio https://realio-rpc.genznodes.dev 21M -1
unification https://rpc1.unification.io:443 21M -1
cryptoorgchain https://rpc.mainnet.crypto.org/ 0M 81500000
joltify https://rpc.joltify.io 21M 2000000
cudos http://mainnet-full-node-01.hosts.cudos.org:26657 21M -1
migaloo https://migaloo-rpc.polkachu.com:443 21M -1
sifchain https://sifchain-rpc.polkachu.com 1M -1
loyal https://rpc-main.joinloyal.io/ 21M -1
scorum https://scorum-blockchain-mainnet-rpc.scorum.com 21M -1
neutaro https://rpc2.neutaro.tech:443 21M -1
andromeda https://rpc.andromeda-1.andromeda.aviaone.com 21M -1
meme https://rpc-meme-1.meme.sx/ 21M -1
noble https://noble-rpc.polkachu.com 5M -1
archway https://rpc.mainnet.archway.io 21M 300000000
agoric https://main.rpc.agoric.net:443 5M 120000000
nois https://nois-rpc.nysa.network 21M 4500000
umee https://umee-rpc.polkachu.com 4M 120000000
carbon https://tm-api.carbon.network 21M -1
nibiru https://nibiru.rpc.kjnodes.com 21M -1
stargaze https://rpc.stargaze-apis.com/ 5M 150000000
aura1 https://rpc.aura.network/ 2M -1
bandchain http://rpc.laozi1.bandchain.org:80 3M 50000000
genesisl1 https://26657.genesisl1.org 21M 2000000000
comdex https://rpc.comdex.one 21M -1
qfs https://rcp.qfsone.com 21M -1
haqq https://rpc.tm.haqq.network 21M 40000000
chihuahua https://rpc.chihuahua.wtf 21M 100000000
point https://rpc-mainnet-1.point.space:26657 21M 10000000
akash https://rpc.akash.forbole.com:443 21M -1
stride https://stride-rpc.polkachu.com/ 2M 100000000
furya https://furya-rpc.synergynodes.com 21M -1
dyson https://dys-tm.dysonprotocol.com:443 2M -1
source https://source.rpc.bccnodes.com/ 21M 100000000
quasar https://quasar-rpc.lavenderfive.com:443 21M 120000000
cosmoshub https://cosmos-rpc.quickapi.com:443 2M 100000000
aioz https://rpc-dataseed.aioz.network:443 2M -1
kava https://rpc.data.kava.io 0M 20000000
coss https://coss-rpc.coss.ink 21M -1
celestia https://public-celestia-rpc.numia.xyz 2M -1
axelar https://rpc-axelar.imperator.co:443 21M -1
heli https://rpc.helichain.com/ 21M -1
qwoyn https://rpc.qwoyn.studio:443 21M 40000000
chain4energy https://rpc.c4e.io/ 21M -1
mtgbp https://rcp.mtgbp.com 21M -1
acrechain https://rpc-acre.synergynodes.com 21M 300000000
composable https://rpc-composable-ia.cosmosia.notional.ventures 21M -1
sommelier https://sommelier-rpc.polkachu.com 10M 60000000
medasdigital https://rpc.medas-digital.io:26657/ 21M 6000000000
neutron https://neutron-rpc.lavenderfive.com 21M 30000000
nolus https://pirin-cl.nolus.network:26657 21M 100000000
lumenx https://rpc-lumenx.cryptonet.pl/ 21M -1
seda https://rpc.mainnet.seda.xyz/ 21M 100000000
humans https://rpc.humans.nodestake.top 21M 40000000
impacthub https://impacthub.ixo.world/rpc/ 21M 200000000
kichain https://rpc-mainnet.blockchain.ki 21M 75000000
bostrom https://rpc.bostrom.cybernode.ai 4M 25000000
nomic https://stakenet-rpc.nomic.io:2096 21M -1
bitsong https://rpc.explorebitsong.com 20M 200000000
saga https://saga-rpc.publicnode.com:443 21M -1
dhealth https://rpc.dhealth.com 10M -1
fetchhub https://rpc-fetchhub.fetch.ai:443 0M 3000000
tenet https://tendermint-1.rpc.tenet.org 21M 20000000
assetmantle https://rpc.assetmantle.one 0M 40000000
sentinel https://rpc-sentinel.busurnode.com 1M -1
osmosis https://rpc.osmosis.zone/ 5M 300000000
bitcanna https://rpc.bitcanna.io/ 1M -1
terpnetwork https://rpc-terp.zenchainlabs.io/ 4M 7100000
omniflixhub https://omniflix-rpc.kingnodes.com 1M -1
pylons https://rpc.nodejumper.io:443/pylons 21M -1
rizon https://rpc.rizon.chaintools.tech/ 21M -1
tgrade https://rpc.mainnet-1.tgrade.confio.run 21M 777000000
pundix https://px-json.pundix.com 1M -1
beezee https://rpc.getbze.com 3M 1000000000
xpla https://dimension-rpc.xpla.dev 1M 100000000
provenance https://rpc.provenance.io/ 5M 60000000
uptick https://uptick-rpc.brocha.in:443 21M 40000000
cifer http://34.128.114.243:26657 21M -1
dymension https://dym-m-rpc.agoranodes.com 5M 400000000
evmos https://rpc-evmos.ecostake.com 21M 40000000
self https://rpc.selfchain.io:26657 21M -1
mayachain https://tendermint.mayachain.info 21M -1
onomy https://rpc-mainnet.onomy.io 21M -1
planq https://rpc.planq.network 21M 40000000
coreum https://full-node-californium.mainnet-1.coreum.dev:26657 21M 50000000
lava https://lava-rpc.w3coins.io:443 21M -1
mun https://mainnet-mun-rpc.konsortech.xyz 21M -1
althea https://nodes.chandrastation.com/rpc/althea/ 21M 20000000
panacea https://rpc.gopanacea.org 4M -1
persistence https://rpc.core.persistence.one 5M 100000000
andromeda1 https://rpc.andromeda-1.andromeda.aviaone.com 21M -1
gravitybridge https://gravitychain.io:26657 95M 2000000000
canto https://canto-rpc.polkachu.com 21M 30000000
kujira https://rpc-kujira.whispernode.com:443 1M 100000000
crescent https://mainnet.crescent.network:26657 10M 100000000
commercionetwork https://rpc-mainnet.commercio.network 21M -1
sge https://sge-rpc.polkachu.com/ 5M -1
ununifi http://a.lcd.ununifi.cauchye.net:26657 21M -1
likecoin https://mainnet-node.like.co/rpc/ 21M -1
secretnetwork https://secretnetwork-rpc.highstakes.ch 1M 6000000
shido https://tendermint.shidoscan.com 8M 10000000
lumnetwork https://rpc.node0.mainnet.lum.network 21M -1
quicksilver https://rpc.quicksilver.zone:443 2M 150000000
dydx https://dydx-rpc.kingnodes.com:443 4M -1
bluzelle https://a.client.sentry.net.bluzelle.com:26657 21M -1
stratos https://rpc.thestratos.org 2M 20000000
doravota https://vota-rpc.dorafactory.org/ 21M -1
injective https://6d0ff611-9009-4bd1-a7a7-acec7c70d454.injective-1.mesa-rpc.newmetric.xyz 4M 50000000
stafihub https://public-rpc1.stafihub.io:443 21M 120000000
emoney https://emoney.validator.network 16M -1
oraichain https://rpc.orai.io 1M -1
onex https://rpc.mainnet.onex.onomy.io 21M -1
cheqd https://rpc.cheqd.net 0M 2000000
chimba https://rpc.mainnet.chimba.ooo 21M 10000000
shareledger https://rpc.explorer.shareri.ng 21M -1
titan https://titan-rpc.titanlab.io:443 21M 40000000
odin https://rpc.odinprotocol.io 5M 100000000
six https://sixnet-rpc.sixprotocol.net:443 21M -1
irisnet https://rpc-irisnet-01.stakeflow.io 2M 40000000
aura https://rpc.aura.network/ 2M -1
passage https://rpc.passage.vitwit.com 21M 100000000
cronos https://rpc.cronos.org/ 1M 60000000
fxcore https://fx-json.functionx.io 1M 30000000
juno https://rpc-juno.whispernode.com:443 21M 100000000
pryzm https://rpc.pryzm.zone 21M 100000000
mars https://rpc.marsprotocol.io:443 21M -1
desmos https://rpc.mainnet.desmos.network 21M 100000000
taketitan https://rcpttnc.taketitan.com 21M -1
teritori https://teritori-rpc.polkachu.com 5M -1
konstellation https://konstellation-rpc.stakerhouse.com 21M -1
rebus https://api.rebuschain.com:26657/ 21M 40000000
odin https://odin-mainnet-rpc.autostake.com:443 5M 100000000
terra2 https://terra2-rpc.lavenderfive.com:443 1M 100000000
jackal https://rpc.jackalprotocol.com 21M -1
regen https://rpc-regen.ecostake.com 4M 40000000
loop https://rpc.loop.pfc.zone/ 21M -1
conscious https://rpc.cvn.io/ 21M 10000000
empowerchain https://rpc-empowerchain.ecostake.com:443 21M -1
okexchain https://exchaintmrpc.okex.org 21M -1
gateway https://tncnt-eu-wormchain-main-01.rpc.p2p.world/ 21M -1
govgen https://rpc.govgen.io:443 2M 100000000
firmachain https://lcd-mainnet.firmachain.dev:26657 21M -1
shentu https://shenturpc.noopsbycertik.com/ 21M -1
kyve https://rpc-kyve.ecostake.com 21M 10000000000
nyx https://rpc.nymtech.net/ 21M -1
import os
import json
import requests
import logging
from datetime import datetime
# Set up logging
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler("script.log"),
logging.StreamHandler()
])
def get_consensus_params(rpc_url):
endpoint = f"{rpc_url}/consensus_params"
try:
logging.info(f"Requesting consensus params from {endpoint}")
response = requests.get(endpoint, timeout=10)
if response.status_code == 200:
data = response.json()
result = data.get('result', {})
consensus_params = result.get('consensus_params', {})
block = consensus_params.get('block', {})
max_bytes = block.get('max_bytes')
max_gas = block.get('max_gas')
logging.info(f"Successfully retrieved consensus params: max_bytes={max_bytes}, max_gas={max_gas}")
return max_bytes, max_gas
else:
logging.warning(f"Failed to get consensus params. Status code: {response.status_code}")
except requests.RequestException as e:
logging.error(f"Request failed for {endpoint}: {str(e)}")
return None, None
def format_bytes(bytes_value):
try:
mb_value = int(bytes_value) / (1024 * 1024)
return f"{mb_value:.0f}M"
except (ValueError, TypeError):
return bytes_value # Return original value if conversion fails
def main():
base_dir = '.' # Assuming the script is run from the top-level directory
results = []
logging.info("Starting to process chain directories")
for chain_dir in os.listdir(base_dir):
chain_path = os.path.join(base_dir, chain_dir)
if os.path.isdir(chain_path):
chain_json_path = os.path.join(chain_path, 'chain.json')
if os.path.exists(chain_json_path):
logging.info(f"Processing {chain_json_path}")
with open(chain_json_path, 'r') as f:
chain_data = json.load(f)
chain_name = chain_data.get('chain_name', 'Unknown')
rpc_endpoints = chain_data.get('apis', {}).get('rpc', [])
for rpc in rpc_endpoints:
rpc_url = rpc.get('address')
if rpc_url:
max_bytes, max_gas = get_consensus_params(rpc_url)
if max_bytes is not None and max_gas is not None:
results.append({
'chain_name': chain_name,
'rpc_url': rpc_url,
'max_bytes': format_bytes(max_bytes),
'max_gas': max_gas
})
logging.info(f"Added results for {chain_name}")
break # Stop after first successful request for this chain
else:
logging.warning(f"No valid RPC URL found for {chain_name}")
# Write results to blockparams.md
logging.info("Writing results to blockparams.md")
with open('blockparams.md', 'w') as f:
f.write("# Block Parameters for Cosmos Chains\n\n")
f.write(f"Generated on: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")
f.write("| Chain Name | RPC URL | Max Bytes | Max Gas |\n")
f.write("|------------|---------|-----------|--------|\n")
for result in results:
f.write(f"| {result['chain_name']} | {result['rpc_url']} | {result['max_bytes']} | {result['max_gas']} |\n")
logging.info("Script execution completed. Results written to blockparams.md")
if __name__ == "__main__":
logging.info("Script started")
main()
logging.info("Script finished")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment