Bitcoin Forum
June 26, 2024, 01:35:52 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 »
241  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 25, 2013, 01:59:59 PM
I had a pm conversation once with somebody who was having the same issues. They were solved for him once the blockchain was synced. I would indeed wait on that Smiley

Thanks Tachikoma,

With my 500kbs dsl it will probably take  weeks by that time the contest is over   Cry
242  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 25, 2013, 01:56:38 PM

The following are identified as funds sent for purchases against that sell:

Code:
3cdcd1b8148a979f3930b1998b3282dfad2f623c9e85c9d924d4634621263294 	1F73UPD5xBKgTSRd8q6QhuncVmDnJAHxYV	0.02
cf77f174b4cf4aaf8ba560070e2af97685e5f946f8cbd4eab6cb371fa50bfd0d 1AMfFzbrhhizKDpqebYVYFGaTwdtSt5ux2 0.0202
66fc6ef07a48f703387eac59c78d8f3c8c1f465d72dd6f4452ebfff24cf3f745 1AMfFzbrhhizKDpqebYVYFGaTwdtSt5ux2 1.8798


cf77f174b4cf4aaf8ba560070e2af97685e5f946f8cbd4eab6cb371fa50bfd0d is valid

3cdcd1b8148a979f3930b1998b3282dfad2f623c9e85c9d924d4634621263294 and
66fc6ef07a48f703387eac59c78d8f3c8c1f465d72dd6f4452ebfff24cf3f745 are invalid because
 Purchase confirmation not found or payment time has expired.
243  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 25, 2013, 01:39:42 PM

Your transaction actually looks fine from a quick glance, assuming you're trying to send from 1GtTPepFqS8MWZzFKsE62bNowY2LZos8Lq using vout 0 from 6efd44d3d185f9266701afff050dead21c5819054ca2a36eead8394e61a4e3df.

Oh, and script is empty because you haven't signed it yet Tongue

Thanks! Smiley

I can't sign it because the "complete" is False.  When I tried to sign it even if complete is "false". There is still no script sig.   I'll wait till the entire block chain is downloaded. Then will try to use your original program. 

Thanks Zathras  Smiley
244  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 25, 2013, 03:21:23 AM
Hey Bitoy,

The blockchain does need to be fully downloaded yep to use the encodetx function as it goes looping through the unspent outputs for the from address to find an input to use for fees and these won't be accurate if the blockchain isn't synced.  

With that said though it looks like you want to use blockchain.info to get unspent outputs so assume you're trying to modify the way encodetx works to use blockchain.info for vin selection rather than a local bitcoind?  Mind if I ask why you're going to a remote source if you already require having the blockchain local?  In any case yep fromtxid is the transaction we're using as the input, fromtxvout is the vout of the output number and fromtxamount is the amount of said vout (eg to work out change).

Using "listunspent", the resulting json is a blank (Probably because I have not downloaded the entire blockchain ).    When I changed it to "http://blockchain.info/unspent"  I was able to get one unspent transaction.

For the wallet I don't want to use blockchain.info anymore,  I prefer the bitcoind api.


Please post your rawtx (unsigned) and I'll have a look Smiley

Here is the raw transaction code from encodetx.   Thanks for taking a look at it =)

Code:
0100000001dfe3a4614e39d8ea6ea3a24c0519581cd2ea0d05ffaf016726f985d1d344fd6e0000000000ffffffff04d0dd0600000000001976a914ae45216a770fbb4a613c09e79b5c4006b908d3eb88ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac70170000000000001976a9144708baf2f30fa7f93c531a7866b7ea9a32bdce3688ace02e0000000000004751210399078b8cda808b1e9bb9653869e94d6494576c9a26d37caac58c8388dd0ab43f2102915B577ABEFF7F707709DF6C5077FBB1172B02FDA32242D8BDBCE29880A22F8052ae00000000

Edit

Looks like I have a problem at "inputs"  script is blank.

Code:

{
   "lock_time":0,
   "inputs":[
      {
         "prev_out":{
            "index":0,
            "hash":"6efd44d3d185f9266701afff050dead21c5819054ca2a36eead8394e61a4e3df"
         },
         "script":""
      }
   ],
   "vout_sz":4,
   "hash":"c0041c10450f01c31e0acca267f84aaa8d5f45b9d49cbc376fd552bf9d62c236",
   "vin_sz":1,
   "out":[
      {
         "address":"1GtTPepFqS8MWZzFKsE62bNowY2LZos8Lq",
         "script_string":"OP_DUP OP_HASH160 ae45216a770fbb4a613c09e79b5c4006b908d3eb OP_EQUALVERIFY OP_CHECKSIG",
         "value":450000,
         "script":"76a914ae45216a770fbb4a613c09e79b5c4006b908d3eb88ac"
      },
      {
         "address":"1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P",
         "script_string":"OP_DUP OP_HASH160 946cb2e08075bcbaf157e47bcb67eb2b2339d242 OP_EQUALVERIFY OP_CHECKSIG",
         "value":6000,
         "script":"76a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac"
      },
      {
         "address":"17UbSDAXDzmxRXCgn2w43EaaHzHK3Ncx87",
         "script_string":"OP_DUP OP_HASH160 4708baf2f30fa7f93c531a7866b7ea9a32bdce36 OP_EQUALVERIFY OP_CHECKSIG",
         "value":6000,
         "script":"76a9144708baf2f30fa7f93c531a7866b7ea9a32bdce3688ac"
      },
      {
         "script_string":"OP_1 0399078b8cda808b1e9bb9653869e94d6494576c9a26d37caac58c8388dd0ab43f 02915b577abeff7f707709df6c5077fbb1172b02fda32242d8bdbce29880a22f80 OP_2 OP_CHECKMULTISIG",
         "value":12000,
         "script":"51210399078b8cda808b1e9bb9653869e94d6494576c9a26d37caac58c8388dd0ab43f2102915b577abeff7f707709df6c5077fbb1172b02fda32242d8bdbce29880a22f8052ae"
      }
   ],
   "size":233,
   "version":1
}

245  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 25, 2013, 02:27:23 AM
I FINALLY took a shot at sending the 1500 dev MSC from 1Exodus:

375 MSC to Bitoy: https://blockchain.info/tx/2b5ef4f2152759242f9afaf6567ef936016850d8bb2ffae6f1b1bf87c1209a01
375 MSC to Zathras: https://blockchain.info/tx/6b282ab5a7fe7c4d7b5cbec79d3d94c584ce88dc358e771651bec32eb88c0847
375 MSC to Grazcoin: https://blockchain.info/tx/a36de127620c5bf35ea216e5040a1921a904fe7bc9f8b9846934bccbd1df4a00
375 MSC to Tachikoma: https://blockchain.info/tx/5fa342f704ca6a9ae84134de8f2d987c18980de70a744d1aa8472e847555fcbd

In each case, the output to 1Exodus is ALSO the change. Let me know if these parse correctly for you guys.

Looks good! Thanks!  https://masterchest.info/lookupadd.aspx?address=1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P

Also led me onto a bug (I'm no longer displaying generate transactions after switching to the new engine) - I didn't notice until now but I'm so used to seeing hundreds of generates when looking up Exodus this was an easy spot - thanks Smiley  EDIT: squashed


Transaction is ok also at
http://mymastercoins.com/Default.aspx?Addr=1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P

JR, Thank you again =)

246  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 24, 2013, 05:16:42 PM
Zathras & Bitboy

Could you tell me how many coins were sold according to your implementations on the Selling Order I put online last week? Transaction 35822ef50d1c5639c80ded37b6580396ecc163bdbad34b3865b9e67b7f0787b3. I think the time is almost there to start comparing clients. I have one or two more bugs to fix but I think that should be it.


According to my implementation only  0.101 MSC for .0202 BTC was sold by 1AMfFz to 1EAuHj.

http://mymastercoins.com/Orders.aspx?CurrencyID=1
click "payment confirmed"

11/17/2013 4:03:10 PM .101 .101 .2 .0202 .001 baba89  188 1AMfFz  1EAuHj  270161 Payment Confirmed  .0202 0.00 


btw i'm trying to add multisig to my wallet so that we can do more testing.
247  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 24, 2013, 04:37:25 PM
Hi Zathras,

I tried using your library to send a multisig transaction.  It was able to create the raw transaction but after signing it the result is complete=false.   Does it require the full bitcoin blockchain be downloaded? (it is 10 weeks behind.)  

btw I replaced your rpccall function with the code below (because webrequest didn't work in my computer).  

Code:
    Public Function rpccall(ByVal bitcoin_con As bitcoinrpcconnection, ByVal method As String, ByVal param0 As String, ByVal param1 As String, ByVal param2 As String, ByVal param3 As String) As String
        Dim Ans As String = ""
        Dim BitcoindExe As String = "C:\Program Files (x86)\Bitcoin\daemon\bitcoind.exe"
        If InStr(BitcoindExe, "bitcoind.exe") > 0 Then
            Try
                Dim process = New Process()
                process.StartInfo.FileName = BitcoindExe
                Dim params As String = ""
                If param1 <> "0" Then
                    params += param1 + " "
                End If
                If param2 <> "0" Then
                    params += param2 + " "
                End If
                If param3 <> "0" Then
                    params += param3
                End If

                Dim arg As String = "-rpcconnect=" + bitcoin_con.bitcoinrpcserver + " -rpcport=" + bitcoin_con.bitcoinrpcport.ToString + " -rpcuser=" + bitcoin_con.bitcoinrpcuser + " -rpcpassword=" + bitcoin_con.bitcoinrpcpassword + " " + method + " " + params
                process.StartInfo.Arguments = arg
                process.StartInfo.UseShellExecute = False
                process.StartInfo.CreateNoWindow = True
                process.StartInfo.RedirectStandardOutput = True
                process.Start()
                Ans = process.StandardOutput.ReadToEnd().ToString
                process.WaitForExit()
            Catch e As Exception
                'exception thrown
                MsgBox("Exception thrown: " & e.Message.ToString)
            End Try
        End If
        Return Ans
    End Function


Edit:

I also used the "http://blockchain.info/unspent?active="

In your encodetx function, is

fromtxvout   =   0   ("tx_output_n")
fromtxamount =  500000 ("value")


Code:

{

"unspent_outputs":[

{
"tx_hash":"dfe3a4614e39d8ea6ea3a24c0519581cd2ea0d05ffaf016726f985d1d344fd6e",
"tx_index":98418277,
"tx_output_n": 0,
"script":"76a914ae45216a770fbb4a613c09e79b5c4006b908d3eb88ac",
"value": 500000,
"value_hex": "07a120",
"confirmations":247
}
 
]
}


248  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 22, 2013, 10:34:59 AM
Happy to help Smiley

According to the documentation listreceivedbyaddress{0,true} will provide a list of all the addresses in the wallet.  In testing I discovered this wasn't accurate however as change addresses were not included even if they held a balance.  So I do that first, and then run a second pass with listunspent to grab any missing addresses.

FYI if the user has to have bitcoind installed that's all that's required to use my library if you wanted to go that route.  The library already has a mlib.getaddresses function to enumerate all addresses in the connected wallet with the above method (just returns a string array of addresses).  I'm not sure if that's in the old version but I'll be pushing my new v2 library up to git this weekend anyway Smiley



Excellent.  Getaddresses is what i'm looking for (i'm now integrating it with my wallet, hope to be ready for testing next week =).     
249  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 22, 2013, 09:51:29 AM

If you're sitting on a slow connection you could spin up a free instance over on AWS (Amazon), run bitcoind there and make your RPC calls to it through an SSH tunnel.  That way you don't need to download anything over your own connection.  Just remember to only keep a small amount of test funds there Smiley


Thank you Zathras,
I'm able to run bitcoind.exe on the amazon aws.   

Is there a method in bitcoind.exe to list all address in a wallet?  I'm think of getting all the bitcoin address of a wallet then getting the MSC transactions from mymastercoins.com.   This will make it a "semi-thin" client  (because the user still has to have bitcoind installed).   

     
250  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 20, 2013, 09:23:06 AM
If you're using blockchain.info have a look at http://blockchain.info/unspent?active=$address - I could (fairly) easily give you a new function in the library that only returns the transaction hex for the vouts (ie the juicy multisig bits - which can be done offline, no need for bitcoind/qt).

You could construct the first part of the transaction hex (vins) using the info from blockchain.info's unspent API and then put the two together prior to signing.

Without looking at what you're trying to do further I don't know if this will help, but just a thought Smiley

Thanks Zathras.  I did that a while ago and it worked.   But now blockchain doesn't support "signrawtransaction".  So i'm stuck again.


I'll try to download the entire bitcoin blockchain (with  my slow internet speed it will take days) then test rpc calls on it.

 
251  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 20, 2013, 09:15:59 AM
Updated MyMastercoins.com 

Added explanation why a transaction is invalid
http://mymastercoins.com/Transactions.aspx

Allow partial payment of Purchase Offer.

Generate MSC Dev coins for the Exodus Address.
7,966.90477835 Generated Coins MSC Dev Funds as of 11/20/2013 9:00:07 AM
252  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 20, 2013, 02:11:47 AM
For a brief moment yesterday - the bounty on this coding contest exceeded $270,000 in value.  That is far more than JR originally anticipated (around Aug 10) would be spend on the entire project - start-to-finish.  Glad you guys are working hard on this.  You sure are going to earn one hell of a lot of money.  

Yes, crazy bitcoin price the last few days.  Now coding contest is around 150k. That is still a lot of money Smiley
253  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 20, 2013, 02:07:20 AM

You are of course welcome to use any of my code (though I'll need to push up the latest version of the library, it's out of date on git).  With that said though, I don't think it's going to help you in this case.  My library depends on a bitcoind/qt instance to loop through the unspent outputs for a given address and select inputs to use as vins for the send transaction.  It's not really suited to a thin client.

I had intended to modify my wallet to support thin client functionality way, way down the track - it's not high on my priority list though (since Tachikoma has taken point on thin client to date) - my primary focus is on a local implementation with no centralized source of truth for now.  Once we all have compatible APIs (and thus multiple sources of truth) thin client functionality will likely get pushed up my priority list more.

Thanks! Smiley

Thank you for the heads up. My only problem now is how to send a multisig (rpc).   

Agreed, once we have compatible api we can easily check double check transactions. 
254  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 19, 2013, 05:06:04 PM
Hi Zathras,

Can you post again how to send a multisig using your library (You posted this before but I can't find it =).

Thanks.


(I'm trying to build a thin client windows wallet rpc blockchain.info but blockchain.info doesn't support "listunspent".  )   
255  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 19, 2013, 04:50:52 PM
-1
This is not according to the contract that the seller offered.
If the buyer already sees that he might be late - he better not send the tx (and lose only the fee).
No need to complicate further the already complicated distributed exchange rules.


Since we allow only one sell offer for an address, we could consider only one purchase offer for an address to simplify the protocol.
I don't see a real reason to complicate the logic here too much, so if we do keep multiple purchase offer option, let it follow the basic rules, ignoring the fact that these are purchase orders from the same address.


I agree with you on simplifying the system.  Allowing only one purchase offer for an address per currency.

256  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 18, 2013, 12:37:13 PM
I've added a PR to group the selling/purchase offer clarifications. Developers, please read through them and see if you agree so far.



Example 1

User A creates a Selling Offer for 10 MSC @ 0.1 a coin with a time limit of 6 in block 20.
User B sends a Purchase Offer to buy 5 MSC in block 22.
User B sends a payment to User A of 0.3 BTC in block 23.
Nothing more happens.

User B Purchase Offer gets adjusted to buy 3 MSC and gets validated.

Example 2

User A creates a Selling Offer for 10 MSC @ 0.1 a coin with a time limit of 6 in block 20.
User B sends a Purchase Offer to buy 5 MSC in block 22.
User B sends a payment to User A of 0.3 BTC in block 23.
User B sends a payment to User A of 0.8 BTC in block 24.
User B paid 0.11BTC in total, enough to completely satisfy his order.



Another option is the seller has to pay the full btc amount.  No partial payment allowed.
Ex.
User A creates a Selling Offer for 10 MSC @ 0.1 a coin with a time limit of 6 in block 20.
User B sends a Purchase Offer to buy 5 MSC in block 22.
User B sends a payment to User A of 0.5 BTC in block 24.

If user B sends a partial payment, it is ignored.  System will wait only for the exact amount.
257  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 18, 2013, 08:17:13 AM
Code:
ac7593ff4fb4a9bc6b053fc12af10e4fc04db73e0fb467d1dbc2466c86c5936b
f67cc2760446b1458c4012bbe7d5f6129badcf4ac6896f82a4de7ec238103216
87018464d016a067e5c8fedc07551c027bd011f43f6d3a02e9a1e252b551ba82

The transactions above are invalid because
No Offer to Sell from Seller 1EAuHj8Z6rTCHPxXfaGzzPsZevC2mg1XAj for Currency "Test MSC"

258  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 18, 2013, 12:12:52 AM

Code:
select * from transactions_processed where TYPE='purchase'

c7103de53a8ea3a20cec9a74543132f98302f75ab1868092e911dd5516f322a5 16rAwebBXhJAM9ALf3fLFbaHKz24r2o3UN 18xEZx3po1iJWP5H2aM3Do11dCGQyaebnT NULL purchase 1383386099 267480 1 2 35721301 NULL 323200 NULL NULL 20000000 9087a1b72536f3b2909943553ba6d4e320565eeea1e42379dd4337b532f09fd8
baba8972de24528bd56ec4ab3ce5fcead28eb45ac418eb87aace08d3da062a9b 1EAuHj8Z6rTCHPxXfaGzzPsZevC2mg1XAj 1AMfFzbrhhizKDpqebYVYFGaTwdtSt5ux2 NULL purchase 1384704190 270151 1 1 35721741 NULL 2020000 NULL NULL 10100000 35822ef50d1c5639c80ded37b6580396ecc163bdbad34b3865b9e67b7f0787b3
ac7593ff4fb4a9bc6b053fc12af10e4fc04db73e0fb467d1dbc2466c86c5936b 1EAuHj8Z6rTCHPxXfaGzzPsZevC2mg1XAj 1F73UPD5xBKgTSRd8q6QhuncVmDnJAHxYV NULL purchase 1384708399 270160 1 1 35721744 NULL 10000000 NULL NULL 50000000 35822ef50d1c5639c80ded37b6580396ecc163bdbad34b3865b9e67b7f0787b3
f67cc2760446b1458c4012bbe7d5f6129badcf4ac6896f82a4de7ec238103216 1EAuHj8Z6rTCHPxXfaGzzPsZevC2mg1XAj 13tKKPNwDZGKhBK8gAHns7bXe2wtqhvzDb NULL purchase 1384699499 270144 1 2 35721727 NULL 20000 NULL NULL 100000 35822ef50d1c5639c80ded37b6580396ecc163bdbad34b3865b9e67b7f0787b3
87018464d016a067e5c8fedc07551c027bd011f43f6d3a02e9a1e252b551ba82 1EAuHj8Z6rTCHPxXfaGzzPsZevC2mg1XAj 1F73UPD5xBKgTSRd8q6QhuncVmDnJAHxYV NULL purchase 1384699499 270144 1 2 35721728 NULL 2000000 NULL NULL 10000000 35822ef50d1c5639c80ded37b6580396ecc163bdbad34b3865b9e67b7f0787b3

I'm only getting the first 2 as valid.  The rest invalid.  I'll check my codes.
259  Alternate cryptocurrencies / Altcoin Discussion / Re: The collective Mastercoin-explorer, Mastercoin-ruby and Mastercoin-wallet topic on: November 17, 2013, 04:35:46 PM
http://mymastercoins.com/Orders.aspx?CurrencyID=1

is showing a valid purchase order that's pending payment.

Can you give me approval to send Bitcoin? I don't see anything on ME.

Well, I did it.

Hope it works - I only had 3 confirmations left.

https://blockchain.info/tx/f102c66c70a8b4cb030ed73eaf64be93d3a2714e521972e7eee846f0dcebd461

You have to send also to the exodus address (.00006).  This transaction won't be seen.
260  Alternate cryptocurrencies / Marketplace (Altcoins) / Re: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) on: November 17, 2013, 03:43:59 PM
Confirmed payment for first distributed exchange msc transaction.  (I think this is from tachikoma's wallet Smiley

http://mymastercoins.com/Orders.aspx?CurrencyID=1


Buying MSC
Waiting for Payment   Payment Confirmed   Expired
Date   Amount to Purchase   Purchased   Unit Price   Total BTC   Transfer Fee   Tx ID   CFS ID   Buyer ID   Seller ID   Max Block Time       Confirm TxID
11/17/2013 4:03:10 PM   .101   .101   .2   .0202   .001   3919   162   9046   9044   270161   Payment Confirmed   3921
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!