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

(edited)

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

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

0.20908229 BEE
6 comments

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.

0.00587059 BEE

Dude, i really need to start linking things. This is the 3rd time just this week that I have forgotten...

0.00038200 BEE

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! :)

0.00065562 BEE

Congratulations, my friend, excellent contribution. I really appreciate how you're always tweaking, adjusting, and refining the code as you, and others, use it. 😁 🙏 💚 ✨ 🤙

0.00066226 BEE

If you ask me - this IS worth money!

!PAKX
!PIMP
!PIZZA

0.00063320 BEE

View or trade PAKX tokens.

@ecoinstant, PAKX has voted the post by @thecrazygm. (1/2 calls)



Use !PAKX command if you hold enough balance to call for a @pakx vote on worthy posts! More details available on PAKX Blog.

0.00053417 BEE

PIZZA!

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

Come get MOONed!

0.00061982 BEE

Hello thecrazygm!

It's nice to let you know that your article won 🥇 place.
Your post is among the best articles voted 7 days ago by the @hive-lu | King Lucoin Curator by keithtaylor

You and your curator receive 0.0000 Lu (Lucoin) investment token and a 14.00% share of the reward from Daily Report 723. Additionally, you can also receive a unique LUGOLD token for taking 1st place. All you need to do is reblog this report of the day with your winnings.

2.png


Invest in the Lu token (Lucoin) and get paid. With 50 Lu in your wallet, you also become the curator of the @hive-lu which follows your upvote.
Buy Lu on the Hive-Engine exchange | World of Lu created by @szejq

If you no longer want to receive notifications, reply to this comment with the word STOP or to resume write a word START

0.00056346 BEE

Congratulations @thecrazygm! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You distributed more than 32000 upvotes.
Your next target is to reach 33000 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

0.00054809 BEE