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

The proof MUST be considered invalid if the asset amount in its outputs != inputs #89

Closed
dr-orlovsky opened this issue Jul 10, 2019 · 7 comments

Comments

@dr-orlovsky
Copy link
Contributor

Subj.

@giacomozucco do I get it right? If yes, it we need to add this to the spec + proof verification code

@petertodd
Copy link
Collaborator

petertodd commented Jul 10, 2019 via email

@dr-orlovsky
Copy link
Contributor Author

dr-orlovsky commented Jul 11, 2019

@petertodd Well, these are different cases. In Bitcoin,

  1. The fees (difference input-output) go to the miners
  2. We can always compute total supply

With RGB,

  1. We have no party to allocate the difference between the input and output — so we have no other options than to "burn" it
  2. The total supply of the asset is specified only in the contract, so if some of the assets will be burned in non-public proofs, nobody will know about the circulating supply. In case of things like publicaly traded corporate shares, it is an issue.

@petertodd
Copy link
Collaborator

@dr-orlovsky That all sounds like fair arguments to me.

Maybe worth writing up an explicit "how would we upgrade this?" section in the docs.

@inaltoasinistra
Copy link
Collaborator

nobody will know about the circulating supply

In any case the circulating supply is unknown, because private keys and proofs could be lost.

In order to reduce a bit the size of proofs, the unspent assets could be deterministically binded to an output (e.g. the last).

@dr-orlovsky
Copy link
Contributor Author

Maybe worth writing up an explicit "how would we upgrade this?" section in the docs.

Yes, we already had that idea and certainly need to do it. But there are already a number of opened issues requiring changing some (not clear/incomplete/contradicting) parts of the spec, so we are working on the spec update, which will be complete during this month – and will add this part into it as well.

@dr-orlovsky
Copy link
Contributor Author

@inaltoasinistra

In any case the circulating supply is unknown, because private keys and proofs could be lost.

Yes, it seems so... But still No 1 applies

In order to reduce a bit the size of proofs, the unspent assets could be deterministically binded to an output (e.g. the last).

It will create more complications and would not help in reducing the size of the proof... Or you mean that the last triplet in the proof need not to list an asset amount and allocate of of the "change"?

@inaltoasinistra
Copy link
Collaborator

Or you mean that the last triplet in the proof need not to list an asset amount and allocate of of the "change"?

Yes, I mean that a triplet for each asset type of the proof can be omitted. This should save 40 bytes (plus encoding overhead) for each asset type.

Wallets must validate all the input proofs, them must compute inputs and outputs assets to check validity. With this change the algorithm would compute the last output assets instead of check them. It would be almost the same operations.

On the other hand the upgrade strategy of the protocol could impact on this, as said by Peter Todd.

@dr-orlovsky dr-orlovsky changed the title The proof MUST be considered invalid if the amount of its outputs != inputs The proof MUST be considered invalid if the asset amount in its outputs != inputs Jul 27, 2019
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

3 participants