Bitcoin Forum
May 08, 2024, 04:52:15 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 »
1  Bitcoin / Development & Technical Discussion / Re: ANN: Announcing code availability of the bitsofproof supernode on: November 30, 2012, 03:24:23 AM
Introducing an opportunistic cache of the last 100.000 transactions gave such a boost to the server that I thought it is worth writing about.
Apparently outputs die generally rather young and saving the db roundtrip for them is the single biggest boost I found until now...

Yep, pynode figured many of these things out, long ago.  A block (including TXs) cache is very useful.

For long running nodes, the signature cache is also very helpful.  Over time, transactions are accepted into the memory pool and signature cache.  When a new block arrives, the majority of transactions found in that block will have had their signatures pre-checked and cached, making acceptance of that block go more rapidly.



are you honestly adding more info.. or just trying to point out that your "pynode" is *so* ahead ??
2  Bitcoin / Development & Technical Discussion / Re: bitsofproof supernode vulnerability: block chain split / node isolation on: November 18, 2012, 11:17:12 PM
is there any particular reason why you use edu.emory.mathcs.backport.java.util.Arrays ? the one from java.util works just fine imo.

That must have been a false auto import by eclipse. Thanks for pointing out, I delete it.

it seems there are still imports using edu.emory.mathcs.backport.java.util.Arrays like in AddressConverter.java   maybe you can fix those too Smiley
3  Bitcoin / Development & Technical Discussion / Re: ANN: Announcing code availability of the bitsofproof supernode on: November 14, 2012, 06:05:27 PM
great work grau! I like the way you code, and your attitude!  keep it up Smiley
4  Bitcoin / Pools / Re: [2000 GH/s] EMC: No Fee/PPS/DGM/Dwolla Payout/SMS/Yubikey/GBT/Vardiff on: October 24, 2012, 12:16:37 PM
Connectivity from the people having trouble at home should be fixed.  The routing table got set to a class A address somehow.  It should work now... sorry about that! I  have no idea how that would have even happened.

awesome!  confirmed it works now!
5  Economy / Gambling / Re: [New Site Launched] SatoshiDICE.com - The World's Most Popular Bitcoin Game on: October 24, 2012, 01:52:21 AM
SatoshiDICE is about to hit 1,000,000 BTC paid out.  You could be the one to do it!!
yey!  it was me ! Tongue 

there's one thing though..  I know *BIG* numbers are fun... but that bet I made to make it go to 1,000,000 was  16 BTC on the less than 64000 .. and i got in return 16.07...  so I didnt win 16.07 btc.. I actualy won 0.07 btc ..    it should in my opinion only count the profits (of course not count the losses lol that would put a negative number haha)

What if I bet 1 BTC on "lessthan 32k" and 1 BTC on "lessthan 64k" in the same transaction, and get lucky number 40000?

<32k returns 2 BTC, <64k returns 0.  Did I win 1 BTC and lose 1 BTC?  Or did I win 0 BTC?  Either way, you were clearly paid out 2 BTC.  It's just that you also paid IN 2 BTC.  Smiley

There are several ways you can count the "pay out" amount.  Using the way which gives the biggest number seems to make sense in terms of the PR it generates.

well even if the bets are in the same transaction they count as different bets...  they just have the same lucky number.. 

personally I would count only the profit of won bets.. but not substract the lost bets of course!
6  Economy / Gambling / Re: [New Site Launched] SatoshiDICE.com - The World's Most Popular Bitcoin Game on: October 23, 2012, 09:10:07 PM
SatoshiDICE is about to hit 1,000,000 BTC paid out.  You could be the one to do it!!
yey!  it was me ! Tongue 

there's one thing though..  I know *BIG* numbers are fun... but that bet I made to make it go to 1,000,000 was  16 BTC on the less than 64000 .. and i got in return 16.07...  so I didnt win 16.07 btc.. I actualy won 0.07 btc ..    it should in my opinion only count the profits (of course not count the losses lol that would put a negative number haha)
7  Bitcoin / Pools / Re: [2000 GH/s] EMC: No Fee/PPS/DGM/Dwolla Payout/SMS/Yubikey/GBT/Vardiff on: October 23, 2012, 05:12:08 PM
That's pretty strange.  Can you run a traceroute on it?

here are a traceroute of eclipsemc.com and us1

Code:
linux~ # traceroute eclipsemc.com
traceroute to eclipsemc.com (96.43.135.180), 30 hops max, 60 byte packets
 1  orion (192.168.5.1)  0.162 ms  0.186 ms  0.220 ms
 2  * * *
 3  10.170.169.161 (10.170.169.161)  12.519 ms  12.529 ms  12.529 ms
 4  216.113.122.17 (216.113.122.17)  12.875 ms  12.881 ms  12.882 ms
 5  216.113.123.222 (216.113.123.222)  33.327 ms  33.337 ms  33.342 ms
 6  216.113.125.38 (216.113.125.38)  31.200 ms  31.104 ms  31.088 ms
 7  10gigabitethernet1-1.core1.mci1.he.net (72.52.92.2)  40.967 ms  35.352 ms  40.483 ms
 8  10gigabitethernet1-1.core1.mci2.he.net (184.105.213.2)  41.748 ms  41.417 ms  41.419 ms
 9  joe-s-data-center-llc.10gigabitethernet1-4.core1.mci1.he.net (216.66.79.14)  39.271 ms  34.789 ms  38.432 ms
10  DC2SW1.KCMODATACENTER.COM (96.43.134.38)  39.281 ms  41.079 ms  41.950 ms
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
Code:
linux~ # traceroute us1.eclipsemc.com
traceroute to us1.eclipsemc.com (208.110.68.114), 30 hops max, 60 byte packets
 1  orion (192.168.5.1)  0.153 ms  0.179 ms  0.217 ms
 2  * * *
 3  10.170.169.165 (10.170.169.165)  13.785 ms  13.800 ms  13.794 ms
 4  216.113.122.37 (216.113.122.37)  14.246 ms  14.256 ms  14.268 ms
 5  216.113.124.118 (216.113.124.118)  37.166 ms  37.188 ms  37.184 ms
 6  216.113.125.38 (216.113.125.38)  32.848 ms  32.736 ms  32.702 ms
 7  10gigabitethernet1-1.core1.mci1.he.net (72.52.92.2)  42.560 ms  35.772 ms  40.002 ms
 8  10gigabitethernet1-1.core1.mci2.he.net (184.105.213.2)  42.213 ms  41.771 ms  41.774 ms
 9  wholesale-internet-inc.10gigabitethernet1-3.core1.mci2.he.net (216.66.78.90)  39.527 ms  36.818 ms  51.145 ms
10  69.30.209.1 (69.30.209.1)  51.153 ms  46.915 ms  46.920 ms
11  us1.eclipsemc.com (208.110.68.114)  46.874 ms  41.374 ms  36.434 ms
8  Bitcoin / Pools / Re: [2000 GH/s] EMC: No Fee/PPS/DGM/Dwolla Payout/SMS/Yubikey/GBT/Vardiff on: October 23, 2012, 04:00:58 AM
Everything seems to be up and running at the moment. Are you still having issues?

i've actually been having problems going to the website itself from my home connection.. but i can connect to the pools...  it just seems to be the web service i cant reach..  but I can from work ..  and other friend on the same provider also works.. 

this is the resolved ip for eclipsemc.com: 96.43.135.180

im getting connection timeouts over port 80:
Connecting to 96.43.135.180:80... failed: Connection timed out.
9  Economy / Web Wallets / Re: Blockchain.info - Bitcoin Block explorer & Currency Statistics on: October 10, 2012, 07:50:17 PM
There is now a filter on address pages to show confirmed transactions only (Including filtering orphans)


like I said in an earlier post..  even if we choose different filtering options.. as soon as we change "pages" that filter gets reset to default
10  Bitcoin / Development & Technical Discussion / Re: bitcoind/bitcoin-qt find source address of input on: October 05, 2012, 12:56:41 AM
ok so my previous example was good for wallet transactions..  so instead I made a more "general" implementation for it to be in getrawtransaction of the bitcoin client

here is a patch-like mod of the code of TxToJSON in rpcrawtransaction.cpp which is used to output a verbosed version of getrawtransaction or decoderawtransaction:
(added code has + in front)

Code:
void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
{
    entry.push_back(Pair("txid", tx.GetHash().GetHex()));
    entry.push_back(Pair("version", tx.nVersion));
    entry.push_back(Pair("locktime", (boost::int64_t)tx.nLockTime));
    Array vin;
    BOOST_FOREACH(const CTxIn& txin, tx.vin)
    {
        Object in;
        if (tx.IsCoinBase())
            in.push_back(Pair("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
        else
        {
            in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
            in.push_back(Pair("vout", (boost::int64_t)txin.prevout.n));
+           CTransaction txPrev;
+           uint256 hashBlock;
+           GetTransaction(txin.prevout.hash, txPrev, hashBlock);  // get the vin's previous transaction
+           CTxDestination source;
+           if (ExtractDestination(txPrev.vout[txin.prevout.n].scriptPubKey, source))  // extract the destination of the previous transaction's vout[n]
+           {
+               CBitcoinAddress addressSource(source);              // convert this to an address
+               in.push_back(Pair("address",addressSource.ToString())); // add the address to the returned object
+           }
            Object o;
            o.push_back(Pair("asm", txin.scriptSig.ToString()));
            o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
            in.push_back(Pair("scriptSig", o));
        }
        in.push_back(Pair("sequence", (boost::int64_t)txin.nSequence));
        vin.push_back(in);
    }
    entry.push_back(Pair("vin", vin));
    Array vout;
    for (unsigned int i = 0; i < tx.vout.size(); i++)
    {
        const CTxOut& txout = tx.vout[i];
        Object out;
        out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
        out.push_back(Pair("n", (boost::int64_t)i));
        Object o;
        ScriptPubKeyToJSON(txout.scriptPubKey, o);
        out.push_back(Pair("scriptPubKey", o));
        vout.push_back(out);
    }
    entry.push_back(Pair("vout", vout));

    if (hashBlock != 0)
    {
        entry.push_back(Pair("blockhash", hashBlock.GetHex()));
        map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
        if (mi != mapBlockIndex.end() && (*mi).second)
        {
            CBlockIndex* pindex = (*mi).second;
            if (pindex->IsInMainChain())
            {
                entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight));
                entry.push_back(Pair("time", (boost::int64_t)pindex->nTime));
                entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime));
            }
            else
                entry.push_back(Pair("confirmations", 0));
        }
    }
}
11  Bitcoin / Development & Technical Discussion / Re: bitcoind/bitcoin-qt find source address of input on: October 05, 2012, 12:36:24 AM
Just as a reminder, while this like it should work, the concept of a sending address does not exist in bitcoin.  What this is doing is finding the last address to have received these funds.  This is occasionally what you expect, but not always.  If you are thinking that this address is owned or controlled by the person that sent you a transaction, you will be wrong fairly often.

I'm only interested in the address.. not the owner.. 
I know this will not always resolve to an address.. but in most case it will.. I will just catch the errors of when it is not the case and handle it gracefully
12  Bitcoin / Development & Technical Discussion / Re: bitcoind/bitcoin-qt find source address of input on: October 04, 2012, 11:40:00 PM
Ok from the help of the people on freenode/bitcoin-dev I was able to resolve the addresses from the inputs of a transaction using the vin.prevout

so just for other people to know...  exmaple to find out the first input's address

Code:
CWalletTx wtx;
pwalletMain->GetTransaction(uint256(txid), wtx);     // get current transaction
CTxIn vin = wtx.vin[0];                                        //get first input
CWalletTx wtxPrev;                                     
pwalletMain->GetTransaction(vin.prevout.hash, wtxPrev);    // get the vin's previous transaction
CTxDestination source;
ExtractDestination(wtxPrev.vout[vin.prevout.n].scriptPubKey, source);  // extract the destination of the previous transaction's vout[n]
CBitcoinAddress addressSource(source);                // convert this to an address

print addressSource.ToString() // might as well print it!

13  Bitcoin / Development & Technical Discussion / Re: bitcoind/bitcoin-qt find source address of input on: October 04, 2012, 10:12:18 PM
Im trying to find the input address of a transaction but i can't seem to find out how..  anyone ?

Transactions do not have an input address.

They have one or more inputs, which may or may not correspond to one or more addresses.

If you have a CScript, then you can call:
Code:
bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);

What are you trying to do?


Im just trying to output more info on the getrawtransaction rpc command for my personal bitcoins ...

lets say i have this transaction output (testnet):
Code:
{
    "hex" : "0100000001241514a48241f8af8abde6e6e3a657a6ff67beb2febdd5c1f4c62a71a1fb81c3000000008b483045022100a84c1b1a89938c4b16ec7749e9afc16f1a5ec26ddbb16e44739818f4bb85b74c02205d5ce610e0b9d80a373f305dbe67d7347d47470e4b3f6bd98e670ae511d98b920141043ac715efdea8815afc64d7441549e9114ba5d2658f0dcc1a75a8420e8af4791ad8ac46b2eec0463bc54946662e860717d92afe137f0a9fb1b7e1eea812487285ffffffff0200a3e111000000001976a9144988abbeb751dcd6e9f4ec40d50b84c99ed1426d88ac00c2eb0b000000001976a914539862a4bc81786df288265752e12bd7c0c0a6c488ac00000000",
    "txid" : "6aeb3de625830fcc45f675042e1ed98d2c08af72119f81a6e7819d55a6f8ab83",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "c381fba1712ac6f4c1d5bdfeb2be67ffa657a6e3e6e6bd8aaff84182a4141524",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "3045022100a84c1b1a89938c4b16ec7749e9afc16f1a5ec26ddbb16e44739818f4bb85b74c02205d5ce610e0b9d80a373f305dbe67d7347d47470e4b3f6bd98e670ae511d98b9201 043ac715efdea8815afc64d7441549e9114ba5d2658f0dcc1a75a8420e8af4791ad8ac46b2eec0463bc54946662e860717d92afe137f0a9fb1b7e1eea812487285",
                "hex" : "483045022100a84c1b1a89938c4b16ec7749e9afc16f1a5ec26ddbb16e44739818f4bb85b74c02205d5ce610e0b9d80a373f305dbe67d7347d47470e4b3f6bd98e670ae511d98b920141043ac715efdea8815afc64d7441549e9114ba5d2658f0dcc1a75a8420e8af4791ad8ac46b2eec0463bc54946662e860717d92afe137f0a9fb1b7e1eea812487285"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 3.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 4988abbeb751dcd6e9f4ec40d50b84c99ed1426d OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9144988abbeb751dcd6e9f4ec40d50b84c99ed1426d88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "mnDmM7j73HEqo746F1cLQZXwTXNPzLxc3W"
                ]
            }
        },
        {
            "value" : 2.00000000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 539862a4bc81786df288265752e12bd7c0c0a6c4 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914539862a4bc81786df288265752e12bd7c0c0a6c488ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "mo8xvtom7uyCwjh3MHzjdc8ZtWqAQp6xW7"
                ]
            }
        }
    ],
    "blockhash" : "00000000235841896dc9856e8a3ef214df8f5e4f2127e534ff18199616f8da00",
    "confirmations" : 103,
    "time" : 1349331390,
    "blocktime" : 1349331390
}

well i would like it to display the vin's address ... a bit like what blockchain.info displays!
14  Bitcoin / Development & Technical Discussion / bitcoind/bitcoin-qt find source address of input on: October 04, 2012, 09:01:56 PM
Im trying to find the input address of a transaction but i can't seem to find out how..  anyone ?

Code:
CWalletTx wtx;
pwalletMain->GetTransaction(uint256(txid), wtx);
CTxIn vin = wtx.vin[0];
CScript scriptSig = vin.scriptSig;

how can I get the source address of that vin .. I dont seem to understand how I can get the address of the scriptsig ..


15  Economy / Web Wallets / Blockchain.info - Bitcoin Address page on: October 04, 2012, 03:31:08 AM
It seems that in the bitcoin address page on blockchain.info

example: https://blockchain.info/address/1L4EThM6x3Rd2PjNbs1U136FpMq4Gmo3fJ

when you choose a specific filter like "Sent"  .. if you change pages it doesnt keep the filter settings.. and if im at page 5 .. and i put a filter setting im back at page 1
16  Bitcoin / Bitcoin Discussion / Re: The Thai Baht (฿) has always been the most frequently used Bitcoin symbol right? on: October 03, 2012, 07:18:25 PM
I'm not the one having problems...

is that a general statement?  Grin
17  Economy / Gambling / Re: SatoshiDICE.com - The World's Most Popular Bitcoin Game on: September 13, 2012, 02:39:32 PM
I now have 3 transactions that are unknown!   I hope this will get solved soon...  its strange that it only seems to be my big winning bets that are blocking  Undecided 

http://www.satoshidice.com/full.php?tx=7a1b4e1101385046795ef4518e6f037a35fab939c102faf72e9461fa11df6385
http://www.satoshidice.com/full.php?tx=a4eb369ffde29a3cd83b94d52480876024f1da40ad0e4f1571e87f0bdfc76f0f
http://www.satoshidice.com/full.php?tx=4d773e005cb9f48336d02f7f81218044da3dace275b11a86e6e5767148114856

for a total of about 42 bitcoins!  thats alot of money that I currently cant use...  why does it take so long for him to fix those?

Update.. just got paid! Smiley
18  Economy / Gambling / Re: [ANN] BTCDice.com - The Best Bitcoin Game in the World! - Better Payouts on: September 13, 2012, 12:17:59 PM
no don't change the math , it's perfect,  hes talking about how the "effective" payout multiplier is written on the game table  ...

so on your "Less than 32768, 50%"  pays 2x minus house percent [ 2 * 0.9835 = 1.967 ]  so in the table you should write 1.967x multiplier
but for the ones that the payout minus house percent give a long decimal number , still use the correct math , but round up the displayed number on the table page.

looks at this comparison table

odd/65536Even multiplierEffective multiplierDisplayed multiplier
16553664454.65664454.656
23276832227.32832227.328
41638416113.66416113.664
881928056.8328056.832
1640964028.4164028.416
3220482014.2082014.208
6410241007.1041007.104
128512503.552503.552
256256251.776251.776
512128125.888125.888
100065.53664.45465664.455
150043.690666666742.96977066742.970
200032.76832.22732832.227
300021.845333333321.484885333321.485
400016.38416.11366416.114
600010.922666666710.742442666710.742
80008.1928.0568328.057
120005.461333333335.371221333335.371
160004.0964.0284164.028
240002.730666666672.685610666672.686
320002.0482.0142082.014
3276821.9671.967
480001.365333333331.342805333331.343

So for the page aesthetics you can display a rounded effective multiplier to 3 decimals so it looks nice.. but don't change the real math behind the calculation of the payout!

I hope this helps out Smiley
19  Economy / Gambling / Re: SatoshiDICE.com - The World's Most Popular Bitcoin Game on: September 13, 2012, 05:13:05 AM
yeah I guess that makes alot of sense! I guess im just eager to get my winnings! 

I don't know if I'm really lucky but all in all with SD and BTCDice I have won about 83btc  Smiley
20  Economy / Gambling / Re: [ANN] BTCDice.com - The Best Bitcoin Game in the World! - Better Payouts on: September 13, 2012, 05:08:59 AM
Satoshidice shows multiplier less the house percent. I show multiplier prior to house percent.

Your help page at http://btcdice.com/howitworks.html says:

If you win, your bet is multiplied by the prize multiplier and that amount is sent back.

But that's not correct.  If you win, your bet is multiplied by the prize multiplier, then the house edge is subtracted, and that amount is sent back.

It would be best if you showed the actual multiplier the user gets.  i.e. take the house edge off the prize multiplier before stating it.  That way people can compare your odds with SD's to easily see which is better odds.

For example, on "lessthan 16000", instead of saying the payout is "4.096x", calculate 4.096*(1-edge/100):

Code:
>>> 4.096 * (1-1.650/100)
4.028416

and state that the payout is 4.028x.

That way people can make a direct comparison with SD's quoted multiplier of 4.003x.

Yeah I think your suggestion is the best thing to do....  less confusion! Smiley
Pages: [1] 2 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!