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

feat: allow list solver flag #48

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alfetopito
Copy link
Contributor

Summary

2 changes:

  1. Add allowListed to SolverNetwork model

Use this to indicate whether the given solver has been allow-listed for this network/env.

  1. Remove active from Solver model

SolverNetwork also has an active flag that's used to indicate whether given solver is active for network/env.
This flag is a n artifact of a previous iteration of the model and should be removed.

Before After
SolverNetwork image image
Solver image image

SolverNetwork model has an active flag that should be the only one
@alfetopito alfetopito self-assigned this Jan 6, 2025
@alfetopito alfetopito requested a review from a team January 6, 2025 16:31
@@ -41,6 +41,11 @@
"type": "relation",
"relation": "oneToOne",
"target": "api::environment.environment"
},
"allowListed": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine with me, but for me is more clear to just say "isOperating".
Also, renaming active to isWhiteListed could be a good idea. We can just add the flag, make sure they match, make the changes in CoW Swap, and then delete the old flag. I don't see anyone else uses this (maybe my spreadsheet and I can adapt it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point about adding a new flag is that, at least from what I could gather from the solver's team view, it has a different connotation that what we need for the progress bar.

They set it to active when the solver has been allow-listed, even if the solver is not running for that environment.

Thus, the new flag is meant to signal that, while active remains what we expect: the solver is enabled and solving for the given network/environment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I understood the other way around. Active was that our protocol whitelisted them, although I see why it makes sense too what you say.

This is why I was suggesting to not leave "active" to avoid confusion.

isWhiteListed --> whitelitest in the protocol.
isOperating ---> is running an instance and posting solutions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe there's better names, but just think that "active" might be confusing

Copy link
Contributor

@anxolin anxolin Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternativelly, we don't use flags, and we just model the status: WHITE_LISTED_INACTIVE, WHITE_ACTIVE, NOT_WHITE_LISTED

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why I was suggesting to not leave "active" to avoid confusion.

Ah got it.

Alternativelly, we don't use flags, and we just model the status

I don't get this one. Would that be a new entity?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just suggesting an enumeration if there's only 3 possible values. A bit verbose but less error prone WHITE_LISTED_INACTIVE, WHITE_ACTIVE, NOT_WHITE_LISTED

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but probably not a good idea, and we want to separate the 2 concerns. I imagine that if this is automatically managed, the whitelisted flag is set manually, but the active is set automatically (for example, solver hasn't posted a solution in 24h)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants