Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the same (or similar, or very different) version numbers for smart contracts and Python packages. #584

Closed
2 tasks done
pirapira opened this issue Feb 19, 2019 · 14 comments
Assignees
Labels
P2 demanded by somebody

Comments

@pirapira
Copy link
Contributor

pirapira commented Feb 19, 2019

Currently the Solidity files contain one version number (say, 0.7.0) and the Python package has another version number (say, v0.11.0). This confuses some people. Maybe we should use the same version or closer version numbers. This issue keeps track of

  • deciding
    a. combine these two version numbers into one
    b. bump smart contract versions to the package version
    c. don't change the current scheme.
    d. make the contract version numbers look very different from tha Python package versions
  • implementing the change if decided.
@pirapira pirapira added needs discussion P2 demanded by somebody labels Feb 19, 2019
@pirapira

This comment has been minimized.

@pirapira
Copy link
Contributor Author

I'll come up with the advantage of having two different version numbers.

@pirapira
Copy link
Contributor Author

advantage of keeping different contract numbers

With the current set up, it's possible to deploy a new version of one smart contract and still keep using the old deployment of another smart contract. If we synchronize the package version and the contract version, every new PyPI release must contain new deployements of every contract. That's unreasonable for the user.

@pirapira

This comment has been minimized.

@pirapira
Copy link
Contributor Author

@karlb has an idea:

We could also bump the contract version number to the current python package version each time we do a deploy.

@pirapira pirapira changed the title Use the same version number for smart contracts and Python packages. Use the same (or similar) version numbers for smart contracts and Python packages. Feb 19, 2019
@rakanalh
Copy link
Contributor

I think the argument makes sense as the package version could be different than the solidity code version... i see two approaches:
Prequisite:

Then:

  1. Either bring the both versions to the same number and bump both numbers when the package is updated.
  2. Document why we have 2 versions for a package

I guess number 2 would be the faster approach as you can direct people towards the documentation if asked about this topic again :)

@pirapira

This comment has been minimized.

@rakanalh

This comment has been minimized.

@hackaugusto
Copy link
Contributor

hackaugusto commented Feb 21, 2019

advantage of keeping different contract numbers

With the current set up, it's possible to deploy a new version of one smart contract and still keep using the old deployment of another smart contract. If we synchronize the package version and the contract version, every new PyPI release must contain new deployements of every contract. That's unreasonable for the user.

This is the reason for having different versions, also please make all deployed versions easily available.

@pirapira

This comment has been minimized.

@pirapira

This comment has been minimized.

@pirapira pirapira changed the title Use the same (or similar) version numbers for smart contracts and Python packages. Use the same (or similar, or very different) version numbers for smart contracts and Python packages. Feb 21, 2019
@pirapira

This comment has been minimized.

@pirapira pirapira closed this as completed Jun 4, 2019
@pirapira
Copy link
Contributor Author

pirapira commented Oct 22, 2019

@karlb came to me and explained a scheme:

  • all new deployments get at least a minor upgrade in contracts_version so the new contracts_version looks very similar to the next Python package version.
  • all Python-only upgrades get a patch upgrade in the package version

I think this works.

There was a counter argument with which @hackaugusto agreed. The argument is not valid anymore, because different contracts_versions already share the same SecretRegistry deployment.

@pirapira pirapira reopened this Oct 22, 2019
@pirapira pirapira mentioned this issue Oct 22, 2019
2 tasks
@pirapira pirapira self-assigned this Oct 22, 2019
pirapira added a commit to pirapira/raiden-contracts that referenced this issue Oct 22, 2019
pirapira added a commit to pirapira/raiden-contracts that referenced this issue Oct 22, 2019
karlb pushed a commit that referenced this issue Oct 22, 2019
@pirapira
Copy link
Contributor Author

#1303 implements this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 demanded by somebody
Projects
None yet
Development

No branches or pull requests

3 participants