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

Add score calculation in domain::Settlement #2719

Closed
Tracked by #2716
sunce86 opened this issue May 11, 2024 · 1 comment
Closed
Tracked by #2716

Add score calculation in domain::Settlement #2719

sunce86 opened this issue May 11, 2024 · 1 comment
Assignees
Labels
E:7.1 Ext. solvers operating driver See https://github.com/cowprotocol/pm/issues/57 for details

Comments

@sunce86
Copy link
Contributor

sunce86 commented May 11, 2024

Add the score function to the domain::Settlement object.

Should be already done here: https://github.com/cowprotocol/services/blob/settlement-auction-struct/crates/autopilot/src/domain/settlement/mod.rs#L46-L60 just add unit test for a real tx containing multiple protocol fees.

@sunce86 sunce86 self-assigned this May 11, 2024
@sunce86 sunce86 added the E:7.1 Ext. solvers operating driver See https://github.com/cowprotocol/pm/issues/57 for details label May 11, 2024
sunce86 added a commit that referenced this issue May 13, 2024
# Description
Related to #2719 (will not
fix it until unit test is updated 👇 )

Adds score calculation to `domain::Settlement` object, which will be
used to calculate the score during solver competition.

## How to test
Will update the `settlement` unit test to test with a settlement
transaction that contains multiple fee policies so the whole
functionality (surplus, multiple fee policies, score) is tested
together.

Will update the test in a separate PR. Now, only the function is merged
to unblock progress on other tasks for colocation.
@sunce86
Copy link
Contributor Author

sunce86 commented May 13, 2024

Closed with #2724 afterall.

I've decided not to update the unit test, as it can't even cover a significant number of edge cases that exist (partial orders, different multiple variations of protocol fees, jit orders etc).
So, I've decided to test it by comparing with existing results, as explained in #2730

@sunce86 sunce86 closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:7.1 Ext. solvers operating driver See https://github.com/cowprotocol/pm/issues/57 for details
Projects
None yet
Development

No branches or pull requests

1 participant