--
You received this message because you are subscribed to the Google Groups "Colored bitcoin - BitcoinX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoinX+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
- For example, TxHash is BE anytime you are dealing with the binary data, but tends to printed to a hex string reversed
txhash should be hex encoded and little-endian, i.e. in same format as used by block explorer.
Lots of great info here! And here too: https://github.com/killerstorm/colored-coin-tools/blob/master/colordefs.py
- I assume we need a binary format, since can we be sure JSON stringify is 100% deterministic across all implementations?
- For example, TxHash is BE anytime you are dealing with the binary data, but tends to printed to a hex string reversed
- If you put a publicKey in the definition, you can detect any issuance of the asset as any spends from a hash160(publicKey * contractHash) address
Value Accounting:- Doesn’t the definition have to include how to calculate total units issued?
- Minimum divisible unit- Implicit for fixed accounting
Coloring rules:- Safer to assume the coloring rules (order based, odd/even satoshi, etc.) could *possibly* change over time
- How about a field to specify the coloring rule ID for each genesis, it can just be a 4 byte version field.
- Asset description / ‘Contract Details’ – is there a longer description that’s part of the colordef?
Issuer Identity:- Contact information?- Published definition URL?- PGP key? X509 certificate with chain?
What timestamp do you use to start the 48 hour (or whatever) clock after issuing a new asset?
- Putting a clock on new issues could create liquidity problems, DoS attacks, if the issuer doesn’t have enough in ‘reserves’ and price is spiking
Fungible Assets:- The meta-data required for the wallet to detect fungible assets could be at the color_asset level, doesn’t have to be at the asset_class level. Specify an asset_class_id in the color_asset. It’s more scalable this way, but you need issuers to coordinate their asset_class_id.
Upgrading Issuance: (future work)
- If you need to change the base satoshi value, or the coloring rule, you make a colordef with an explicit ‘parent_asset_hash’, an exchange rate, and an exchange bot’s publicKey- For example, if ‘DUST’ definition goes down over time, you can ‘reclaim metal’ through re-issue and an exchange bot- If this is standardized in the definition, then wallets can do it automatically
We need to revamp color definition infrastructure, largely because there were several problems with additional issues.Albert gave us a great idea: separate notion of color and asset. Color exists in context of coloring algorithms, asset is a meaning we associate with a set of colors.
Transaction outputs are of color X if they can be traced back without mixing to a genesis of color X which is a single transaction output.Making "one color = one genesis TXO" a rule simplifies things.Color descriptor (color_desc) can be a string like:"<txhash>,<outindex>,<block_number>".Block number is needed because transactions with same txhash are possible: https://en.bitcoin.it/wiki/BIP_0030txhash should be hex encoded and little-endian, i.e. in same format as used by block explorer.
Next, color_set is just a JSON array of color_desc's in which color_descs are sorted as strings.color_set_hash is a hash of a deterministic serialization of this JSON object.color_asset is a JSON object consisting of color_set, contract and signature. (Also known as "asset definition")To issue colored coins, issuer creates a contract object which describes what it is about, make transaction with desired amount of satoshis and then signs contract and color_set together.When he needs to issue more coins representing same asset, he will add genesis tx outs to color_set and sign a new color_asset.Client can periodically look for update of asset definition retrieving it from a certain location. If definition was updated, client can either update a locally used asset definition automatically according to a certain policy, or it might ask user whether to trust a new definition.We do not want to trust asset issuer's signature blindly, thus new asset definition will be used only:1. If it is endorsed by other parties, e.g. signed both by an issuer and by exchange/notary/insurer.2. After some timeout, e.g. 48 hours. This gives an asset issuer has time to notify investors about potential theft of private key.color_asset_class is a collection of color assets which user thinks are more-or-less fungible.
I am not convinced, that this is a great Idea. Please point me to the reasoning. I think a color is meaningful only if associated with terms that describe what it stands for and terms is nothing else then definition of the asset.
You can also turn this around and see the same terms means same asset, same color that is fungibility of financial assets.
The motivation and effect of BIP30 is exactly to disallow same transaction hash.
BTW only coinbases have a practical chance to produce same hash without being a double-spend too.
color_asset_class is a collection of color assets which user thinks are more-or-less fungible.WHAT? There is "no more or less fungibility" in finance!
Please also consider that having an expiry (maturity) of an asset greatly supports future scalability. There is no need to propagate coloring for events passed or bonds matured.
Great feedback, thanks.
I would strongly disagree that watching the block chain for spend-from-address is complex – in fact what could be more simple!
I think it’s complex to have to publish, distribute, and then get exchanges and maybe even individual clients to whitelist individual definitions over and over for the same color. If you are issuing GOLDcoin, it’s not like you can issue 100kg on Day 1, you need to prove reserves, which increase with adoption, and so regular, periodic issuance inline with market adoption should be expected. A spike in demand (which is unpredictable and subject to herd mentality) could mean even more frequent issuance. I’m trying to envision these long data tables where someone is supposed to check off the set of issues they trust for the same color on a daily/weekly basis. Sounds like a usability nightmare.
I am not convinced, that this is a great Idea. Please point me to the reasoning. I think a color is meaningful only if associated with terms that describe what it stands for and terms is nothing else then definition of the asset.It is just a change in terminology, basically we just rename color to colored asset.User's will never see "colors" in user interface of their client.
You can also turn this around and see the same terms means same asset, same color that is fungibility of financial assets.There is a purely technical reason to avoid mixing coins which correspond to different genesis txouts.I'll explain it in details in a next message, but basically we know a lot of messy edge cases which can be prevented this way.So again, we do not change semantics, we just:1. Prevent software from mixing coins which descend from different genesis txouts to avoid potential problems.2. rename "color" to "colored asset".The motivation and effect of BIP30 is exactly to disallow same transaction hash.Please read BIP 30 carefully: it only disallows same transaction hash _within one block_.They can still exist in different blocks.
To counter this problem, the following network rule is introduced:
This rule is to be applied to all blocks whose timestamp is after a point in time that is yet to be decided.
BTW only coinbases have a practical chance to produce same hash without being a double-spend too.No: you can spend from this coinbase to exactly same address to produce another tx with same hash.We are working with crypto stuff, relying on "It rarely ever happens" is not an option.If it is possible for an attacker to exploit this, then we need to protect against it.
color_asset_class is a collection of color assets which user thinks are more-or-less fungible.WHAT? There is "no more or less fungibility" in finance!Well, coins from different issuers are not fungible because they carry different counter-party risk.However, user might treat those coins as if they we fungible.
Hi All,
I thought that the seperation to color and asset was to enable "assets" to include multiple single colors.
This could support 2 streight forward expansions :
Have multiplle issuers to the same asset, a ripple like implementation over bitcoinx would allow several issuers to issue a USDCoin and have different colors each but have user X look at them as one asset (offcourse this requires more client side work)
Enable more felxibility in additional issuance of a specific asset, such that not all its colors are the same.
From my understanding it simply creates an additional meta data to the color definition, to allow future flexibility, specifically multi issuance color.
Tamas, Alex,
Can you help me understand the gap in definition ? Is it a semantics issue or a design issue ?
--
- Blocks are not allowed to contain a transaction whose identifier matches that of an earlier, not-fully-spent transaction in the same chain.
This is why BIP30 is there to disallow even the unlikely.
// Do not allow blocks that contain transactions which 'overwrite' older transactions,// unless those are already completely spent.
if (fEnforceBIP30) {for (unsigned int i=0; i<vtx.size(); i++) {uint256 hash = GetTxHash(i);if (view.HaveCoins(hash) && !view.GetCoins(hash).IsPruned())return state.DoS(100, error("ConnectBlock() : tried to overwrite transaction"));}}It checks whether duplicate transaction has any unspent outputs.If there are unspent outputs then block is rejected, otherwise it is accepted.
If you still disagree we can ask Pieter.
From my understanding it simply creates an additional meta data to the color definition, to allow future flexibility, specifically multi issuance color.
Tamas, Alex,
Can you help me understand the gap in definition ? Is it a semantics issue or a design issue ?
Everyone agrees pointer to genesis will include Tx Hash and out index. Alex suggested additionally including a block_number aka ‘height’ to address the BIP30 corner case, fine, let’s move on. I don’t know what you’re talking about ‘offset’, no one suggested trying to pick genesis as the n’th transaction in a block, if that's what you mean?1. The genesis transaction should be identified by its hash not block offset
>1. The genesis transaction should be identified by its hash not block
>offset
Everyone agrees pointer to genesis will include Tx Hash and out index. Alex
suggested additionally including a block_number aka ‘height’ to address the
BIP30 corner case, fine, let’s move on. I don’t know what you’re talking
about ‘offset’, no one suggested trying to pick genesis as the n’th
transaction in a block, if that's what you mean?
> 2. There should be a maturity on the definition
I understand the use case for a ‘maturity’ property, and of course it makes
perfect sense for issuer to specify a maturity in their terms. However,
there’s a big difference between ASCII text in the “terms”, and some
property in the color definition which changes how all color trackers and
wallets should behave. Alex wrote a long response on this, I’m sorry if you
missed it. What you’re actually talking about is an auto-destruct feature,
presumably based on a UTC timestamp, which in theory would only be used for
an asset where the value was absolute zero after that point. ‘Maturity date’
may say when principle is due, that doesn’t mean principle is necessarily
paid at that instant. For some bonds, redemption amount may not even be
possible to calculate until maturity. There's no legal reason the holder of
record can't change after the maturity date. Or a company in bankruptcy may
be negotiating a haircut with bond holders over the final principle payment.
In any case, you don’t want wallets automatically melting assets based on a
timestamp. Let’s keep ‘maturity’ in the “terms” and let the color tracker
remain blissfully ignorant. Users can always melt an asset whenever they
choose.
> 3. The color has to be uniquely linked with the terms it represents, since
> without terms there is no meaning to a color. Because of this one-to-one
> relationship it would also be wise to use the term's hash as the color's
> name or unique identifier.
Are you talking about specifically how to display the name of the coin in
the wallet UI? I think it's an implementation detail that can be left to the
exchange/wallet designer.
> 4. Fungibility of assets is given if they have the same terms, that again
> supports identifying colors with hash of the terms, so they can be merged
> if identical even if they are descendants of separate color genesises.
When you say ‘merged’ do you mean multiple inputs into a single output on
the block chain? Or just from a user interface perspective? Please see my
email earlier today on this topic. Single output on the block chain is a
single color. A multi-genesis color requires a universal point-of-truth for
identifying the genesis outputs, like using a spent-from-address. There may
be other issues I haven't considered, so I'm also waiting to see what Alex
writes on this.
> The corner case he is addressing is absurdly low probability.
We're not concerned about collisions. The attack is not 'trusted issuer X'
identifies a genesis of hash = H, and then an attacker can craft their own
transaction with the same hash = H. That would require a second pre-image.
I think the corner case is 'malicious issuer Y' identifies a genesis by
hash, but it turns out that specific hash can be easily reproduced on the
block chain.
>The self destruction however is needed to contain pollution with colors
>that got irrelevant long ago.
There's nothing stopping an exchange from delisting an asset, or a wallet
from melting an asset, based on their own policy. I don't think "pollution"
is the right analogy -- no one is forcing anyone to track a color they don't
care about. Again, of course expiration will happen, I just don�t think it's
a fundamental property of color tracking.
> No, I am talking about the unique identifier of the color on the lowest
> level. The hash of the terms appears to be the right thing for me.
Could you be more specific of how you think the hash should be used? You
want it on the block chain somewhere? Or perhaps just a way for multiple
parties to identify which asset they are trying to trade.
> Assume an instrument is re-issued e.g. a Bond is tap-ed, that means there
> is a new genesis of the same color, should those meet in a transaction
> then they should have the same color and be able to merge. This is
I refer to with fungibility and that served well with color id derived from
terms.
I think the key problem with merging coins from multi-genesis is to ensure
there is universal agreement those coins have the same terms.
You still need
a way to map terms, or 'color id', onto a set of genesis transactions.
I
suggested defining genesis as "spend-from-address" to solve this, not sure
what you think of that. Having a color id derived from the terms could be
useful, but I don't think it solves this particular problem.