Bitcoin Forum
June 08, 2023, 07:07:59 PM *
News: Latest Bitcoin Core release: 25.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 29, 2011, 10:30:51 PM
The general idea is very very good, but the current "snapshots" of the network should be put on torrent sites.

Torrents offer many advantages over normal ways of distribution:

- Automatic checking of authenticity (torrents have checksums integrated)
- Greatest speed of download
- Decentralization: no central servers needed (same as with Bitcoin)


I very like the idea of using Bittorrent, but I'm not sure about few things:

1. we're adding big dependency on other program (bittorrent client)
2. I don't know any good and portable  C / C++  lib for bittorrent (any ideas?)
3. it's still centralised (bittorrent clients need to connect to tracker), but of course it's much better in terms of download speed and load balancing.
4. Bitcoin clients are already using some protocol to download blocks - perhaps we can resuse it instead of adding another protocol?

All in all: idea looks good, but I wasn't not sure how to deal with those problem, so I just implemented version with mirrors. If we find a solution, I'll try to improve fastboot ;-)
2  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 25, 2011, 10:28:27 AM

Of course it is. That's not what I meant. What you are doing is useful, but it does not have the same security guarantees. Right now, through hardcoded block hashes in the client, the maintainer has the ability to force a particular chain onto you, but that chain must still exist and be valid. If the hash of the entire block file is hardcoded in the client, the maintainer can effectively make you get an invalid block database.

sure, but then - even if evil maintainer prepared faked blockchain - client shouldn't download more blocks from p2p. correct?
3  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 25, 2011, 09:17:55 AM
beta version for linux:

https://github.com/kkurach/bitcoin/tree/fastboot

any comments?  (files:  src/fastboot.h  src/fastboot.cpp)
4  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 20, 2011, 07:13:31 AM
I have thought of this... in my ideal world, this is how it would be implemented.

The client has a few public keys which it trusts (developer maintained), or has a screen where trusted keys can be manipulated by the user (developer maintains the defaults but user is ultimately in charge).


Hey casascius, I think that's a great idea. Perhaps (for the first version) I can just hardcode signatures of some people (responsible for github/bitcoin), and then - in client - just verify signatures of downloaded files. This will allow to update file with blocks every day (and because of that function should provide even faster boot), without changing client source code.

What do you guys think about hardcoding signatures instead of md5sum of first N blocks?
5  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 20, 2011, 03:41:15 AM
Thinking out loud...
Do we even need to check the ECDSA signatures in blocks older than the last checkpoint?
Assuming the checkpoint hash is okay, you can't change any transactions in blocks before it without breaking the chain.
Assuming the checkpoint hash was replaced (eve hacked the devs box or something)... we're pretty much fucked anyways as the client will reject the legit chain and stay on the attackers chain.

Any input?

Hey ArtForz, I think you're right. Anyway, I think it's safer, cleaner and easier to implement this with hardcoded checksums. First, we are discovering very early that downloaded blocks are invalid (because someone changed them or there were problems with download). It allows to retry download from a different mirror as soon as md5hash is calculated.

Secondly, I'm not sure how exactly works the logic inside client (handling broken chain), and I'd prefer to not touch it, just to be on a safe side.  With checksum approach I just write a class with one method, which downloads and verifies files. This method can be run from any point of client, and the rest of the client is untouched.

Last but not least, we get another (perhaps redundant) protection with this md5sum.
6  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 19, 2011, 11:52:51 PM
And indeed, most of the time is spent validating the block chain, not downloading. Before 0.3.24, larger blocks often caused disconnects when sending because of an anti-spam measure. That is/was also a cause of delay when starting up, but is slowly improving, as more nodes (and thus potential download partners) upgrade to 0.3.24.

But here we are not validating blockchain block-by-block (which takes a lot of CPU). I just verify md5um of a file which contains 140000 blocks.  It's  much much faster.

That said, a -fastboot argument that takes a URL or filename to import a blockchain from may be useful in certain situations.

it can take argument, but I think it should also have some default mirrors hardcoded (user usually just download and run a program, and don't care about reading docs and looking for URLs, etc...). I already have 3 people who volunteered to provide mirrors, which may be enough for beta version.
7  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 18, 2011, 06:08:12 PM
ok, I did the homework.

I used Matt's blockchain (thanks Matt for sharing this!!) on fresh client.
(http://bitcoin.bluematt.me/bitcoin-nightly/blockchain-nightly/)

download time: 7 minutes
bunzip2 and tar -  ~ 2 minutes
./bitcoin -rescan :  1 minute


total: 10 minutes
result:  140600 blocks done Smiley
8  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 18, 2011, 05:49:33 PM
@zellfaze   hm...but don't we need to run  -rescan? If I download 140k blocks,  what about my transactions which were included in those blocks? Will they show up or I need to rescan?   
Anyway, I believe that still download + rescan is faster than p2p.
9  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 18, 2011, 10:46:50 AM
I think you're solving the wrong problem. Most of the time is not spend downloading the block chain but processing it. Take a look at your CPU usage.

Is it true also for newer blocks? I know that it's pretty fast to download first  60-70k,  but later it's getting slower and slower....


BTW. perhaps we can store already processed blocks? (as binary blob Smiley ),  of course with md5 verification?  then we get everything as fast as download Smiley
10  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 18, 2011, 10:42:50 AM
@sirk390

1. you do can -  git push Tongue  of course I was talking only about updating md5 string in the code. (so, older clients will still work but have to download more blocks from p2p than newer clients [equal to the number of blocks between releases])

2. You don't need to as the blockchain is allready "protected" against block changes.

It's just another protection. Calculating hash is not a big deal, and I'm not sure how exactly blockchain protection works when attacker can change almost all blocks.
11  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 18, 2011, 09:00:25 AM
what do you mean? take only last N blocks? but then we don't have the whole history
12  Bitcoin / Development & Technical Discussion / Re: [new feature discussion] -fastboot on: August 18, 2011, 08:42:15 AM
Any constructive criticism from people who voted no ?  Thanks!
13  Bitcoin / Bitcoin Technical Support / Re: [dev] git master branch doesn't compile (linux, wx 2.9, gcc 4.4.5) on: August 18, 2011, 08:02:15 AM
SOLVED!  doc is wrong,   wxWidget 2.9.0 doesn't work. need 2.9.2
14  Bitcoin / Development & Technical Discussion / [new feature discussion] -fastboot on: August 18, 2011, 03:54:19 AM
Hey guys,

I'm in the middle of implementing new option for official bitcoin client:  -fastboot.
As we know, currently syncing "fresh" client takes really long time - even several hours. This option will allow user to download all blocks in a very short time, by downloading almost all blocks (as compressed file) from one of mirrors (mirror will be choosen randomly by client).  MDhash of downloaded file will be hardcoded into client, to prevent changing blocks. It also mean that this code needs to be updated every few weeks (as currently is with the number of blocks),  but I think it's worth it.

What do you think about that?

Pros:
+ sync you fresh client in few minutes


Cons:
- servers with files are centralized, so in case they doesn't work,  option won't speed up


Thanks!

----
EDIT: I've run small test.

I used Matt's blockchain (thanks Matt for sharing this!!) on fresh client.
(http://bitcoin.bluematt.me/bitcoin-nightly/blockchain-nightly/)

download time: 7 minutes
bunzip2 and tar -  ~ 2 minutes
./bitcoin -rescan :  1 minute


total: 10 minutes
result:  140600 blocks done
-------
15  Other / Beginners & Help / Re: Whitelist Requests (Want out of here?) on: August 17, 2011, 06:27:36 PM
Hey,

I'd like to be whitelisted because I wanted to help developing bitcoin. According to README:

Development process
===================

"
If it is a more complicated or potentially controversial change, then the patch submitter will be asked to start a discussion (if they haven't already) on the development forums:  http://bitcointalk.org/index.php?board=6.0
"

Currently I cannot start any discussions.  I'm experienced bitcoin user ( > 4 months) as well as programmer ( > 10 years Smiley )

Thanks!
16  Bitcoin / Bitcoin Technical Support / [dev] git master branch doesn't compile (linux, wx 2.9, gcc 4.4.5) on: August 17, 2011, 09:21:03 AM
I'm not sure if it's "newbie" but I cannot post to developers Tongue
I cloned git repo from github, but master doesnt compile (log below)
What's wrong with that? I have installed wxWidget 2.9,  ubuntu 10.10, gcc 4.4.5

seems that someone is using wx method which doesn't exists.. which version of wx are you using?

regis@lap:~/bit/bitcoin/src$ git fetch origin
regis@lap:~/bit/bitcoin/src$ git rebase origin/master
Current branch master is up to date.
regis@lap:~/bit/bitcoin/src$ make -j4 -f makefile.unix bitcoin
g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DNOPCH -DUSE_SSL -DUSE_UPNP=0 -I/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9 -I/usr/local/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -D__WXDEBUG__ -D__WXGTK__ -pthread -DGUI -o obj/ui.o ui.cpp
ui.cpp: In function ‘bool GetWalletPassphrase()’:
ui.cpp:262: error: ‘class wxString’ has no member named ‘ToStdString’
ui.cpp: In member function ‘virtual void CMainFrame::OnIconize(wxIconizeEvent&)’:
ui.cpp:448: warning: ‘bool wxIconizeEvent::Iconized() const’ is deprecated (declared at /usr/local/include/wx-2.9/wx/event.h:1950)
ui.cpp:456: warning: ‘bool wxIconizeEvent::Iconized() const’ is deprecated (declared at /usr/local/include/wx-2.9/wx/event.h:1950)
ui.cpp: In member function ‘virtual void CMainFrame::OnMenuOptionsEncryptWallet(wxCommandEvent&)’:
ui.cpp:1183: error: ‘class wxString’ has no member named ‘ToStdString’
ui.cpp:1200: error: ‘class wxString’ has no member named ‘ToStdString’
ui.cpp: In member function ‘virtual void CMainFrame::OnMenuOptionsChangeWalletPassphrase(wxCommandEvent&)’:
ui.cpp:1248: error: ‘class wxString’ has no member named ‘ToStdString’
ui.cpp:1274: error: ‘class wxString’ has no member named ‘ToStdString’
ui.cpp:1294: error: ‘class wxString’ has no member named ‘ToStdString’
make: *** [obj/ui.o] Error 1
regis@lap:~/bit/bitcoin/src$
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!