Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Improve spec on contract deployment #104

Closed
dr-orlovsky opened this issue Jul 28, 2019 · 2 comments
Closed

Improve spec on contract deployment #104

dr-orlovsky opened this issue Jul 28, 2019 · 2 comments

Comments

@dr-orlovsky
Copy link
Contributor

dr-orlovsky commented Jul 28, 2019

From the current spec it is unclear:

  1. How to deterministically define to which transaction the contract is committed: there is no field inside the contract to point to that address
  2. At this moment asset issuing transaction is external to contract commitment transaction, at least contract header contains the full issuance_utxo address, and nothing prevents the contract creator to commit to other than issuing transaction, while the assets will be assigned to an existing transaction.

These parts must be improved, at least some rationale behind the design has to be provided

@dr-orlovsky dr-orlovsky added this to the v1.0.0 milestone Jul 28, 2019
@dr-orlovsky dr-orlovsky self-assigned this Jul 28, 2019
@dr-orlovsky dr-orlovsky added this to To do in RGB via automation Jul 28, 2019
@dr-orlovsky dr-orlovsky moved this from To do to Initial discussion in RGB Jul 28, 2019
@dr-orlovsky dr-orlovsky moved this from Initial discussion to Proposal under review in RGB Jul 28, 2019
dr-orlovsky added a commit to dr-orlovsky/spec that referenced this issue Jul 28, 2019
…iasset proofs, separation of asset issuing tx from contract committment
@dr-orlovsky dr-orlovsky changed the title Separation of issuing and commitment tx for contract publishing Improve spec on contract deployment Aug 1, 2019
@dr-orlovsky
Copy link
Contributor Author

dr-orlovsky commented Aug 5, 2019

We discussed this issue with @giacomozucco and came to the following proposal:

  1. Contracts should be allowed to issue assets to an UTXO outside of the commitment tx
  2. The moment of the contract commitment is the moment of the asset issuance. Assets are assigned at this point to the issue_utxo
  3. Commitment tx should be added as a field into the contract header, but it can participate in the commitment itself (i.e. is not a part of the contract hash).
  4. Since (according to Design proper multi-asset proof specs #87) asset_id "commits" to the contract commitment tx it serves as a protection from multiple contract deployments, since each contract deployment will result in a different set of the issued asset_ids

@dr-orlovsky dr-orlovsky moved this from Proposal under review to PR being prepared in RGB Aug 5, 2019
@dr-orlovsky dr-orlovsky moved this from PR being prepared to PR under review in RGB Aug 5, 2019
@dr-orlovsky
Copy link
Contributor Author

The commit 7db1a0e provides solution to this issue

RGB automation moved this from PR under review to Done Aug 9, 2019
@dr-orlovsky dr-orlovsky removed this from Done in RGB Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant