PR to add Reward info to Insight Explorer#2
Conversation
|
screenshots look great - will review and test patch tomorrow, thank you @gaeacodes ! |
|
I'm reindexing for addresindex etc, should be able to test tonight. |
From DeckerSU as a comment to the PR for bitcore-node-komodo. I have also hosted an updated instance of the explorer at http://34.122.103.103:7774 |
|
I'm still reindexing - slower than a wet sheep going uphill. |
thanks!
"KMD Available to Claim" is for individual addresses.All the utxos of a single address are already combined for that element, so the value displayed and reward available to claim are for all the utxos belonging to the single address.
If a utxo is spent we are setting reward to be claimed as 0.
It should be possible.will try! |
I don't believe so, but it was potentially a little confusing seeing same address in some cases having a 0 value, but in others having a non 0 value. Perhaps we should mark the relevant ones as "Rewards: N/A, utxo spent"? Is there a threshold value for rewards display? I've been comparing rewards value to what is shown in AtomicDEX desktop and noticed a slight difference - have been waiting for some to accrue again to confirm. Example below. |
Will look into it
Will check this too. but, did you refreshed the explorer page just before comparing with atomicdex? |
|
My 5 cents: to don't get users confused with Before: After: It's already done on https://explorer.kmd.sh/ instance, so you can see "live-demo". |
|
yep, fresh reload. Noticed a difference in values last night with another address
After claiming
Might be due to calculation hours being offset by server/client timezone? FWIW my server is set to UTC time, PC is at GMT+8 |
Do you remember the address and transaction id by any chance? |
corrects rewards display
|
@smk762 I wasn't updating the tipTime after the initial start of the explorer.So, most of the calculations were wrong. |
|
@smk762 added rewards available to the address summary in address view,limited the reward value to 4 decimals.Please do a fresh install and test when you have time. |
|
http://34.122.103.103:7775/tx/3d5643c80ac4dcc8cb4900508e27abde001affc219cfd12930168a2155a4e2e0 cc: @smk762 |
|
Good pickup. Currently it appears to be an exhorbitant fee, perhaps a better display would be to recalculate the fee (as minus the rewards value), and tag the rewards as "Lost rewards", hyperlinked to info on why they didnt get the rewards like https://support.komodoplatform.com/support/solutions/articles/29000024428-komodo-5-active-user-reward-all-you-need-to-know Rewards value looks ok compared to atomicdex for address RUwodWWAabv3h2jSatVDSMT89cLkTMSutA I was getting a crash for address RCyANUW2H5985zk8p6NHJfPyNBXnTVzGDh though. in ~/.komodo/debug.log In stdout for explorer Might be a setting or something I need to tweak, strangely not an issue for most other addresses I checked. |
will do this
yes, I was getting similar crashes because of sending too many RPC requests. so, changed async.parallel to async.series. now, such crashes are not happening. but, it still takes too long to display the data. maybe because my server has low thread count/RAM. here it is: http://34.122.103.103:7775/address/RCyANUW2H5985zk8p6NHJfPyNBXnTVzGDh I am already returning "not able to estimate rewards" if the address has too many transactions. Example: http://34.122.103.103:7775/address/RD47yEoA4VGriqjeiLdMVKnuE7x7xqFy9r if you make a fresh installation of the explorer, the crash should go away |
Add link to explain lost rewards
|
@smk762 Displays potential lost rewards when rewards are not claimed and also added the link. |
|
No more crash on Looking good mate! I'm about ready to approve this, will give it a day or two for other reviewers to put another set of eyes over it and poke around a bit in case I missed something. |
|
@smk762 Any updates? |
There was a problem hiding this comment.
Working on my side, and all requested tweaks applied. Thanks @gaeacodes
|
excellent, reach out on discord ref. bounty - thank you @gaeacodes @smk762 @gcharang |
|
@smk762 @ca333 @DeckerSU @gcharang Thanks for testing,merging the PR and all the help. |
|
@gaeacodes plz reopen PR on https://github.com/KomodoPlatform/insight-ui-komodo/tree/kmd-rewards - yes Decker gave me some good feedback. A few layers should be enhanced - i.e. differentiation between ACs and KMD - spam-protection/prevention ref. rpc interface requests, et cetera. |
|
it will be nice to visualise the reward as a separate input @gaeacodes example: screenshot from Decker solution proposal Also - are you able to modify the rpc interface on the komodo side? What we need is adding additional information to the special thanks to @DeckerSU for solution-design review |
will do. Will update this view in new PR.
With the currently available RPC from komodod, the way I have implemented is the only way to have rewards claim data displayed. But, I agree implementing the reward amount as an output for getrawtransaction RPC will decrease the number of requests and computation being done in the bitcore-node layer.
I have some experience with the C programming language and almost none with C++ . But, I will take a look and let you know if I am able to do it. cc: @ca333 |



This PR just contains the changes needed for the UI.
I have submitted other PR's to @DeckerSU's bitcore-node-komodo(DeckerSU/bitcore-node-komodo#2), insight-api-komodo(DeckerSU/insight-api-komodo#1)
When merged, all of these together will allow reward data to be displayed on the insight explorer.
To test my changes, scripts in the repo https://github.com/gaeacodes/komodo-install-explorer can be used
Make sure
komododis not running and execute the following commands:Then, start
komododwith all the indexes like tx,timestamp,spent and address enabled and visit http://localhost:7774 to view the explorer.Thanks to @gcharang for all the suggestions and help.
The Insight API gets a few addtions to the
txendpoint. To view them, visithttp://localhost:7774/insight-api-komodo/tx/<txid>Here are a few screenshots that show the addtions done to UI.