SeiyaKobayashi / zkml-optimization

Optimization for on-chain private machine learning.
MIT License
13 stars 1 forks source link

[TASK]: Implement `disableModel()` function #19

Closed SeiyaKobayashi closed 1 year ago

SeiyaKobayashi commented 1 year ago

📝 Overview

Implement disableModel() function of Verifier contract.

🖋 Details

This function should soft-delete the registered model using a flag field (e.g. isDisabled). Hard-deletion should be avoided to prevent model developers from re-registering same models (could be a potential attack when this contract becomes incentivized).

📚 References

n/a

SeiyaKobayashi commented 1 year ago

We don't need the other way around (e.g. enableModel()), just because there is no use-cases / motivation for users to do so. If model is updated, IPFS issues totally different content ID for the updated one, leading users to call registerModel() again instead of calling enableModel().