Converting deployments contracts to deployments #509
brandonpille
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have been thinking about the deployment contracts. It might be possible to no longer consider them as "contracts". @muhamadazmy told us that it might introduce too much breaking changes in the clients. But we have found a solution that avoids those breaking changes while improving the flow of the chain and the migration in graphql. Below you can find the mapping (left is old and right is new) that we need to make in the change in order to achieve this.
| Node Contract | => | Deployment | + (| Capacity Reservation Contract |)
| Rent Contract | => | Capacity Reservation Contract |
| Name Contract | => | Name Contract |
So for each node contract we will create a deployment which will no longer be a "contract", we will keep deployments in a new storage (Deployments). The deployments created in the migration on the chain will take over the contract id of the node contract. But those ids are a new "type" of id: a deployment id, which we will keep on the chain as a new storage value (DeploymentID) and it will equal the ContractID storage value on the moment of the migration. We will translate a node contract into a capacity reservation contract if the node contract was not deployed on a node for which there is/was a rent contract. This translated capacity reservation contract will thus use the contract id of the node contract (so that we won't have to create a new one).
Rent contracts will be translated into capacity reservation contracts (also taking over the contract ids).
After the migration:
What are your thoughts: @DylanVerstraete, @muhamadazmy
Beta Was this translation helpful? Give feedback.
All reactions