Bitcoin Forum
June 16, 2021, 10:51:53 AM *
News: Latest Bitcoin Core release: 0.21.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Altcoin Discussion / Re: Ripple Giveaway! on: February 27, 2013, 03:57:28 PM
r41ekZxefK6H3sqv7tmtwikzyY8JKaWZKj
2  Bitcoin / Development & Technical Discussion / Re: [Automatic] Building windows client from sources on: July 14, 2011, 02:06:30 PM
I would suggest breaking it into 2 batch files.  The first one would be to create the environment and the second would just compile the client.
Yeah, i bet everyone who will use it for second time will do it anyway.
Relevant lines for [pulling updates and] re-building bitcoin:
Code:
for /F "delims=" %%I in ("%~dp0") do set install_root=%%~fI
set PATH=%install_root%\msysgit\bin;%install_root%\msysgit\mingw\bin;%PATH%

cd bitcoin
::git pull
cd src
bash -i -c 'make -f makefile.mingw INCLUDEPATHS="-I../../boost -I../../db-4.7.25.NC/build_unix -I../../openssl-1.0.0d/include -I../../wxWidgets/lib/gcc_lib/mswu -I../../wxWidgets/include -DBOOST_THREAD_USE_LIB -UUSE_UPNP" LIBPATHS="-L../../boost/stage/lib -L../../db-4.7.25.NC/build_unix -L../../openssl-1.0.0d -L../../wxWidgets/lib/gcc_lib" WXLIBS="-lwxmsw29u_html -lwxmsw29u_core -lwxmsw29u_adv -lwxbase29u -lwxtiff -lwxjpeg -lwxpng -lwxzlib" LIBS="-lboost_system-mgw44-mt-1_48 -lboost_filesystem-mgw44-mt-1_48 -lboost_program_options-mgw44-mt-1_48 -lboost_thread-mgw44-mt-1_48 -ldb_cxx -lssl -lcrypto -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi"'
strip bitcoin.exe
P.S. Edit: uncomment 'git pull' if you want to update source tree
3  Bitcoin / Development & Technical Discussion / [Automatic] Building windows bitcoin client from sources on: July 14, 2011, 11:20:02 AM
Here is the script to grab and compile latest sources.
Only mingw is pre-built, everything else is built from scratch.
  • Fully automatic!
  • No prerequisites.
  • Just create .bat and run it.
  • It downloads and builds everything in current folder.
You can delete C:\msysgit afterwards.
Upnp not included.
Tested on Windows 2008 R2 and Windows 7, 32 and 64 bit.

Code:
if exist msysGit.exe goto unpack
echo Downloading msysgit
echo Set x=CreateObject("Microsoft.XMLHTTP"):x.Open "GET","http://msysgit.googlecode.com/files/msysGit-fullinstall-1.7.6-preview20110708.exe",0:x.Send() >d.vbs
echo Set s=CreateObject("ADODB.Stream"):s.Type=1:s.Open():s.Write(x.responseBody):s.SaveToFile "msysGit.exe",2 >>d.vbs
cscript /nologo d.vbs
if not exist msysGit.exe goto e1
:unpack
msysGit.exe -y -nr
xcopy /E C:\msysgit
echo Compiling GIT
msysgit\bin\bash.exe --login echo DONE

:setpath
for /F "delims=" %%I in ("%~dp0") do set install_root=%%~fI
set PATH=%install_root%\msysgit\bin;%install_root%\msysgit\mingw\bin;%PATH%

:wxWidgets
svn co http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
cd wxWidgets\build\msw
bash -c 'mingw32-make -f makefile.gcc BUILD=release'
cd %install_root%

:Boost
svn co http://svn.boost.org/svn/boost/trunk boost
cd boost
call bootstrap.bat mingw
bjam.exe toolset=gcc address-model=32 variant=release link=static threading=multi runtime-link=shared --build-type=complete stage
cd %install_root%

:OpenSSL
curl http://openssl.org/source/openssl-1.0.0d.tar.gz --O openssl-1.0.0d.tar.gz
md5sum openssl-1.0.0d.tar.gz >check.md5
grep 40b6ea380cc8a5bf9734c2f8bf7e701e check.md5
if not %errorlevel%==0 goto e1
tar xzf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
bash -i -c './config;make'
perl util/mkdef.pl 32 libeay enable-static-engine > libeay32.def
dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32
cd %install_root%

:BerkeleyDB
if exist db-4.7.25.NC goto BerkeleyDBUnpacked
curl http://download.oracle.com/berkeley-db/db-4.7.25.NC.zip --O db-4.7.25.NC.zip
unzip db-4.7.25.NC.zip
:BerkeleyDBUnpacked
cd db-4.7.25.NC/build_unix
bash -i -c '../dist/configure --enable-mingw --enable-cxx;make'
cd %install_root%

:Bitcoin
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/src
bash -i -c 'make -f makefile.mingw INCLUDEPATHS="-I../../boost -I../../db-4.7.25.NC/build_unix -I../../openssl-1.0.0d/include -I../../wxWidgets/lib/gcc_lib/mswu -I../../wxWidgets/include -DBOOST_THREAD_USE_LIB -UUSE_UPNP" LIBPATHS="-L../../boost/stage/lib -L../../db-4.7.25.NC/build_unix -L../../openssl-1.0.0d -L../../wxWidgets/lib/gcc_lib" WXLIBS="-lwxmsw29u_html -lwxmsw29u_core -lwxmsw29u_adv -lwxbase29u -lwxtiff -lwxjpeg -lwxpng -lwxzlib" LIBS="-lboost_system-mgw44-mt-1_48 -lboost_filesystem-mgw44-mt-1_48 -lboost_program_options-mgw44-mt-1_48 -lboost_thread-mgw44-mt-1_48 -ldb_cxx -lssl -lcrypto -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi"'
strip bitcoin.exe
copy ..\..\msysgit\mingw\bin\mingwm10.dll
exit

:e1
echo failed!
Thanks for Windows Build Instructions:http://forum.bitcoin.org/index.php?topic=5851.msg86700#msg86700
4  Bitcoin / Bitcoin Discussion / Re: What programming language to learn? on: July 10, 2011, 11:54:10 AM
Its been a while since I programmed (basic) <-- dont laugh.. gorilla was an awesome game!

anyways I'd like to learn to make scripts or programs that can help bitcoin, I'm just wondering if I had to learn one which would be the best.  Should I learn C or should I learn php for web stuff.   Kinda leaning toward php.  But just wondering what others think.  When i go to learn something I go balls to the wall.

What is the bitcoin client programmed in?
Bitcoin client written in C++.

Basic C knowledge is always needed, whatever main language you about to choose.

A good starting point is this site:
http://projecteuler.net/index.php?section=problems
People solve problems using various languages and techniques.
You have to find a solution to access the discussion.

According to my observations of projecteuler (sorted by popularity):
- C++ wins, but by a small margin
- Python is more and more popular, native big integers is a big advantage (not in real world just in this particular problems), some implementations can compete with C++ speed (psyco etc.)
- Java is used quite often
- Ruby represents very nice and compact source code, but lack of speed make it worthless for final fast solution sometimes (300x slower than C is quite possible), but very useful in research/testing
- Haskell is the most popular functional language atm, there are some solution on Clojure,APL/J/K,LISP
- C#, Delphi is still used

Perl is the best for text/binary parsing, and my choice for very small programs.
5  Bitcoin / Development & Technical Discussion / Re: Vanitygen: Vanity bitcoin addresses FAST! on: July 06, 2011, 12:23:52 PM
Digging through OpenSSL 1.0.0d, the main source of entropy for the default RNG on Linux would appear to be /dev/urandom, or failing that, /dev/random or /dev/srandom.  In fact, if you want to, you can load it up in strace and watch it open /dev/urandom and read random bytes.
Indeed, my mistake. time() is not the only source of entropy by default.
I didnt look deep enough.
Code:
openssl-1.0.0d/crypto/rand/md_rand.c: ssleay_rand_bytes():
if (!initialized)
{
RAND_poll();
initialized = 1;
}
Btw using just time() was quite secure anyway. Assuming Vanitygen runs at least several minutes, the amount of keys to brute-force is >2^64:
 - 15 bit PID
 - 21 bit timeframe (1 month)
 - 7-8 bit CPU speed, + a few bits of time uncertainty each EC_KEY_generate_key()
 - 2^20+ keys to generate  
6  Bitcoin / Development & Technical Discussion / Re: Vanity bitcoin addresses: a new way to keep your CPU busy on: July 04, 2011, 05:27:56 PM
It seems someone already played with cool-looking addresses/hashes back in 2010:
http://blockexplorer.com/address/11126yHiXjavR3oNVwV2GRNso2ah4MnZtm  (there was >1k BTC at this address!)

Code:
HASH160                                   BTC_IN
0000000000000000000000000000000000000000 00000000.07110007
0000000000000000000000000000000000000001 00000000.01000000
000001aa6aa32fb6138c08d5e91f9a502656abdb 00000000.00000001
0000094d87949ffa143d5f3c049a5f071a16a941 00000000.00000001
00000d645142c1b4c07e6a14a854acf4412d8713 00000000.00000001
00000f3b345053879dc45e2ffa23deb781af36e3 00000000.00000001
000013bd967f59213494a10a3fdf49e0b79371cd 00000000.00000001
000018fc5a9d6eae103f0e572ff02c6e8412d42c 00000000.00000001
00001a969f9529cedba0cb353553667874e5c263 00000000.00000001
000020b4868dbb9f9ea4ae2cb23a05b6c7a50737 00000000.00000001
00002ccc7e36c6e7077dc186d33e5f60c76edf58 00000000.00000001
00002e5019ebe4c717080cae027fdb7b1c5045c4 00000000.01000000
000032a07a118a18f4ca16ad4255fbf91a12f0a3 00000000.00000001
00003629f51465a2d757e25dcf189cc260fc392d 00000000.00000001
00003710b5473b680675ba9c0d52ef954103481c 00000000.00000001
00003ddb3d79d74da3ccd4593419f4f2a55a68f8 00000000.79000000
00004020b6275ee5743080928fefe7fe90ef838c 00000000.00000001
0000435e719970dc7aa64245dc7e984f191c1c56 00000000.02000000
000046035080a1bdce64d087aca6d9017a0557a4 00000000.04000000
000048f2b372c547a768bf61f436f2394cc21787 00000000.00000001
00004ed54c20dd73ccba1e102992084b39b556f8 00000000.00000001
000051da44a22641488b8718034be843b795aa82 00000000.00000001
00005831c8aba83829c9aea53b885e752aed62f0 00000000.00000001
00005859982da7cc90ffccb6a11138293d6a7ed7 00000000.00000001
00005af355dd005383792ab27b03b2cd3663a49d 00000000.00000001
00005e2615c19b97a819558e8e8380d5eea3e098 00000000.01000000
00005fea533cbb8cd290f43e0aeea80891837ba2 00000000.00000001
000060df7b6b95c47f0b311f581ad8a471c027b8 00000000.00000001
000062c4f36e984e1c38d64ed3e83fac0b8875d2 00000000.00000001
00006a5f1c919936181de6397671dfdee5eb3f8e 00000001.00000000
00006b7527baa323ae799ae76fbc7755f5c8cb68 00000000.00000001
0000782ec52331217996d5ed7e8fac6d3db7e2c7 00000005.68000000
00007eea3c271357c4254b2f6dd58d6184828f0f 00000000.00000001
0000830a9b1f296aa3f1c468f63be4933422f249 00000008.55000000
00009b759340b8d90771ebf2da76312900d9663d 00000000.00000001
0000a281962dc5123c9d83c977b6e4fbeb5effdb 00000000.00000001
0000a2948d8d534848124a606e43724e37f4b815 00000000.00000001
0000a635cad79b5825dab5176a0bdc59124068b7 00000000.00000001
0000aba36b6f4e822a12885a26d9392101070d4c 00000000.00000001
0000adbae47afaa49642252bb3ad5764aaa91f75 00000000.00000001
0000b7d68d18879c2a2c1e07001398cecb755180 00000000.00000001
0000c32bc79b9e8c8a2afb72462636be440dcc5d 00000000.00000001
0000cce1bcb7f8d8e34548e277cb43620ac50c6e 00000000.00000001
0000cd341be1f51cef57ac0207d098212a4b000a 00000000.00000001
0000cfcee541e4815bb92f4e6b8f5d6d210d2ace 00000000.00000001
0000d10e7744f0885a4fbd20c8ec1a0b82ece4a3 00000000.00000001
0000e30fb7a987abc3c28ca6398c18dc17edd608 00000100.29000000
0000ebb22c6afe1fd46bf1ca17cae2a9496df9ac 00001137.00000000
0000f02e3d9d88a95a015219a8b69a5b9d6cfbcb 00000078.21000000
000105c698a07fabe70f165eb6dae2ee681c03b3 00000517.88000000
000146b7dbf1ca1d1df70500d7c8ca13f19fa15f 00000000.05000000
00014bdcadd62ce646cdbbd68776102e802b1556 00000031.81000000
0001aaf0074a13876565da1abb94fb0ee1607467 00000000.05148120
0001c2d11f347e1d47d05fea3ad5d86efceda60a 00000009.49152769
...
ffff0c753b76620e152890565a7285171ad528ce 00000000.01000000
ffff235734d335de7da59b46d4e2229f03569dc9 00000041.26800000
ffff5ea334aadbe15678ef8ef9046296ee2ccdfa 00000004.80000000
ffff78aece539fb0dca39fbc2200bfb3583d477d 00000921.98226031
ffff97c97e1ccab5bc88350310e8ec76b30f7380 00000013.81000000
ffff9d832765e995c0e3a0e147934043f15add6b 00000003.80000000
ffffd66277094fb1186572d2c5a03056d1a7569f 00000000.50000000
fffff69ea5a3bdc76955591088ddfe5ec555d6cc 00001475.47000000
fffff9fabcf4e7a9bd5f9a44078fdba199c69b38 00000000.00000013
ffffffffffffffffffffffffffffffffffffffff 00000000.01000000
Small perl (64-bit) script to dump entire transaction database :
Code:
open F,'<blk0001.dat'; binmode F; local $/; $_=<F>;
while(/(.{8})\x19\x76\xA9\x14(.{20})\x88\xAC/sg){
  $c=unpack('Q',$1);
  $h=$2;
  $balance{$h}+=$c;
}
for(sort keys %balance){
  $c=$balance{$_};
  $s=sprintf('%016d',$c);
  substr($s,8,0)='.';
  print unpack('H*',$_)." $s\n";
}
1 million addresses soon!
(it counts only inputs, not generation or outputs)
7  Bitcoin / Development & Technical Discussion / Re: Vanitygen: Vanity bitcoin addresses FAST! on: July 04, 2011, 04:25:33 PM
What entropy sources it uses?
It uses linux time() (measured in seconds) and process PID when EC_KEY_generate_key() is invoked.
Code:
openssl-1.0.0d/crypto/bn/bn_rand.c:144
             time(&tim);
             RAND_add(&tim,sizeof(tim),0.0);
I suppose its standard behavior of programs based on OpenSSL.

EC_KEY_generate_key() adds entropy (based on time()) every 1000000 keys or so.
Basically private key (integer) starts from random number and increases for 1000000 keys.
Then new entropy added and new private key generated.

Should be secure after first iteration (1M).

8  Other / Beginners & Help / Re: Whitelist Requests (Want out of here?) on: July 04, 2011, 04:06:18 PM
I have spent more than 4 hours and posted 5 times however I am still a 'newbie'?
Not anymore! Btw i think whitelist not moving
9  Other / Beginners & Help / Re: Mtgox stopped answering help request? on: July 04, 2011, 04:02:29 PM
If they control 90% of the market, why wouldnt control this forum as well !
Cant say if MtGox is good or bad, but their site was not secure for sure.
And it created Mayhem! Not neccessary a bad thing either (in the long run).
10  Other / Beginners & Help / Re: I wish there were more ways to earn btc [There could be I just don't know] on: July 04, 2011, 03:48:41 PM
I wish there were more ways to exchange btc. Dwolla? LR? I never heard of them before!
P2P Virtual Currency is TOO VIRTUAL Smiley
11  Other / Beginners & Help / Re: Introduce yourself :) on: July 04, 2011, 03:41:04 PM
Greetings !
Ever played Anarchy Online? I did!
12  Other / Beginners & Help / Re: Whitelist Requests (Want out of here?) on: July 04, 2011, 02:31:37 PM
Hi

There is an interestinge discussion going on in dev branch of forum, and i want to participate.
http://forum.bitcoin.org/index.php?topic=1387.0
It's about addresses like
http://blockexplorer.com/address/11126yHiXjavR3oNVwV2GRNso2ah4MnZtm
(BTW this one from 2010 and had >1000BTC)
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!