First update of 2022 on BlockTrades work on Hive software

in HiveDevs2 years ago

blocktrades update.png

Below is a list of some of the Hive-related programming issues worked on by the BlockTrades team during the past month. Because of the amount of time that has passed since the last report and the amount of work that has been done, I’ll just cover a few highlights here.

Hive Application Framework: framework for building robust and scalable Hive apps

We put a lot of effort into creating new user documentation for HAF(e.g. documentation for HAF app developers). Despite all that work, I expect the docs will still need further improvement as we get feedback from users trying out HAF for the first time.

As a supplement to the written documentation, we’ve also created scripts to simplify setup of a HAF-server (either in a docker container or running “bare-metal” on a computer). Here’s a look at the options to the top-level “one-step” script for setting up a HAF server:

./scripts/setup_haf_instance.sh parameters: --help
Usage: ./scripts/setup_haf_instance.sh [OPTION[=VALUE]]...

One-step setup for a HAF server instance
OPTIONS:
  --host=VALUE           Optionally specify a PostgreSQL host location (defaults to /var/run/postgresql)
  --port=NUMBER          Optionally specify a PostgreSQL operating port (defaults to 5432)
  --hived-data-dir=PATH  Optionally specify a path where hived node will store its data. For faster setup, put a recent blockchain/block_log and block_log.index file in this directory before running this script.
  --hived-option=OPTION  Optionally specify a hived option to be passed to the automatically spawned hived process (this option can be repeated to pass multiple hived options).
  --option-file=FILE     Optionally specify a file containing other options specific to this script's arguments. This file cannot contain another --option-file option within it.
  --haf-database-store=DIRECTORY_PATH
                         Optionally specify a directory where Postgres SQL data specific to the HAF database will be stored.
  --branch=branch        Optionally specify a branch to checkout and build.
  --help                 Display this help screen and exit

We’ve continued to improve the build-and-test system for HAF and it now uses the aforementioned scripts to setup test scenarios for HAF. We also made more optimizations and fixed some minor bugs exposed during testing.

I’m planning to write an overview post for HAF developers early next week that should serve as a jumping off point for anyone interested in using HAF to design their app (in my opinion this should be anyone building a new Hive-based app).

Balance tracker (example HAF app)

We created an API and a web interface for the balance_tracker (an example HAF app) using the PostgREST web server as an experiment in creating a HAF app that only requires SQL and Javascript coding. For more details on this app, see my previous posts.

We finished optimizing this application, then created a 2nd version of this application that uses a Python-based web server to compare performance against the PostgREST web server. After fully optimizing the SQL queries that both web servers rely on, we found that the PostgREST server performs better than the Python-based web server (at first this fact was obscured by the slowness of the unoptimized SQL queries).

The results from these benchmarks between the two different server types suggest that we may want to make PostgREST the recommended server for HAF apps, so next we’re planning to experiment with replacing the Python-based web server used in the HAF account history app to see if we can improve its performance in a similar way.

HAF account history app (aka hafah)

We’ve continued to work on hafah, the account history app that will replace the need for API nodes to run a resource-intensive account history hived node. We setup a build-and-test system for hafah and we fixed some bugs exposed during our verification of the data produced compared to the data produced by an account history hived node. We also completed some benchmarks that show superior performance by hafah operating on a live-synced HAF database compared to a hived-based account history node.

One of the next things we plan to examine is the performance of a version of hafah that only operates on irreversible block data (this type of operation is useful for exchanges and other financial apps). We expect the performance of hafah working only on irreversible blocks will be faster than standard hafah, but we want to quantify the extent of the performance advantage.

Hived (blockchain node software) work

We made some major optimizations in the way that hived serializes API results to JSON and this has a decent impact in the performance of some of the API calls (including the account history api calls that are being compared against hafah’s performance).

We also continued to make improvements to the testing system. Hived can now report its “state” to testtools to allow for more testing scenarios. We added tests for comment options. We also created more tests for the account history plugin in order to help us verify the functionality of hafah.

We continued to do work on RC costs analysis, but this work is temporarily on hold now until we trace down why we’ve seen an increase in block time offsets under heavy traffic conditions, because our analysis so far indicates that this slowdown isn’t related to the time to process the transactions in the blockchain thread and it dominates and obscures the real costs of processing these operations..

I suspect that this problem is a result of a known issue with the use of boost-based locks that are incompatible with the multitasking model used by the peer-to-peer layer. These locks got introduced when the p2p code was first lifted out of BitShares and re-used in the Steem code, but they haven’t caused any real bottlenecking until chain activity increases to a very high level. We have a tentative solution for fixing this issue and we’ll start on it in a week or so once a dev frees up to work on it.

With respect to protocol changes (hardfork changes), we added the ability for an account to replace its signing keys twice per hour (previously it was limited to once per hour). This change was requested in order to allow for more secure key changing.

What’s next?

  • Make a few more improvements to one-step script for installing HAF
  • Finish write up of “Getting started with HAF” post
  • Add support for filtering of operations by sql_serializer to allow for smaller HAF server databases
  • Collect benchmarks for hafah operating in irreversible block mode
  • Finish conversion of hivemind to a HAF-based app
  • Fix locking/task incompatibility issue between blockchain and p2p threads and see if this fixes block time offset increase under heavy transaction loading.
  • Complete work on resource credit rationalization after block time offset issue is resolved

When hardfork 26?

We’ve only a few remaining tasks to complete for hardfork 26, and I’m somewhat optimistically hoping we can complete the remaining ones by the end of the month. In the meantime, we’ve setup a first testnet that can be used to test @howo’s RC delegations (and incidentally test many of the other changes we’ve made so far). Once we’ve completed all the changes for this hardfork, we’ll launch a final testnet for a month, with a planned hardfork time at the end of that month, assuming no problems are discovered. Realistically, this means the earliest possible hardfork date would be the end of March, but it wouldn’t surprise if that time pushes into April.

Sort:  
Loading...

I don't think there's a desperate need to rush the hardfork. Best to do some extra checks anyway. We've enjoyed good stability with Hive and don't want to spoil that.

Yes, I definitely have no plans to rush it. Especially since the major new feature of late, HAF, doesn't rely on the hardfork.

is there anything difficult stopping you from addin those Hive-Engine tokens to Blocktrades? And also @telosnetwork (They could even make proposal to 1. pay you and 2. have telos and TLOS to sell for hive as a liquidity pool for you (and hive engien with swap.TLOS or main net TLOS would be nice on blocktrades, works just like eos but old eos lol ) also wax ... so new users dont have to even use hive engine at first... maybe later for possible better deal but id love to see all the hive engine tokens on blocktrades or just at least LEO and LVL and popular ones :) maybe they can pay you HIVE to get listed :) hahah

thanks again for makin hive lol

Complete work on resource credit rationalization after block time offset issue is resolved

Does this mean that it will be friendlier to the new Hive blockchain users? Nowadays new Hive blockchain users often have to ask for RC (Resource Credits) delegation to be able to do the basic interactions (posting and commenting) on the Hive blockchain, because they often run out of RC (Resource Credits).

I don't really know yet what the impact will be of RC rationalization on user experience until we've completed the work and can do some analysis on how it affects RC consumption by individual accounts.

Maybe we could improve on Hive Power free delegation services (like #GiftGiver at https://giftgiver.site/) while we wait for blockchain updates that would help new users post and comment normally without worrying about running out of Resource Credits.

Anyway, I noticed that you put RC (Resource Credits) twice on your comment. I recommend putting only one RC (Resource Credits) on your comment (in the beginning) and just type RC for the rest of your comment.

I give you some !ALIVE and some !LUV.

@xplosive! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @savvyplayer. (1/10)

The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want.

RC delegation may help, if apps that are onboarding users are more willing to delegate RC since it doesn't require delegating the HP with it.

What's the main highlight of HF26 ??

Hard to say right now. From my point of view, the Hive Application Framework for creating new apps is the most important code change we're making, but it is not really a hardfork feature since it doesn't require a change to the Hive protocol and Hive devs can start using it now.

I'll probably be writing up a separate post in another week or two with a list of all the hardfork-specific changes.

how is that secret feature of yours coming along? ;)

I hope to start on it in a week, it's the last feature planned for the HF.

Hi @blocktrades ! Where can I find more information about HAF. I would like to begin working with this framework and explore new ideas with it.

I'll be making a post in day or two with info on how to get started with HAF.

Ok. Thanks you very much @bloctrades. I will keep an eye on that post.

Should be ready in hafahnower.

halfanaxa

you know I have like 2010 facebook messenger conversations with Eisenhower's Great Grand daughter Laura M Eisenhower and she agreed to go get coffee with me but we were all too busy with ufo conferences

huh? That's just some wordplay. That line is heard commonly in Canada and a lot people say hafahnower instead of 'half an hour'. Man I hate having to explain dumb jokes... lol

hah so i say halfaxa

tell os about the future of canAdiaz and blocktrades.... canada seems to have hive witnesses in here haha rational canadian self interest

huh?

I'm just a Canadian who read a post, eh. Like to know what's going on, eh.

I will not comment much on the plans for this follow-up project. Possible! we better wait for the decision that will be executed.... thanks for this information sir.

With blocktrade hive too keeps on getting better too

Good to see how the application keeps getting better day by day

thanks for all of the dedication to Hive <3

Great Job! 3.jpg

Congratulations @blocktrades! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 1530000 HP as payout for your posts and comments.
Your next payout target is 1535000 HP.
The unit is Hive Power equivalent because your rewards can be split into HP and HBD

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

To support your work, I also upvoted your post!

Check out the last post from @hivebuzz:

Hive Power Up Month challenge - Feedback from February day 3
Our Hive Power delegations to the last Power Up Month challenge Winners
Feedback from the February 1st Hive Power Up Day
Support the HiveBuzz project. Vote for our proposal!


~~~ embed:1490013256316035076 twitter metadata:SGl2ZWJ1bGx8fGh0dHBzOi8vdHdpdHRlci5jb20vSGl2ZWJ1bGwvc3RhdHVzLzE0OTAwMTMyNTYzMTYwMzUwNzZ8 ~~~
The rewards earned on this comment will go directly to the person sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

Congratulations @blocktrades! Your post has been a top performer on the Hive blockchain and you have been rewarded with the following badge:

Post with the highest payout of the day.

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 the last post from @hivebuzz:

Hive Power Up Month challenge - Feedback from February day 3
Our Hive Power delegations to the last Power Up Month challenge Winners
Feedback from the February 1st Hive Power Up Day
Support the HiveBuzz project. Vote for our proposal!

Its great to see the continous development and updates. And making Hive more feasible for the developers.

Also, I feel making it lucrative to more devs will automatically lead to better exposure and adoption. All the best for the good work and thankyou for the commitment towards making this chain better 👏 🤘👍

optimistically hoping

can you hope pessimistically ? that would be impressive :P
also you should write "wen hardfork" that's the mandatory spelling :)))

I guess you might be able to hope pessimistically if you're into schadenfreude. But here I'm just trying to quantify a probability difference between "realistically hoping" and "optimistically hoping".

I am looking forward to the RC delegation since it will benefit a lot of new users, making the whole onbaording process less tedious.

Off topic, I have heard about a light account in the past, I do not know what it entails but would devs look into creating lite.accounts that can access (post, comment, etc) hive without having the full benefit of a hive account(staking, voting, etc)? For instance, WordPress has a feature where none bloggers can leave comments without having to signup on the platform (with their Gmail). Is this something we can do on hive? I think it would be great for creators to get feedback from outside the hive ecosystem.

Yes, light accounts are possible on Hive, and I think there's a good chance we'll be looking into creating some tools to support that model this year.

I think there's a good chance we'll be looking into creating some tools to support that model this year.

Thanks for the information. cheers!

It's always nice to learn more about how Hive software is evolving even though I don't grasp all the technical details. Keep up the great work guys

Great work as always, you are superb sir.

Very good work.

I think that some ideas might not really fit in the now. For instance I think the hardfork26 is not really necessary at the moment. According to this post, it is stated that the hardfork26 might be happening by ending of the month, but I think we are not yet ready for another hardfork since someone like me have not already recovered from the previous.

Thank you for having me and congratulations on your many achievements on the HIVE blockchain and I see better and more innovations coming in through you.

Just a clarification: there's no plan to HF at the end of this month. I'm hoping we can HF at the end of next month, but I'm not sure we can even make that timeframe.

@blocktrades , can you please check on a transfer that I have made to my account on Poloniex?

Is raising the debt limit still in plan for the HF?

Yes, the code for that has already been merged into the develop branch.

P.S. Any thoughts on reducing the conversion time from 3.5 days, to 2 or maybe 1 day? This will lower the risk from the Hive price changes and create a better peg for HBD.

I don't think it is really necessary to reduce the hbd->hive conversion time to improve the peg tracking against USD.

Despite the opinions of some other observers, I personally think the peg works very well as-is, now that we have hive->hbd conversions to peg the upside. With the one potential exception of the haircut case (a risk that will be lowered with the next HF, of course), I believe HBD to be as stable against USD as fiat currencies that trade against the dollar. And in many ways, even the haircut risk can be likened to the risk of holding any fiat currency when the economy of the country backing that currency is experiencing problems.

So I believe HBD has sufficient pricing stability now to act as a currency for buying/selling goods and that's all we should want. I don't believe there is any strong benefit to a slavish tracking of USD value, just a need for reasonable price stability against real goods.

Overall I agree with the notion that HBD being as stable against USD as fiat currencies that trade against the dollar and it is sufficiently stable.

Still I cant see strong arguments against shortening the conversion time.
One I can think of would be biggest risk for price manipulation, but a day or two still guaranties price stability. On the positive side, users will be more likely to engage in conversions for a smaller differences in the price if the period is smaller.

My main concern about shortening the conversion time further isn't exactly about the risk of price manipulation. I am most concerned that it modifies normal market-based pricing mechanisms for Hive. For example, in a normal market, if you buy enough of a fixed quantity good, you can expect the price to go up.

In the case of HBD, it provides another mechanism for acquiring Hive: instead of buying Hive, you can acquire a lot of HBD, wait for a short term market drop, then convert it to Hive during the time Hive is at a low price. This doesn't apply the same amount of positive pricing pressure that acquiring Hive on the market at that price would likely apply. Instead, this mechanism dilutes the supply of Hive itself. There's nothing outright wrong about this different method of acquiring Hive or the potential inflation mechanism it creates, but it does change the pricing and supply dynamics somewhat, and I don't think we should push it too far.

Great keep pushing

Great going and keep it up❤️.

Very excited about HAF and the new account history App!
Keep up the good work!

Congratulations @blocktrades! Your post has been a top performer on the Hive blockchain and you have been rewarded with the following badge:

Post with the highest payout of the week.

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 the last post from @hivebuzz:

Hive Power Up Month - Feedback from February day 5
Hive Power Up Month challenge - Feedback from February day 3
Our Hive Power delegations to the last Power Up Month challenge Winners
Support the HiveBuzz project. Vote for our proposal!

thanks for the update :) Even though I don't understand everything it is interesting and i am glad you share it:)

This is great, nice work 👍 @blocktrades .

Mudah mudahan di tahun 2022 ini menjadi tahun yang cerdas buat kita semua... terima kasih