yearn / yearn-vaults

Yearn Vault smart contracts
https://yearn.finance/
GNU Affero General Public License v3.0
519 stars 317 forks source link

First vault added to release a new apiVersion is always endorsed #179

Closed fubuloubu closed 3 years ago

fubuloubu commented 3 years ago

copied from https://github.com/iearn-finance/yearn-protocol/issues/96 by @fameal

What's your issue about?

The vault that is used to create a new release using YRegistry.newRelease(0x...) is automatically endorsed and shown on Yearn's main site in the production tab.

Steps to reproduce Create a new release using YRegistry.newRelease(0x...) with any vault.

What is expected to happen. It's expected to create a new release and add the vault to the registry.

What actually happens. It creates a new release, adds the vault to the registry, and endorses it automatically.

Notes It's not always that the first vault of a new release is production-ready. So we need a way to create a new release, add a vault, and test it accordingly.

fubuloubu commented 3 years ago

Solution is to modify Registry by removing the following line: https://github.com/iearn-finance/yearn-vaults/blob/77b3dccbea306034832265217d60b90023af5c5c/contracts/Registry.vy#L169

Registry would need to be redeployed and release/endorsement data migrated to newer deployment. All experiments will be lost at that time.

fubuloubu commented 3 years ago

Note: waiting on fix in https://github.com/vyperlang/vyper/pull/2281 to redeploy Registry