-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
Codecov Report
@@ Coverage Diff @@
## master #677 +/- ##
==========================================
+ Coverage 68.69% 68.93% +0.24%
==========================================
Files 94 95 +1
Lines 12409 12665 +256
==========================================
+ Hits 8524 8731 +207
- Misses 3885 3934 +49
Continue to review full report at Codecov.
|
7542e58
to
5049ba0
Compare
I think we should merge the h3dex branch into this and then rewrite this code to use that rather than the active_gateways thing. |
baafda2
to
db4d126
Compare
- Calculate hex densities - Add test for calculated hex densities on ledger pinned at 587624 - Add scale_test and specs - Add scale function for density - Add scale_test - Remove unnecessary hip17 chain vars - Plug HIP17 calculations to reward txn - Introduce yet another chain var for density_target_res - Add scale for rx and tx rewards
- Don't use active_gateways, use a fold - Use tested h3 keying scheme - Fix some other minor issues - Fix scale test - Switch to using h3dex for density map - More efficent initialization of densities - Remove nested loops - Fix eunits to use updated reward fun - Fix one more broken eunit and specs - Fix seek tuple and allow +1 upper bound - Add a simple known h3dex test - Review comment: Verbose spec for densities - Fix broken hip17 var validation
- Case ladder for hip17 vars - Bootstrap hexes for tests - Fix init_per_testcase for comparison test - Enhance tests, fix some more reward txn bugs - Add export scale test - Add basic real-world perf test for rewards - Dont build the full density map - Add a temporary full cross verification test - Fix scaling - Refactor hex API, make dialyzer happy - Adhere to update hex API in tests
- Start at k-ring of 2 - Fix exporting scale test data - Cleanup now unneeded debugging - Update limit function - Define lower resolution bound for rewards - Use chain var for lower bound res - Update scale_test to actually do cross checking - Update hip17 reward suite to run again
- Fix hex test suite - Fix interactive filtering
- Fix log msg - Add another crosscheck
%% Calculate clipped and unclipped densities | ||
densities(H3Index, VarMap, Interactive, Ledger). | ||
|
||
-spec densities( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how hard would it be to make it so there's a precalc densities vs. on demand runtime switch so we could bench them against each other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern was the total memory needed for a global map. Even this local map building, I think, can throw away more than it does right now by discarding higher resolution hexes once we've calculated the lower resolution densities.
case blockchain_hex:var_map(Ledger) of | ||
{error, _} -> | ||
%% do the old thing | ||
get_rewards_for_epoch(Current+1, End, Chain, Vars, Ledger, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just one of these with
VarMap = case blockchain_hex:var_map(Ledger) of {ok, VM} -> VM; _ -> #{} end,
above it? Are we actually doing anything different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planning to go through this today and see what we can do to make this suck less.
HIP17 reward testing rework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay
Refer: https://github.com/helium/HIP/blob/master/0017-hex-density-based-transmit-reward-scaling.md
TODO:
last_poc_challenge