NotATether
Legendary
Offline
Activity: 1722
Merit: 7203
In memory of o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 04, 2020, 09:22:24 PM |
|
There isn't even a complete list of consensus rules for Bitcoin ( https://en.bitcoin.it/wiki/Protocol_rules comes close). Just figuring out the consensus rules and listing them all in one place is a full-time job for multiple people, and this applies to all altcoin projects, the serious ones of course. That would be true if I wanted to create something completely different than bitcoin. I want to create a coin, following all the bitcoin rules but on a different chain. On a few words I want to remake bitcoin from block 1. I guess that since Bitcoin core or electrum are written in a way to follow the bitcoin's consensus rules, they can follow my coin's too. I think that a "project" like that sounds simple enough. But is it? I thought that building bitcoin core (that reads a new blockchain), would be that easy but it seemed it wasn't. Even if you're working on something where you don't have to worry about consensus rules, if you want to something like this to be accomplished quickly, and not slowly, you need to have: - A couple hours you can spare each day for working on the project - A fast workstation that doesn't make you wait so long for compilation to finish - Lots of experience in C++ (or whatever language it's in), as in you need to have already written projects in it. There is no time to spend browsing language documentation. And if you're modifying an existing project you also need to have studied the behavior of all the program variables at runtime, via debugging or some other means. I think you only read the source code about the chainparams.cpp file without attaching a debugger to a normal bitcoin-qt to see how the variables in that file are used in calculations which affect other variables. So before modifying a program you need to know how its internals work while it runs, at least for the section you are working on, otherwise it's like walking in the dark without a flashlight; you bump into things and it takes you longer to get to your destination.
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4318
<insert witty quote here>
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 04, 2020, 09:32:45 PM |
|
There is no definite answer to your question, as a lot of it depends on things like: - Your familiarity with cryptocurrency in general - Your familiarity with C++ - Your familiarity with C++ software development methodologies and tools - Your familiarity with the Bitcoin Core codebase - Your familiarity with Linux - Your familiarity with the various compilation tools and methods - Your familiarity with cross-compiling Windows binaries on Linux I'm sure that it would be relatively simple for one of the Bitcoin Core "main" [1] devs to rework the code to do exactly what it is you're trying to do. Someone with a "reasonable" level of C++ and the tools, but no experience with BTC or cryptocurrency in general, would probably be able to do it, but would most likely need a bit of time and research to figure out how to do it. You have admitted that your experience level in a number of the areas I've listed above is "low". I just want to prove that anyone can create a cryptocurrency.
"Anyone" is probably a bit of a stretch. Although given enough time and effort, most competent devs should be able to figure it out. It just probably won't happen "overnight". [1] yes, this is a terrible term... but it's early and I haven't had any coffee and my brain is still waking up ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif)
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 04, 2020, 09:52:22 PM |
|
otherwise it's like walking in the dark without a flashlight; you bump into things and it takes you longer to get to your destination. You described it nice. Okay, I get that it needs time, effort and knowledge. As a beginner (about everything), I see the whole thing in a simple way, which is probably not. Changing few lines on chainparams.cpp and waiting that it's finished, could work in theory, but in action it is far from that. But how bitcoin's blockchain is the one that all nodes follow? Is it because of the pchMessageStart? If this change then am I a different node? A different "follower"? "Anyone" is probably a bit of a stretch. Although given enough time and effort, most competent devs should be able to figure it out. It just probably won't happen "overnight". I wrote a falsely phrase, you're right. What I wanted to say is that anyone is free to create a cryptocurrency. He can make it if he wants it! He doesn't have to spend money or take permission from a third party. Because, after all, bitcoin is just a bunch of code. Nothing special for the computer, but a huge step for mankind. [1] yes, this is a terrible term... but it's early and I haven't had any coffee and my brain is still waking up ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) Good morning from Greece! Here it's 23:51. Going to sleep now. ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif)
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4318
<insert witty quote here>
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 04, 2020, 10:41:08 PM |
|
I admire your tenacity... you have a goal, and you're determined to reach it. So, kudos for that! ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) I guess the main problem you're likely to face is that, it's not just a quick "chain params" edit... as you have already discovered there are other factors at play like the ports used, version numbers etc. Obviously, with the proliferation of altcoins that have been spawned back in 2016-2017 etc, it clearly isn't a "mission impossible"... it'll just need a bit of work. Did you manage to figure out why the Windows version just crashed immediately on startup? Was there anything registered in the Windows Error Log that might indicate why it was crashing? ![Huh](https://bitcointalk.org/Smileys/default/huh.gif)
|
|
|
|
mocacinno
Legendary
Offline
Activity: 3500
Merit: 5086
https://merel.mobi => buy facemasks with BTC/LTC
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 05, 2020, 10:15:52 AM |
|
--snip-- - Create an altcoin core with bitcoin core source code.
- Create an altcoin wallet using electrum source code.
- Create a block explorer for the altcoin.
--snip-- A long time ago, i have created my own (private) coins for learning purposes... So it's defenately possible. I stared with litecoin's codebase since at that time it still had the code for a cpu miner, so that made things easyer to find the first couple of blocks. I had that network running between a couple of home computers for weeks... I also setup a block explorer... Can't remember which one tough... And I cloned P2Pool and setup my own mining pool.. IIRC, the whole thing took me about a week... Including adapting litecoin's codebase for my own "coin", compiling linux and windows binaries, setting up an explorer and a pool... But since it was a private project I never applied any updates or improvements. Later on, i got fed up by the sheer amount of low-effort worthless altcoins flooding the market, so i made a proof-of-concept to prove anybody with some basic skills could push an altcoin to the market in a couple of hours, so i created mocacoin in a timespan of 3 or 4 hours (IIRC): https://www.mocacinno.com/mocacoinIt's based on monero's coinbase (or was it based on a clone of a clone of XMR... Don't remember) So, if that's TL;DR; : sure, it's possible to create your own altcoin, as long as it's for learning purposes... an explorer: sure... a pool: sure.... electrum: sure (i haven't done this personally, but i don't see why not)...
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 05, 2020, 11:28:08 AM |
|
Did you manage to figure out why the Windows version just crashed immediately on startup? Was there anything registered in the Windows Error Log that might indicate why it was crashing? ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) Yes, I've figured it out what was the fault weeks now. I just didn't reply to your last post. You were right, it was the checkpointData. Instead of: checkpointData = { { } }; I should do it: checkpointData = { { { 0, uint256S("0x0")} } }; So now, bitcoin-qt opens without any errors. I've several queries right now, though. First of all, I connect with nodes. That shouldn't happen. I've deleted all “vSeeds.emplace_back” lines. There are no IP addresses on my source code. I've also changed the message signature of mainnet to: pchMessageStart[0] = 0xf0; pchMessageStart[1] = 0xb0; pchMessageStart[2] = 0xb0; pchMessageStart[3] = 0xd0; Although, Bitcoin Core sends information somewhere. ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FlbKuJYV.png&t=665&c=qs4G8JR1WLP1yQ) Second question. Why am I considered as asynchronized? I haven't changed the satoshi's genesis block and in order to work I've set nMaxTipAge to a large value, so it can mine without thinking that the block is way too old. (bad grammar)validation.cpp:int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE * 10000; Third question. Why I can't mine? Difficulty is 1. Does it have to do with the previous question that I'm not "synchronized"? ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FNUE4CMJ.png&t=665&c=8sqMHKBB4OnaoA) And I cloned P2Pool and setup my own mining pool.. What's the point of cloning one if it's a small project? People can mine from their pc via Core. It must be hard, but according to your posts, you are an experienced miner so it wouldn't be that bad.
|
|
|
|
mocacinno
Legendary
Offline
Activity: 3500
Merit: 5086
https://merel.mobi => buy facemasks with BTC/LTC
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 05, 2020, 12:15:37 PM |
|
--snip-- And I cloned P2Pool and setup my own mining pool.. What's the point of cloning one if it's a small project? People can mine from their pc via Core. It must be hard, but according to your posts, you are an experienced miner so it wouldn't be that bad. It's the same point as everything else in your thread: a learning experience... The point of setting up a pool for such a cloned coin is exactly the same point as having a block explorer or an spv wallet... After all: you can easily parse those couple of blocks manually instead of using an explorer, and you don't need an SPV wallet if the total size of your blockchain is only a couple Mb...
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4318
<insert witty quote here>
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 07, 2020, 05:16:40 AM Last edit: November 15, 2023, 12:41:37 AM by HCP |
|
So now, bitcoin-qt opens without any errors. I've several queries right now, though. First of all, I connect with nodes. That shouldn't happen. I've deleted all “vSeeds.emplace_back” lines. There are no IP addresses on my source code. I've also changed the message signature of mainnet to: Although, Bitcoin Core sends information somewhere. ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Ftalkimg.com%2Fimages%2F2023%2F11%2F15%2FzvsYq.png&t=665&c=G7auYOjZMb6xCw) Will probably be all the "fixed seeds" in chainparamsseeds.cpp Shutdown your custom Core app, then delete peers.dat. After that, in chainaparams.cpp, find the "vFixedSeeds" lines... and make sure they're all "vFixedSeeds.clear();"... then recompile and restart Bitcoin-qt.exe... you should see no "peers" on the peers tab in "Windows -> Peers": ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Ftalkimg.com%2Fimages%2F2023%2F11%2F15%2Fzv38j.png&t=665&c=qpy5Z3Xmph1CHQ) Second question. Why am I considered as asynchronized? I haven't changed the satoshi's genesis block and in order to work I've set nMaxTipAge to a large value, so it can mine without thinking that the block is way too old. (bad grammar)validation.cpp:int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE * 10000; Because there aren't any "blocks" to sync if you just start up with the Genesis block... until a block is mined, there will be nothing to sync Third question. Why I can't mine? Difficulty is 1. Does it have to do with the previous question that I'm not "synchronized"? ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Ftalkimg.com%2Fimages%2F2023%2F11%2F15%2FzvvAG.png&t=665&c=574Omh859dUv3g) Fairly sure that the generatetoaddress command only works in "regtest" mode. You'll need to connect a 2nd node, and then setup a solo miner of some description to create a block before you'll see the nodes "sync".
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 07, 2020, 10:27:35 AM |
|
I've done what you said. I don't get any peers now. So it's a new coin right now. I also tried to run bitcoin core on 2 different devices as you said (from 2 different ip addresses). ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FfjB3QAY.jpg&t=665&c=1oAVzqSK2MIlbw) The problem is that when I run addnode "xx.xxx.xxx.xxx:7333" "add" it returns me null. I'm sending you a video of it via PM.
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4318
<insert witty quote here>
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 07, 2020, 12:06:19 PM |
|
The problem is that when I run addnode "xx.xxx.xxx.xxx:7333" "add" it returns me null. I'm sending you a video of it via PM.
That is the correct response... it should return null... Do you then see the "xx.xxx.xxx.xxx" machine appear in the "peers" tab after you use the addnode command? ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) If you don't then you might need to look into the IP addresses you're using and/or the network settings. From the video you sent me, it looks like you're using external IP addresses... if they're both on the same network and plugged into the same router, then I'd expect you should be using addresses that start 192.168.x.x or 10.0.x.x etc... they're the most common "private" network type addresses... Also, it's possible that the Windows firewall is just being stupid and blocking things ![Roll Eyes](https://bitcointalk.org/Smileys/default/rolleyes.gif) I ran my 2 nodes on 2 Linux VMs, connected in a network as 10.0.2.4 and 10.0.2.5... when I used the following from the first VM: It took only 2 or 3 seconds and the connection was made and I could see it listed in the "Peers" tab. I still haven't been able to mine a block, despite spending hours trying to get cgminer/bfgminer "solo" CPU mining... neither of them seem to want to connect the node via RPC, despite the fact that bitcoin-cli works fine (even from the 2nd node across the network) ![Undecided](https://bitcointalk.org/Smileys/default/undecided.gif)
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 07, 2020, 12:28:19 PM Last edit: November 07, 2020, 12:38:46 PM by BlackHatCoiner |
|
I added my local ip and it connected. (192.168.2.3:7333) So yeah, right now on the network traffic tab I can see that the devices are sharing information. Question, how difficult is finding a block below the target with difficulty = 1? ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fs5ptqJR.png&t=665&c=SA7KGa9RuIbfPQ) Edit: I made it! ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Frz1K92F.png&t=665&c=btfeP-J4z-lhDw) The problem I face now is that it hasn't shared to my laptop the information that I mined it... What could be the fault? ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) (Once I run getblockcount on laptop I get 0)
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4318
<insert witty quote here>
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 07, 2020, 10:06:17 PM |
|
Out of interest, how did you mine that block? Did you have to setup a standalone "miner" of some description? Or did you just use the generatetoaddress option? ![Huh](https://bitcointalk.org/Smileys/default/huh.gif)
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 07, 2020, 10:19:51 PM |
|
Out of interest, how did you mine that block? Did you have to setup a standalone "miner" of some description? Or did you just use the generatetoaddress option? ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) No mining scripts. Just generatetoaddress with 1 billion max tries. (I think)
|
|
|
|
nc50lc
Legendary
Online
Activity: 2534
Merit: 6019
Self-proclaimed Genius
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 08, 2020, 03:47:30 AM Last edit: November 08, 2020, 04:03:28 AM by nc50lc |
|
Fairly sure that the generatetoaddress command only works in "regtest" mode.
AFAIR, I've read somewhere that it works in mainnet. It's just that the difficulty is too high that it'll surely fail after the default 'maxtries' ( 1000000 iterations). I'll try to find the post ( from a Bitcoin Core developer) and update this later. -edit-Found it: /index.php?topic=5227792.msg53894613#msg53894613Thanks google search.
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4318
<insert witty quote here>
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 08, 2020, 05:53:27 AM Last edit: November 15, 2023, 12:39:52 AM by HCP |
|
AFAIR, I've read somewhere that it works in mainnet. It's just that the difficulty is too high that it'll surely fail after the default 'maxtries' (1000000 iterations).
Yep, "no" realistic chance with Bitcoin, but with difficulty set to 1 on these custom coins, it will eventually find a block or 2 ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) No mining scripts. Just generatetoaddress with 1 billion max tries. (I think)
Ah yes, that and a bit of patience finally resulted in a block being produced... however I'm in the same boat, the 2nd node seems like it has received the "header" at least... but doesn't seem to be retrieving or syncing the generated block... ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Ftalkimg.com%2Fimages%2F2023%2F11%2F15%2FzvR5d.png&t=665&c=-XXpr3qpOrb9vg) EDIT: after mining a couple of subsequent blocks, it seems the 2nd node was able to sync up properly... and I'm now able to send transactions between the 2 etc. So maybe mine some more blocks and see if that kicks things into action for you ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Ftalkimg.com%2Fimages%2F2023%2F11%2F15%2Fzvt25.png&t=665&c=SJOdNjWTA_-oTw) ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Ftalkimg.com%2Fimages%2F2023%2F11%2F15%2FzvzRz.png&t=665&c=KbU3Cw2qfsrGDA) Note: I also dropped the maturity time to 5 blocks as mining on the VMs is very slow and I couldn't wait for 100 blocks! ![Wink](https://bitcointalk.org/Smileys/default/wink.gif)
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2020, 08:38:14 AM |
|
I like getting back to it once a month. It is a nice habit and practice. ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) I had left it for 6 weeks without mining any blocks. I don't think that this is an issue. At least not at the first 2016 blocks. Today I opened bitcoin-qt on my laptop and pc and started mining using generatetoaddress. I haven't succeeded yet: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fji0D1cJ.png&t=665&c=he8V8DUi6hg_5w) By using a cpu miner like cpuminer does it go faster? Why is my antivirus going crazy when I try to download it? It doesn't allow me. ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2Fw07VGkC.png&t=665&c=njH3uKYmsBKqRQ) I try to disable it temporally but it says: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FxaBjJRH.png&t=665&c=Z0aRkTkHMu1nQA) Should I worry?
|
|
|
|
NotATether
Legendary
Offline
Activity: 1722
Merit: 7203
In memory of o_e_l_e_o
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2020, 11:05:59 AM |
|
By using a cpu miner like cpuminer does it go faster? Why is my antivirus going crazy when I try to download it? It doesn't allow me. Antivirus programs now have filters that flag all miners, malicious or not, as malware. You need not worry about this as long as you downloaded cpuminer from a reputable source and verified its checksum. You should whitelist the file.
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2020, 12:06:34 PM |
|
generatetoaddress should have multi-core capability (since Bitcoin-qt also had one for mainnet mining), so i doubt there's significant performance increase.
I have a better GPU than CPU. Is it possible to run bitcoin core with GPU?
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1638
Merit: 8044
Bitcoin is a royal fork
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2020, 01:29:25 PM |
|
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4318
<insert witty quote here>
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 21, 2020, 06:36:35 PM Last edit: November 15, 2023, 12:32:06 AM by HCP |
|
Where are the blocks located? On my bitcoin core it says that I have mined 6 blocks, just like you did, but I don't see them anywhere: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Ftalkimg.com%2Fimages%2F2023%2F11%2F15%2FzkyjC.png&t=665&c=lrUCn4_WpMCe4g) In the "blocks" folder... so that blk00000.dat file that is shown in your screenshot will have your block data in it. You can retrieve some block information from the console using: This will return the BLOCK_HASH... then:
|
|
|
|
|