nucypher / nucypher-monitor

NuCypher network intelligence crawler and web dashboard
7 stars 15 forks source link

Threshold update #108

Closed derekpierre closed 2 years ago

derekpierre commented 2 years ago

Basically, we no longer need to run the Crawler process, only the Dashboard and the information is loaded once - nothing to "update" at the moment i.e. simply nucypher-monitor dashboard --network mainnet --provider <provider uri>.

I removed all Dashboard use of Economics due to getReserveReward() no longer being available from StakingEscrow, and information is instead obtained from contracts.

Early sneak preview of the simplified UI:

Screen Shot 2022-01-05 at 10 59 57 AM Screen Shot 2022-01-05 at 11 00 17 AM

Still TODO (reason for WIP):

The work done so far is the bare minimum to get something working in the meantime. Outstanding questions remain:

  1. Still have some code to remove, but do we remove all unnecessary code (eg. all of crawler.py etc.) - that would be quite the prune, or is this PR simple enough for now? Do we expect to use this dashboard with a return to increased functionality in the future?
  2. Even though we may no longer use the status dashboard in the long run (but rather the Threshold UI when it ships), presumably we want to keep the /supply_information endpoint available until exchanges move away from NU?
  3. The /supply_information endpoint only shows information as it was at the time of NU inflation halt - think vesting calculations - does this make sense? Do we care about decreasing est_circulating_supply based on NU that was wrapped to T? If so, we'll also need to track unwraps back to NU as well. Doesn't need to be addressed right this instant, but something to think about.
  4. Any additional information we want to show?
  5. Should I even bother supporting the updated ibex registry? Lynx does not have the halt change but ibex does. Do we care about non-mainnet networks - feels like a "no"? If "yes", differentiating in the same codebase would be tricky - when to use crawler vs not, when to show a UI element vs not.
mswilkison commented 2 years ago

Thanks @derekpierre

presumably we want to keep the /supply_information endpoint available until exchanges move away from NU?

Yeah, I think there's no reason to get rid of it for the time being. I'm not sure many people are using it though... maybe just Coingecko and CMC? (And I'm not even sure about them).

The /supply_information endpoint only shows information as it was at the time of NU inflation halt should we change max supply to equal total current supply? since the 3.8B is no longer relevant

Do we care about decreasing est_circulating_supply based on NU that was wrapped to T?

I wouldn't worry about it for now... too much complexity. If needed we can revisit in the future.

Do we care about non-mainnet networks

from my perspective, no. but maybe there's some testing or dev argument otherwise?

codecov-commenter commented 2 years ago

Codecov Report

Merging #108 (75b6e85) into main (8e45513) will increase coverage by 0.73%. The diff coverage is 45.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   50.90%   51.63%   +0.73%     
==========================================
  Files          11       11              
  Lines         888      796      -92     
==========================================
- Hits          452      411      -41     
+ Misses        436      385      -51     
Impacted Files Coverage Δ
monitor/dashboard.py 23.88% <15.38%> (+4.19%) :arrow_up:
monitor/cli/_utils.py 35.71% <41.66%> (-1.13%) :arrow_down:
monitor/cli/main.py 63.04% <100.00%> (+8.61%) :arrow_up:
monitor/layout.py 93.75% <100.00%> (-0.37%) :arrow_down:
monitor/settings.py 100.00% <100.00%> (ø)
monitor/supply.py 98.90% <100.00%> (-0.09%) :arrow_down:
monitor/charts.py 0.00% <0.00%> (-17.11%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8e45513...75b6e85. Read the comment docs.

derekpierre commented 2 years ago

Made changes after chatting with @vzotova to ensure that the status monitor will remain compatible with upcoming follow-up StakingEscrow upgrade. Also added tile to indicate outstanding ETH in WorkLock.

Screen Shot 2022-01-10 at 3 07 24 PM
derekpierre commented 2 years ago

If there are no outstanding comments - I'll merge later tonight, and update the status monitor.