Bitcoin Forum
May 25, 2024, 12:35:56 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 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 »
981  Bitcoin / Development & Technical Discussion / Re: [RFC] When wallets conflict with the block chain on: May 01, 2011, 06:39:36 PM
I finally have this implemented, see https://github.com/sipa/bitcoin/tree/rejectedtx

Initial testing shows that it can detect such conflicts, and store/restore correctly in wallet.dat.

The GUI will show rejected transactions, the RPC interface will hide them.

It still needs a way for permanently removing rejected transactions (default after X confirmations of the conflicting tx?), and a way to query them from RPC.
982  Bitcoin / Development & Technical Discussion / Re: wallet glitched on: May 01, 2011, 08:42:17 AM
I have a tx showing 0/unconfirmed, which won't change even if I use -rescan.

Here's what I did:

1. send tx
2. immediately quit bitcoin
3. move wallet.dat aside, replace with a different one
4. run bitcoin. The tx doesn't appear, as expected
5. wait for a new block-  tx appears with 1 confirmation (since this wallet is the recipient)
6. quit bitcoin
7. put original wallet.dat back.
8. tx still stuck at 0/unconfirmed. all other tx have confirmations increasing. -rescan has no effect.

This seems to be a bug, since rescan should work.

Strange indeed, this shouldn't happen. And it definitely shouldn't remain after a rescan. Couple of questions though:
* which version of bitcoin are you using
* you say "since this wallet is the recipient", so you're using an address from the new wallet as destination for a tx from the old one?
* did you only move wallet.dat aside, or the whole datadir?
983  Bitcoin / Development & Technical Discussion / Re: ECDSA Signatures allow recovery of the public key on: April 30, 2011, 04:10:20 PM
Patch is here: https://github.com/sipa/bitcoin/commit/6e223c405988a1002eeeee69db88a1128a38b0a3
984  Bitcoin / Mining software (miners) / Re: hashkill - testing bitcoin miner plugin on: April 30, 2011, 11:38:21 AM
Code:
[hashkill] Version 0.2.4
[hashkill] Plugin 'bitcoin' loaded successfully
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] This plugin supports GPU acceleration.
[hashkill] Initialized hash indexes
[hashkill] Initialized thread mutexes
[hashkill] Spawned worker threads
[hashkill] Successfully connected and authorized at mining.bitcoin.cz:8332
[hashkill] Compiling OpenCL kernel source (amd_bitcoin.cl)
[hashkill] Binary size: 457180
[hashkill] Doing BFI_INT magic...

Mining statistics...
Speed: -1478477178 MPlaintexts/sec [cur: 62%] [proc: 20] [subm: 30] [stale: 0] [eff: 150%]     
985  Bitcoin / Development & Technical Discussion / Re: ECDSA Signatures allow recovery of the public key on: April 30, 2011, 10:06:15 AM
What's the extra CPU cost for recovering the public key?  Current bottleneck for bitcoin transaction processing is the CPU cost of ECDSA signature verification, not disk space or bandwidth, so saving bytes at the expense of more CPU is not the right thing to do.

I implemented this in bitcoin using openssl libraries. I tested it on existing signatures (converting them to the 65-byte "compact" signature format described above), and that signatures are always valid for their corresponding recovered public keys (even when recovering from random data).

I benchmarked both signature verification and key recovery. On my system, signature verification takes around 650us, key recovery takes around 685us, so there is a 5% CPU penalty. Note that signing does have a larger overhead (around 150%)
986  Bitcoin / Development & Technical Discussion / Re: Has someone actually revised the entire code? on: April 29, 2011, 10:37:53 AM
There is even a guy who implemented an entire bitcoin client in Java, so I guess he's looked at the entire source.

https://code.google.com/p/bitcoinj/

That guy was even the first to respond in this thread Smiley
987  Bitcoin / Development & Technical Discussion / Re: Why is bitcoin.org using a self-signed SSL certificate... on: April 28, 2011, 11:27:45 PM
+1

A system like bitcoin which is based on strong cryptography cannot afford not having a certificate accepted by most browsers.
988  Bitcoin / Development & Technical Discussion / Re: ECDSA Signatures allow recovery of the public key on: April 26, 2011, 03:52:23 PM
ArtForz notes some possibly low-hanging fruit: we verify the same TX multiple times.

Can you elaborate?
989  Economy / Economics / Re: Gold vs bitcoin on: April 25, 2011, 10:47:45 AM
bitcoin can be transfered electronically, gold can't. gold can be traded physically, bitcoin can't. otherwise, for the purposes of money, they are the same, but due to this distinguishing feature, they each serve different markets for money: the physical and the electronic.

Gold and bitcoins are complementary.  Both have different uses and both are usefull.
Bitcoin can be traded physically (flashdrives, printed certificates).  I agree with your vote though.

Gold can be traded physically without the buyer needing to trust anyone - he can verify it himself (though it would require some tools, like a weighing scale)

Bitcoins can be traded electronically without the buyer needing to trust anyone - he can verify it himself (though it would require some tools, like a full bitcoin client)

Gold can be traded electronically by using digital tokens representing ownership of a physical amount of gold, but it requires trust in the issuer of the token.

Bitcoins can be traded physically by using physical tokens representing ownership of an electronic amount of bitcoins, but it requires trust in the issuer of the token.
990  Bitcoin / Development & Technical Discussion / Re: ECDSA Signatures allow recovery of the public key on: April 25, 2011, 09:45:28 AM
A suggestion: introduce an additional OP_GENPUBKEY, which pops a signature and a 2-bit number from the stack (which states which of the 4 possible generated keys is the right one), and pushes the generated public key (for this transaction and signature) itself onto the stack. From then on, it can be processed by the existing infrastructure, such as checking it against a known value, or first hashing it using OP_HASH160 before comparing it to an address.

A typical scriptPubKey for consuming a spend-to-address would then become:

  OP_GENPUBKEY OP_HASH160 <address> OP_EQUALVERIFY

With corresponding scriptSig:

  <signature> <generatedId>

If we drop the DER-encoding of the signature and just give the 2 256-bit numbers, prefixed with a version byte maybe, this is a 24-byte scriptPubKey, and a 67-byte scriptSig (compared to a 25-byte scriptPubKey and a 139-byte scriptSig now)

As suggested by [mike], we could go for an even smaller but slightly less flexible OP_CHECKSPEND, that does everything:

  <address> OP_CHECKSPEND

Which is only 22 bytes. We could do without the generatedId (allowing a 66-byte scriptSig) in this case, but at a potentially increased verification cost (2 to 4 possible pubkeys need to be verified).
991  Bitcoin / Bitcoin Discussion / Re: concern for bitcoin and the environment on: April 25, 2011, 09:41:25 AM
The amount of energy spent per day in an economically viable way (that is, excluding people who willingly burn more energy than what it gains them), is limited to block_subsidy*block_per_day*USD_per_BTC/USD_per_kWh.

Currently, this means around 50 * 144 * 1.7 / 0.11 kWh per day, or 111MWh/day, or 4MW power consumption. That is (currently) less than an accelerating eurostar train.

Note that assuming the block subsidy (including fees) and power price remain equal, this only depends on the bitcoin exchange rate, which may go up to 70 USD/BTC before it is economically viable to burn the equivalent of an average Boeing 747.

Also note that this is an upper limit - as long as miners want some profit, the total power consumption needs to remain below this number.
992  Bitcoin / Development & Technical Discussion / ECDSA Signatures allow recovery of the public key on: April 24, 2011, 02:24:06 PM
Hello all,

I recently read in the sec pdf file (see http://www.secg.org/download/aid-780/sec1-v2.pdf, pages 47-48, section 4.1.6) that it is possible to recover the public key used in an ECDSA signature. After an IRC conversation, this was implemented and tested by roconnor, and it seems to be possible indeed.

Currently, bitcoin txin's for spend-to-address transactions use a DER-encoded signature + DER-encoded public key, resulting in 139-byte scripts. Assuming we drop the DER-encoding (except for a version byte), we could reduce this to 65 bytes.
993  Economy / Economics / Re: A modest amount of inflation should be part of bitcoin on: April 23, 2011, 08:00:59 PM
If the reason is purely psychological, you could create something like an "indexed bitcoin", where the client simply multiplies all numbers with 1.02^((months_since_jan_2009)/12) or something like that. The underlying properties of the system are not changed, but still things like decreasing wages can be avoided.
994  Bitcoin / Bitcoin Discussion / Re: Double wallet on: April 21, 2011, 11:00:02 PM
The wallet does not contain the coins. It contains the keys to spend coins which are assigned to the corresponding addresses. The coins themselves, if such a thing exists, are kept by the network.

If you try to spend a coin twice, the network will only accept the first transaction to do so.
995  Bitcoin / Development & Technical Discussion / Re: Extracting Private Key - (java or rpc) on: April 20, 2011, 04:06:03 PM
It adds RPC calls dumpprivkey and importprivkey.
996  Bitcoin / Development & Technical Discussion / Re: Extracting Private Key - (java or rpc) on: April 20, 2011, 03:58:26 PM
I have a patch in my walletdump branch that can export and import private keys. It is still dangerous to do so, including a chance of corrupting your wallet if keys are used in several place at the same time.

See https://github.com/sipa/bitcoin/tree/walletdump
997  Bitcoin / Development & Technical Discussion / Re: Target difficulty value, enough bits in nonce? on: April 20, 2011, 08:24:33 AM
And there is another nonce inside the coinbase transaction, which is updated every time the nonce in the header overflows. Furthermore there is added entropy using the timestamp, and the public key of the miner.
998  Bitcoin / Development & Technical Discussion / Re: Did pull, can't compile due to miniupnpc problems on: April 18, 2011, 09:08:36 AM
Remove your previous obj/*.o files.
999  Bitcoin / Bitcoin Discussion / Re: Will bitcoin ever be faster? on: April 18, 2011, 08:45:23 AM
Also see http://bitcointalk.org/index.php?topic=423.msg3819#msg3819 and other ideas in that thread.
1000  Bitcoin / Development & Technical Discussion / Re: [RFC] When wallets conflict with the block chain on: April 17, 2011, 07:14:17 PM
Why another (intentionally) conflicting transaction? Just mark the unconfirmed transaction inactive...

It could end up going through, which might cause you to pay twice.

Maybe, but you'll need to be careful.
  • If there was a problem with the inputs (already spent eg.), the correction tx won't be accepted either (and you definitely don't want a correction tx for a correction tx).
  • If the problem was with the output (eg. non-standard script), a correction tx that does a simple spend-to-self may get you certainty, by seeing the correction tx end up in a block sooner than the original
  • If the original tx never reached the network, a retransmit is the best thing to do, but a correction tx won't harm

So, implementation-wise, i suppose it should be a kind of spend-to-self tx, which is by default not assumed to be active, until it is seen in a block.
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 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!