If you guys think there are better ways though let's look at those
I already said before that flexibility is welcomed for more advanced uses of mastercoin.
I'm not sure I agree with this - the whole idea of using the sender for change (which I believe both Tachikoma and I do) is to 'solve the change problem' in the simplest manner.
This is a
strategic question that we are dealing here with, and more people have to decide on this (J.R., board, ...):
Do we want masterchain to be future compatible or not?I obviously think that the answer is YES, and I try to come up with solutions that keep the common tx simple, but leave an option for more advanced uses (in a similar way to bitcoin's protocol approach). Any solution that enables reasonable future compatibility is fine with me.
Taking zathras comments into consideration I modified my porposal to the following:
TX with 3 outputs: exodus, recipient, BIP11 - is valid (trivial case). The redeeming public key inside BIP11
MUST be the one of the sender.
TX with 4 outputs: exodus, recipient, change, BIP11 - is valid (change case). Like above + the change
MUST go to the sender (to identify easily the recipient).
TX with more than 4 outputs (future compatible) - valid
ONLY under the following set of rules:
- Exodus and recipient outputs MUST have the same value (we have it already today).
- Change MUST go to sender (tachikoma+zathras suggestion).
- Pubkey in BIP11 MUST belong to sender (tachikoma+zathras suggestion).
- Other outputs CANNOT have the same value like the Exodus one.
"Other outputs" (which are easily detectable) are ignored for mastercoin purposes.
If tx has more than 4 outputs (the advanced sender uses future-compatible feature intentionally), the sender knows that by not following the above 4 rules, his tx will be invalid.
I think for now we have enough ways to send the messages, we just need to code up support for more of them. I'm happy with the current implementation and think we should leave this discussion for when we are a bit further along.
Sorry for the delayed responses guys, things have been a little crazy at the day job!
Re above, I think that's mostly what's already been agreed, though the outputs being the same we don't currently apply & I don't think we need to. Class B is really nice and simple:
* For pubkeyhash outputs, we only have two (Exodus & Recipient), plus a possible third for change as long as it equals sender - no ambiguity here
* For multisig outputs, we can have as many as we need, then we just scoop up all the data pubkeys put them in order and we have our data payload from 1 to 7,650 bytes - no ambiguity here either
As such there isn't really a need to try and enforce same output values etc with Class B again contributing to the simplicity
We can always build another transaction class if we find in future we need to do something different (though I can't see what we're restricting with Class B but then I also don't pretend to see the future!), but for now I'm with Tachikoma that Class B should be effectively locked in now. The only remaining debate is the ongoing compressed/uncompressed public key for the sender discussion, but that doesn't need to be set in stone yet - we all support decoding both types and my case for encouraging the use of compressed keys is a case for lightening the transaction weight, not changing the way the transaction works. I guess the compressed sender pubkey could be considered a discussion on best practice rather than specification if that helps set the context
Can I get a MSC address from Tachikoma, Zathras, and grazcoin please?
I'd like to send you each some MSC from the Exodus Address (needs to be approved by the board, but I'm thinking 500 MSC each). A MSC send from the Exodus Address will currently be invalid on all of your implementations, but the board has been pestering me about when we'll have access to reward MSC (the 10% which is slowly vesting over the next few years) for use in bounties. That work is outside the scope of the current coding contest, so I figured I'd provide an incentive, by sending you each some of those MSC so you'll be motivated to find a few minutes to add support for those coins
The balance at the Exodus Address varies over time, so there may be a bit of complexity with supporting those coins. As long as you check the balance as of each send from 1exodus, there shouldn't be any problem determining that a send is valid. I'd suggest that you round down to midnight of the previous day when displaying the balance. The formula for percent vested is 1-(0.5^y) where y is the number of years since the fundraiser ended September 1st 2013. Right now, y is about 0.16666, so the reward MSC are about 11% vested. Since there are 619478.59338440 MSC in the world, 61947.859338440 of those are reward MSC. 11% of those is a bit less than 7000 MSC available there right now.
Thanks!
Wow, that's really generous! Thanks! I'll take a day or two away from building distributed exchange into the masterchest wallet and look at putting some code together to handle reward MSC & Exodus sends.
619478.59338440 MSC in the world, 61947.859338440 of those are reward MSC. 11% of those is a bit less than 7000 MSC available there right now.
I believe this is not correct. As quoted from mastering explorer
Total bought via Exodus MSC 563,162.36
Total MSC that will ever exist
563,162.36 × 110% = 619,478.596 Cap
Total reward MSC
563,162.36 x 0.1 = 56,316.236 Reward MSC
You are correct - I was multiplying 10% times the total of all MasterCoins, rather than 10% of the total sent to 1exodus. Thanks for the correction.
I got my number for the total number of MSC from the FAQ here:
http://wiki.mastercoin.org/index.php/FAQ#How_many_mastercoins_exist.3FIt might need to be updated
The figure in the wiki is accurate. You may remember we had a discussion on the semantics of reward mastercoins and the outcome of that was to consider all reward mastercoins created, but only spendable as per the formula specified in the spec.
This helped to counter the "mastercoins are continually created in an ongoing process" misconception and helped establish that Mastercoin has a fixed cap of 619478.59338440 MSC.
563,162.35762218 were purchased from the Exodus address, which created 56,316.23576222 reward MSC giving a total cap of 619,478.59338440 MSC.
Thanks!