블럭체인 2021. 11. 23. 12:22
반응형

작년부터 작업했던 비트코인 소스에 대한 분석 작업을 정리하여 올리고자 합니다.

서비스 구성에 대한 부분은 리눅스로 구축을 하였지만, 소스에 대한 분석 리눅스 환경보다는 개인적으로 Visual studio에서 하는것이 역시 생산성이 높은 듯하다.

 

첫번째 작업은 역시 소스의 다운로드와 컴파일이다.

 

1) git clone https://github.com/bitcoin/bitcoin.git

 

GitHub - bitcoin/bitcoin: Bitcoin Core integration/staging tree

Bitcoin Core integration/staging tree. Contribute to bitcoin/bitcoin development by creating an account on GitHub.

github.com

 

2) https://bitcoin.forum/t/building-bitcoin-core-with-visual-studio/39

빌드 과정

추가적으로 vcpkg와 qt를 버젼에 맞게 구성해놓으면 아래와 같이 정상적으로 빌드가 됩니다.

디버그 버젼: bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Debug /t:build

 

빌드화면
실행파일

[중요바이너리 설명]

1. Bitcoin Core Wallet - Located at \local\bitcoin-qt.exe. Bitcoin Core Wallet is a combination of full Bitcoin peer and wallet frontend.

2. Bitcoin Core Daemon - Located at \local\bitcoind.exe. Bitcoin Core Daemon is the Bitcoin peer, which you can interact with through RPCs to port 8332 (or 18332 for testnet).

3. Bitcoin CLI (Command Line Interface) - Located at \local\bitcoin-cli.exe. Bitcoin CLI allows you to send RPC commands to Bitcoin Daemon (bitcoind).

4. Bitcoin Transaction - Located at \local\bitcoin-tx.exe. Bitcoin Transaction allows you to create and update Bitcoin transactions.

반응형
posted by choiwonwoo
:
MINERVA/C_CPP 2021. 11. 19. 23:32
반응형

개발 PC를 새로 장만 후, 작업 프로젝트의 소스를 다시 빌드시 아래와 같은 에러가 발생하여 잠시 당황하였다가 기억을 더듬어 다음과 같이 처리하였습니다.

 

[에러화면]

C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\sphelper.h(51): fatal error C1083: 포함 파일을 열 수 없습니다. 'atlbase.h': No such file or directory

 

[해결]

반응형
posted by choiwonwoo
:
MINERVA/C_CPP 2021. 11. 19. 21:44
반응형

아래의 값은 컴파일러에 의해서 세팅되는 메모리 값입니다.

(*가급적 모든 변수/메모리는 반드시 초기화하는 습관을 가지는것이 제일 듯합니다.)

 

- 64 bits
[초기화 되지 않은 지역변수]
0xCCCCCCCCCCCCCCCC
[초기화 되지 않은 Heap 메모리]
0xCDCDCDCDCDCDCDCD
[Free된 Heap 메모리]
0xDDDDDDDDDDDDDDDD or  0xFEEEFEEEFEEEFEEE
[할당된 Heap 메모리를 벗어난 공간]
0xFDFDFDFDFDFDFDFD

- 32 bits
[초기화 되지 않은 지역변수]
0xCCCCCCCC
[초기화 되지 않은 Heap 메모리]
0xCDCDCDCD
[Free된 Heap 메모리]
0xDDDDDDDD or  0xFEEEFEEE
[할당된 Heap 메모리를 벗어난 공간]
0xFDFDFDFD

 

추가 도움 내용:

 

4. 메모리 값을 보고 현재 메모리 상태를 알아보자.

WFC Technical Note 006 - Funny Memory Values Introduction Microsoft has put quite a lot of memory leak detection helpers in Windows NT. They have not done a good job of advertising it. This document..

choiwonwoo.tistory.com

 

반응형
posted by choiwonwoo
: