Pages:
Author

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

legendary
Activity: 1050
Merit: 1000
I tried using the faucet to get my first Mastercoin, but got only test Mastercoins  Sad
https://masterchest.info/lookupadd.aspx?address=13Q6qSEHxhspYW5wUAbeXcCrTUmJ36PMty

That could mean you have used the faucet before and received real MSC.
You will receive MSC and TMSC once.

I have not. This was the first time I tried.
The message I got at the end after all the verification showed only Test Mastercoin.

On Mastercointalk forum too I can not log in. I keep getting this message 'Your account is still awaiting admin approval.'
hero member
Activity: 644
Merit: 500
I tried using the faucet to get my first Mastercoin, but got only test Mastercoins  Sad
https://masterchest.info/lookupadd.aspx?address=13Q6qSEHxhspYW5wUAbeXcCrTUmJ36PMty

That could mean you have used the faucet before and received real MSC.
You will receive MSC and TMSC once.
legendary
Activity: 1050
Merit: 1000
I tried using the faucet to get my first Mastercoin, but got only test Mastercoins  Sad
https://masterchest.info/lookupadd.aspx?address=13Q6qSEHxhspYW5wUAbeXcCrTUmJ36PMty
sr. member
Activity: 284
Merit: 250

The first problem that I have seen is J.R. last TMSC set of transactions before the bounty 2 payment.
https://masterchest.info/lookuptx.aspx?txid=f641c18f98b242a791c3e3a06661474794ac27d196b02704179a36a8c6234737


Zathras said that the current agreement is that no TMSC are awarded to the exodus address. It means that this transaction is indeed invalid.
masterchain.info got updated.

Now https://masterchain.info/general/TMSC-difference.txt has still many lines.

The first one is:
1MCHESTbJhJK27Ygqj4qKkx4Z4ZxhnP826: masterchain 9.0; mymastercoins 8.0; masterchest 8.0;

on masterchest:
https://masterchest.info/lookupadd.aspx?address=1MCHESTbJhJK27Ygqj4qKkx4Z4ZxhnP826
we can see that 2 sell offers were given one ofter the other, but they are both considered as valid:

https://masterchest.info/lookuptx.aspx?txid=a6578d96c62f95db8dafcc3b1ef66e3cbbfc37246386e1a6e5827d316c533d02
https://masterchest.info/lookuptx.aspx?txid=21055eae2c3b4d900755378f099fe06d7f28666a4156c8449a46493ecd86a8d4

masterchain.info invalidates the second, as only one sell offer is allowed per address.
https://masterchain.info/selloffer.html?tx=21055eae2c3b4d900755378f099fe06d7f28666a4156c8449a46493ecd86a8d4
(hover over "invalid" to get invalidation reason).

am I correct?


sr. member
Activity: 284
Merit: 250
You may find consensus checkers for both MSC and TMSC here:

In text format:
https://masterchain.info/general/MSC-difference.txt
https://masterchain.info/general/TMSC-difference.txt

In json format:
https://masterchain.info/general/MSC-difference.json
https://masterchain.info/general/TMSC-difference.json

(the previous https://masterchain.info/general/difference.json is now a link to https://masterchain.info/general/MSC-difference.json)

The difference of MSC is already shrinking, but the TMSC difference seems large.

The first problem that I have seen is J.R. last TMSC set of transactions before the bounty 2 payment.
It seems mymastercoins and masterchest assume exodus address does not have enough TMSC. This causes a long chain of failures.

https://masterchest.info/lookuptx.aspx?txid=f641c18f98b242a791c3e3a06661474794ac27d196b02704179a36a8c6234737
same on http://mymastercoins.com/Default.aspx

btw - is there a way in mymastercoins to give a direct link to transaction?

comments?
sr. member
Activity: 284
Merit: 250
Getting slowly back to consensus on MSC.
https://masterchain.info/general/difference.txt

What's left:

1EAPGcQWz5pwiK98Y8PzWyetqjawsQDRCj: masterchain 0.0; mymastercoins 0.0025; masterchest 0.0025;
1PVWtK1ATnvbRaRceLRH5xj8XV1LxUBu7n: masterchain 0.00011111; mymastercoins 0.00022222; masterchest 0.00022222;
16X6UDz6dMkVAAkWdY6HKe85o6EVAbzDtn: masterchain 0.00275; mymastercoins 0.00025; masterchest 0.00025;
1HbEJjzhU52sjqyhs1KP7L8MXJdFXMhzBM: masterchain 0.0; mymastercoins 0.0005; masterchest 0.0005;
1DYb5Njvcgovt9gUMdMgYkpaQjAEdUooon: masterchain 0.0; mymastercoins 0.00014118; masterchest 0.00014118;
1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc: masterchain 0.000875; mymastercoins 0.000375; masterchest 0.000375;
1MaStErt4XsYHPwfrN9TpgdURLhHTdMenH: masterchain 17952.5523665; mymastercoins 17952.5521142; masterchest 17952.5521142;

At least part of it is due to validity of transaction with BIP11/BIP16 inputs.
We already agreed to invalidate them after a discussion:
Zathras agreed: https://bitcointalksearch.org/topic/m.3644277
Tachikoma agreed: https://bitcointalksearch.org/topic/m.3640210

examples for such a tx:
https://blockchain.info/tx/6d68b101c8b92b38c02595a084aa5c8b0308c4f2f5714070d7656251075dbbcf
https://blockchain.info/tx/5a6ebc8fb1969f4d79af34006affd69aa0cac5c25bf9e434aec6333f5f71926e

Currently, those tx are still valid:
https://masterchest.info/lookuptx.aspx?txid=6d68b101c8b92b38c02595a084aa5c8b0308c4f2f5714070d7656251075dbbcf
Same on http://mymastercoins.com/

Zathras, Bitoy - can you please update?

hero member
Activity: 644
Merit: 500

Mymastercoins Wallet v 2 released.

http://mymastercoins.com/MyMSCWallet.aspx

Posted a link at mastercointalk.org
Thank you for this wallet
sr. member
Activity: 284
Merit: 250
It seems already MSC consensus is broken.
https://masterchain.info/general/difference.json

I just go over the (MSC) differences one by one.
The first difference (12BjxEGAGcLnpXVbJHp4L5FNKh1YNweRn7) is due to the tx:
725210a6bfea06e4aa9a582602d758db920eff9c720aca380d6e77c08a4108ac

My parsing says:
invalid mastercoin tx (failed all peek and decode levels)

My code was implemented after https://github.com/mastercoin-MSC/spec/issues/29
https://github.com/grazcoin/mastercoin-tools/blob/master/msc_utils_parsing.py#L181
Level 1, 2 and 3 failed.

I assume you have the updated version:
https://github.com/mastercoin-MSC/spec/#class-a-transactions-also-known-as-the-original-method

correct?
If so, then I will update my code then.

sr. member
Activity: 284
Merit: 250
A step towards DEx consensus!

masterchain.info got a DEx update.
The orderbook (TMSC) can be found here:
https://masterchain.info/index.html?currency=TMSC&filter=sell

An example for updated sell offer transaction (sell offer version 0001 with action 02) is here:
https://masterchain.info/selloffer.html?tx=fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58¤cy=TMSC
You can check the field "Updating offer" to see the previous depracated offer.

On the address
https://masterchain.info/Address.html?addr=1BKpa19m5Xy9SvSzC5djPWtCfbuynSDwmb¤cy=TMSC
You could see among the sell offers the live and the depracated ones.

My consensus checker still checks MSC, but I will add TMSC. It seems already MSC consensus is broken.
https://masterchain.info/general/difference.json

Let's get first to MSC consensus, break the TMSC consensus with complicated buy/sells (1BKpa19m5Xy9SvSzC5djPWtCfbuynSDwmb did a good job) and fix it!

sr. member
Activity: 449
Merit: 250
sr. member
Activity: 284
Merit: 250


On my parsing it is still invalid:
https://masterchain.info/selloffer.html?tx=fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58¤cy=MSC
and the invalid reason (hover red Invalid) is "invalid last data script in BIP 11".
or the json:
https://masterchain.info/tx/fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58.json

You data script is:
0002004e2002000000000000000000000000000000000000000000000000000000
and my internal parsing says:

parse_multisig: {'action': '0', 'should_be_zeros': '2000000000000000000000000000000000000000000', 'fee_required': '004e20'}

The relevant parsing code is the function parse_2nd_data_script:
https://github.com/grazcoin/mastercoin-tools/blob/master/msc_utils_parsing.py#L60




The action is 1 byte 8 bit unsigned integer.  
https://github.com/mastercoin-MSC/spec#field-sell-offer-sub-action

So instead of "2" (for update) I changed it to  "02"



OK. I updated also to "02".
legendary
Activity: 1358
Merit: 1003
Ron Gross
Going forward we are paying out $100,000 each month, plus an additional amount of Dev MSC.

http://mastercointalk.org/index.php?topic=121.0
legendary
Activity: 2478
Merit: 1362
Are you seriously paying out 300?

Half (150 btc) have been already paid.
newbie
Activity: 47
Merit: 0
newbie
Activity: 28
Merit: 0
Are you seriously paying out 300?
sr. member
Activity: 449
Merit: 250


On my parsing it is still invalid:
https://masterchain.info/selloffer.html?tx=fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58¤cy=MSC
and the invalid reason (hover red Invalid) is "invalid last data script in BIP 11".
or the json:
https://masterchain.info/tx/fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58.json

You data script is:
0002004e2002000000000000000000000000000000000000000000000000000000
and my internal parsing says:

parse_multisig: {'action': '0', 'should_be_zeros': '2000000000000000000000000000000000000000000', 'fee_required': '004e20'}

The relevant parsing code is the function parse_2nd_data_script:
https://github.com/grazcoin/mastercoin-tools/blob/master/msc_utils_parsing.py#L60




The action is 1 byte 8 bit unsigned integer.  
https://github.com/mastercoin-MSC/spec#field-sell-offer-sub-action

So instead of "2" (for update) I changed it to  "02"
sr. member
Activity: 284
Merit: 250
Here is a new trans I posted from the wallet

2 byte trans version
1 byte action

fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58

Please check if it is correct.

On my parsing it is still invalid:
https://masterchain.info/selloffer.html?tx=fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58¤cy=MSC
and the invalid reason (hover red Invalid) is "invalid last data script in BIP 11".
or the json:
https://masterchain.info/tx/fdebcfcaf4d7bceddd206dc1f334d7c5ccb7a6890c0cfe9d7926be6d7d5e2f58.json

You data script is:
0002004e2002000000000000000000000000000000000000000000000000000000
and my internal parsing says:

parse_multisig: {'action': '0', 'should_be_zeros': '2000000000000000000000000000000000000000000', 'fee_required': '004e20'}

The relevant parsing code is the function parse_2nd_data_script:
https://github.com/grazcoin/mastercoin-tools/blob/master/msc_utils_parsing.py#L60


legendary
Activity: 1106
Merit: 1026
With the faucet one significant expense is the transportation cost. To collect all those multi-sig outputs that are spendable I did this:

1. List and store all transactions for address X
2. Iterate over all outputs and store those which are from type "mutlisig" and require one signature and include address X
3. Create a raw transaction that spents such output from (2) for each potential output
4. If signrawtransaction for (3) returns "complete", this output is indeed spendable
5. Store all those and create a transaction that uses all spendable outputs as inputs and send the coins back to address X

This is how the result looks like:

https://blockchain.info/tx/21db95ecd700438bf46e0a435410c27ab0f235218a80afacd81db4fec5bf8260 (ignore the "script translation" from blockchain.info.. of course no OP_FALSE was used)


If you like to test this yourself, feel free to use this as basis:

https://gist.github.com/dexX7/9146763


For some odd reason my local bitcoind client started to return a success for outputs that are already spent and thus the whole approach fails now, because the success or failure of signing the tx determined, if an output shall to be considered as spendable. edit: there was one case where an output was added to the list two times.

I haven't looked at alternative implementations like sx or libbitcoin. I like to know, if one of those is worth to look at and if anyone of you guys here already worked on a solution for spending multisig outputs. Smiley

newbie
Activity: 34
Merit: 0
Any guidance on what needs to be tested currently?
legendary
Activity: 1106
Merit: 1026
Thanks zathras and Bitoy!

To pick this up again, those are the API endpoints I found:

Code:
https://masterchest.info/mastercoin_verify/addresses.aspx
https://masterchest.info/mastercoin_verify/transactions.aspx?address=[ADDRESS]¤cyid=[CURRENCYID]

http://www.mymastercoins.com/jaddress.aspx?address=[ADDRESS]¤cy_id=[CURRENCYID]
http://www.mymastercoins.com/jtransactions.aspx?address=[ADDRESS]¤cy_id=[CURRENCYID]

https://masterchain.info/mastercoin_verify/addresses/[CURRENCYID - 1]
https://masterchain.info/mastercoin_verify/transactions/[ADDRESS]
Pages:
Jump to: