Working Nodes - The Simplest Method
Alright, sometimes you just need a quick list of working Hive nodes, maybe for a script or just to check endpoints, and you don't want to write a full program in JS, Go, Rust, or whatever. If you're comfortable on the command line and have basic tools like curl and jq installed (most Linux/Mac systems do, Windows users might need WSL or equivalent), there's actually a really straightforward way to grab them.
We can leverage the awesome work done by @nectarflower (for main Hive nodes) and @flowerengine (for Hive-Engine nodes). As I've mentioned in previous posts about my libraries, they keep updated node lists right in their account's JSON metadata. So, we can just query the blockchain directly for that metadata!
Here’s a dead-simple bash script that does exactly that. It uses curl to call the database_api.find_accounts method for each account name via a public API node, and then pipes the JSON result through jq twice – first to extract the json_metadata field and parse it (fromjson), and then again to pull out the actual node list (.nodes[]).
#!/bin/bash
printf "nectarflower - Hive Nodes\n"
# Fetch nectarflower account data and parse metadata for nodes
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.find_accounts", "params": {"accounts":["nectarflower"]}, "id":1}' https://api.hive.blog |
jq '.result.accounts[0].json_metadata | fromjson' |
jq '.nodes[]'
printf "\nflowerengine - Hive-Engine Nodes\n"
# Fetch flowerengine account data and parse metadata for nodes
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.find_accounts", "params": {"accounts":["flowerengine"]}, "id":1}' https://api.hive.blog |
jq '.result.accounts[0].json_metadata | fromjson' |
jq '.nodes[]'
Run that script (make sure it's executable: chmod +x your_script_name.sh), and you get a nice, clean list of nodes spat out right on your terminal, like this:
Of course, if you're like me, simple isn't always the only way! You can definitely get more extravagant even sticking purely with bash scripting. I've been tinkering with my own, more advanced bash script for node checking – it's still a work-in-progress, and I'll probably share it when I feel like it's in a better place, but check out this much prettier (and informative) output it can generate:
What can I say? I have a unique sense of fun when it comes to building tools like this. Hope the simple script helps someone out there who just needs a quick node list!
As always,
Michael Garcia a.k.a. TheCrazyGM
Leave Working Nodes - The Simplest Method to:
Read more #dev posts
Best Posts From Michael Garcia
We have not curated any of thecrazygm's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Michael Garcia
- Fixing Data Integrity Issues in Hive-Engine Nodes
- The Final Chapter: dCity's 70,000 HIVE Claimdrop Has Been Distributed!
- Anther v0.1.0: A Modern Go SDK for Building on Hive
- Redesigning the Project Builder (GET FEATURED!)
- HiveTools Workbench: A Week of Polish, Pollen, and Splinterlands Wallets
- Pollen: A Safer, Cleaner Path Forward for Hive JavaScript Developers
- NectarPay Is Live, and Solana USDC Payments Are Working
- NectarPay Needs One Brave Hive Account Tester
- Lightning Strikes Twice: Upbit Triggers a 45-Million Hive Mega-Pump
- A Massive Makeover for the Mithril Diesel Pool (And Other HiveTools Updates)
- Nectar and NectarEngine v1.0.0 are Live on srbde
- HiveTools Post Curation Tool Now Filters By Language
- Finally Fixing the Little Docs Glitches in Hive-Nectar and NectarEngine
- The OGL/ORC Puzzle: Why We're Using a 25-Year-Old License on Purpose
- Hardening the Gopher Hole: A Security Audit of Go4Hive
- The Kimchi Premium Returns: Analyzing the 50% Hive Spike
- Go4Hive: Bringing the Gopher Spirit back to the Blockchain
- Modernizing MagnetBank: From legacy bloat to a lean, Neon-Powered Monorepo
- The Hive-Engine Failover Fix Is in Main
- Three-Tune-Tuesday: MetalCore Edition