Bitcoin Forum
May 11, 2024, 07:56:23 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 »
341  Bitcoin / Development & Technical Discussion / Re: Non-canonical signatures: looking for detectives on: September 08, 2012, 03:41:50 PM
So does that mean that I need to check for leading zero bytes and remove them, in the case that the R or S values happen to be that small by chance? 

Exactly.

Quote
So R and S are not always supposed to be 32 or 33 bytes?

Certainly not, but fewer bytes becomes exponentially less probable.
342  Bitcoin / Development & Technical Discussion / Re: Non-canonical signatures: looking for detectives on: September 08, 2012, 03:38:13 PM
It's certainly incorrectly padded (according to DER).

Neither R and S can start with a zero byte, unless the value would otherwise represent a negative value, in which case exactly one zero byte is required.

So if R would be the (improbably low) number 10000000 (decimal), it'd be encoded as 0x00989680.
343  Bitcoin / Development & Technical Discussion / Re: Non-canonical signatures: looking for detectives on: September 08, 2012, 03:28:35 PM
This one in particular is strange: 9ce2dd7a13f9183128a410d777341ff09b407c0e09c46cc5986c05546c893d49.

Its second input has an R value that is 9 million times smaller than its maximum, which is unlikely to happen purely by chance...
344  Bitcoin / Development & Technical Discussion / Re: Non-canonical signatures: looking for detectives on: September 08, 2012, 02:08:14 PM
On that note, I specifically remember mentioning it to roconner on IRC (or rather, he asked me about it), and was amazed when I told him that it works.  Maybe he went and started doing it, too...?  Heh, probably not.  Just blame it on me, for now.

Actually, no. Here's a list of signatures that use excessive padding, and are certainly not created by Armory (I checked its source code):


f7b8c8aa8a7bb0863646dadb2a2ec549d852ef7b76e486edad98ceebbbcacd7c
9dd9eaffe8862b2c50306322f1c91e1a0e6680bec504ec47ba3ec8dde1500273
3754b02a582375f4bba91ad42837c71e666a109ea0cdaa5b8b118530e47fb139
5199802d027d689a17340e9eab7816ddab44bf2c56b9d9bcc53a0cd6819c915d
50998e3c9036099cb8868a91e13f8067ef20b07822bb359e8025fadd5a6aff85
d84258850dfbbbdfd97b0d8ef16cdbb7104130626b207c4b2df8b5a7716e421b
a165c2467873303b1da4348ca5a314d32d6c7a0bd03f64e40439f0b9f93101db
f0b7592f35cf51eddbb6cb32cefb870db7d33ce21253c75ffe4c9cdd4feaa57a
ce5c306f6dad7bf291fe536e026930f58e2779c37c4db1e7651d83e61b657c47
28680b34764f83a7dd31cb88a27e377602d79c89ef762611af32a548b5fb229f
76491e456827d304f5766276d896a060ef511b85cafb1336239d6b3e2af05fed
263107307a774a60f50f80ae997edb21b58944267b5d1db13675b455eb114143
9ce2dd7a13f9183128a410d777341ff09b407c0e09c46cc5986c05546c893d49

345  Bitcoin / Development & Technical Discussion / Re: Non-canonical signatures: looking for detectives on: September 08, 2012, 01:41:55 AM
gmaxwell has since found out that at least some of the non-DER signatures are created by Armory, and etotheipi has already told me he'll change it for the next release.

346  Bitcoin / Development & Technical Discussion / Non-canonical signatures: looking for detectives on: September 07, 2012, 09:02:51 PM
Hello everyone,

as some of you may know, Bitcoin uses DER-encoded signatures. However, at least the reference client supports any signature encoded in the less strictly defined BER encoding (and even allows some deviations from that). There are several inconveniences associated with allowing multiple encodings, and even some very weak attacks (there's no risk of losing money, in any case). To prevent this, we'd like to at first make non-canonical signatures non-standard, and maybe at a (much) later time, propose a BIP to make them invalid entirely.

There are still some sites/software which produces non-canonical signatures, so we can't make them non-standard yet. My question for you is finding who creates them.

Here is a list of transaction id's my node saw recently, which use a particular type of DER violation (excessive padding):


2229be0a6b3342d5dc3443be9b8b5306e6531f177434b5111247c0155995ba58
284c7971387d1a049aee8bd693fe2dfbad69521c0e43224bd5263529f0002744
35c0819290fd7bdfd48e7a20ea8260a0805993d714a7d7e21892d93e6e7c2f7b
5b74b9b294769be261a9caa1310bb648dd6dd530ac75cee9b7c6bfb6d160d07d
6009f0ef333e81c15a3818fc18b728e7b37881e665ae2b2e6d71b2337219f3da
63c310454e0a23d2543548a4cf7500557a2c632a84fbeb20bee47a3b16bd37b9
72dd12b8451298f316a8b687766e399f397e81e4c1c318f87548725bc95aadf5
82f37114f752865b1520eae888913b02f68aea740d830d1afe9487efd6bfa6d0
83abc9588b7a5c6084398f92c88c485e025773c567745b125c977aa1a502bc88
8a1fae8c8dbb96d1f6b879830f4df948b11ea10806564a60e0197c28f7718d52
95b5b109b744c04369e4d122bb86f3cce951088ab641fe7c6dc35c91a66ffc5b
ae216d17d68fef69b53fbc283f60efd342509f36b51c8740bdf149c319a516b1
c0f852f402f1a9989cc4c8b4921461ec850d8c4b8a9c5733a6273429523f066a
cfd4fce2d88967fdbe089b455169b683503576f69faaa1e9da636ccd62196b05


Anyone knows who/what created these?
347  Bitcoin / Development & Technical Discussion / Re: list of addresses of services where you can't send back on: September 06, 2012, 11:44:35 AM
Just don't send coins back to a sender address; if you need to do a refund, ask the customer for a refund address.

Bitcoin transactions do not have a well-defined "from" address anyway; they potentially have inputs for which a previously-sent-to address can be determined. There is no reason to know, or to assume, that the sender wants to receive payments there. Furthermore, doing that implies address reuse, which is bad for privacy in the Bitcoin network (for everyone, by increasing the trackability of coins).
348  Bitcoin / Development & Technical Discussion / Re: Bitcoin and TOR on: September 03, 2012, 03:07:59 PM
Is there a guide for this?

doc/Tor.txt in the source tree
349  Bitcoin / Bitcoin Technical Support / Re: How to backup and import wallet.dat file. on: September 01, 2012, 08:57:40 PM
-rescan is not needed in this case (and hasn't been since 0.3.21).
350  Bitcoin / Development & Technical Discussion / Re: Version 0.7.0 release candidate 1 ready for testing on: August 31, 2012, 09:03:36 PM
would love to test but it gives a version error with p2pool Smiley require 0.5 or higher

I believe you need the git version of p2pool.
351  Bitcoin / Development & Technical Discussion / Re: Reviving post: Where's the -walldir option in bitcoind? on: August 30, 2012, 11:03:46 PM
The only option is to work around it by creating a whole second BDB instance, doubling the overhead, doubling the development effort needed, and bloating the code.  Oh, and then the client would have to rescan after even trivial "clean" crashes (maybe even on normal starts too, now that I think about it), because there would be no way to do transactions across both instances and so the code could never be sure that both databases were synchronized, even if both were marked clean.

This is not entirely true, to be honest. Splitting the environment would mean some extra code, but after recent cleanups, it would certainly not be too hard anymore. Wallets store information about which blockchain they last saw (since 0.3.21 iirc), and are effectively rescanned at startup when there is a mismatch already, and we don't really do transactions across database files.

The only reason that hasn't been done, is because it is not the final solution. We've had so much troubles with BDB, because we don't use it in a way it was intended for (big servers with power generators, managing large database files simultaneously being accessed by many processes, with all log files backed up regularly to tapes, and software upgrades being performed manually by a database administrator; in this setting, it is rock solid).

As I said, the only real solution - in my opinion - is moving away from BDB and use a key-value store format that guarantees consistency in a single file. As the wallet is loaded entirely in memory anyway, that shouldn't be hard at all. I've already worked on this for a while, but right now, there are more urgent problems, and we're all volunteers that need to choose what to spend time on.
352  Bitcoin / Development & Technical Discussion / Re: Reviving post: Where's the -walldir option in bitcoind? on: August 30, 2012, 10:55:03 PM
So are you saying wallet.dat effectively comprises a table in the BDBE - does BDB not support linked tables?
If wallet.dat is linked in with these other database files, how come it can be renamed and replaced with a new wallet.dat without any discernible difference apart from I can now send BTC from my new wallet -what difference does the BDB see if this file is outside the data folder? If Access can manage linked tables... - I know, bad example ;-)

BDB is not like SQL databases. A BDB environment consists of database files and log files, each database file consisting of one or more tables, and each table consisting basically just of key-value pairs. The environment is used to allow atomic transactions that span multiple files, and manage access from multiple processes to the tables without conflicts - all features we don't use. I'm not sure what you mean by linked tables - I'm not talking about the tables/values represented by the database files, but rather their actual implementation. The log files are necessary to recover from crashes (or at least intended for that), to be able to redo or undo partially completed transactions.

Also, for the wallet, we ask BDB to detach the database file from the environment at shutdown, to be sure it can be backed up and copied around. This works, but is certainly not how BDB is intended to be used.
353  Bitcoin / Bitcoin Technical Support / Re: backup wallet on: August 30, 2012, 02:58:54 PM
Use the 'backup wallet' feature in the menu. It will allow saving a copy of wallet.dat, which you can place in the datadir on your new computer.

You can also just copy the wallet.dat file, but don't do so while the program is running, or hasn't shut down cleanly.
354  Bitcoin / Development & Technical Discussion / Re: Version 0.7.0 release candidate 1 ready for testing on: August 30, 2012, 02:51:54 PM
The BIP links directly to the code change.  It's hard to be more explicit than that.

It doesn't explain the reason though. Blockheight-in-coinbase will guarantee that every transaction in the network is unique and has a unique hash, apart from hash collisions.

This is a more fundamental solution than the quick fix that BIP30 provided. You may want to read for some more motivation.
355  Bitcoin / Development & Technical Discussion / Re: Reviving post: Where's the -walldir option in bitcoind? on: August 30, 2012, 11:11:08 AM
The problem is slightly more difficult than just choosing the location of the wallet file.

The problem is BDB: our wallet file is not just a standalone file, but lives in a Berkleley Database environment, which consists of several files (including log files the database files refer to). Being able to have the wallet be stored in a placed independent from the other databases requires splitting the database environment in two. There are several difficulties with doing this, and it's not a real solution.

The real solution is moving away from BDB for wallets. It was a bad design decision to use BDB for wallets, and has caused us numerous problems already. We've been working on implementing a new wallet format that doesn't depend on a database before, but there have been more urgent issues recently.

In short: yes this needed, yes it will be implemented, but no it's not that easy, and it probably won't be done very soon.
356  Bitcoin / Bitcoin Technical Support / Re: 1 data folder for win and linux on: August 29, 2012, 02:07:15 PM
Enable "detach databases at shutdown" in the menu, or use the -detachdb configuration option, shutdown cleanly, and remove (or just don't copy) the database/ subdirectory between the two system.

The database environment is very system dependent, and BDB (the database engine we use) does not guarantee backward compatibility between environments. When detached from the environment, the database files themselves are backward compatible, though.
357  Economy / Gambling / Re: Accepting Pirate bets on: August 29, 2012, 12:06:42 PM
I'm going to start a bet that he either repays partly before juli 15, 2013, or never fully at all. Who's in?

PS: that's when his debt will be more than the amount of bitcoin in circulation.

358  Bitcoin / Development & Technical Discussion / Re: database/log.00000XXX on: August 28, 2012, 10:36:21 PM
blkindex.dat, addr.dat (before 0.7.0) and wallet.dat are database files. They live in a database environment, consisting of several files, including transaction logs that are necessary in order to recover from (some) crashes.

When using -detachdb (or always for wallet.dat), BDB is asked to fully synchronize all changes to disk, and remove the references from the database files to the log files in the environment.

As to what blkindex.dat contains: where every transaction and every block can be found in the blk0000*.dat files, and where each transaction output was spent.
359  Bitcoin / Development & Technical Discussion / Re: Version 0.7.0 release candidate 1 ready for testing on: August 28, 2012, 09:34:25 PM
Code:
An error occurred while setting up the RPC port 8332 for listening: Cannot assign requested address

That's normal if some other instance is already running which is listening on port 8332. Testnet+mainnet maybe? Or Bitcoind and Bitcoin-Qt? Or an old and a new version?

If neither of these is the case, please paste (the end of) your debug.log file somewhere.
360  Bitcoin / Development & Technical Discussion / Re: Getting Coins out of testnet in a box on: August 28, 2012, 03:38:09 PM
To be extra conservative the protocol requires 120 blocks before generated coins can be sent.  If we have a >120 block re-org we likely have big problems. Smiley

Nitpick: the protocol only requires 100 confirmations before allowing to spend a coinbase output, but the client enforces 120, to be safe in the presence of reorganisations.
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!