Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Contract upgrade tooling: makefile + documentation #293

Merged
merged 19 commits into from
Dec 21, 2023

Conversation

snissn
Copy link
Contributor

@snissn snissn commented Nov 24, 2023

No description provided.

@snissn snissn marked this pull request as ready for review November 24, 2023 23:03
@snissn snissn requested a review from adlrocha November 24, 2023 23:25
Base automatically changed from mikers/prettierServerCommit2 to dev November 27, 2023 10:18
hardhat.config.ts Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
- **Subnet Actor Diamond Upgrade**:

```bash
make upgrade-sa-diamond [NETWORK=<network-name>]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can a subnet actor be upgraded if it wasn't initially deployed using hardhat but the ipc-cli? This would mean that the deployment assets are not available for deployment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know enough about ipc-cli to answer this question.. does ipc-cli end up calling hardhat?

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately not, it makes a transaction to the registry to trigger the deployment of a new subnet actor. Is there a way to artificially generate a desployment.json to help with the upgrade? We may need to come up with a way to allow updates from subnets deployed from the registry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I understand better how this code works and what needs to happen for this to work from doing the internal audit. I think that there's a reasonable way through this where we need to add code in ./src/subnetregistry/RegisterSubnetFacet.sol that includes the diamond cut facets and then we will just need to exapnd the facets on the subnet registry to manage the upgrades. we'll need some sort of management for the equivalent of deployment.json but that might not be so bad and it might make sense to store some of these data items on chain in the registry. One last concern is that we may end up with a system that has too many subnets to upgrade in a single block so we should have a fallback there to paginate and may need to think about whether we need to do this upgrade change in a transaction where contracts are paused during the upgarde if it spans multiple txs

Copy link
Contributor

Choose a reason for hiding this comment

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

Now tracking here: consensus-shipyard/ipc#497

README.md Outdated Show resolved Hide resolved
@adlrocha
Copy link
Contributor

hey @snissn. Do you mind rebasing this one and fixing the conflicts? I think it may be a good idea to get this one merged and address my comment about the subnet upgrade mechanism in a follow-up PR (in order not to leave this one hanging too long).

Copy link
Contributor

@raulk raulk left a comment

Choose a reason for hiding this comment

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

There seems to be a bunch of improvements still needed here, but let's merge this and continue working on the rest in the ipc-monorepo.

@raulk raulk changed the title makefile + documentation fixes Contract upgrade tooling: makefile + documentation Dec 21, 2023
@raulk raulk merged commit 97fb4ea into dev Dec 21, 2023
9 checks passed
@raulk raulk deleted the mikers/documentationFixes branch December 21, 2023 13:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants