Pages:
Author

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

sr. member
Activity: 266
Merit: 250
Bitoy (and others). The spec mentions that the amount used in a Selling Order should be reserved and thus removed from the balance. I did a consensus check between us and I think you are not doing that yet. Because of this its harder to compare numbers; could you check your output and see if you could build in reserved funds to your solution?
Hey Tachikoma,

I already do the above but still struggling to locate differences between us from comparisons - are you already doing the above?

For example let's look at 1LjT88X7Zu8BdbqJw8vfRa83NJuzYL9kqm, they got 107.12380845 TMSC from Exodus, bought & sold exactly 1 TMSC, sent & received exactly 1 TMSC.  Thus balance is still exactly 107.12380845.

However the address has an active selling order with 1 TMSC reserved.  Thus the balance should be 106.12380845 TMSC + 1 TMSC reserved.

Your final balance & verification API still provide 107.12380845 though (which lacks consensus with my 106.12380845 TMSC state). 





Is this a bug your end or am I missing something? (haven't slept much in the last couple of days so it may be something obvious Wink

Thanks
Zathras

Atriz - I actually think the above is yours - I thought 3BTC for 1TMSC was a bit strong!!! Smiley  Protocol wise you cancel a sell by creating another sell with a sale amount of zero.  To change you simply do another sell offer (you can only have one sell open at any one time).  Not sure how that applies to Graz's implementation though, he'd have to advise you there.
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?


legendary
Activity: 1260
Merit: 1031
Rational Exuberance
wallet + DEx update:

Good news:
Tutorial for masterchain.info's cool Hybrid web wallet (TM) that does bitcoin/mastercoin sending as well as Distributed Exchange operations is available on:
https://masterchain.info/downloads/masterchain_tutorial.pdf

What it CAN do:
  • Show balances of MSC/TMSC/BTC for each of your addresses (just add them to the wallet)
  • Initiate a send/sell of each of the funds on the wallet
  • Suggest wallet addresses when clicking ACCEPT on an sell offer
  • Generate a correct PAY transaction after the offer got accepted

What it CANNOT (yet) do:
  • Sync wallet with server is not yet implemented. It means that the wallet is kept only locally in your browser. To re-create it, add the addresses to a new wallet

Few technical details:
  • All view pages are rendered locally on your browser using json data from the server (or from your filesystem). The json files are static (so no problem for 1M users together, since users bring their own CPUs)
  • Wallet is kept in browser storage. No private information is stored. A secure mechanism to keep the wallet data online will be later introduced
  • Wallet operations are done using a POST request from the server to:
    • /wallet/validateaddr/
    • /wallet/send/
    • /wallet/sell/
    • /wallet/accept/
  • At this point, the tx gets the bitcion network using pushtx of blockchain.info (will be later changed)

Testing:        
Not enough testing has been done. There are still sharp edges, and some hick-ups.
Example are available in the tutorial.
There is still enough work to get to consensus on DEx.


Sources:
https://github.com/grazcoin/mastercoin-tools

Note:
the wallet is not a cold wallet, but a cool wallet ;-)


 Whoa! Shocked

That is a big step forward!!

Everybody please remember that we are giving a way a HUGE 50 BTC bounty (over $40k at current prices) for testing alone in addition to the even larger down payment on the distributed exchange work on 1/22. Testing this implementation is a great opportunity to earn some of that cash. Talk about fast, easy money!!
sr. member
Activity: 284
Merit: 250
wallet + DEx update:

Good news:
Tutorial for masterchain.info's cool Hybrid web wallet (TM) that does bitcoin/mastercoin sending as well as Distributed Exchange operations is available on:
https://masterchain.info/downloads/masterchain_tutorial.pdf

What it CAN do:
  • Show balances of MSC/TMSC/BTC for each of your addresses (just add them to the wallet)
  • Initiate a send/sell of each of the funds on the wallet
  • Suggest wallet addresses when clicking ACCEPT on an sell offer
  • Generate a correct PAY transaction after the offer got accepted

What it CANNOT (yet) do:
  • Sync wallet with server is not yet implemented. It means that the wallet is kept only locally in your browser. To re-create it, add the addresses to a new wallet

Few technical details:
  • All view pages are rendered locally on your browser using json data from the server (or from your filesystem). The json files are static (so no problem for 1M users together, since users bring their own CPUs)
  • Wallet is kept in browser storage. No private information is stored. A secure mechanism to keep the wallet data online will be later introduced
  • Wallet operations are done using a POST request from the server to:
    • /wallet/validateaddr/
    • /wallet/send/
    • /wallet/sell/
    • /wallet/accept/
  • At this point, the tx gets the bitcion network using pushtx of blockchain.info (will be later changed)

Testing:        
Not enough testing has been done. There are still sharp edges, and some hick-ups.
Example are available in the tutorial.
There is still enough work to get to consensus on DEx.


Sources:
https://github.com/grazcoin/mastercoin-tools

Note:
the wallet is not a cold wallet, but a cool wallet ;-)

sr. member
Activity: 449
Merit: 250
Hey Bitoy,

That's a normal Class B transaction - first multisig is sender (for redemption), second and third multisigs are 1st and 2nd packet.


Thanks Zathras,

I'll get 2nd and 3rd multisigs and see what happens. 

(Blockchain.org is down = Mymastercoins is down =(


sr. member
Activity: 266
Merit: 250
Hey Bitoy,

That's a normal Class B transaction - first multisig is sender (for redemption), second and third multisigs are 1st and 2nd packet.

Which part are you having problems with mate & I'll do my best to help.

Thanks
Zathras

Code:
Console.WriteLine(mlib.decryptmastercoinpacket("1HfXDX3ALapNebQC8stTdd5zK7kiCgvX9n", 1, "8710f318fa37e6d84c5f6f0d830d73104d00d4da7e539c8ad7f30689c9f25c"))
010000001400000002000000000BEBC20000000000000003DB0A0000000000

Console.WriteLine(mlib.decryptmastercoinpacket("1HfXDX3ALapNebQC8stTdd5zK7kiCgvX9n", 2, "64e9d0d88cc3defc8855cabdb31d362747292f815149c72464847dfb2c034c"))
020003E8000000000000000000000000000000000000000000000000000000

Code:
select TXID,FROMADD,TYPE,VALID,CURTYPE,SALEAMOUNT from transactions_processed where TXID='309cfaa34c85326dd483544a130f4c1337c29599b720538acbc68fa28dced0ff'
309cfaa34c85326dd483544a130f4c1337c29599b720538acbc68fa28dced0ff 1HfXDX3ALapNebQC8stTdd5zK7kiCgvX9n selloffer 1 2 200000000
sr. member
Activity: 449
Merit: 250
I'm having a problem parsing this multisig transaction

http://blockexplorer.com/tx/309cfaa34c85326dd483544a130f4c1337c29599b720538acbc68fa28dced0ff

There seems to be 3 multisig
 
027fff7acd96c7a4c36ab7515ce5c25d49caf9bd16084a2b1eeccde30dc6c8c995 028710f318fa37e6d84c5f6f0d830d73104d00d4da7e539c8ad7f30689c9f25c95 0264e9d0d88cc3defc8855cabdb31d362747292f815149c72464847dfb2c034c95

I tried the 1st 2 but the transaction came out invalid.

Do we have to use  "peek and decode" here also?




 
sr. member
Activity: 449
Merit: 250
Seems like I am slipping out on Exodus dev vesting every now and then by one willet (colloquial term or official btw?).

Must be rounding, will check my types and formulas to see what I can come up with.

Thanks
Zathras

Zathras,

Maybe we can remove the Exodus address from the consensus % calculations since we are getting from different sources and there will be a block difference somewhere.  One willet difference in the exodus address is not a problem.


 


sr. member
Activity: 266
Merit: 250
Seems like I am slipping out on Exodus dev vesting every now and then by one willet (colloquial term or official btw?).

Must be rounding, will check my types and formulas to see what I can come up with.

Thanks
Zathras
sr. member
Activity: 266
Merit: 250
Agreed.  Easy enough to add a last block evaluation into the consensus system.  For example we can ignore results from implementations that are behind etc.

Tachikoma, since the verification API is your baby, how do you want to play this? First JSON attribute/value pair perhaps?

Thanks
Zathras
sr. member
Activity: 449
Merit: 250

Perhaps you guys need to create a little widget that shows how many hours:minutes:seconds out of sync each engine is

Nice suggestion.   A "last block time processed" in the api.
legendary
Activity: 1666
Merit: 1010
he who has the gold makes the rules
I see a sudden drop in consensus, with a lot of conflicting addresses.
Also it doesn't seem like any one implementation is the cause for the conflict.

Copying pasting the conflicting addresses here (sorry for the format):


Hi Ron,

The mymastercoins engine is off for a few minutes.  Have to update the table to add tachikoma's dex api.

Consensus is back to 99.96% Smiley


Consensus   Address   MyMastercoins   Masterchain   Mastercoin-Explorer   Masterchest
1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P   11355.93262989   11355.93262989   11355.93262989   11355.93262988


There is only a 0.00000001 difference in masterchest exodus address.

Perhaps you guys need to create a little widget that shows how many hours:minutes:seconds out of sync each engine is
sr. member
Activity: 449
Merit: 250
I see a sudden drop in consensus, with a lot of conflicting addresses.
Also it doesn't seem like any one implementation is the cause for the conflict.

Copying pasting the conflicting addresses here (sorry for the format):


Hi Ron,

The mymastercoins engine is off for a few minutes.  Have to update the table to add tachikoma's dex api.

Consensus is back to 99.96% Smiley


Consensus   Address   MyMastercoins   Masterchain   Mastercoin-Explorer   Masterchest
1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P   11355.93262989   11355.93262989   11355.93262989   11355.93262988


There is only a 0.00000001 difference in masterchest exodus address.
legendary
Activity: 1358
Merit: 1003
Ron Gross
I wasn't alarmed by this, just wanted...
I do not suggest that you are alarmed.  I am merely commenting that your manner of notice - is the kind which cause market players to act like idiots. 

Your notice did not reflect the true nature of the problem.  Thus, these guys will go crazy.  It is certainly OK for users to know when the system goes out of sync - but I suggest one be careful with announcement which can be read recklessly. 

+1, I'll take that into consideration.
legendary
Activity: 1358
Merit: 1003
Ron Gross
Ron,

Clearly this is no big deal.  Probably MyMastercoins rolled back to an old version accidentally.  (It appears to me that only 'MyMastercoins' is off.  - no?)  I am sure they will set it straight on a simple tweek.  

You'll please note that the market price of Mastercoin rose 60% on the same day consensus was announced (yesterday/today).  Stupid - however, nevertheless true.  Now is a pretty bad time to shout out about apparent consensus failures.  Especially those which are clearly explainable and repairable.  Sometimes such notices aren't interpreted well by market players who are less than competent with regard to the meaning.  Mastercoin markets are like a theatre of people sitting on the edge of their seat.  One guy quietly utters 'fire' and the whole place is cleared in ten seconds.  Please, don't raise unnecessary alarms which are difficult for the non-techies to interpret with accuracy.

Thanks for the message.

I wasn't alarmed by this, just wanted to let the devs know that something is going on.
Mastercoin is a transparent project, if something breaks we let people know and fix it.

In this case it's important to let not just developers but also users know as they rely on this for transactions.

So ... not yelling "Fire!", just letting people know, and confident this will get fixed soon.
legendary
Activity: 1358
Merit: 1003
Ron Gross
I see a sudden drop in consensus, with a lot of conflicting addresses.
Also it doesn't seem like any one implementation is the cause for the conflict.

Copying pasting the conflicting addresses here (sorry for the format):

Quote
Consensus   Address   MyMastercoins   Masterchain   Mastercoin-Explorer   Masterchest
13ZDbTUK9prE7jVsjBz6t39JTihhifckHs   1   4.0   4.0   4.00
16D7dga3G2G1wAyFatF9HbCbCVkdRPmwUv      20.0   20.0   20.00
17KB39BPWiAEuY2g2cVibBQBWSaqTivdTr   20   0.0   0.0   0.00
181k55nxGuqDRpJx3iU43T4wJznf7ZazFN   0.043   0.043   0.043   
182osbPxCo88oaSX4ReJwUr9uAcchmJVaL   376.18   376.18   376.18   376.266
18ArFG8cPDT5P8NVdjFuSGjkybRTW8VBji   0.043   0.043   0.043   
1ATjSfdYVCBnFRrn383xHU7HvHt2EDWPni   1.01   4.01   4.01   4.01
1BSzMPgMwWXr8iQnJkU7Yaef7LFv4WaymY      1.0   1.0   1.00
1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P   11338.12465214   11347.28782561   11347.55421245   11347.30903753
1FBkQ5jbNkzuEVEU9mgTNrqSx73CBYhrbA      3.0   3.0   3.00
1GaNupdUBzfVF2B3JUAY1rZwHoXJgjyzXj   93.22275429   74.17245429   74.17245429   74.17245429
1KAsYCU9bs56UJWYsvWWfmCZmNgKG9Xis8      10.0503   10.0503   10.0503
1LjT88X7Zu8BdbqJw8vfRa83NJuzYL9kqm   60.12630845   60.12630845   60.12630845   10.00
1LxDxsJgS123R9XZntp6vafLJ2SoGfApFJ   165.16223427   211.73923424   211.73923424   211.73923424
1MaStErt4XsYHPwfrN9TpgdURLhHTdMenH   10450.27445588   10402.19745591   10402.19745591   10402.19745591
1Nymhex8hmirHLPMLHMVi9kmzdyjrXHcdg   2.227   2.727   2.727   2.727
full member
Activity: 142
Merit: 252
the discrepancy is in the calculation of dev MSC vesting period caused by an issue with calculation based on time stamp, not any "transaction"

Ah - that makes more sense.  And since it’s Dev MSC, the devs have a very good incentive to make sure it’s correct!  Wink
legendary
Activity: 1666
Merit: 1010
he who has the gold makes the rules
Guys, this really is awesome.  I do find it interesting that all four implementations have different exodus balances ;-)  Is it really only a single tx that causes the discrepancy?

JR, Peter and I have been having a side conversation about Mastercoin basic-SPV, btw.  There may be a way to ensure that all MSC transactions (from any client) are relying on the same set of information when they present a new transaction, in an easily verifiable method.  Not 100% sure at this point, but ideas are being discussed.  If this is the case, it might be easier in the future to ensure consensus on a go-forward basis.

Any concerns about all the Test MSC being spread all over the place, wrt DEx?  I like Bitoy’s idea of just syncing a few test MSC addys for consensus, and then figuring out a block where all DEx implementations should match after that point.

the discrepancy is in the calculation of dev MSC vesting period caused by an issue with calculation based on time stamp, not any "transaction"
full member
Activity: 142
Merit: 252
Guys, this really is awesome.  I do find it interesting that all four implementations have different exodus balances ;-)  Is it really only a single tx that causes the discrepancy?

JR, Peter and I have been having a side conversation about Mastercoin basic-SPV, btw.  There may be a way to ensure that all MSC transactions (from any client) are relying on the same set of information when they present a new transaction, in an easily verifiable method.  Not 100% sure at this point, but ideas are being discussed.  If this is the case, it might be easier in the future to ensure consensus on a go-forward basis.

Any concerns about all the Test MSC being spread all over the place, wrt DEx?  I like Bitoy’s idea of just syncing a few test MSC addys for consensus, and then figuring out a block where all DEx implementations should match after that point.
sr. member
Activity: 449
Merit: 250
To test  dex, lets just synchronize a few test msc addresses (maybe 4 addressess).

(We don't have to synchronize the whole test msc.)





Pages:
Jump to: