이메일 #051 - #055
원본 출처: Satoshi - Sirius emails 2009-2011
이메일 #051
Date: Sat, 31 Oct 2009 20:09:58 +0000
From: Satoshi Nakamoto <[email protected]>
Subject: Re: Linux build
To: [email protected]
한글 번역
heapchk()는 현재 쓰이지 않는 MSVCRT 디버깅용 기능에 불과합니다. Linux에서는 아무 동작도 하지 않도록 두면 됩니다. OpenSSL은 Linux에서 자동으로 /dev/urandom을 이용해 시드를 생성하므로, RandAddSeedPerfmon 역시 아무 동작도 하지 않도록 두면 됩니다.
네트워크와 분리된 상태에서 철저히 테스트하기 전에는 네트워크에 연결되지 않게 하세요. 컴퓨터가 두 대 있다면 인터넷을 뽑고 "bitcoin -connect=<ip>"를 이용해 서로 연결하세요, 한 대는 windows, 다른 한 대는 linux로 말입니다. -connect를 사용하면 192.168.x.x 같은 라우팅 불가 주소에도 연결할 수 있습니다. 우리가 아직 미처 확인하지 못한 비정상적인 찌꺼기를 내보내거나 네트워크에서 다른 반사회적인 동작을 하게 될 경우, 네트워크의 신뢰성에 나쁜 인상을 주고 싶지 않습니다.
테스트 가능한 빌드가 나오면 제가 테스트할 시간을 낼 수 있습니다. 지금까지의 변경 사항에 대해 현재 진행 중인 스트레스 테스트에 포함시킬 수 있습니다.
[email protected]님이 쓰셨습니다:
저는 util.h에서 QueryPerformanceCounter를 Linux의 gettimeofday로 교체하기 위해 #ifdef를 만들었습니다. wxWidgets 2.9로 업데이트하자 일부 Unicode/ANSI 오류가 코드 변경 없이 해결되었습니다. 현재 Linux에서 겪고 있는 유일한 컴파일 오류는 util.h의 heapchk() 때문입니다.
제가 마주친 이식성 없는 부분 몇 가지를 고쳤습니다: QueryPerformanceCounter printf 형식 문자열의 %I64d Sleep CheckDiskSpace
제가 고쳐야 할 다른 이식성 없는 부분을 아시면 알려 주세요.
debug.log와 db.log를 현재 디렉터리가 어디가 되든 그곳에 두는 대신, 데이터 파일과 같은 디렉터리(%appdata%\Bitcoin)로 옮기려고 합니다.
영어 원문
heapchk() is just a MSVCRT debugging thing that's not being used. It
can be a no-op on Linux. OpenSSL automatically uses /dev/urandom to
seed on Linux, so RandAddSeedPerfmon can also be a no-op.
Don't let it connect to the network before we've tested it thoroughly
off-net. If you have two computers, unplug the internet and use
"bitcoin -connect=<ip>" to connect to each other, one windows and one
linux. -connect will allow you to connect to non-routable addresses
like 192.168.x.x. We don't want to reflect badly on the reliability of
the network if it throws off some malformed crud we hadn't thought to
check for yet, or discovers something else anti-social to do on the network.
I have time that I can do some testing when you've got something
buildable to test. I can include it in the stress test I'm currently
running on the changes so far.
[email protected] wrote:
> I made an #ifdef to replace QueryPerformanceCounter with Linux's
> gettimeofday in util.h. Some Unicode/ANSI errors were resolved without
> code changes when I updated to wxWidgets 2.9. The only compile error I'm
> getting in Linux at the moment is from heapchk() in util.h.
>
>> I fixed some non-portable stuff I came across:
>> QueryPerformanceCounter
>> %I64d in printf format strings
>> Sleep
>> CheckDiskSpace
>>
>> If there's any other unportable stuff you know of I should fix, let me
>> know.
>>
>> I think I'll move debug.log and db.log into the same directory as the
>> data files (%appdata%\Bitcoin), rather than whatever the current
>> directory happens to be.
>
>
>
이메일 #052
Date: Tue, 03 Nov 2009 09:31:41 +0200
From: [email protected]
To: Satoshi Nakamoto <[email protected]>
Subject: Re: Linux build
한글 번역
지금까지 이식한 것을 svn/branches에 올렸습니다. Util, script, db와 헤더는 이제 완전히 컴파일되고 net.cpp는 부분적으로 컴파일되니, 아직 할 일이 남아 있습니다.
_beginthread는 Linux에 직접 대응하는 기능이 없어서, 대신 Boost 스레드를 사용했습니다.
Tor SOCKS 프록시를 이용해 연결하지 못했습니다. Freenode의 Tor 정책 때문에 그들의 히든 서비스로 접속해야 해서 그런 것일 수 있습니다: http://freenode.net/irc_servers.shtml#tor
heapchk()는 현재 쓰이지 않는 MSVCRT 디버깅용 기능에 불과합니다. Linux에서는 아무 동작도 하지 않도록 두면 됩니다. OpenSSL은 Linux에서 자동으로 /dev/urandom을 이용해 시드를 생성하므로, RandAddSeedPerfmon 역시 아무 동작도 하지 않도록 두면 됩니다.
네트워크와 분리된 상태에서 철저히 테스트하기 전에는 네트워크에 연결되지 않게 하세요. 컴퓨터가 두 대 있다면 인터넷을 뽑고 "bitcoin -connect=<ip>"를 이용해 서로 연결하세요, 한 대는 windows, 다른 한 대는 linux로 말입니다. -connect를 사용하면 192.168.x.x 같은 라우팅 불가 주소에도 연결할 수 있습니다. 우리가 아직 미처 확인하지 못한 비정상적인 찌꺼기를 내보내거나 네트워크에서 다른 반사회적인 동작을 하게 될 경우, 네트워크의 신뢰성에 나쁜 인상을 주고 싶지 않습니다.
테스트 가능한 빌드가 나오면 제가 테스트할 시간을 낼 수 있습니다. 지금까지의 변경 사항에 대해 현재 진행 중인 스트레스 테스트에 포함시킬 수 있습니다.
[email protected]님이 쓰셨습니다:
저는 util.h에서 QueryPerformanceCounter를 Linux의 gettimeofday로 교체하기 위해 #ifdef를 만들었습니다. wxWidgets 2.9로 업데이트하자 일부 Unicode/ANSI 오류가 코드 변경 없이 해결되었습니다. 현재 Linux에서 겪고 있는 유일한 컴파일 오류는 util.h의 heapchk() 때문입니다.
제가 마주친 이식성 없는 부분 몇 가지를 고쳤습니다: QueryPerformanceCounter printf 형식 문자열의 %I64d Sleep CheckDiskSpace
제가 고쳐야 할 다른 이식성 없는 부분을 아시면 알려 주세요.
debug.log와 db.log를 현재 디렉터리가 어디가 되든 그곳에 두는 대신, 데이터 파일과 같은 디렉터리(%appdata%\Bitcoin)로 옮기려고 합니다.
영어 원문
I uploaded what I've ported so far to the svn/branches. Util, script,
db and the headers compile fully now and net.cpp partially, so there's
still work to do.
_beginthread doesn't have a direct Linux equivalent, so I used Boost
threads instead.
I couldn't get connected using the Tor SOCKS proxy. That might be
because of the Freenode Tor policy which requires connecting to their
hidden service: http://freenode.net/irc_servers.shtml#tor
> heapchk() is just a MSVCRT debugging thing that's not being used. It
> can be a no-op on Linux. OpenSSL automatically uses /dev/urandom to
> seed on Linux, so RandAddSeedPerfmon can also be a no-op.
>
> Don't let it connect to the network before we've tested it thoroughly
> off-net. If you have two computers, unplug the internet and use
> "bitcoin -connect=<ip>" to connect to each other, one windows and one
> linux. -connect will allow you to connect to non-routable addresses
> like 192.168.x.x. We don't want to reflect badly on the reliability of
> the network if it throws off some malformed crud we hadn't thought to
> check for yet, or discovers something else anti-social to do on the
> network.
>
> I have time that I can do some testing when you've got something
> buildable to test. I can include it in the stress test I'm currently
> running on the changes so far.
>
> [email protected] wrote:
>> I made an #ifdef to replace QueryPerformanceCounter with Linux's
>> gettimeofday in util.h. Some Unicode/ANSI errors were resolved
>> without code changes when I updated to wxWidgets 2.9. The only
>> compile error I'm getting in Linux at the moment is from heapchk()
>> in util.h.
>>
>>> I fixed some non-portable stuff I came across:
>>> QueryPerformanceCounter
>>> %I64d in printf format strings
>>> Sleep
>>> CheckDiskSpace
>>>
>>> If there's any other unportable stuff you know of I should fix,
>>> let me know.
>>>
>>> I think I'll move debug.log and db.log into the same directory as the
>>> data files (%appdata%\Bitcoin), rather than whatever the current
>>> directory happens to be.
>>
>>
>>
이메일 #053
Date: Tue, 03 Nov 2009 15:53:25 +0000
From: Satoshi Nakamoto <[email protected]>
Subject: Re: Linux build, proxy
To: [email protected]
한글 번역
잘됐습니다, Linux 빌드 작업을 함께하게 되어 기대하고 있었습니다.
Freenode의 히든 서비스에 접속하면, 남용 때문에 그곳에서도 TOR를 차단했으니 접속이 끊긴다는 안내를 받게 됩니다. unix에서 암호 유틸리티를 실행하고 로그인에 쓸 계정을 이메일로 요청하는 몇 단계 절차가 있기는 하지만, 꽤 복잡해집니다. 계정 하나를 신청한 뒤 모두가 같은 계정을 쓰면 되지 않을까 싶습니다만, IRC 서버가 아마 계정당 하나의 로그인으로 제한하거나, 어떤 관리자는 같은 계정에 열 개가 넘는 로그인이 들어오는 것을 달가워하지 않을지도 모르겠습니다.
IRC 부분 말고, 프록시 테스트는 어떻게 됐습니까? 전에 연결한 적이 있으니 addr.dat에 알려진 노드 주소들이 들어 있겠지만, 어떤 노드가 온라인 상태인지 IRC로 알 수 없으면 찾는 데 오래 걸립니다. 보통은 당신 외에 들어오는 연결을 받을 수 있는 다른 노드가 1개에서 3개 정도 있고, 당신을 이미 아는 기존 노드들은 결국 당신에게 연결할 것입니다. 연결이 몇 개나 됐고, 얼마나 걸렸습니까? TOR를 거쳐 바깥으로 성공적으로 연결됐는지 알려면 debug.log에서 "connected"를 검색해야 할 겁니다.
시드를 받기 위해 보통 방식으로 한 번 연결하지 않고 TOR로 처음 연결하려면, 들어오는 연결을 받을 수 있는 기존 노드의 주소를 알고 이렇게 시드로 지정해야 합니다: bitcoin -proxy=127.0.0.1:9050 -addnode=<ip of a node>
들어오는 연결을 받아들이는 일부 노드가 자신의 IP를 프로그램에 넣어 두는 데 동의한다면, 자동으로 시드를 받을 수 있을 것입니다. 또는 사용법과 함께 Wiki 페이지에 올린 일부 IP 시드 주소로도 됩니다.
또 다른 방법은 TOR 노드를 차단하지 않는 IRC 서버를 세상에서 다시 찾아보는 것입니다. 아니면 누군가 하나를 세우도록 하는 방법도 있습니다. IRC 서버들은 실제로 텍스트 채팅이 이뤄지기 때문에 TOR를 차단합니다... 봇과 잡동사니만 있는 서버라면 신경 쓰지 않을 겁니다. 포럼이나 메일링 리스트에 질문을 올려 아는 서버가 있는지 물어보는 게 좋겠습니다.
또 다른 문제는 TOR 사용자는 들어오는 연결을 받을 수 없고, 받을 수 있는 노드가 워낙 적다는 점입니다. 모두가 TOR로 가면 연결할 노드가 없어질 것입니다.
들어오는 연결을 받아들일 수 있는 노드가 부족합니다. 최근에는 보통 2개에서 4개 사이를 오갑니다. 사람들에게 공유기에서 포트 포워딩을 설정하는 것이 중요하다고 강조해야 합니다. 모든 P2P 파일 공유 프로그램에는 그 방법이 설명되어 있습니다. bitcoin.sourceforge.net 홈페이지에 들어오는 연결을 받기 위해 포트 포워딩을 설정하도록 권하는 문단을 넣고, 공유기별로 방법을 설명한 사이트로 연결해야 합니다.
[email protected]님이 쓰셨습니다:
지금까지 이식한 것을 svn/branches에 올렸습니다. Util, script, db와 헤더는 이제 완전히 컴파일되고 net.cpp는 부분적으로 컴파일되니, 아직 할 일이 남아 있습니다.
_beginthread는 Linux에 직접 대응하는 기능이 없어서, 대신 Boost 스레드를 사용했습니다.
Tor SOCKS 프록시를 이용해 연결하지 못했습니다. Freenode의 Tor 정책 때문에 그들의 히든 서비스로 접속해야 해서 그런 것일 수 있습니다: http://freenode.net/irc_servers.shtml#tor
heapchk()는 현재 쓰이지 않는 MSVCRT 디버깅용 기능에 불과합니다. Linux에서는 아무 동작도 하지 않도록 두면 됩니다. OpenSSL은 Linux에서 자동으로 /dev/urandom을 이용해 시드를 생성하므로, RandAddSeedPerfmon 역시 아무 동작도 하지 않도록 두면 됩니다.
네트워크와 분리된 상태에서 철저히 테스트하기 전에는 네트워크에 연결되지 않게 하세요. 컴퓨터가 두 대 있다면 인터넷을 뽑고 "bitcoin -connect=<ip>"를 이용해 서로 연결하세요, 한 대는 windows, 다른 한 대는 linux로 말입니다. -connect를 사용하면 192.168.x.x 같은 라우팅 불가 주소에도 연결할 수 있습니다. 우리가 아직 미처 확인하지 못한 비정상적인 찌꺼기를 내보내거나 네트워크에서 다른 반사회적인 동작을 하게 될 경우, 네트워크의 신뢰성에 나쁜 인상을 주고 싶지 않습니다.
테스트 가능한 빌드가 나오면 제가 테스트할 시간을 낼 수 있습니다. 지금까지의 변경 사항에 대해 현재 진행 중인 스트레스 테스트에 포함시킬 수 있습니다.
[email protected]님이 쓰셨습니다:
저는 util.h에서 QueryPerformanceCounter를 Linux의 gettimeofday로 교체하기 위해 #ifdef를 만들었습니다. wxWidgets 2.9로 업데이트하자 일부 Unicode/ANSI 오류가 코드 변경 없이 해결되었습니다. 현재 Linux에서 겪고 있는 유일한 컴파일 오류는 util.h의 heapchk() 때문입니다.
제가 마주친 이식성 없는 부분 몇 가지를 고쳤습니다: QueryPerformanceCounter printf 형식 문자열의 %I64d Sleep CheckDiskSpace
제가 고쳐야 할 다른 이식성 없는 부분을 아시면 알려 주세요.
debug.log와 db.log를 현재 디렉터리가 어디가 되든 그곳에 두는 대신, 데이터 파일과 같은 디렉터리(%appdata%\Bitcoin)로 옮기려고 합니다.
영어 원문
Great, I've been looking forward to working on the Linux build.
If you connect to Freenode's hidden service, then they tell you they've
also banned TOR from that due to abuse and it kicks you off. There's a
several step procedure you can do to run a password utility on unix and
e-mail request an account that you could login with, but that's getting
pretty complicated. I wonder if we could get away with applying for one
account and then everyone use the same account? I suppose the IRC
server probably limits accounts to one login, or some admin might not
like to see a dozen logins on the same account.
Besides the IRC part, how did your test of proxy go? Since you've been
connected before, your addr.dat contains known node addresses, but
without IRC to know which ones are online, it takes a long time to find
them. There are normally 1 to 3 other nodes besides you that can accept
incoming connections, and existing nodes that already know you would
eventually connect to you. How many connections did you get, and how
long did it take? I guess to know whether it successfully connected
outbound through TOR you'd need to search debug.log for "connected".
To originally connect with TOR without connecting normally once to get
seeded, you'd have to know the address of an existing node that can
accept incoming connections and seed it like this:
bitcoin -proxy=127.0.0.1:9050 -addnode=<ip of a node>
If some nodes that accept incoming connects were willing to have their
IP coded into the program, it could seed automatically. Or some IP seed
addresses posted on a Wiki page with the instructions.
Another option is to search the world again for an IRC server that
doesn't ban TOR nodes. Or if we could get someone to set one up. IRC
servers ban TOR because they have actual text chat on them... if there
was one with just bots and junk then it wouldn't care. Probably should
post a question on the forum or the mailing list and see if anyone knows
one.
Another problem is that TOR users can't accept incoming connections, and
we have so few that can. If everyone goes to TOR, there won't be any
nodes to connect to.
We have a shortage of nodes that can accept incoming connections. It
generally ranges from 2 to 4 lately. We need to emphasize the
importance to people of setting up port forwarding on their router.
Every P2P file sharing program has instructions how to do it. We should
have a paragraph on the bitcoin.sourceforge.net homepage urging people
to set up port forwarding to accept incoming connections, and a link to
a site that describes how to do it for each router.
[email protected] wrote:
> I uploaded what I've ported so far to the svn/branches. Util, script, db
> and the headers compile fully now and net.cpp partially, so there's
> still work to do.
>
> _beginthread doesn't have a direct Linux equivalent, so I used Boost
> threads instead.
>
> I couldn't get connected using the Tor SOCKS proxy. That might be
> because of the Freenode Tor policy which requires connecting to their
> hidden service: http://freenode.net/irc_servers.shtml#tor
>
>> heapchk() is just a MSVCRT debugging thing that's not being used. It
>> can be a no-op on Linux. OpenSSL automatically uses /dev/urandom to
>> seed on Linux, so RandAddSeedPerfmon can also be a no-op.
>>
>> Don't let it connect to the network before we've tested it thoroughly
>> off-net. If you have two computers, unplug the internet and use
>> "bitcoin -connect=<ip>" to connect to each other, one windows and one
>> linux. -connect will allow you to connect to non-routable addresses
>> like 192.168.x.x. We don't want to reflect badly on the reliability of
>> the network if it throws off some malformed crud we hadn't thought to
>> check for yet, or discovers something else anti-social to do on the
>> network.
>>
>> I have time that I can do some testing when you've got something
>> buildable to test. I can include it in the stress test I'm currently
>> running on the changes so far.
>>
>> [email protected] wrote:
>>> I made an #ifdef to replace QueryPerformanceCounter with Linux's
>>> gettimeofday in util.h. Some Unicode/ANSI errors were resolved
>>> without code changes when I updated to wxWidgets 2.9. The only
>>> compile error I'm getting in Linux at the moment is from heapchk()
>>> in util.h.
>>>
>>>> I fixed some non-portable stuff I came across:
>>>> QueryPerformanceCounter
>>>> %I64d in printf format strings
>>>> Sleep
>>>> CheckDiskSpace
>>>>
>>>> If there's any other unportable stuff you know of I should fix, let
>>>> me know.
>>>>
>>>> I think I'll move debug.log and db.log into the same directory as the
>>>> data files (%appdata%\Bitcoin), rather than whatever the current
>>>> directory happens to be.
>>>
>>>
>>>
>
>
>
이메일 #054
Date: Wed, 04 Nov 2009 05:38:17 +0000
From: Satoshi Nakamoto <[email protected]>
Subject: Re: Linux build
To: [email protected]
한글 번역
거의 다 됐습니다. 몇 가지를 고쳐서 끝까지 컴파일되게는 했지만, 링크할 시스템 라이브러리를 몰라서 정의되지 않은 참조가 잔뜩 있습니다.
makefile을 고쳐 /usr/local 아래와 기본 "make install" 위치에서 필요한 것들을 찾도록 했습니다. 제가 한 일과 사용한 스위치는 build-unix.txt에 적어 두었습니다. 당분간은 wxWidgets 2.8.9를 쓰고 있는데, Windows와 같은 버전이라 플랫폼 변경과 동시에 버전 변경 문제가 생기는지 고민하고 싶지 않아서입니다. 2.8.10이나 2.9.0도 아마 괜찮을 겁니다. 어차피 거의 모든 라이브러리를 링크하고 있으니 wxWidgets는 단일 라이브러리 컴파일 방식을 택했습니다.
xpm 파일들을 추가했는데, 이는 Windows 대신 다른 곳에서 모두 RC 파일 대신 쓰는 방식입니다. 정적 배열에 그림을 정의하는 기발한 C 파일들입니다. 비트코인 아이콘에는 5가지 다른 버전이 있지만 xpm에서 그게 어떻게 동작하는지 알 수 없어 가장 큰 것만 넣었습니다. GTK에서는 알아서 크기를 조정해 줄지도 모르겠습니다. 이게 맞는지 어떤지는 모르겠지만, 컴파일은 됩니다.
[email protected]님이 쓰셨습니다:
지금까지 이식한 것을 svn/branches에 올렸습니다. Util, script, db와 헤더는 이제 완전히 컴파일되고 net.cpp는 부분적으로 컴파일되니, 아직 할 일이 남아 있습니다.
_beginthread는 Linux에 직접 대응하는 기능이 없어서, 대신 Boost 스레드를 사용했습니다.
영어 원문
It was almost there. I fixed a few things and got it to finish
compiling but I don't know the system libraries to link to so there's
undefined references galore.
I changed the makefile to look for things under /usr/local and in their
default "make install" locations. I wrote what I did and switches I
used in build-unix.txt. I'm currently using wxWidgets 2.8.9 for now
because it's the same version as on Windows and I don't want to wonder
if there's version change issues at the same time as platform change.
2.8.10 or 2.9.0 are probably fine though. I went with the
single-library compile of wxWidgets since we're linking to almost every
library anyway.
I added xpm files, which is what they use everywhere else but Windows
instead of RC files. They're clever C files that define graphics in
static arrays. The bitcoin icon has 5 different versions but I couldn't
figure out how that works in xpm so I only put the biggest one. Maybe
on GTK it scales it for you. I don't know if these are right or what,
but they compile.
[email protected] wrote:
> I uploaded what I've ported so far to the svn/branches. Util, script, db
> and the headers compile fully now and net.cpp partially, so there's
> still work to do.
>
> _beginthread doesn't have a direct Linux equivalent, so I used Boost
> threads instead.
>
이메일 #055
Date: Wed, 04 Nov 2009 20:38:03 +0000
From: Satoshi Nakamoto <[email protected]>
Subject: Re: Linux build
To: [email protected]
한글 번역
중복 작업을 하지 않도록 제가 아직 Linux 빌드 작업을 하고 있다는 것만 알려 드립니다. 링크까지 마치고 실행했으며, 리소스 대신 xpm에서 비트맵을 불러오도록 바꾸는 등의 실행 시점 문제들을 해결하고 있습니다.
의존성 중 일부는 직접 컴파일하는 대신 구할 수 있는 debian 패키지가 있습니다: apt-get install build-essential apt-get install libgtk2.0-dev apt-get install libssl-dev
Berkeley DB나 Boost에 패키지가 있는지 확인해야 합니다.
OpenSSL은 공유 링크할 텐데, Linux에는 항상 미리 설치되어 있다고 거의 확신합니다. GTK는 공유 링크해야 합니다. 기본으로 미리 설치되어 있는지는 완전히 확신할 수 없습니다.
영어 원문
Just letting you know I'm still working on the Linux build so we don't
duplicate work. I got it linked and ran it and working through runtime
issues like getting it switched to load bitmaps from xpm instead of
resources.
There are debian packages available for some of the dependencies instead
of having to compile them ourselves:
apt-get install build-essential
apt-get install libgtk2.0-dev
apt-get install libssl-dev
I need to see if Berkeley DB or Boost have packages.
We'll shared-link OpenSSL, I'm pretty sure it's always preinstalled on
Linux. GTK has to be shared linked. I'm not completely sure if it's
preinstalled by default.