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

Global unique templateId of compiled contract #11

Open
greenhat opened this issue Feb 25, 2020 · 1 comment
Open

Global unique templateId of compiled contract #11

greenhat opened this issue Feb 25, 2020 · 1 comment
Milestone

Comments

@greenhat
Copy link
Member

greenhat commented Feb 25, 2020

Motivation

  • when contract code or embedded parameter changes it may brake the assumptions used at call sites;
  • identifying the exact contract by the users;
    The contract id should change is any code or embedded parameter name changes. However, changes in embedded parameter values should not change the id. We're identifying the contract template and not the parametrized contract instance.

Implementation

Hash of:
serialized contract template (ergo tree with placeholders instead of constant values)

@greenhat greenhat added this to the 1.0 milestone Feb 25, 2020
@greenhat greenhat self-assigned this Feb 25, 2020
@greenhat greenhat changed the title Add version to ErgoContract Unique id of ErgoContract Feb 25, 2020
@greenhat greenhat changed the title Unique id of ErgoContract Global unique id of ErgoContract Feb 25, 2020
@greenhat greenhat changed the title Global unique id of ErgoContract Global unique templateId of compiled contract Feb 25, 2020
@greenhat
Copy link
Member Author

Actually, it has nothing to do with compiler and it should be in sigma as ErgoTree.templateId.

@greenhat greenhat removed their assignment Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant