Pages:
Author

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

newbie
Activity: 34
Merit: 0
Masterchain.info/HybridWebWallet:
I'm getting ERROR in the source script field when I prepare a simple send of TMSC or a sell offer. I've verified the address before and got an OK.
hero member
Activity: 938
Merit: 1000
The guys from engine.co found a potential race condition where the user could accidentally create a new sell order when they were trying to change an old one, because the old one had already been bought.

At my suggestion, Marv made this pull request to add a 2-confirmation time limit after a sale is complete before that address can initiate a new sell offer: https://github.com/mastercoin-MSC/spec/pull/38

I'm posting here because not respecting the time limit will lead to consensus divergence, so I want to make sure everybody is aware of it.

Thanks!

Perhaps it's the lack of sleep but I don't like the fact that this has been merged already, up till now everything we did was democratic. Shouldn't we discuss such a major change in the protocol before merging it? I would appreciate it if at least some examples could be given in how this is suppose to work before and after the merge.

I also think this pull request should be open for discussion like any other pull request.
my opinion:
I don't think this solution really solves this race condition, e.g. due to difference in fee amount and inputs complexity of the buy/sell change transactions, the sell offer change can still get merged 2 confirmations later, and then we're in the same race condition state.

Alternative solution would be to keep only the option to cancel the offer (amount zero), and omit the option to change it.
If one wants to make a change, he can first cancel the old offer, and then create a new one.

EDIT: it would be also much easier to implement, and reduce complexity.


My plus 1 for this idea. Separate messages make a lot of sense to me.
newbie
Activity: 10
Merit: 0
Hey guys,

It's great to see so much progress lately on this awesome project.
I'd like to help with testing the DEx, could I get some Test MSC for that?
The Testnet address is mkXFVEDn8rf5L4k9dw1rKBgU1Ceu69rrsn, BTC address is 1B4dzdSTt8p1qfMba4MTPUvABDXDYTHT2S, thanks.
Also, if I try adding the address to the masterchain wallet as described here https://masterchain.info/downloads/masterchain_tutorial.pdf
it just shows me an empty wallet page with no addresses in it after clicking on "Add to wallet". I tried several times with different addresses but it doesn't seem to work for me. I'm using Chrome on Windows 8 if that's important.

I hope I can be of help,
Best wishes
newbie
Activity: 34
Merit: 0
Is there a way to speed up the transactions? Or is it usual to have 8 hours until 1st confirmation?
Do many miners reject multisig transaction?

Edit: Nevermind, second transaction was quickly processed.
newbie
Activity: 30
Merit: 0
Hiya,

As things start to heat up (cool!) - it's clear you require help testing - i'd like to be involved. Is there any clear plan or list of tasks that one should accomplish?

Thanks for all the hard work.

hero member
Activity: 938
Merit: 1000
My DEx transactions are getting stuck in a verification loop, don't mind any of my output at the moment.
sr. member
Activity: 449
Merit: 250
sr. member
Activity: 284
Merit: 250
The guys from engine.co found a potential race condition where the user could accidentally create a new sell order when they were trying to change an old one, because the old one had already been bought.

At my suggestion, Marv made this pull request to add a 2-confirmation time limit after a sale is complete before that address can initiate a new sell offer: https://github.com/mastercoin-MSC/spec/pull/38

I'm posting here because not respecting the time limit will lead to consensus divergence, so I want to make sure everybody is aware of it.

Thanks!

Perhaps it's the lack of sleep but I don't like the fact that this has been merged already, up till now everything we did was democratic. Shouldn't we discuss such a major change in the protocol before merging it? I would appreciate it if at least some examples could be given in how this is suppose to work before and after the merge.

I also think this pull request should be open for discussion like any other pull request.
my opinion:
I don't think this solution really solves this race condition, e.g. due to difference in fee amount and inputs complexity of the buy/sell change transactions, the sell offer change can still get merged 2 confirmations later, and then we're in the same race condition state.

Alternative solution would be to keep only the option to cancel the offer (amount zero), and omit the option to change it.
If one wants to make a change, he can first cancel the old offer, and then create a new one.

EDIT: it would be also much easier to implement, and reduce complexity.
hero member
Activity: 938
Merit: 1000
I'm getting this  transaction as invalid
8d47449b082ffe6f6b2adad327591778c43bf984e84062fb1cb13320b47ccbbd

TMSC

Date: 11/10/2013 9:22:18 AM      
Remarks: Sender 16rAwebBXhJAM9ALf3fLFbaHKz24r2o3UN doesn't have 1.337 TMSC. Bal:1.1583 Sale:0.002 Pend:0      

11/8/2013 6:44:20 AM   1NHVAzYT2jQ8roRddYXhvZtiVjuMwuWBGn .1337   6890  
11/7/2013 8:15:22 AM   1NHVAzYT2jQ8roRddYXhvZtiVjuMwuWBGn .808   6866  
11/2/2013 10:15:26 PM   1F73UPD5xBKgTSRd8q6QhuncVmDnJAHxYV .1   6727  
11/2/2013 10:15:22 AM   18xEZx3po1iJWP5H2aM3Do11dCGQyaebnT .2 .003232 6736  
10/28/2013 8:13:38 AM 2.4 1NHVAzYT2jQ8roRddYXhvZtiVjuMwuWBGn     6708  

Yeah the problem is I have been messing with the DEx for two months now and it's really about time I do a full reimport because some of these transactions got imported with the old logic. I will make some time over the weekend to create a development database and see the consensus between the old and new. Until that time please assume you implementation is the correct one Smiley

Grazcoin: Could you take a look at a1b5d7c73e9ec345075eb2357c4dbfced610bdac63808f2f0d05fa431e266795? It appears you are using the change address as recipient for this transaction.
hero member
Activity: 938
Merit: 1000
The guys from engine.co found a potential race condition where the user could accidentally create a new sell order when they were trying to change an old one, because the old one had already been bought.

At my suggestion, Marv made this pull request to add a 2-confirmation time limit after a sale is complete before that address can initiate a new sell offer: https://github.com/mastercoin-MSC/spec/pull/38

I'm posting here because not respecting the time limit will lead to consensus divergence, so I want to make sure everybody is aware of it.

Thanks!

Perhaps it's the lack of sleep but I don't like the fact that this has been merged already, up till now everything we did was democratic. Shouldn't we discuss such a major change in the protocol before merging it? I would appreciate it if at least some examples could be given in how this is suppose to work before and after the merge.
newbie
Activity: 15
Merit: 0
很牛b的样子 围观 Shocked一下
hero member
Activity: 1232
Merit: 683
Tontogether | Save Smart & Win Big
Nice!

Sent my first transaction through the site:
https://blockchain.info/tx/bf9d9904a3797a36b42213e45974c9ee5a7a759147fef79c1648dc62cdc13b19


Also made a Sell offer but I believe I found a bug under "Price per coin" it won't let me type in a decimal, so I went to sell at .003 and instead it listed the sell offer at 3 BTC after typing in 003.

Update: I found that you must type 0 before typing in a decimal, I was attempting to put in .003 which didn't work but when typing in 0.003, it works perfect.


There is no way to cancel orders correct?




I could accept also format of .003, but for now only 0.003 is considered as valid.
To cancel an order, you create the same order with amount 0.
I am not sure that version that runs now on the website parses it correctly.



I tried to create the same order with amount 0 but after submitting the sell order I still see the 3 BTC sell order. Hopefully no one makes a mistake and buy's it on accident, though if they do I will fully refund them heh.



I will fix that parsing whenever I get to it (hopefully on the weekend).
Can you please give the tx hash so I don't have to look for it?


d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43


Also zathras v2 is another step closer to DEx Smiley
sr. member
Activity: 266
Merit: 250
Quick note to say v2 is now live (https://masterchest.info).

The major point for v2 is of course DEx support, there are a few other bits and pieces (like test MSC consensus monitoring) along with the new simplified Class A transaction parsing model.

I'm fully expecting there to be some bugs at first, please do let me know if you come across anything incorrect or unexpected.

Thanks Smiley
Zathras
legendary
Activity: 1260
Merit: 1031
Rational Exuberance
The guys from engine.co found a potential race condition where the user could accidentally create a new sell order when they were trying to change an old one, because the old one had already been bought.

At my suggestion, Marv made this pull request to add a 2-confirmation time limit after a sale is complete before that address can initiate a new sell offer: https://github.com/mastercoin-MSC/spec/pull/38

I'm posting here because not respecting the time limit will lead to consensus divergence, so I want to make sure everybody is aware of it.

Thanks!
sr. member
Activity: 284
Merit: 250
Nice!

Sent my first transaction through the site:
https://blockchain.info/tx/bf9d9904a3797a36b42213e45974c9ee5a7a759147fef79c1648dc62cdc13b19


Also made a Sell offer but I believe I found a bug under "Price per coin" it won't let me type in a decimal, so I went to sell at .003 and instead it listed the sell offer at 3 BTC after typing in 003.

Update: I found that you must type 0 before typing in a decimal, I was attempting to put in .003 which didn't work but when typing in 0.003, it works perfect.


There is no way to cancel orders correct?




I could accept also format of .003, but for now only 0.003 is considered as valid.
To cancel an order, you create the same order with amount 0.
I am not sure that version that runs now on the website parses it correctly.



I tried to create the same order with amount 0 but after submitting the sell order I still see the 3 BTC sell order. Hopefully no one makes a mistake and buy's it on accident, though if they do I will fully refund them heh.



I will fix that parsing whenever I get to it (hopefully on the weekend).
Can you please give the tx hash so I don't have to look for it?
sr. member
Activity: 284
Merit: 250
Great job work Grazcoin, the masterchain.info site looks very good.

I was trying to make a sell offer for some MSC but when I tried verifying it said no pubkey on blockchain, it's probably a newb question but what did I do wrong?


My guess would be the following:

Your address has never been used before on the Bitcoin blockchain. Because of this Masterchain.info doesn't know your public key and can't create the transaction for you. Using this address to spent an output would probably solve this issue.

Graz uses the opposite approach that I'm using; that is I ask you for the public key. His solution is probably better since most people wouldn't know how to retrieve their public key. But perhaps he could add my solution as backup in case this happens.

OK, will make a transaction and try again.

I agree that there should be an option to input a pubkey as a backup, just wondering would the fact that you would have to enter your address and pubkey be a security risk for any reason?

Indeed. For addresses that never signed anything on the blockchain - there is no way to retrieve the public key, so you should enter the public key yourself.
Once you do, the transaction can be generated.

sr. member
Activity: 284
Merit: 250
Tachikoma - the balance of 12QcQmKr7TaPNSHV4g2Nts3nvQAHwKN9cF is (-1)
http://mastercoin-explorer.com/addresses/12QcQmKr7TaPNSHV4g2Nts3nvQAHwKN9cF
It means that you already partially accept DEx for mastercoins (although feature is not yet available), and you also allow negative balances ;-)
Grazoin

sr. member
Activity: 266
Merit: 250
Blast these differing timezones!!!!!  Last hackathon was great because of the real-time collaboration (rather than back and forth over the forums where I reply while you guys are sleeping & then vice versa lol).

I think we should do another for DEx consensus as soon as we can arrange it Smiley

On the topic of consensus - I'm also keen to get the block time in there ASAP because we keep slipping on consensus not due to failure but due to update speed.  With the block time in there I can 'grey out' results that aren't as of the latest block and exclude them from consensus score calculation.

Tachikoma - you mentioned a couple of options - I like 1 (the information URI) as that gives us a lot of flexibility to add other attributes as we discover their utility.  Also did you know you've got a negative balance on one of the addresses?  Hehe love the monkey patching ref - if that was a crime I'd be strung up Tongue

Bitoy - think you're behind mate.



Also I'm going to live v2 even though the pull that validates the ambiguous transactions is still outstanding - since you guys have all already validated those transactions, I can only assume it's going to get merged in some form or other (masterchest.info v1 (prod) still invalidates them per current spec)

Thanks Smiley
Zathras

hero member
Activity: 1232
Merit: 683
Tontogether | Save Smart & Win Big
Nice!

Sent my first transaction through the site:
https://blockchain.info/tx/bf9d9904a3797a36b42213e45974c9ee5a7a759147fef79c1648dc62cdc13b19


Also made a Sell offer but I believe I found a bug under "Price per coin" it won't let me type in a decimal, so I went to sell at .003 and instead it listed the sell offer at 3 BTC after typing in 003.

Update: I found that you must type 0 before typing in a decimal, I was attempting to put in .003 which didn't work but when typing in 0.003, it works perfect.


There is no way to cancel orders correct?




I could accept also format of .003, but for now only 0.003 is considered as valid.
To cancel an order, you create the same order with amount 0.
I am not sure that version that runs now on the website parses it correctly.



I tried to create the same order with amount 0 but after submitting the sell order I still see the 3 BTC sell order. Hopefully no one makes a mistake and buy's it on accident, though if they do I will fully refund them heh.

sr. member
Activity: 449
Merit: 250
Tachikoma,

http://mastercoin-explorer.com/transactions/189e0d3f4c4cdc04a70a71d7bcb78ad3c4685220d5931d58ab811443e87afba6

Amount Bought is 1.088
But you Amount Accepted is 1.08802089

1QFWodNASZv8KRHnhypKaMys5CGRg7GrFQ
Pages:
Jump to: