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

Add a git-like stage for adding contract changes before pushing #119

Open
maraoz opened this issue May 15, 2018 · 11 comments
Open

Add a git-like stage for adding contract changes before pushing #119

maraoz opened this issue May 15, 2018 · 11 comments
Labels
kind:enhancement An upgrade or a new feature that improves the system size:8 Size 8 topic:dx Developer experience topic:tools Off-chain tooling in general
Milestone

Comments

@maraoz
Copy link
Contributor

maraoz commented May 15, 2018

Implement a validation to make sure add is required before push

To make zos more git-like, push shouldn't send new implementations to the network unless the developer has previously added them. Currently, zos push will send all updated implementations to the blockchain automatically.

@maraoz maraoz added the topic:dx Developer experience label May 15, 2018
@maraoz maraoz added this to the v0.2.0 milestone May 15, 2018
@facuspagnuolo facuspagnuolo modified the milestones: Backlog, MVP Jun 4, 2018
@facuspagnuolo facuspagnuolo changed the title zos add Foo should be required before zos push Implement a validation to make sure add is required before push Jun 5, 2018
@facuspagnuolo facuspagnuolo modified the milestones: Backlog, Sprint #1 Jun 5, 2018
@facuspagnuolo facuspagnuolo added kind:enhancement An upgrade or a new feature that improves the system topic:tools Off-chain tooling in general labels Jun 5, 2018
@vs77bb
Copy link

vs77bb commented Jun 6, 2018

@facuspagnuolo @maraoz Thought this might be a good candidate for a Gitcoin bounty! Please do let us know if any other issues make sense - the community ❤️'s Zeppelin 🙂

@facuspagnuolo facuspagnuolo modified the milestones: Sprint #1, v2.0.0 Jun 6, 2018
@facuspagnuolo facuspagnuolo added the size:8 Size 8 label Jun 7, 2018
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.35 ETH (164.47 USD @ $469.91/ETH) attached to it.

@gitcoinbot
Copy link

@davidbanu Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@vs77bb
Copy link

vs77bb commented Jun 18, 2018

Hi @davidbanu can you please provide an update here? We may send this back to the crowd if we don't hear from you. Hope you're doing well 🙂

@davidbanu
Copy link

Still working on this...

@gitcoinbot
Copy link

@davidbanu Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@davidbanu due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@spalladino spalladino self-assigned this Jun 26, 2018
@spalladino spalladino changed the title Implement a validation to make sure add is required before push Add a git-like stage for adding contract changes before pushing Jun 27, 2018
@spalladino
Copy link
Contributor

Renaming the issue to reflect its full extent.

We currently have the following steps for pushing a change in a contract implementation to the blockchain, assuming it was previously registered via a zos add:

1- Change source code
2- Compile to build folder
3- Push change to a network via zos push

If we want to make a full analogy with git, we could do the following:

1- Change source code and compile. This is equivalent to modifying the git working copy.
2- Add the change via zos add, which registers the change in zos.json. The json file now keeps track of the code of the contracts, not just their names, and is equivalent to a git stage.
3- Commit the change to a network via a zos commit, which registers these changes in the zos.network.json file. This is equivalent to committing the change to a local git branch.
4- Deploy to the blockchain via a zos push, which actually deploys the changes required in the zos.network.json file to the blockchain. This is equivalent to pushing the changes to a remote.

Note that this makes zos more difficult to use, albeit more safe. When deploying to mainnet, it may make sense to have this safeguard; but when developing or testing, requiring zos add and/or zos commit for every change is cumbersome. We could have defaults for development/test that automatically perform the add when pushing, but having different behaviour for different networks could be confusing.

A simpler way to implement this, without resorting to a full git-like stage, is to just keep track of the hashes of the contracts' code in zos.json, updating them via add. This allows a user to ensure that the code in the build folder corresponds to what they have in the local folder, but offers no help if it doesn't.

We've agreed to defer this issue for later, after we gather more feedback on zos usage.

@Gustavobelfort
Copy link

Is this bounty still open ?

@spalladino
Copy link
Contributor

@Gustavobelfort we decided to postpone this issue for now, thanks for checking in though!

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Cancelled


The funding of 0.35 ETH (119.91 USD @ $342.6/ETH) attached to this issue has been cancelled by the bounty submitter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind:enhancement An upgrade or a new feature that improves the system size:8 Size 8 topic:dx Developer experience topic:tools Off-chain tooling in general
Projects
None yet
Development

No branches or pull requests

7 participants