-
Notifications
You must be signed in to change notification settings - Fork 951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Bridge pool recommendations #1811
Conversation
ca9b0d4
to
88dcf90
Compare
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.
The code changes look fine, but needs to new unit tests to cover the new code paths for provided conversion tables.
628dc99
to
9a29d88
Compare
9a29d88
to
ff93833
Compare
ff93833
to
d8ddf6e
Compare
d8ddf6e
to
83bafe9
Compare
83bafe9
to
8079c9a
Compare
@batconjurer there's currently a gotcha in the recommendations algorithm, I think. the the current signed pool may be behind the most up to date Bridge pool, because of the vote extension tx lag. so, I believe the algorithm may recommend a transfer that has already been relayed, that still shows up in the signed pool. a simple solution may be to return with an error if the signed Bridge pool nonce does not match the up to date Bridge pool nonce in storage. this way we never recommend transfers that have already been relayed and acted upon |
8079c9a
to
1750a8e
Compare
1750a8e
to
b4b73e2
Compare
b4b73e2
to
1274ecb
Compare
7c404af
to
968f1a6
Compare
ead7d26
to
c4e4819
Compare
let query_validators = query_validators!(); | ||
let epoch_0_validators = query_validators(0); | ||
let epoch_1_validators = query_validators(1); | ||
_ = query_validators; |
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.
what is the purpose of this?
* origin/tiago/fix-bp-recommendations: Add changelog for #1811 Ignore invalid conversion rates Add test_conversion_table_profit_margin() unit test Proper Debug impl for I256 values Return recommendation data in `generate_recommendations` Test the height of the BP proof stored in the db Check BP root's height when vote extension was signed Store height when BP root was signed Fail recommending BP batch of txs if nonce is out of date Prohibit generating BP proofs when the signed root is outdated More conversion table unit tests Abstract `generate_eligible` unit tests with a helper fn Add test_generate_eligible_happy_path() unit test Avoid overflowing when calculating earned gwei amount Improve conversion rate query Factor out `generate_eligible()` Fix Bridge pool proof warning voting power Rename `generate` to `generate_recommendations` Refactor recommendations to use EligibleRecommendation Add context to CLI Bridge pool cmds Fix Bridge pool `construct_proof` Convert gwei to tokens in Bridge pool conversion table Bridge pool conversion rates table Retrieve the inner raw string on wrapped context values
* origin/tiago/fix-bp-recommendations: Add changelog for #1811 Ignore invalid conversion rates Add test_conversion_table_profit_margin() unit test Proper Debug impl for I256 values Return recommendation data in `generate_recommendations` Test the height of the BP proof stored in the db Check BP root's height when vote extension was signed Store height when BP root was signed Fail recommending BP batch of txs if nonce is out of date Prohibit generating BP proofs when the signed root is outdated More conversion table unit tests Abstract `generate_eligible` unit tests with a helper fn Add test_generate_eligible_happy_path() unit test Avoid overflowing when calculating earned gwei amount Improve conversion rate query Factor out `generate_eligible()` Fix Bridge pool proof warning voting power Rename `generate` to `generate_recommendations` Refactor recommendations to use EligibleRecommendation Add context to CLI Bridge pool cmds Fix Bridge pool `construct_proof` Convert gwei to tokens in Bridge pool conversion table Bridge pool conversion rates table Retrieve the inner raw string on wrapped context values
* origin/tiago/fix-bp-recommendations: Add changelog for #1811 Ignore invalid conversion rates Add test_conversion_table_profit_margin() unit test Proper Debug impl for I256 values Return recommendation data in `generate_recommendations` Test the height of the BP proof stored in the db Check BP root's height when vote extension was signed Store height when BP root was signed Fail recommending BP batch of txs if nonce is out of date Prohibit generating BP proofs when the signed root is outdated More conversion table unit tests Abstract `generate_eligible` unit tests with a helper fn Add test_generate_eligible_happy_path() unit test Avoid overflowing when calculating earned gwei amount Improve conversion rate query Factor out `generate_eligible()` Fix Bridge pool proof warning voting power Rename `generate` to `generate_recommendations` Refactor recommendations to use EligibleRecommendation Add context to CLI Bridge pool cmds Fix Bridge pool `construct_proof` Convert gwei to tokens in Bridge pool conversion table Bridge pool conversion rates table Retrieve the inner raw string on wrapped context values
Describe your changes
Closes #1799
Indicate on which release or other PRs this topic is based on
Based on #1795
Checklist before merging to
draft