Bitcoin Forum
April 25, 2024, 01:43:11 PM *
News: Latest Bitcoin Core release: 27.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 129133 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.
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 02, 2013, 09:02:16 AM
 #281

Good news! I will update my codebase and know that I can move forward in safety now Smiley

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714052591
Hero Member
*
Offline Offline

Posts: 1714052591

View Profile Personal Message (Offline)

Ignore
1714052591
Reply with quote  #2

1714052591
Report to moderator
vokain
Legendary
*
Offline Offline

Activity: 1834
Merit: 1019



View Profile WWW
November 02, 2013, 09:11:39 AM
 #282

awesome to hear Smiley can those of us less technically capable help you with anything in any way?
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 02, 2013, 09:13:23 AM
 #283

We were mostly doing the groundwork, updating our internal libraries to support the new calls. The next step will be to implement it in our wallet-like applications. These can be tested once they are updated. I think that would be a good point to jump in Smiley

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

Activity: 266
Merit: 250



View Profile
November 02, 2013, 09:19:42 AM
 #284

Since Class B seems to be working so well now Smiley I've made a couple of minor changes to the amendment (eg removed the requirement for the sender public key to be compressed in a multisig) - I'd say it's pretty much on point now, if you're happy with it can you let me know and I'll ask JR to perhaps link it from the OP or something (or of course suggest any further changes).

Thanks! Smiley

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

Activity: 201
Merit: 100


View Profile
November 02, 2013, 10:58:50 AM
 #285

Good news! I will update my codebase and know that I can move forward in safety now Smiley

Funny...I think I was in the middle of a transaction as you updated the codebase as I saw the previous purchases vanish from one moment to the next.  I've completed a new order against my original sell and it went through just fine by adding the amount to Exodus.  Let me know if anything looks odd.

Will it be somehow possible to set up bids? Or can purchase offers only be made against existing sell offers?  Just wondering if it would be usefull to setup multiple offers to create data points for anyone looking to develop a ticker with bid, ask, depth charts etc..
superfluouso
Full Member
***
Offline Offline

Activity: 201
Merit: 100


View Profile
November 02, 2013, 11:10:12 AM
 #286

I guess something is not quite right.  My purchase of 0.2 Test MSC on 18xEZx3po1iJWP5H2aM3Do11dCGQyaebnT is not showing up at masterchest.info but does show up at mastercoin-explorer.com

Also, masterchest.info does not yet recognize tx c7103de53a8ea3a20cec9a74543132f98302f75ab1868092e911dd5516f322a5  (sorry if I'm pointing out the obvious Zathras)
prophetx
Legendary
*
Offline Offline

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
November 02, 2013, 01:44:51 PM
 #287

hey guys I am writing the tutorial for making buy and sell offers.

http://wp.me/p40n6G-1h (work in progress)


right now I am working on the buy side, since i do not have any test msc.  and i came up to one issue thus far.

when I created a purchase offer i got this

Code:
01000000011bfb75ae8a4327c54c74e8c5f8793b054ab36603786bc64ba56a08f3834dc57c0400000000ffffffff0438ae9600000000001976a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac70170000000000001976a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ace02e00000000000047512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dde08642f932bb00d1f877482d17d5251fcafa252ae00000000

then I went here, because the instructions say to decode the raw tx to do a check

http://mastercoin-explorer.com/raw/transactions/new

i got this page





but if i went here

https://coinb.in/decode-raw-transaction.html

I get

Code:
Array
(
    [txid] => 4dfb874fc5123e88f8042a4a072086506895c49eedb767bd12b8eebb39bab033
    [version] => 1
    [locktime] => 0
    [vin] => Array
        (
            [0] => Array
                (
                    [txid] => 7cc54d83f3086aa54bc66b780366b34a053b79f8c5e8744cc527438aae75fb1b
                    [vout] => 4
                    [scriptSig] => Array
                        (
                            [asm] =>
                            [hex] =>
                        )

                    [sequence] => 4294967295
                )

        )

    [vout] => Array
        (
            [0] => Array
                (
                    [value] => 0.09875
                    [n] => 0
                    [scriptPubKey] => Array
                        (
                            [asm] => OP_DUP OP_HASH160 157d5a4d561c5e36e37037ec962971aa0f761cbf OP_EQUALVERIFY OP_CHECKSIG
                            [hex] => 76a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac
                            [reqSigs] => 1
                            [type] => pubkeyhash
                            [addresses] => Array
                                (
                                    [0] => 12xdMh16KkH34YKbzoPZmn5Ai6i3jzfVwX
                                )

                        )

                )

            [1] => Array
                (
                    [value] => 6.0E-5
                    [n] => 1
                    [scriptPubKey] => Array
                        (
                            [asm] => OP_DUP OP_HASH160 19fd7459d1c21227f3e87582fa1de350b1549ae2 OP_EQUALVERIFY OP_CHECKSIG
                            [hex] => 76a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac
                            [reqSigs] => 1
                            [type] => pubkeyhash
                            [addresses] => Array
                                (
                                    [0] => 13NRX88EZbS5q81x6XFrTECzrciPREo821
                                )

                        )

                )

            [2] => Array
                (
                    [value] => 6.0E-5
                    [n] => 2
                    [scriptPubKey] => Array
                        (
                            [asm] => OP_DUP OP_HASH160 946cb2e08075bcbaf157e47bcb67eb2b2339d242 OP_EQUALVERIFY OP_CHECKSIG
                            [hex] => 76a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac
                            [reqSigs] => 1
                            [type] => pubkeyhash
                            [addresses] => Array
                                (
                                    [0] => 1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P
                                )

                        )

                )

            [3] => Array
                (
                    [value] => 0.00012
                    [n] => 3
                    [scriptPubKey] => Array
                        (
                            [asm] => 1 02c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc2 02e53e090dad2a9813ae5583a18dde08642f932bb00d1f877482d17d5251fcafa2 2 OP_CHECKMULTISIG
                            [hex] => 512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dde08642f932bb00d1f877482d17d5251fcafa252ae
                            [reqSigs] => 1
                            [type] => multisig
                            [addresses] => Array
                                (
                                    [0] => 12xdMh16KkH34YKbzoPZmn5Ai6i3jzfVwX
                                    [1] => 1GHQdVP8vpF8JrtrmXwE7kqLoMmLrqfDRR
                                )

                        )

                )

        )

)
prophetx
Legendary
*
Offline Offline

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
November 02, 2013, 02:29:19 PM
 #288

ok another issue (I probably am doing something wrong but I cannot figure it out)

so i did sendrawtransaction

and got this




but a few blocks have passed now and none of those tx have any confirmation

also I have a question about the 0.00012 amount where is that going?
prophetx
Legendary
*
Offline Offline

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
November 02, 2013, 02:39:45 PM
 #289

Quote
Note that after you send this purchase offer and it's accepted by the site you will have to send the proper amount in Bitcoin from your MasterCoin address. Make sure your address is funded and that you send the coins from this address.

Isn't this already a part of the sendrawtransaction?  Or am I mistaken? 

Also in the "Amount" in the "Building new purchase offer"  what does this mean?

 I understood it to mean how many MSC I want to buy from the offer but perhaps I got it wrong because the sell offer wanted 0.0001 btc and my total out btc was 0.0025, and I put in 4 as the amount (assumed it would be 4 MSC).

thanks!
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
November 02, 2013, 03:08:58 PM
 #290

Hi Tachikoma,

Please check
1GD6YyXnd7DKvfUKs22Fp3FSGuvK6n4F4j

the MSC balance is negative.


also
1HRE7U9XNPD8kJBCwm5Q1VAepz25GBXnVk
Master-explorer balance 500

The balance in Masterchest is 0.  Same as what I got in my server.
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 02, 2013, 03:12:18 PM
 #291

then I went here, because the instructions say to decode the raw tx to do a check

http://mastercoin-explorer.com/raw/transactions/new

i got this page





but if i went here

https://coinb.in/decode-raw-transaction.html

I get

<code here>

That page on Mastercoin explorer is meant to decode raw Mastercoin keys, not Bitcoin transactions. Also verifying the output of a site using the same site is madness. The whole point is to verify that the site is not lying to you.

ok another issue (I probably am doing something wrong but I cannot figure it out)

so i did sendrawtransaction

and got this




but a few blocks have passed now and none of those tx have any confirmation

also I have a question about the 0.00012 amount where is that going?

Can you give me the transaction id? Perhaps the fee was too low or something similar.

The 0.000012 is the output for the Mulitisig output.
Quote
Note that after you send this purchase offer and it's accepted by the site you will have to send the proper amount in Bitcoin from your MasterCoin address. Make sure your address is funded and that you send the coins from this address.

Isn't this already a part of the sendrawtransaction?  Or am I mistaken?  

Also in the "Amount" in the "Building new purchase offer"  what does this mean?

 I understood it to mean how many MSC I want to buy from the offer but perhaps I got it wrong because the sell offer wanted 0.0001 btc and my total out btc was 0.0025, and I put in 4 as the amount (assumed it would be 4 MSC).

thanks!

You are indeed mistaken. Only once your "Accept Purchase" has been confirmed in a block and flagged as valid can you send the actual Bitcoin amount. This does not happen at the same time. You were right about the amount. It's the amount you want to buy from the offer.

A general note: you don't have to rely on an external site to decode your transaction. You can use the Bitcoin console for this as well. Just type decoderawtransaction <txhash>.

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

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
November 02, 2013, 03:21:38 PM
 #292

here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0&currency_id=2&forced_fee=0.00001
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 02, 2013, 03:26:30 PM
 #293

here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0&currency_id=2&forced_fee=0.00001

Sorry I should have asked for the encoded transaction, do you still have that? The raw transaction hash?

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

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
November 02, 2013, 03:34:18 PM
 #294

here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0&currency_id=2&forced_fee=0.00001

Sorry I should have asked for the encoded transaction, do you still have that? The raw transaction hash?

this right?

Code:

{
"hex" : "01000000011bfb75ae8a4327c54c74e8c5f8793b054ab36603786bc64ba56a08f3834dc57c040000006a47304402202b839fe4159c2d071c9a8075e5f00130b8c2e49ee2aa5c90bb1613606d9fd96302201391ea704f54c001a402e4f039806d5221c48b83a64d3cac255cb48399eadd6d012102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc2ffffffff0438ae9600000000001976a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac70170000000000001976a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ace02e00000000000047512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dd412852f932bb00d1f877482d17d5251fcaf3952ae00000000",
"complete" : true
}

or this one

Code:

signrawtransaction 01000000011bfb75ae8a4327c54c74e8c5f8793b054ab36603786bc64ba56a08f3834dc57c0400000000ffffffff0438ae9600000000001976a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac70170000000000001976a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ace02e00000000000047512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dd412852f932bb00d1f877482d17d5251fcaf3952ae00000000

sorry not great at the nomenclature yet
prophetx
Legendary
*
Offline Offline

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
November 02, 2013, 03:37:18 PM
 #295

I have a question from someone else

Quote
Should it work even if my wallet doesn’t fully synced with the network ? I’m getting “complete” : false

http://blog.mastercoin.org/2013/11/02/tutorial-test-msc-btc-distributed-exchange-transactions/comment-page-1/#comment-4
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 02, 2013, 03:40:26 PM
 #296

here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0&currency_id=2&forced_fee=0.00001

Sorry I should have asked for the encoded transaction, do you still have that? The raw transaction hash?

this right?

Code:

{
"hex" : "01000000011bfb75ae8a4327c54c74e8c5f8793b054ab36603786bc64ba56a08f3834dc57c040000006a47304402202b839fe4159c2d071c9a8075e5f00130b8c2e49ee2aa5c90bb1613606d9fd96302201391ea704f54c001a402e4f039806d5221c48b83a64d3cac255cb48399eadd6d012102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc2ffffffff0438ae9600000000001976a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac70170000000000001976a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ace02e00000000000047512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dd412852f932bb00d1f877482d17d5251fcaf3952ae00000000",
"complete" : true
}


sorry not great at the nomenclature yet

Yeah this is it.
I have a question from someone else

Quote
Should it work even if my wallet doesn’t fully synced with the network ? I’m getting “complete” : false

http://blog.mastercoin.org/2013/11/02/tutorial-test-msc-btc-distributed-exchange-transactions/comment-page-1/#comment-4


I wouldn't advertise it on your blog yet. It's a bit too early for early adoption.

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 02, 2013, 03:42:47 PM
 #297

Seems the fee was not set properly. I'm investigating.

Edit: I'm guessing you kept the fee set to 0.00001 ? This is lower then the required network fee. I've updated the code to force the fee to 0.0001 when it's set lower so other users don't make this mistake.

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

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
November 02, 2013, 03:47:45 PM
 #298

Seems the fee was not set properly. I'm investigating.

okay thanks.

I do not think I will get that many hits on the tutorial, if I do I will take it down.

Here is another question from someone in the FB group (I thought I had heard someone discuss this and saying that we should not store MSC on blockchain wallets right?)

Quote
What if I dont have the mastercoins on my bitcoin-qt wallet but on the blockchain's wallet ? will I still manaage to broadcast the transaction ?

https://www.facebook.com/groups/213147185526904/214802042028085/?comment_id=214808968694059&notif_t=group_comment


========EDIT=======

Nevermind I found the answer to this

https://blockchain.info/pushtx
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
November 02, 2013, 04:02:48 PM
 #299

As long as you can sign rawtransactions you can use this. Complete: false either means the person did not sign the transaction or that he signed it but did not possess the right private key to sign it. 

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

Activity: 714
Merit: 510



View Profile
November 02, 2013, 08:54:42 PM
Last edit: November 02, 2013, 09:11:30 PM by Luckybit
 #300

1EdAjiApS5cCpHdH4RKPMab1xmMVRWjLvk to buy 20 test MSC from 13NRX88EZbS5q81x6XFrTECzrciPREo821
Just successfully sent my first test transaction on the BTC to MSC decentralized exchange.

At first nothing happened so I entered the transaction hash into Mastercoin explorer:
http://mastercoin-explorer.com/transactions/33644e6f24b29e1ef170d78ff04eab6f7e19368908edc6d477f9902697a71d67

It seems that the process could be more streamlined but it does seem to work. Now I'll wait to see if I receive 20 test MSC

Complete success:
http://mastercoin-explorer.com/addresses/1EdAjiApS5cCpHdH4RKPMab1xmMVRWjLvk

Now the selling offer:
e1a53bf47d64391294d07110f6cc9f94e56963e960829ad45886c9800047a6bf

It should broadcast here:
http://mastercoin-explorer.com/order_books
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!