Bitcoin Forum
July 12, 2024, 11:21:03 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 [95] 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 »
1881  Bitcoin / Development & Technical Discussion / Re: Bitcoin client svn: Problems closing dialogs (osx, wxwidgets svn) patch proposed on: December 17, 2010, 05:11:25 PM
Works nicely on Linux, and is the recommended way to close dialogs.

Anybody able to give it a quick compile and test on Windows?
1882  Bitcoin / Bitcoin Technical Support / Re: unexpected halt of generation on: December 16, 2010, 11:42:09 PM
Weird.  Are you on Linux or Mac?  If you are, grab my bitcointools and run
  ./dbdump.py --wallet

... then look for:

nLimitProcessors:
  and
fGenerateBitcoins:
1883  Bitcoin / Development & Technical Discussion / Re: svn rev 103/104: listaccounts, listtransactions*, and -rpctimeout on: December 16, 2010, 06:24:05 PM
... and I just noticed an egregious bug:  listtransactions was reporting the receiving address instead of the account name for "receive" transactions.  Fix is svn rev 104.  Please bang on it and let me know if I screwed anything else up.

While I was committing, I also added "time" to transaction info output, and fixed a little bug reported a while ago (setgenerate true 0 is now the same as setgenerate false).
1884  Bitcoin / Development & Technical Discussion / Re: Getting the address that received funds on: December 16, 2010, 05:46:46 PM
Maybe a composite ID would solve the problem, anyway I think that if something is called ID it should be guaranteed to be unique (or collision likelihood should be limited to the probability of a hash collision)

Just use transactionID+account.

You've already got the problem that if a customer sends coins from account A to an address that belongs to account B, that is a single, unique transaction that affects two accounts.

listtransactions will Do the Right Thing (generate two entries, different accounts, same transaction id).  And gettransaction won't lie to you (it doesn't say anything about what accounts were involved, on purpose, for exactly this reason).

1885  Bitcoin / Development & Technical Discussion / Re: Getting the address that received funds on: December 16, 2010, 04:29:39 PM
So that basically means that if you're relying on listtransactions to track incoming transactions to a web app account you're in deep trouble...

No, only the amount sent to the address associated with the web app's account(s) will be reported in listtransactions.

But that's exactly why this is a lot harder than it seems-- we've got to think about weird transactions people might use to try to break websites that use this API.
1886  Bitcoin / Bitcoin Technical Support / Re: unexpected halt of generation on: December 16, 2010, 02:44:33 PM
Do you have gen=something in your bitcoin.conf?
1887  Bitcoin / Development & Technical Discussion / Re: Getting the address that received funds on: December 16, 2010, 02:33:52 PM
Outputting the transaction time would be easy.

"The address that received funds" is not as obvious as you might think.  It is possible to generate transactions that are split and go to several addresses (well, it is possible if you use your own custom client, standard Bitcoin doesn't expose that feature).

Some or all of those addresses might be yours, and might be associated with any number of accounts.

I see two possible ways of dealing with this:

1. Generate multiple entries for a single transaction.  E.g. if you receive a split transactions, where 50 BTC goes to address '1aaa...' and 10 to address '1bbbb...', listtransactions will list that as two separate entries that share the same txid:
Code:
    {
        "category" : "receive",
        "amount" : 50.00000000,
        "txid" : "2c9d43db0142130a9926ef4b1c58abf17e8b4dfd2148bf2072b0df6d2bac8789",
        "toaddress" : "1aaa", ... etc, irrelevant fields omitted...
    },
    {
        "category" : "receive",
        "amount" : 10.00000000,
        "txid" : "2c9d43db0142130a9926ef4b1c58abf17e8b4dfd2148bf2072b0df6d2bac8789",
        "toaddress" : "1bbb", ...
    },

You can already get two separate entries for one transaction if you send to yourself, so this might be the best answer.  And it makes the common case simpler.

2. Or maybe 'toaddress' should be address:amount pairs, like this:
Code:
    {
        "category" : "receive",
        "amount" : 60.00000000,
        "txid" : "2c9d43db0142130a9926ef4b1c58abf17e8b4dfd2148bf2072b0df6d2bac8789",
        "toaddress" : { "1aaa" : 50.000000, "1bbb" : 10.000000 }
    },

Writing all this down, I'm thinking that listtransactions aught to generate multiple entries, but gettransaction aught to generate address:amount pairs (and still omit category/account, as it does now).
1888  Bitcoin / Development & Technical Discussion / Re: Question on the move JSON-RPC call on: December 16, 2010, 01:53:29 PM
move <fromaccount> <toaccount> <amount> [minconf=1] [comment]

minconf does what you want (gives an Account has insufficient funds error if not enough funds with minconf confirmations).

1889  Bitcoin / Development & Technical Discussion / svn rev 103/104: listaccounts, listtransactions*, and -rpctimeout on: December 16, 2010, 01:22:50 AM
I just committed svn rev 103.  Changes are:

listaccounts :  lists all the accounts in your wallet along with their current balances.

listtransactions : call it with no arguments, or give it '*' as the account name, and it lists the last N (default 10, as before) transactions from all accounts.  Part of this change is disallowing '*' as an account name.

-rpctimeout : Thanks to Mt`AwAy who pointed out that, if somebody was allowed to connect to the bitcoin rpc port (via -rpcallowip), then they could connect, do nothing, and hang the connection, causing a denial-of-RPC-service.  Now bitcoin's RPC thread will close the connection if it doesn't get the HTTP request within -rpctimeout (default 30) seconds.
1890  Bitcoin / Bitcoin Discussion / Re: Why another surge in interest? on: December 15, 2010, 09:59:38 PM


A big spike 18 hours ago, but then back to pretty much normal.
1891  Bitcoin / Bitcoin Discussion / Re: Bitcoin Redundancy For Security on: December 15, 2010, 05:40:46 PM
Implementing this in a convenient way would be tough, and it would be blocked by IsStandard.

No, implementing it would be easy.  Implement it (don't forget the UI), test it on the test network (where it is pretty trivial to get non-IsStandard stuff into blocks), and then lobby for a new 'standard' transaction type.

theymos, please stop acting like the current IsStandard test is set in stone. It is not, and, as Satoshi said, new versions of the client are rapidly adopted by a majority of the network, so introducing a new transaction type will not be a big deal.
1892  Bitcoin / Bitcoin Discussion / Re: Mining cartel attack on: December 14, 2010, 08:42:27 PM
I posted a huge reply to a previous post explaining exactly this...
I also mentioned an attack that hasn't been discussed. If my post was deleted could a mod explain why? And/or let other people know about the attack so it could be discussed as necessary?

I deleted two posts-- one from you that was a quote of ByteCoin's simulation results (and nothing else).

And a second from ByteCoin (if I recall correctly), saying essentially "what's up with the empty post?"
1893  Bitcoin / Development & Technical Discussion / Re: Risks when publishing 'static' bitcoin addresses on the web on: December 14, 2010, 05:01:24 PM
What exactly are you trying to acomplish here ?


To put a donate button on a website that generates a brand new address on demand for everyone who wants to donate, so all the donors don't donate to a common address that can tie everyone together.

If there was a language of choice, perhaps it would be Javascript, so it happened all in the browser.  Of course there has to be some way to get the generated keypair to the recipient, like e-mail or whatever, but somebody else can figure that out.

Simplest way:

Call getaccountaddress "charity_name"  when you generate the web page.  You'll get the same address over and over, until somebody donates.  Then you'll get a new address.

Then periodically call:
  getbalance "charity_name"
... and if the balance is greater than zero, call:
  sendfrom "charity_name" charity_real_bitcoin_address amount

... to send the charity the accumulated coins.

If you deal with several charities this way, AND you're bundling up several donations before forwarding the coins to the charity, then it'll be hard to connect donors to particular charities.
1894  Bitcoin / Bitcoin Discussion / Re: Mining cartel attack on: December 14, 2010, 04:37:40 PM
If you're simulating, be sure you're not overlooking the 'opportunity cost' of working on the next-valid-block when you're 'holding back' blocks.

Example:

Cartel finds block N.  Instead of releasing it right away, Cartel holds it and starts working on block N+1 (trying to get a head start).

Before Cartel finds block N+1, somebody else finds an alternate block N and announces it.

IF Cartel loses the race to announce, then Cartel has wasted time looking for a block N+1 that will not be accepted.

If they simply announce block N right away, they'll never waste time trying to find a block N+1 that has only a 50% chance  of being accepted.

Unless the Cartel can propagate their blocks across the network faster than the whole rest of the network, there is never an advantage to holding back blocks.
1895  Bitcoin / Bitcoin Discussion / Re: Mining cartel attack on: December 14, 2010, 03:53:27 PM
I did a simulation of two cartel strategies along the lines of my previous post.
Cartel power Cartel block fraction
......
50%   59.86%

There is something wrong with your simulation.  Proof:

Imagine a bitcoin world with two Cartels, each with 50% of the power, each following the strategy you outline.

It is obvious that they cannot BOTH get 59% of the blocks.
1896  Bitcoin / Bitcoin Discussion / Re: Mining cartel attack on: December 14, 2010, 02:28:55 PM
The only rule oddity in the simulator is: when the Network (all those who are not the cartel) solves a hash, it is not credited a mined block if the preceding block was mined by the cartel. (In this case, the cartel would use its superior network connectivity to "override" the network's newly mined block with the cartel's previously mined block).

Did you simulate network connectivity at all?  Bitcoin is a semi-randomly connected network, where most of the connections are (I would guess) outbound connections from non-generating nodes who are sitting behind firewalls.  With a typical node having 8 random connections, to different /16 networks, it seems to me it would be pretty tough to get tight-enough control over enough network connections to consistently win the "announce a new block" race.

Anybody know how to estimate what percentage of connections the cartel would have to control to only lose the announce-a-block race 15% of the time?  It'll be way more than 15%....

1897  Bitcoin / Development & Technical Discussion / Re: 0.3.18 Bug Report on "getreceivedbyaccount" display on: December 13, 2010, 05:10:06 PM
You should be using getreceivedbyaddress rather than getreceivedbyaccount. You didn't assign that address to any account.

What theymos said.  You're asking for the balance of the account named '1Fs5rqB2sXZ3kax1r3HfuYpK2ksSxLYJT8', and there is no such account.

Whether bitcoin should return an error (instead of 0) if you ask for the balance of a non-existant account is debatable...
1898  Bitcoin / Bitcoin Discussion / Re: SHA v. 3 Algorithm Candidates Finalized on: December 12, 2010, 10:44:35 PM
Maybe I'm missing something here, but I'm confused... How would getting knowledge of a public key be even remotely dangerous ?

If the hashing algorithms are broken I might be able to generate an ECDSA private/public key pair where the public key hashes to the same bitcoin address as one of your public keys.

If I can do that, then I can spend your coins.

On my list of things to worry about, this is just below "Asteroid impact destroys the earth" (but above "Aliens invade and make me their slave").
1899  Economy / Marketplace / Re: I2P now accepting Bitcoin donations! on: December 12, 2010, 09:54:05 PM
That generates a new address for new CGI script invocation (== each page view).

An attacker, or just a popular web page, could fill your wallet with never-used addresses.
Well, a new address would only be generated on each visit of the "donate" page, not the main page.  I don't think it would be that much space consuming on disk.

Also, is there any other way to prevent public to know how much have been donated ?

getaccountaddress is designed for exactly this kind of thing-- it will return the same address over and over, until it gets used (until somebody donates).  After that, it returns a different address...

Of course, if "the public" is grabbing the donation address off your "Donate to Us" page, they could generate a list of donation addresses, add up the donations received on all those addresses, and figure it out.  Depending on how many donations you're getting that might be easy (scrape the page once per day) or hard (if you're getting dozens of donations per day).

You could make it much harder for anybody to figure out how much you're getting in donations by randomly donating to yourself (using the same address returned by getaccountaddress), preferably from a wallet shared by lots of other people (like a MyBitcoin or Mt.Gox account)... 

1900  Bitcoin / Development & Technical Discussion / Re: CGI script for donations on: December 12, 2010, 09:44:43 PM
You don't want to generate a new address for each web page hit.  That's a lot of useless addresses stored in your wallet.
Change "getnewaddress(label)"  to "getaccountaddress(label)" and you'll get the same address over and over, until somebody donates.  Then you'll get a different one.
Pages: « 1 ... 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 [95] 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!