grzracz / OrangeApp

Orange App for mining Orange
8 stars 5 forks source link

Live charting of active juicers' effort #1

Closed SilentRhetoric closed 9 months ago

SilentRhetoric commented 9 months ago

Added a live bar chart of juicer efforts in each cycle using @observablehq/plot to generate a chart from juicer data.

When the lastBlock changes, we get the block contents and parse the transactions. App calls to the oranges app are identified to get local state deltas and attribute them to accounts. A key assumption is that a local state delta of 0 : {effort: 600} means that account at index 0 (or 1 or 2) of the accounts array now has 600 effort recorded.

The active juicers are stored in state and the graph is rendered in a useEffect and attached to a div. The graph is highly configurable, but the Plot library is finicky. Please let me know if you have questions.

Happy juicing!

SilentRhetoric