create account

Hive-Nectar v0.0.9: A More Robust Node Handler by thecrazygm

View this thread on: hive.blogpeakd.comecency.com
· @thecrazygm · (edited)
$57.88
Hive-Nectar v0.0.9: A More Robust Node Handler
Hey everyone,

EDIT: Version is now **0.0.10**. Emergency hotfix for broken permlinks.

Today, I'm happy to announce a new release for **`hive-nectar`**, which is now at version **0.0.9**. This update focuses on improving the reliability and intelligence of how the library handles Hive nodes. Plus, I took the opportunity to clean up a lot of minor linting errors that were annoying me. A clean codebase is a happy codebase!

![v0.0.9 Dist Created](https://files.peakd.com/file/peakd-hive/thecrazygm/Eo43sg8uWm9PC7XpYDRnGwiHq3UnQZnVHf8epibWyGLPSuCRavce9LE4DXsGEGWnYyp.png)

The core of this update is a significant refactor of the `update_nodes` function within the `NodeList` class. This is the part of the library responsible for finding and maintaining a list of healthy, fast nodes to connect to.

---

#### What's New in Node Handling?

Previously, the logic for updating the node list was a bit scattered. Now, it's much smarter and more authoritative.

- **A Single Source of Truth:** The `update_nodes` function now gets its authoritative list of nodes and performance data directly from the `json_metadata` of the `@nectarflower` account. This ensures it's always working with the most current and accurate report.
- **Smarter Scoring:** Instead of calculating scores locally, the function now directly uses the `weighted_score` provided in the report for ranking nodes. Any nodes not in the report have their scores zeroed out, so they don't interfere with the official ranking.
- **Dynamic Node Discovery:** The library now dynamically adds new nodes it finds in the report, even if they weren't in the original hard-coded list. This includes nodes that are known to be failing, which are correctly added with a score of -1 to avoid being used. This ensures the node list is always complete and up-to-date.
- **Cleaner Code:** A lot of unused fallback paths and redundant code were removed to make the logic leaner and easier to maintain.

These changes mean that any application using `hive-nectar` will be much more resilient and intelligent when connecting to the Hive blockchain. It will automatically favor the best-performing nodes and avoid ones that are down or struggling, leading to a faster and more reliable experience for the end-user.

This is an important step forward for the library, and I'm excited to get these improvements out there.

EDIT: <https://github.com/TheCrazyGM/hive-nectar>

As always,
Michael Garcia a.k.a. TheCrazyGM
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 252 others
properties (23)
authorthecrazygm
permlinkhive-nectar-v009-a-more-robust-node-handler
categoryhive-186392
json_metadata{"app":"peakd/2025.7.1","format":"markdown","image":["https://files.peakd.com/file/peakd-hive/thecrazygm/Eo43sg8uWm9PC7XpYDRnGwiHq3UnQZnVHf8epibWyGLPSuCRavce9LE4DXsGEGWnYyp.png"],"tags":["dev","nectar","python","tribes","archon","pimp","proofofbrain"],"users":["nectarflower"]}
created2025-07-12 08:48:09
last_update2025-07-13 03:17:09
depth0
children7
last_payout1969-12-31 23:59:59
cashout_time2025-07-19 08:48:09
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value57.879 HBD
promoted0.000 HBD
body_length2,462
author_reputation92,057,429,844,099
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries
0.
accountthecrazygm.bank
weight1,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id143,994,213
net_rshares176,377,296,531,322
author_curate_reward""
vote details (316)
@ecoinstant ·
$0.00
If you ask me - this IS worth money!

!PAKX
!PIMP
!PIZZA
👍  
properties (23)
authorecoinstant
permlinkre-thecrazygm-szajf6
categoryhive-186392
json_metadata{"tags":["hive-186392"],"app":"peakd/2025.7.1","image":[],"users":[]}
created2025-07-12 14:40:24
last_update2025-07-12 14:40:24
depth1
children1
last_payout1969-12-31 23:59:59
cashout_time2025-07-19 14:40:24
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.002 HBD
promoted0.000 HBD
body_length56
author_reputation848,503,578,331,948
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id144,000,223
net_rshares8,286,651,922
author_curate_reward""
vote details (1)
@pakx ·
<center><table><tr></tr><tr><td><center><img src='https://files.peakd.com/file/peakd-hive/pakx/PakX-logo-transparent.png'><p><sup><a href='https://hive-engine.com/?p=market&t=PAKX'>View or trade </a> <code>PAKX</code> tokens.</sup></p></center></td><td><center>@ecoinstant, PAKX has voted the post by @thecrazygm. (1/2 calls)</p><br><br><p>Use !PAKX command if you hold enough balance to call for a @pakx vote on worthy posts! More details available on <a href='/@pakx'>PAKX Blog</a>.</p></center></td></tr></table></center>
properties (22)
authorpakx
permlinkre-ecoinstant-1752331269
categoryhive-186392
json_metadata"{"tags": ["pakx", "hivepakistan"], "app": "HiveDiscoMod"}"
created2025-07-12 14:41:09
last_update2025-07-12 14:41:09
depth2
children0
last_payout1969-12-31 23:59:59
cashout_time2025-07-19 14:41:09
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length524
author_reputation56,076,292,068
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id144,000,234
net_rshares0
@kenny-crane ·
$0.28
I'm sure many devs will find this to be a valuable library. Thank for this!

The github is at https://github.com/TheCrazyGM/hive-nectar for those who want to use it.

👍  , , , , , , , , , , , , , ,
properties (23)
authorkenny-crane
permlinkre-thecrazygm-szb5e5
categoryhive-186392
json_metadata{"tags":["hive-186392"],"app":"peakd/2025.7.1","image":[],"users":[]}
created2025-07-12 22:34:54
last_update2025-07-12 22:34:54
depth1
children2
last_payout1969-12-31 23:59:59
cashout_time2025-07-19 22:34:54
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.277 HBD
promoted0.000 HBD
body_length167
author_reputation234,762,386,624,944
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id144,011,222
net_rshares829,308,663,153
author_curate_reward""
vote details (15)
@thecrazygm ·
$0.05
Dude, i really need to start linking things. This is the 3rd time just *this week* that I have forgotten...
👍  
properties (23)
authorthecrazygm
permlinkre-kenny-crane-szbifb
categoryhive-186392
json_metadata{"tags":["hive-186392"],"app":"peakd/2025.7.1","image":[],"users":[]}
created2025-07-13 03:16:24
last_update2025-07-13 03:16:24
depth2
children1
last_payout1969-12-31 23:59:59
cashout_time2025-07-20 03:16:24
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.045 HBD
promoted0.000 HBD
body_length107
author_reputation92,057,429,844,099
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id144,015,953
net_rshares135,276,251,007
author_curate_reward""
vote details (1)
@kenny-crane ·
Ha, no worries, I gotchu!  Your brain has been hard at work all week and little things fall through the cracks.  I know they do for me!

Have a nice day! :)
properties (22)
authorkenny-crane
permlinkre-thecrazygm-szbkj5
categoryhive-186392
json_metadata{"tags":["hive-186392"],"app":"peakd/2025.7.1","image":[],"users":[]}
created2025-07-13 04:01:57
last_update2025-07-13 04:01:57
depth3
children0
last_payout1969-12-31 23:59:59
cashout_time2025-07-20 04:01:57
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length156
author_reputation234,762,386,624,944
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id144,016,436
net_rshares0
@pizzabot ·
<center>PIZZA!


$PIZZA slices delivered:
@ecoinstant<sub>(1/20)</sub> tipped @thecrazygm 


<sub>Come get [MOON](https://moon.hive.pizza)ed!</sub></center>
properties (22)
authorpizzabot
permlinkre-hive-nectar-v009-a-more-robust-node-handler-20250712t144047z
categoryhive-186392
json_metadata"{"app": "pizzabot"}"
created2025-07-12 14:40:48
last_update2025-07-12 14:40:48
depth1
children0
last_payout1969-12-31 23:59:59
cashout_time2025-07-19 14:40:48
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length156
author_reputation7,561,320,422,270
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id144,000,227
net_rshares0
@tydynrain ·
Congratulations, my friend, excellent contribution. I really appreciate how you're always tweaking, adjusting, and refining the code as you, and others, use it. 😁 🙏 💚 ✨ 🤙 
properties (22)
authortydynrain
permlinkre-thecrazygm-2025712t184415405z
categoryhive-186392
json_metadata{"links":[],"type":"comment","tags":["hive-186392","dev","nectar","python","tribes","archon","pimp","proofofbrain"],"app":"ecency/3.3.3-mobile","format":"markdown+html"}
created2025-07-13 04:44:15
last_update2025-07-13 04:44:15
depth1
children0
last_payout1969-12-31 23:59:59
cashout_time2025-07-20 04:44:15
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length171
author_reputation202,588,628,623,974
root_title"Hive-Nectar v0.0.9: A More Robust Node Handler"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id144,016,919
net_rshares0