Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: songchunlai on July 14, 2021, 04:17:48 AM



Title: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: songchunlai on July 14, 2021, 04:17:48 AM
I am trying to compile bitcoin0.0.1 with qt .But I got this problem, how to make it work?
http://118.194.232.145/2021-07-1411-59-58.png
This is my code:118.194.232.145/bitcoin0.0.1_src_202107132157_UI.zip (http://118.194.232.145/bitcoin0.0.1_src_202107132157_UI.zip)


Title: Re: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: NotATether on July 14, 2021, 06:26:20 AM
Why exactly are you trying to compile an old binary, that even if successful, wont be able to parse any blocks or transactions (or possibly even discover peers)?


Title: Re: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: NeuroticFish on July 14, 2021, 07:02:47 AM
I may be totally wrong, but with such old source you may have more success on something closer to initial configuration (maybe 32 bit too?).
And, as said, it may be pointless. You acquire have better knowledge from much more recent source, which will compile easier and will also work.


Title: Re: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: songchunlai on July 14, 2021, 03:56:04 PM
I may be totally wrong, but with such old source you may have more success on something closer to initial configuration (maybe 32 bit too?).
And, as said, it may be pointless. You acquire have better knowledge from much more recent source, which will compile easier and will also work.
It's looks more easy to learn. I want find how to start learn it.



Why exactly are you trying to compile an old binary, that even if successful, wont be able to parse any blocks or transactions (or possibly even discover peers)?
There is so much to learn. Very difficult for me. I will study hard.

[moderator's note: consecutive posts merged]


Title: Re: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: garlonicon on July 14, 2021, 05:53:07 PM
If you want to understand what is going on, you probably shouldn't try to compile everything at once, but rather start from empty main and include things one by one. There are some parts of the code that you can compile without other parts, like for example base58 encoding, big numbers (uint160, uint256, etc.), calculating hashes (like sha256 or ripemd160). If you resolve dependencies, you will see some parts are based on pure C++ and nothing else, you can start from that. There will be some parts based on some libraries, like for example OpenSSL, and you have to install that library correctly to compile that. Dealing with everything at once may be overwhelming, also because you will get some compiler errors on Linux that you wouldn't on Windows (for example related to std::min, fixed quite early, but not present in the first version).

I tried to build the first version some time ago and the easiest way to do that was to focus on one part you want to build at a time. For example, I had some code where only ECDSA handling was present, in this way I could play with public key cryptography without worrying about other parts. Then, I had some code with sha256 hashing and nothing else, in this way I could play with mining, for example by re-mining the Genesis Block, where only extra nonce or timestamp was different from the original block. And then, when I had many different parts well-behaving and correctly compiled, I could join everything together to build that version.


Title: Re: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: NotATether on July 14, 2021, 06:39:24 PM
Why exactly are you trying to compile an old binary, that even if successful, wont be able to parse any blocks or transactions (or possibly even discover peers)?
There is so much to learn. Very difficult for me. I will study hard.

Ah, so that's why you're trying to compile an old release.

For starters, you can browse the classes in the Doxygen documentation: https://doxygen.bitcoincore.org/ and study the ones you're interested in. They even have links to inline files so you don't have to cross-reference on Github.


Title: Re: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: DaveF on July 14, 2021, 06:59:53 PM
A while ago when I went to compile the old versions I found it easier to download the gigs and gigs of old linux DVDs with all the needed software and dependencies on them instead of trying to hunt them down online.

https://soft.lafibre.info/

Should get you what you need. Have not tried in a while but it did work a few years ago.

-Dave


Title: Re: bitcoin0.0.1 i2o_ECPublicKey not work
Post by: songchunlai on July 15, 2021, 03:28:53 AM
If you want to understand what is going on, you probably shouldn't try to compile everything at once, but rather start from empty main and include things one by one. There are some parts of the code that you can compile without other parts, like for example base58 encoding, big numbers (uint160, uint256, etc.), calculating hashes (like sha256 or ripemd160). If you resolve dependencies, you will see some parts are based on pure C++ and nothing else, you can start from that. There will be some parts based on some libraries, like for example OpenSSL, and you have to install that library correctly to compile that. Dealing with everything at once may be overwhelming, also because you will get some compiler errors on Linux that you wouldn't on Windows (for example related to std::min, fixed quite early, but not present in the first version).

I tried to build the first version some time ago and the easiest way to do that was to focus on one part you want to build at a time. For example, I had some code where only ECDSA handling was present, in this way I could play with public key cryptography without worrying about other parts. Then, I had some code with sha256 hashing and nothing else, in this way I could play with mining, for example by re-mining the Genesis Block, where only extra nonce or timestamp was different from the original block. And then, when I had many different parts well-behaving and correctly compiled, I could join everything together to build that version.
If I annotated this function instead 51, It's will work :http://118.194.232.145/2021-07-1511-05-58.png



A while ago when I went to compile the old versions I found it easier to download the gigs and gigs of old linux DVDs with all the needed software and dependencies on them instead of trying to hunt them down online.

https://soft.lafibre.info/

Should get you what you need. Have not tried in a while but it did work a few years ago.

-Dave
Thank you Mr. Davef.



Why exactly are you trying to compile an old binary, that even if successful, wont be able to parse any blocks or transactions (or possibly even discover peers)?
There is so much to learn. Very difficult for me. I will study hard.

Ah, so that's why you're trying to compile an old release.

For starters, you can browse the classes in the Doxygen documentation: https://doxygen.bitcoincore.org/ and study the ones you're interested in. They even have links to inline files so you don't have to cross-reference on Github.
Wow, Thank you. It's a useful site.

[moderator's note: consecutive posts merged]