Bitcoin Forum
November 16, 2024, 02:48:28 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 [24] 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 »
  Print  
Author Topic: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread)  (Read 129204 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
November 12, 2013, 01:33:20 AM
 #461

Bitoy, can I have a MSC address for you please? I think you should be included when I send the devs some MSC from the Exodus Address.

I was going to send 1500 between you all, and it seems that I had better get a move on before that becomes worth more than our current contest!

(This is a fun little incentive I mentioned before to make sure all our web clients recognize dev Mastercoins)

Ah fantastic, I was wondering when those exodus sends would occur, I've got some dev code I'm keen to test before it makes it into the next major Masterchest update (next update is a big one) - of course I'm very happy to be getting some MSC also! Smiley

Smart Property & Distributed Exchange: Master Protocol for Bitcoin
ripper234
Legendary
*
Offline Offline

Activity: 1358
Merit: 1003


Ron Gross


View Profile WWW
November 12, 2013, 04:20:01 AM
 #462

I think I'll be disabling notifications on this thread.
Too much stuff happening.

We might need a semi-official position whose role is to coordinate with all the developers since we're unable to keep track.
I think J.R is doing that right now.
We need to get him to quit his job at cozi and do this full time.

Go J.R go!

Anyway this is just random thoughts before I unwatch the thread, not sure if it's needed or not at this point.

Please do not pm me, use ron@bitcoin.org.il instead
Mastercoin Executive Director
Co-founder of the Israeli Bitcoin Association
zbx
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
November 12, 2013, 06:45:00 AM
 #463

W.r.t. block lag, what if an address has an insufficient balance to send X mastercoins until the block in which he attempts to send them?
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 12, 2013, 09:20:43 AM
 #464

That would be an invalid transaction. I've had a night to sleep on it and I'm not sure how much I like it. I still do not like the random chance but changing the procol might be too drastic. Unless somebody really loves it let's drop it.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 12, 2013, 12:50:12 PM
Last edit: November 12, 2013, 01:10:05 PM by Tachikoma
 #465

Guys I need to amend the validation spec a bit. But to do so I need your opinions.

Right now Bitboy and I deal differently with addresses.

When Mastercoin-explorer displays the addresses for a certain currency_id and an address has not received any transactions for the given currency_id it omits the address from the results. As far as my application is concerned the address does not exist so it can't display it.

BitBoy's implementation however returns the address with a zero balance. Which is technically also correct.

Anybody has a reason to pick one over the other?

The code news however is that this is already proven useful.

Quote
Mastercoin explorer has 2617.47620688 for 1AGFxUanxnWnrTiwLsY4NyvNZTv3RWFnfT but Bitboy has 2617.48620688
Mastercoin explorer has 200 for 1MBrNtFBw9QQ1owGsTs6Nd1iL1Err2H4yp but Bitboy has 199.99
Mastercoin explorer has 757.23987298 for 1Q1sFqsi8S5DxV5hz6sWLamGBp9To93iG7 but Bitboy has 752.23987298

Much easier to find which transactions to fix now.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
November 12, 2013, 04:00:07 PM
 #466


Quote
Mastercoin explorer has 2617.47620688 for 1AGFxUanxnWnrTiwLsY4NyvNZTv3RWFnfT but Bitboy has 2617.48620688
Mastercoin explorer has 200 for 1MBrNtFBw9QQ1owGsTs6Nd1iL1Err2H4yp but Bitboy has 199.99
Mastercoin explorer has 757.23987298 for 1Q1sFqsi8S5DxV5hz6sWLamGBp9To93iG7 but Bitboy has 752.23987298

Much easier to find which transactions to fix now.

Thanks Tachikoma,

I'll fix the the missing transactions.

Btw the "peek and decode" is already approved.  I'll update and run checks again.

grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
November 12, 2013, 04:04:16 PM
 #467

Guys I need to amend the validation spec a bit. But to do so I need your opinions.

Right now Bitboy and I deal differently with addresses.

When Mastercoin-explorer displays the addresses for a certain currency_id and an address has not received any transactions for the given currency_id it omits the address from the results. As far as my application is concerned the address does not exist so it can't display it.

BitBoy's implementation however returns the address with a zero balance. Which is technically also correct.

Anybody has a reason to pick one over the other?

I think bitboy's approach is better (same behaviour of blockchain.info).
It means that I will have to change my implementation as well.


The code news however is that this is already proven useful.

Quote
Mastercoin explorer has 2617.47620688 for 1AGFxUanxnWnrTiwLsY4NyvNZTv3RWFnfT but Bitboy has 2617.48620688
Mastercoin explorer has 200 for 1MBrNtFBw9QQ1owGsTs6Nd1iL1Err2H4yp but Bitboy has 199.99
Mastercoin explorer has 757.23987298 for 1Q1sFqsi8S5DxV5hz6sWLamGBp9To93iG7 but Bitboy has 752.23987298

Much easier to find which transactions to fix now.

I will join the comparison game whenever my sell offer/accept parsing is done.
That's a great tool.


Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 12, 2013, 04:55:43 PM
 #468

BitBoy some of those transactions are wrong at my site as well. You might actually parse them correctly.

Guys I need to amend the validation spec a bit. But to do so I need your opinions.

Right now Bitboy and I deal differently with addresses.

When Mastercoin-explorer displays the addresses for a certain currency_id and an address has not received any transactions for the given currency_id it omits the address from the results. As far as my application is concerned the address does not exist so it can't display it.

BitBoy's implementation however returns the address with a zero balance. Which is technically also correct.

Anybody has a reason to pick one over the other?

I think bitboy's approach is better (same behaviour of blockchain.info).
It means that I will have to change my implementation as well.

The problem is that I have no clue how I can find something that doesn't exist. I can't supply addresses that I don't know exist. I could query all currencies (there might be a lot in the future) and use data based on that but that would only bloat the verification-api without any real benefit.

I still vote to omit addresses that have no transactions for a certain currency_id.


The code news however is that this is already proven useful.

Quote
Mastercoin explorer has 2617.47620688 for 1AGFxUanxnWnrTiwLsY4NyvNZTv3RWFnfT but Bitboy has 2617.48620688
Mastercoin explorer has 200 for 1MBrNtFBw9QQ1owGsTs6Nd1iL1Err2H4yp but Bitboy has 199.99
Mastercoin explorer has 757.23987298 for 1Q1sFqsi8S5DxV5hz6sWLamGBp9To93iG7 but Bitboy has 752.23987298

Much easier to find which transactions to fix now.

I will join the comparison game whenever my sell offer/accept parsing is done.
That's a great tool.

Once I finished the code I will put the site online. It should display an overview of all transactions that are parsed differently on all sites, we should all be able to use this.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
dacoinminster (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1031


Rational Exuberance


View Profile WWW
November 12, 2013, 05:06:31 PM
Last edit: November 12, 2013, 06:44:41 PM by dacoinminster
 #469

Bitoy sent his address via PM:

Hi dacoinminster,

Here is my msc address
1Fq37GNfyxSvnmye3QdxH6GpPAQ3enarfs

Thank you for including mymastercoins  Smiley

It may be a couple of days yet before I send the MSC. I've got a ton of other stuff to catch up on.

Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
November 12, 2013, 05:28:27 PM
 #470

Hi Tachikoma

I've updated the parsing (all class A is now "peek and decode")  and Master Explorer and MyMastercoins has the same balances (yehey!)

Except for one address
15a4XCuWmx2cCQVf8wZK7mqdvj5uwo1vby

MM=575     ME=570

It is TX
ecb77ee990de29745de949462e1f6e44584c310a0da12c9fbdf86dbe6ffabcfc

btw First line of your API there is a null address with balance 5.0  
[{"address":null,"balance":"5.0"}
zbx
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
November 12, 2013, 06:45:45 PM
 #471

Yeah, that's a transaction that I botched a couple of days ago. The sequence numbers are ascending instead of descending.
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 12, 2013, 07:06:59 PM
 #472

Hi Tachikoma

I've updated the parsing (all class A is now "peek and decode")  and Master Explorer and MyMastercoins has the same balances (yehey!)

Except for one address
15a4XCuWmx2cCQVf8wZK7mqdvj5uwo1vby

MM=575     ME=570

It is TX
ecb77ee990de29745de949462e1f6e44584c310a0da12c9fbdf86dbe6ffabcfc

btw First line of your API there is a null address with balance 5.0  
[{"address":null,"balance":"5.0"}

Woop! Awesome. As soon as I'm done with my current validation rewrite I will check out this transaction. Smiley

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
November 12, 2013, 07:14:19 PM
 #473

The problem is that I have no clue how I can find something that doesn't exist. I can't supply addresses that I don't know exist. I could query all currencies (there might be a lot in the future) and use data based on that but that would only bloat the verification-api without any real benefit.

I still vote to omit addresses that have no transactions for a certain currency_id.

If you don't find an address (which is a valid bitcoin address) in your database, simply report an empty address with all values 0.


Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
November 12, 2013, 11:56:22 PM
 #474

Yeah, that's a transaction that I botched a couple of days ago. The sequence numbers are ascending instead of descending.

It is now valid because of the new specs in 1.2 "peek and decode". (Unless I read wrong Smiley
zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
November 13, 2013, 07:48:46 AM
 #475

Yeah, that's a transaction that I botched a couple of days ago. The sequence numbers are ascending instead of descending.

It is now valid because of the new specs in 1.2 "peek and decode". (Unless I read wrong Smiley

Sorry guys, I've been snowed the last week or so.  I see JR has included my appendix in the latest revision of the spec Grin which is great news - that means peek & decode is officially in so zbx's case in question would now be valid yep regardless of the bad sequence numbers (credit though; peek & decode was Tachikoma's idea, I just helped flesh it out and documented it Smiley).

Note I'll need to cut a little code for this which I'll include in the coming Masterchest update.  Somehow my current implementation isn't quite up to scratch Tongue

Code:
 
...
Else
   If isvalidtx = False Then  '### fall back to peek and decode
      'peek and decode routine here
   End If
End If
....

Smart Property & Distributed Exchange: Master Protocol for Bitcoin
zbx
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
November 13, 2013, 08:10:32 AM
 #476

Hi. I'm thinking of making a submission to the coding contest. Would people here be interested in having an implementation of the Mastercoin protocol in Go, specifically one designed to be run as a server process, e.g. to be used in a trading engine, and handling the Bitcoin protocol over JSON-RPC? The priorities in design would be to make it fast, lean and robust. Does the project need software like that at this point (assuming that I can write it well... I'm very new to Go)? Does it need another independent implementation at all right now?
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 13, 2013, 08:45:13 AM
 #477

I believe there is a bounty for a FIAT/MSC exchange. Your software idea sounds like it belongs there. Exchanges need to be fast in order to function so Go might be a good fit Smiley

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
zbx
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
November 13, 2013, 09:31:18 AM
 #478

I believe there is a bounty for a FIAT/MSC exchange. Your software idea sounds like it belongs there. Exchanges need to be fast in order to function so Go might be a good fit Smiley

dacoinminster said (on Trello) that a Fiat/MSC exchange wasn't going to be a project goal for now.
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 13, 2013, 09:32:58 AM
 #479

hmm weird. It's in the bounty topic.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
November 13, 2013, 09:39:48 AM
 #480

Yeah, that's a transaction that I botched a couple of days ago. The sequence numbers are ascending instead of descending.

It is now valid because of the new specs in 1.2 "peek and decode". (Unless I read wrong Smiley

Sorry guys, I've been snowed the last week or so.  I see JR has included my appendix in the latest revision of the spec Grin which is great news - that means peek & decode is officially in so zbx's case in question would now be valid yep regardless of the bad sequence numbers (credit though; peek & decode was Tachikoma's idea, I just helped flesh it out and documented it Smiley).

Note I'll need to cut a little code for this which I'll include in the coming Masterchest update.  Somehow my current implementation isn't quite up to scratch Tongue

Code:
 
...
Else
   If isvalidtx = False Then  '### fall back to peek and decode
      'peek and decode routine here
   End If
End If
....


To make coding shorter, I did peak and decode to get the data address then get the largest sequence as the receipient address.



Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 [24] 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!