Pages:
Author

Topic: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) - page 45. (Read 129207 times)

sr. member
Activity: 449
Merit: 250
Tachikoma, I'm doing some cross testing - can you please let me know which transaction ID you're using to validate payment for this purchase/accept offer transaction 33644e6f24b29e1ef170d78ff04eab6f7e19368908edc6d477f9902697a71d67?

Thanks! Smiley

https://bitcointalksearch.org/topic/m.3488484

tachikoma said he might have considered purchase offer as payment.

(If this trans is invalid, the other sends of this buyer is also invalid.)
sr. member
Activity: 449
Merit: 250
Tachikoma and bitoy: I am LOVING these charts!

Seriously. I am so jealous of you guys. This has got to be the most fun programming project I have ever seen. I'm grateful for the part I get to play in it, even if I'm not (currently) slinging code.

Doing something new makes this project the most fun programming project I've worked on.   The support from fellow "contestant" is  excellent (And Also the btc  Smiley.   Thank you for the opportunity!
newbie
Activity: 42
Merit: 0
sr. member
Activity: 266
Merit: 250
Tachikoma, I'm doing some cross testing - can you please let me know which transaction ID you're using to validate payment for this purchase/accept offer transaction 33644e6f24b29e1ef170d78ff04eab6f7e19368908edc6d477f9902697a71d67?

Thanks! Smiley
legendary
Activity: 1260
Merit: 1031
Rational Exuberance
Tachikoma and bitoy: I am LOVING these charts!

Seriously. I am so jealous of you guys. This has got to be the most fun programming project I have ever seen. I'm grateful for the part I get to play in it, even if I'm not (currently) slinging code.
sr. member
Activity: 449
Merit: 250
zbx
member
Activity: 64
Merit: 10

I would however encourage you to target Class B transactions in your software for simple sends rather than Class A due to the blockchain bloat issue.


Yeah, it's on my to-do list Wink.
legendary
Activity: 1358
Merit: 1003
Ron Gross
Sorry I just saw you good idea to discuss this over at the issue, and not here.
I won't be commenting on this issue here anymore, only on github.
legendary
Activity: 1358
Merit: 1003
Ron Gross
Zathras / Grazcoin need your thoughts on the following.

User A has 300 Mastercoins and creates/broadcasts selling offer to sell these 300 coins. What happens with user A's balance?

Two options as I see it:

1. The 300 get deducted from his balance making it 0 and simple send transactions sent while his offer is still valid open will get invalidated until he cancels the offer.
2. The 300 stay and are not reserved, only accepted offers get deducted from the balance. If User A sends 100 coins while the offer was still open and User B wants to purchase 300 coins his Purchase Offer will be invalid and he should not send the funds.

I prefer option 1 since it makes things easier to work with and it's expected behaviour on exchanges. This would also mean that you can't make an valid offer that is larger then the amount of MSC that you hold.

Posting an offer that is larger than the amount of MSC you hold is actually an important feature in my book.
Gox had this a while back.

You might want to let _the system_ know you want to sell, even if you don't have the balance yet.
Then, immediately when you receive funds (e.g. you're waiting for a 3rd party to pay you), these funds turn into a live offer.

The UI and offer matching engine should filter "live offers" from offers that lack funding.

I support option #2, not #1.
hero member
Activity: 938
Merit: 1000
I've submitted a PR for the spec to include our "reserved funds" discussion. Please comment on the PR to keep the discussion centralised there: https://github.com/mastercoin-MSC/spec/pull/1
sr. member
Activity: 266
Merit: 250
Great. Thanks for the help.

@zathras, just to be clear, shouldn't it be the other way around, i.e., shouldn't the sequence number of the reference address determine the sequence number of the data address? I can't change the sequence number of the reference address to 52; I must change the sequence number of the data address to 49 (in this example). (This is really just a question of how the spec. should be worded... in parsing, the two might well be equivalent.)

Of course sorry, my reply was worded poorly - I simply meant that during decoding we would expect the sequence number to be 52 but as it's 50 we throw the transaction out - you're correct, in this instance when encoding you would change the data address seqnum to 49 Smiley

I would however encourage you to target Class B transactions in your software for simple sends rather than Class A due to the blockchain bloat issue.

Thanks! Smiley
zbx
member
Activity: 64
Merit: 10
Great. Thanks for the help.

@zathras, just to be clear, shouldn't it be the other way around, i.e., shouldn't the sequence number of the reference address determine the sequence number of the data address? I can't change the sequence number of the reference address to 52; I must change the sequence number of the data address to 49 (in this example). (This is really just a question of how the spec. should be worded... in parsing, the two might well be equivalent.)
hero member
Activity: 938
Merit: 1000
Tachikoma, I don't consider this valid but mastercoin-explorer seems to (though it does seem to throw a bad destination address), is that a bug or do we have differing interpretations of Class A?  

Thanks! Smiley

That's a bug! Will fix that Smiley
sr. member
Activity: 266
Merit: 250
Hello, all.

I'm having trouble with a Mastercoin transaction that I just crafted (using my own software): 'ecb77ee990de29745de949462e1f6e44584c310a0da12c9fbdf86dbe6ffabcfc'. It's called 'Valid' on Mastercoin explorer, but the destination address isn't being properly recognised. It isn't even showing up on Masterchest. It seems that the problem may be with the sequence numbers, which are, in that transaction, ascending. Previous transactions that I sent from that address (using Test MSC), used descending sequence numbers and were parsed properly. But the latest spec (on GitHub) says that they should be ascending, no? In any case, it's not a big deal to me if the transaction in question is invalidated, because I control the destination address, too.

So for this one, it looks like a mastercoin transaction (specifically Class A simple send):

Code:
Console.WriteLine(mlib.ismastercointx(bitcoin_con, "ecb77ee990de29745de949462e1f6e44584c310a0da12c9fbdf86dbe6ffabcfc"))
simple

However as you note the sequence numbers are not correct:

Code:
50 15a4XCuWmx2cCQVf8wZK7mqdvj5uwo1vby
51 15efTnSCG13druGmetEp1AULCEqudtCSwq

Sequence number 51 is your data address, so your reference address should be 52, not 50 - this is why Masterchest throws it out.

From my suggested appendix:

Quote
The reference address sequence number must be the data address sequence number + 1

I hope JR won't mind me saying this, but I think my suggested appendix is the most up to date reflection of how we're parsing transactions at this point in time.  With that said I understand JR is slap bang in the middle of a spec update, and these changes will (I believe) make it into rev 1.2 of the spec.

Tachikoma, I don't consider this valid but mastercoin-explorer seems to (though it does seem to throw a bad destination address), is that a bug or do we have differing interpretations of Class A?  

Thanks! Smiley
zbx
member
Activity: 64
Merit: 10
Hello, all.

I'm having trouble with a Mastercoin transaction that I just crafted (using my own software): 'ecb77ee990de29745de949462e1f6e44584c310a0da12c9fbdf86dbe6ffabcfc'. It's called 'Valid' on Mastercoin explorer, but the destination address isn't being properly recognised. It isn't even showing up on Masterchest. It seems that the problem may be with the sequence numbers, which are, in that transaction, ascending. Previous transactions that I sent from that address (using Test MSC), used descending sequence numbers and were parsed properly. But the latest spec (on GitHub) says that they should be ascending, no? In any case, it's not a big deal to me if the transaction in question is invalidated, because I control the destination address, too.
legendary
Activity: 1260
Merit: 1031
Rational Exuberance
The question I don't see discussed yet; was Buyer A's purchase request confirmed in a block before Buyer B placed their purchase request?

Yeah, the order in the block chain is what matters. We shouldn't show confirmation that it is ok to send bitcoins until at LEAST one block, preferably more.
legendary
Activity: 1260
Merit: 1031
Rational Exuberance
I still think this is a different situation. At one point there _were_ 10 coins available, it just wasn't the case when the payment got confirmed. Only 3 were left. I think it would be weird to see my Purchase Offer being accepted but all of the sudden the amount got reduced from 10 to 3 coins. I might not notice and send Bitcoins worth 10 MSC instead of the 3 I got now. It's all around confusing. I don't understand why not just invalidate the whole Purchase Offer and make it easier for everybody.

I think this is more of a UI design question than a spec question. There will be lots of buy and sell offers going on, and the higher the trading volume, the more annoying it will be to not get partial fills.

We already need to design the UI carefully so that the user knows not to send bitcoin payment until they receive confirmation. We also need to make sure that the confirmation is very explicit about how many coins they have reserved for purchase (which might not be the amount they were trying to buy) and how much money they need to send, and where to send it. A simple binary switch (you got it, or you didn't) doesn't handle collisions very elegantly.
hero member
Activity: 938
Merit: 1000
The spec does provide for truncating an order to available units:

Quote
3. Amount you are purchasing = 130,000,000 (1.30000000 MasterCoins) (64-bit unsigned integer, 8
bytes, should not exceed number available for sale, but if it does, assume buyer is purchasing all
of them
)

The question I don't see discussed yet; was Buyer A's purchase request confirmed in a block before Buyer B placed their purchase request?

I still think this is a different situation. At one point there _were_ 10 coins available, it just wasn't the case when the payment got confirmed. Only 3 were left. I think it would be weird to see my Purchase Offer being accepted but all of the sudden the amount got reduced from 10 to 3 coins. I might not notice and send Bitcoins worth 10 MSC instead of the 3 I got now. It's all around confusing. I don't understand why not just invalidate the whole Purchase Offer and make it easier for everybody.
sr. member
Activity: 266
Merit: 250
The spec does provide for truncating an order to available units:

Quote
3. Amount you are purchasing = 130,000,000 (1.30000000 MasterCoins) (64-bit unsigned integer, 8
bytes, should not exceed number available for sale, but if it does, assume buyer is purchasing all
of them
)

The question I don't see discussed yet; was Buyer A's purchase request confirmed in a block before Buyer B placed their purchase request?

hero member
Activity: 938
Merit: 1000
This makes the implementation much harder to validate and makes it harder for people to understand what is going on with their offers.

J.R. can you make a decision on this one?
Pages:
Jump to: