Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Decay Constant #287

Open
thebeanogamer opened this issue Aug 10, 2022 · 2 comments
Open

Decay Constant #287

thebeanogamer opened this issue Aug 10, 2022 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers priority: moderate size: small

Comments

@thebeanogamer
Copy link
Member

What do we do about the decay constant? It should be =<1, but you could technically want a bigger number (if you wanted the value of a challenge to increase as it is solved).

Is that too obscure of a use case? Should we just cap it at 1? If not, we should add a pre-event check because you almost certainly don't want to do that.

I like the idea of previewing the decay in shell, although we'd need to decide where the logic for that happens.

@thebeanogamer
Copy link
Member Author

Conclusion is that we should limit it to 0 < constant < 1 in the DB and shell. Will raise a seperate issue on shell.

@0xAda
Copy link
Contributor

0xAda commented Oct 8, 2023

This is possible to do as a DB constraint, however out database de# this area is quite questionable. The decay constant is stored in flag_metadata which is a JSON field, which was intended to mean its entirely frontend's responsibility to manage, however thats not how this has been used in practice. If we're going to do this as a database constraint, postgres will allow us to do it, I'm unsure if django or sqlite will, but I would question if this should be a slightly bigger refactor of pulling things out of flag_metadata

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working good first issue Good for newcomers priority: moderate size: small
Projects
None yet
Development

No branches or pull requests

2 participants