Skip to content
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

Remove obsolete solver competition data #2143

Merged
merged 11 commits into from
Dec 18, 2023
Merged

Conversation

fleupold
Copy link
Contributor

@fleupold fleupold commented Dec 8, 2023

Description

Now that we collect all the competition data we care about going forward, we can remove the obsolete fields. Changes should be backwards compatible as Options will be parsed as Some if present and extra fields that remain in the json that is stored in the DB will be ignored. Very old auctions for which we don't store ranking or score will fail to load (but that's acceptable IMO)

Changes

  • Make it so that we don't log calldata fields that don't exist for non-winners.
  • Remove objective as it's not recorded for runners up (and isn't really relevant just for the winner). All we care about now is score
  • Remove gasPrice and liquidityFetchedBlock as they don't exist anymore.
  • Make mandatory score and ranking non-optional
  • Add e2e test for multiple solver solutions

How to test

Run e2e test

Related Issues

Fixes #1949

@fleupold fleupold requested a review from a team as a code owner December 8, 2023 08:57
@sunce86
Copy link
Contributor

sunce86 commented Dec 11, 2023

@harisang Is it ok to completely remove the Objective section? It is true that the protocol now only cares about the score (based on CIP20), but what will be the status after ranking by surplus? Also, for debugging it might be useful to capture surplus and fees from the onchain settlement.

Base automatically changed from solver-competition-prices to main December 13, 2023 16:30
@fleupold fleupold force-pushed the solver-competition-cleanup branch from 083fa7b to 0c26de1 Compare December 13, 2023 16:50
@fleupold fleupold requested a review from MartinquaXD December 14, 2023 20:58
@harisang
Copy link
Contributor

harisang commented Dec 15, 2023

Am i correct to assume that moving forward, what we report in the competition endpoint should be from the point of view of the autopilot only? If so, I agree "gasPrice" and "liquidity fetching block" should be removed, and also I don't think we need the objective anymore. Score should always represent the value according to which solutions are getting ranked, and this should be sufficient

@fleupold
Copy link
Contributor Author

Am i correct to assume that moving forward, what we report in the competition endpoint should be from the point of view of the autopilot only?

I think so. At the end of the day all data we want to log here we either need to receive from the driver or index ourselves. Since the autopilot shouldn't worry about liquidity going forward, it would have to be passed up from drivers (which in most cases doesn't make sense, since not all drivers fetch liquidity in the first place)

@fleupold fleupold enabled auto-merge (squash) December 18, 2023 09:15
@fleupold fleupold merged commit a5e3ff5 into main Dec 18, 2023
8 checks passed
@fleupold fleupold deleted the solver-competition-cleanup branch December 18, 2023 09:19
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Populate better solver competition data
4 participants