ecotheexploiter cross-posted this post in HiveDevs 2 months ago


Use nectar without using hive-nectar?

in #nectar2 months ago (edited)

Let me explain...

Been trying to get the attention of people for our proposal and just to show people how important this stuff is to me, I step out of my comfort zone and try to show how it could be important for people that don't even use python or hive-nectar.

nectarflower profile

metrics and pretty outputThe account_json_metadata of @nectarflower, which when done will be updated hourly, contains a the list of working nodes and benchmarks against them. I'm running it daily as I'm still working out bugs and make it nice. Along with the that @nectarflower will put out daily.

Seems like something pretty useful? No?

So, I broke out of my comfort zone and wrote a little function in javascript to use dhive to query the data and create a new instance with the updated nodelist. So, now my dhive apps and scripts will use the most up to date nodelist based on benchmark scores. Pretty sweet I think.

// Example usage
updateNodesFromAccount('nectarflower')
  .then(updatedClient => {
    console.log('Node update complete');
    // Use the updated client for further operations
    return updatedClient.database.getDynamicGlobalProperties();
  })
  .then(result => {
    console.log('Test query with updated client successful:', result.head_block_number);
  })
  .catch(error => {
    console.error('Error:', error);
  });

hive-nectar work as it's supposed to, that is a very integral part of it. So, I've been reverse engineering the benchmarks and output to match as close as possible, with some bonus data.I don't know about you, but I hate when my scripts and cron jobs and such die because your favorite node is down. I find it frustrating, and the @fullnodeupdate account hasn't been updated since '22, which is what beem uses. Well, in order to make

The full source of the updateNodesFromAccount{'nectarflower') example can be found it's own github repo here: https://github.com/TheCrazyGM/nectarflower-js

So, even if you don't believe that beem hive-nectar needs to exist, I feel it's pretty important stuff that we are doing for the community as a whole.

Maybe this will help someone, maybe it won't. But it is the kind of stuff I do daily just because I enjoy doing it. Perhaps you will support our vision:
Proposal 339: A modular open-source development framework with critical library maintenance.

As always,
Michael Garcia a.k.a. TheCrazyGM

Sort:  

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

You got more than 100 replies.
Your next target is to reach 200 replies.

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

Check out our last posts:

Feedback from the April Hive Power Up Day
Hive Power Up Month Challenge - March 2025 Winners List
Be ready for the April edition of the Hive Power Up Month!