AztecProtocol / aztec-packages

Apache License 2.0
203 stars 235 forks source link

Epic: Upgradeable Aztec Smart Contracts #8979

Open iAmMichaelConnor opened 1 month ago

iAmMichaelConnor commented 1 month ago

~First thing's first: decide on how we want to enable contract upgrades. Decide based on dev ease of use and a reduction in critical bugs.~

Build SetCode

Reading material:

@nventuro @spalladino is there anything you'd add, with an extra 6 months of knowledge since you wrote these docs, and in advance of discussing this topic next week?

Overview: https://forum.aztec.network/t/how-to-do-contract-upgrades-feb-2024-edition/4583

https://forum.aztec.network/t/deep-dive-into-delegatecall-proxy-upgrades/4581 https://forum.aztec.network/t/contract-upgrades-via-shared-mutable-state-slowjoe/4582 https://hackmd.io/wVLDGk5gRJaTQfFQ3YmEDA?both

old? https://forum.aztec.network/t/implementing-contract-upgrades/2570

This task list will be clearer once we decide on an approach.

### Tasks
- [ ] Decide on the approach.
- [ ] Kernel circuit changes.
- [ ] AVM changes.
- [ ] Example proxy contracts and e2e tests.
nventuro commented 1 month ago

I still much prefer the SharedMutable approach, especially now that we've been using it for a while and understand it better.

I think what's missing here is involving the AVM team - it's progressed a lot in the last few months and they likely have valuable input to consider.

rahul-kothari commented 1 month ago

cc @dbanks12 @fcarreiro the planned approach should have only a small amount of work from AVM. Not needed for testnet launch so not including it on the milestone