mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 24, 2021, 11:19:53 PM |
|
hi guys, im working on altcoin for knowledge purpouse
i have some questions, first one:
- what do you think about this configuration on chainparams?
consensus.nPowTargetTimespan = 21 * 24 * 60 * 60; // three weeks consensus.nPowTargetSpacing = 9 * 60;
ill keep asking in the same thread
|
|
|
|
Heisenberg_Hunter
Legendary
Offline
Activity: 1584
Merit: 1280
Heisenberg Design Services
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 25, 2021, 05:10:51 AM |
|
This is one among the most important part of the code in chainparams.cpp. Here consensus.nPowTargetSpacing refers to the time limit between the confirmation of consecutive blocks. In your altcoin, every block will be confirmed in 9 minutes i.e (9 minutes * 60 seconds) consensus.nPowTargetTimespan refers to the difficulty readjustment time. In bitcoin, this is placed at 14 days which is mentioned in #L77 of chainparams.cpp. But in your altcoin, block difficulty will be readjusted in 21 days i.e (21 days * 24 hours * 60 minutes * 60 seconds) In terms of bitcoin, difficulty is adjusted every 2016 blocks and this is calculated using the formula nPowTargetTimespan / nPowTargetSpacing. If the same thing is taken in your altcoin, (21 * 24 * 60 * 60) / (9 * 60) = 3360 blocks I have never read why satoshi chose 10 minute block interval but when complained they were slow, he pointed out to this topic : Snack Machine Thread
|
|
|
|
odolvlobo
Legendary
Offline
Activity: 4424
Merit: 3318
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 25, 2021, 07:18:12 AM Last edit: February 25, 2021, 07:50:29 AM by odolvlobo |
|
- what do you think about this configuration on chainparams? consensus.nPowTargetTimespan = 21 * 24 * 60 * 60; // three weeks consensus.nPowTargetSpacing = 9 * 60;
Why change them? Why do you want to change them to those values?
|
Join an anti-signature campaign: Click ignore on the members of signature campaigns. PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
|
|
|
baro77
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 25, 2021, 07:28:32 AM |
|
I have never read why satoshi chose 10 minute block interval ....
as far as I know, it was a threshold choice, the two needs being: 1) to give enough time to the decentralized network to converge to a "common" (even if intrinsically yet imperfect) status 2) fast confirmation, intended as rapidity to "bury" your transaction under a given number of blocks In Masterng Monero 2nd Edition chapter 10 Antonopoulos writes: " Bitcoin’s block interval of 10 minutes is a design compromise between fast confirmation times (settlement of transactions) and the probability of a fork. A faster block time would make transactions clear faster but lead to more frequent blockchain forks, whereas a slower block time would decrease the number of forks but make settlement slower " How he got that actual value of 10 minutes , aka by which stochastic and computational assumptions is/was supported, I don't know and it would be interesting to be able to repeat the calculus nowadays to check if performance could be improved
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 25, 2021, 07:41:36 AM |
|
This is one among the most important part of the code in chainparams.cpp. Here consensus.nPowTargetSpacing refers to the time limit between the confirmation of consecutive blocks. In your altcoin, every block will be confirmed in 9 minutes i.e (9 minutes * 60 seconds) consensus.nPowTargetTimespan refers to the difficulty readjustment time. In bitcoin, this is placed at 14 days which is mentioned in #L77 of chainparams.cpp. But in your altcoin, block difficulty will be readjusted in 21 days i.e (21 days * 24 hours * 60 minutes * 60 seconds) In terms of bitcoin, difficulty is adjusted every 2016 blocks and this is calculated using the formula nPowTargetTimespan / nPowTargetSpacing. If the same thing is taken in your altcoin, (21 * 24 * 60 * 60) / (9 * 60) = 3360 blocks I have never read why satoshi chose 10 minute block interval but when complained they were slow, he pointed out to this topic : Snack Machine Threadso the best thing i can do is making default values? thanks
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 25, 2021, 08:45:39 AM |
|
hi there, another question: while forking, im facing this : Checkpoint data When nodes first sync, there is some checkpoint data hard coded into the application, specific blocks that the application looks for. We have no blockchain data, so we want to clear these in src/chainparams.cpp
// Mainnet: Line 104 // The best chain should have at least this much work. consensus.nMinimumChainWork = consensus.powLimit;
// By default assume that the signatures in ancestors of this block are valid. consensus.defaultAssumeValid = uint256(); // ... // Line 154 checkpointData = { { } };
chainTxData = ChainTxData{ // Data from rpc: getchaintxstats 4096 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 /* nTime */ 0,//1532884444, /* nTxCount */ 0,//331282217, /* dTxRate */ 0,//2.4 };
it means that i have to delete all this lines?: checkpointData = { { { 11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d")}, { 33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6")}, { 74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20")}, {105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97")}, {134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe")}, {168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763")}, {193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317")}, {210000, uint256S("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e")}, {216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e")}, {225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932")}, {250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214")}, {279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40")}, {295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983")}, } };
|
|
|
|
Heisenberg_Hunter
Legendary
Offline
Activity: 1584
Merit: 1280
Heisenberg Design Services
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 25, 2021, 06:26:41 PM |
|
so the best thing i can do is making default values?
That's totally dependent on how you design your clone coin. For example in Litecoin, Charlie decided to lower the confirmation time to 2.5 minutes and the difficulty adjustment by 4 days i.e after 2016 blocks difficulty adjusts but since 2.5 minutes is taken into consideration, difficulty gets adjusted in 4 days instead of bitcoin's 21 day time frame. But as @baro77 suggested satoshi could have used this 10 minute to prevent a fork or to decentralize the system more. hi there, another question:
while forking, im facing this :
Which version of Bitcoin Core did you fork? New versions are highly complex for a new person to read and understand. If you want to understand the underlying technology use some 2010-2013 versions or more likely something before segwit activation. There are vast improvements in the network since 2011 (after satoshi left) and the network and the code itself became more complicated for new people to understand.
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 26, 2021, 06:17:49 AM |
|
so the best thing i can do is making default values?
That's totally dependent on how you design your clone coin. For example in Litecoin, Charlie decided to lower the confirmation time to 2.5 minutes and the difficulty adjustment by 4 days i.e after 2016 blocks difficulty adjusts but since 2.5 minutes is taken into consideration, difficulty gets adjusted in 4 days instead of bitcoin's 21 day time frame. But as @baro77 suggested satoshi could have used this 10 minute to prevent a fork or to decentralize the system more. hi there, another question:
while forking, im facing this :
Which version of Bitcoin Core did you fork? New versions are highly complex for a new person to read and understand. If you want to understand the underlying technology use some 2010-2013 versions or more likely something before segwit activation. There are vast improvements in the network since 2011 (after satoshi left) and the network and the code itself became more complicated for new people to understand. Hi, first of all... many many thanks on answering and taking time to it, second, your answer gave me the clue why i was thinking im not doing fine... and yes, I am following old info and tutorial to try to assembly as you said basicly, im using this tutorial: https://medium.com/@jordan.baczuk/how-to-fork-bitcoin-part-2-59b9eddb49a4but at points: Activate BIPs Checkpoint data Genesis block it starts to show up all new updates and i guess changed on the code, since most of them as tutorial says cannot be possible to make because files are not in the same places, coding has changed, etc I´ve forked 0.21 btc, working on linux ubuntu 20.20, so I guess im working with outdated information... and yes is more dificult as you say then And as I am trying to understand what happened and how to keep forward im stuck at Genesis block, they coding or how it is called it changed and i cannot understand even searching, reading, trying to understand whats going on and how step on I assumen that newbies like me mostly they pay on walletgenerator to get theyr coins, but this is a challenge for me and i dont want the easy way I assume i gotta search more on the net about how to fork 0.21 and learn more, If you have any recomendations appreciate it thanks for your time, kind regards
|
|
|
|
Heisenberg_Hunter
Legendary
Offline
Activity: 1584
Merit: 1280
Heisenberg Design Services
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 26, 2021, 07:34:11 PM |
|
What's your goal behind forking and learning? Are you going to create an altcoin for experimental and learning purposes? Are you going to contribute to Bitcoin Core? or are you going to work on some other different project? Forking and learning 0.21.0 is certainly a near to impossible task for a newcomer to bitcoin. Bitcoin itself has changed so much more technical and nowadays new developers who are onboarding to Bitcoin Core just learn a certain specific functionality and contribute to them! For instance, if they know well about the P2P functionality they will just work on improvising them but Senior Core developers like sipa/macrofalke/gmaxwell/laanwj mostly work on the whole structure AFAIK. And as I am trying to understand what happened and how to keep forward im stuck at Genesis block
For this you need to remove the merkle root and genesis block hashes and replace them with your own hash so that your coin will start mining your new coins otherwise the whole purpose of bitcoin forking will fail. The Merkle Root and Genesis Block hashes were once present in main.cpp but in 2016 it was renamed to validation.cpp. So there were lots of changes and if you are willing to say your goal I would be happy to help you and guide you along that way. BTW if you are willing to contribute to Bitcoin Core and have no idea on Bitcoin, I would suggest you to take up this free youtube course on cryptography : Introduction to Cryptography by Christof Paar and then move on to reading Mastering Bitcoin book (free on github). If you know a bit of python, try solving programming questions in Programming Bitcoin (free on github) When you have done all these, you would be getting a way to start your career. But remember the path will be extremely daunting and you should have the eagerness inside you!
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 28, 2021, 09:37:42 AM Last edit: February 28, 2021, 11:13:07 AM by mironkraft |
|
What's your goal behind forking and learning? Are you going to create an altcoin for experimental and learning purposes? Are you going to contribute to Bitcoin Core? or are you going to work on some other different project? Forking and learning 0.21.0 is certainly a near to impossible task for a newcomer to bitcoin. Bitcoin itself has changed so much more technical and nowadays new developers who are onboarding to Bitcoin Core just learn a certain specific functionality and contribute to them! For instance, if they know well about the P2P functionality they will just work on improvising them but Senior Core developers like sipa/macrofalke/gmaxwell/laanwj mostly work on the whole structure AFAIK. And as I am trying to understand what happened and how to keep forward im stuck at Genesis block
For this you need to remove the merkle root and genesis block hashes and replace them with your own hash so that your coin will start mining your new coins otherwise the whole purpose of bitcoin forking will fail. The Merkle Root and Genesis Block hashes were once present in main.cpp but in 2016 it was renamed to validation.cpp. So there were lots of changes and if you are willing to say your goal I would be happy to help you and guide you along that way. BTW if you are willing to contribute to Bitcoin Core and have no idea on Bitcoin, I would suggest you to take up this free youtube course on cryptography : Introduction to Cryptography by Christof Paar and then move on to reading Mastering Bitcoin book (free on github). If you know a bit of python, try solving programming questions in Programming Bitcoin (free on github) When you have done all these, you would be getting a way to start your career. But remember the path will be extremely daunting and you should have the eagerness inside you! Hi there Heisenberg, thanks again for your time My main reason is just as challenge, for myself. I will make an altcoin.** I am not thinking I will have enought "something" to contribute to the core of bitcoin Other projects? Nope, just this one, since I think is the first part for understanding to future projects, and not only for bitcoin project, for mainly every type of project in my life Coding and developing is not my main way of life, im on logistics industries and nothing related to this But i can say that near 2010-2014 I was on WiFi comunities, developing and creating ways to "crack" wifis, for nearly 4 years, contribuiting by creating usable dictionaries and tutorials for cracking even wpa2 throught rainbow tables, using cowpatty, aircrack, modem jtag for extracting info, etc. All that died on 2015 since I left everything to search a "future" on normal jobs and studies. I will check all info you have gaven to me and try to understand more Thanks for your time again edit** my step by step challenge to create the altcoin is: craeting, understanding, mining first block, wallet etc. creating website (already got it) inviting people to mine it and enjoy it as final step, trying to enter to a exchange with the coin (wich will be fucking hard i guess, but i will learn the requirements for it)* *not impossible since i know from near someone who has a little exchange or kind of that that is my project, i even invited my baes sisters to this learning projject both, since she knows about coding and else and works with i would like not do it alone, so i will learn also to team up in this kind of projects
|
|
|
|
Heisenberg_Hunter
Legendary
Offline
Activity: 1584
Merit: 1280
Heisenberg Design Services
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 28, 2021, 08:03:59 PM |
|
My main reason is just as challenge, for myself. I will make an altcoin.** Other projects? Nope, just this one, since I think is the first part for understanding to future projects, and not only for bitcoin project, for mainly every type of project in my life
If you are willing to create an altcoin just for experimental and fun purposes, I would suggest you should check out launching an ERC20 token in Ropsten Test Network first and experiment them. I have created tons of altcoins in Ethereum Test Network for learning purposes and some of the logos and names were funny enough to call them as a shitcoin ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) Ethereum helps you to launch a shitcoin so easily out of thin air unlike forking and changing the bitcoin code is little difficult while comparing to the creation of ERC20 token. These are my thoughts on creation of altcoin alias shitcoin ![Grin](https://bitcointalk.org/Smileys/default/grin.gif) my step by step challenge to create the altcoin is: craeting, understanding, mining first block, wallet etc. creating website (already got it) inviting people to mine it and enjoy it as final step, trying to enter to a exchange with the coin (wich will be fucking hard i guess, but i will learn the requirements for it)* *not impossible since i know from near someone who has a little exchange or kind of that
that is my project, i even invited my baes sisters to this learning projject both, since she knows about coding and else and works with
If your sister is good with coding and a bit of cryptography, both of you can come up with a unique idea of scalability coin based on bitcoin? Here is an additional guide I found for you which could be of some help : coin cloning guideThere are tons and tons of bitcoin clones but most of them failed to take off or failed in the initial months. The reason for the success of litecoin (another bitcoin clone) was that it was launched during the early days of bitcoin and there were very few altcoins back then. Also litecoin had something unique : scalability while comparing to bitcoin. Hence there was a popular quote: If Bitcoin is the Gold Standard of Cryptocurrency, Litecoin would be Silver Standard! Inviting people to mine it? Good one, if you have successfully launched your coin feel free to send a link to me so that I can see how mining new coins would be ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) only list your coin in an exchange if you feel it has a good use case otherwise take your time and build the tech. P.S Good Luck on your coin cloning project ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
hash.guide
Newbie
Offline
Activity: 12
Merit: 1
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 03:47:16 AM |
|
If you would like to feel accomplished and deploy an ERC20 token before working on an entire blockchain network, consider checking out my guide I have on YouTube & tutorial on website cryptoist.org
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 06:09:01 AM |
|
My main reason is just as challenge, for myself. I will make an altcoin.** Other projects? Nope, just this one, since I think is the first part for understanding to future projects, and not only for bitcoin project, for mainly every type of project in my life
If you are willing to create an altcoin just for experimental and fun purposes, I would suggest you should check out launching an ERC20 token in Ropsten Test Network first and experiment them. I have created tons of altcoins in Ethereum Test Network for learning purposes and some of the logos and names were funny enough to call them as a shitcoin ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) Ethereum helps you to launch a shitcoin so easily out of thin air unlike forking and changing the bitcoin code is little difficult while comparing to the creation of ERC20 token. These are my thoughts on creation of altcoin alias shitcoin ![Grin](https://bitcointalk.org/Smileys/default/grin.gif) my step by step challenge to create the altcoin is: craeting, understanding, mining first block, wallet etc. creating website (already got it) inviting people to mine it and enjoy it as final step, trying to enter to a exchange with the coin (wich will be fucking hard i guess, but i will learn the requirements for it)* *not impossible since i know from near someone who has a little exchange or kind of that
that is my project, i even invited my baes sisters to this learning projject both, since she knows about coding and else and works with
If your sister is good with coding and a bit of cryptography, both of you can come up with a unique idea of scalability coin based on bitcoin? Here is an additional guide I found for you which could be of some help : coin cloning guideThere are tons and tons of bitcoin clones but most of them failed to take off or failed in the initial months. The reason for the success of litecoin (another bitcoin clone) was that it was launched during the early days of bitcoin and there were very few altcoins back then. Also litecoin had something unique : scalability while comparing to bitcoin. Hence there was a popular quote: If Bitcoin is the Gold Standard of Cryptocurrency, Litecoin would be Silver Standard! Inviting people to mine it? Good one, if you have successfully launched your coin feel free to send a link to me so that I can see how mining new coins would be ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) only list your coin in an exchange if you feel it has a good use case otherwise take your time and build the tech. P.S Good Luck on your coin cloning project ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Thanks a lot Heis! lets see if I reach somewhere, keep you informed
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 01, 2021, 09:23:46 PM |
|
Hi there again, So, once I have done the checkpoint data as: https://wtools.io/paste-code/b3X1Please check lines at chainparams.cpp; if deleting lines of checkpointData = { as it says in the tutorial ( https://medium.com/@jordan.baczuk/how-to-fork-bitcoin-part-2-59b9eddb49a4) it is ok // Mainnet: Line 104 // The best chain should have at least this much work. consensus.nMinimumChainWork = consensus.powLimit; // By default assume that the signatures in ancestors of this block are valid. consensus.defaultAssumeValid = uint256(); // ... // Line 154 checkpointData = { { } }; chainTxData = ChainTxData{ // Data from rpc: getchaintxstats 4096 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 /* nTime */ 0,//1532884444, /* nTxCount */ 0,//331282217, /* dTxRate */ 0,//2.4 }; // Testnet: Line 205 // The best chain should have at least this much work. consensus.nMinimumChainWork = consensus.powLimit; // By default assume that the signatures in ancestors of this block are valid. consensus.defaultAssumeValid = uint256(); /... // Line 246 checkpointData = { { } }; chainTxData = ChainTxData{ // Data from rpc: getchaintxstats 4096 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 /* nTime */ 0,//1531929919, /* nTxCount */ 0,//19438708, /* dTxRate */ 0,//0.626 }; As I assumed is ok, i continue with the proyect: Already I think I found the method for genesys block in core 0.21: 1- downloaded: https://github.com/nasa8x/node-genesis-block2- installed it in: XXXXCoin directory ( https://pasteboard.co/JQEpO9n.png) 3- applied next code (with error): root@ubuntu:/home/asus/XxxxCoin# git clone https://github.com/nasa8x/node-genesis-block.git genesis-block Cloning into 'genesis-block'... remote: Enumerating objects: 8, done. remote: Counting objects: 100% (8/8), done. remote: Compressing objects: 100% (8/8), done. remote: Total 29 (delta 0), reused 3 (delta 0), pack-reused 21 Unpacking objects: 100% (29/29), 18.92 KiB | 289.00 KiB/s, done. root@ubuntu:/home/asus/XxxxCoin# cd genesis-block root@ubuntu:/home/asus/XxxxCoin/genesis-block# npm install
> multi-hashing@git+https://github.com/nasa8x/node-multi-hashing.git#25517b7c7896c9c2b5e342a4e0c835adb0b11951 install /home/asus/XxxxCoin/genesis-block/node_modules/multi-hashing > node-gyp configure build
gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/asus/XxxxCoin/genesis-block/node_modules/multi-hashing/build' gyp ERR! System Linux 5.8.0-43-generic gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure" "build" gyp ERR! cwd /home/asus/XxxxCoin/genesis-block/node_modules/multi-hashing gyp ERR! node -v v10.19.0 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! multi-hashing@git+https://github.com/nasa8x/node-multi-hashing.git#25517b7c7896c9c2b5e342a4e0c835adb0b11951 install: `node-gyp configure build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the multi-hashing@git+https://github.com/nasa8x/node-multi-hashing.git#25517b7c7896c9c2b5e342a4e0c835adb0b11951 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-03-01T21_03_44_626Z-debug.log root@ubuntu:/home/asus/XxxxCoin/genesis-block# python gen.py -a X11 -t 1517542208 -z "Semper Fidelis to your happiness - 08/Mar/2020." -p "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" python: can't open file 'gen.py': [Errno 2] No such file or directory root@ubuntu:/home/asus/XxxxCoin/genesis-block#
I am trying to understand what I did wrong or if after many hours reading and trying to comprehend if i failed again xD Thanks for your time, keep posting if I advance something with core 0.21 as newbie
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 02, 2021, 09:18:16 PM |
|
bump!
|
|
|
|
Heisenberg_Hunter
Legendary
Offline
Activity: 1584
Merit: 1280
Heisenberg Design Services
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 06, 2021, 06:32:21 PM |
|
Hey mironkraft, I didn't notice the bump and hence forgot to post an update regarding the above post. Checkpoints were an important part of the core software back in the early days but they have become far less important to reduce the power of developers on the bitcoin network. For instance, checkpoints will consist of data of the blocks up until which the transactions are valid and you cannot modify the transactions before the specific block through a forking. I think you got passed through that and the next lies is the creation of genesis block and adding the block hash to the client. I think I have found a solution for your above mentioned issue. All you need to do is that there should be 1 file and a folder created during the npm install process. So you need to delete the file " package-lock.json" and the folder " node_modules" and then delete the caches using this command written in terminal npm cache clear --force npm install
This is one among the very common errors and most of the time this solution worked for me while practicing years ago. Hopefully this should work for you too. But before this, try running npm start using sudo command.
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 08, 2021, 06:44:07 AM |
|
Hey mironkraft, I didn't notice the bump and hence forgot to post an update regarding the above post. Checkpoints were an important part of the core software back in the early days but they have become far less important to reduce the power of developers on the bitcoin network. For instance, checkpoints will consist of data of the blocks up until which the transactions are valid and you cannot modify the transactions before the specific block through a forking. I think you got passed through that and the next lies is the creation of genesis block and adding the block hash to the client. I think I have found a solution for your above mentioned issue. All you need to do is that there should be 1 file and a folder created during the npm install process. So you need to delete the file " package-lock.json" and the folder " node_modules" and then delete the caches using this command written in terminal npm cache clear --force npm install
This is one among the very common errors and most of the time this solution worked for me while practicing years ago. Hopefully this should work for you too. But before this, try running npm start using sudo command. Thanks Heis!, already cleared and deleted both files from my Coin directory after clearing cache, and executing commands on the main directory of the coin, i found this; (comments below) root@ubuntu:/home/asus/XxxxxCoin# npm cache clear --force
npm WARN using --force I sure hope you know what you are doing. root@ubuntu:/home/asus/XxxxxCoin# root@ubuntu:/home/asus/XxxxxCoin# npm install
npm WARN saveError ENOENT: no such file or directory, open '/home/asus/XxxxxCoin/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open '/home/asus/XxxxxCoin/package.json' npm WARN XxxxxCoin No description npm WARN XxxxxCoin No repository field. npm WARN XxxxxCoin No README data npm WARN XxxxxCoin No license field.
up to date in 0.282s
at my understandings, there is no package.json file, wich i dont know how to create or i missunderstand where in the tuto or process to create since there is only this package at an install of the genesis-block inside of the main coin folder, /XxxxxCoin/genesis-block (installed from: git clone https://github.com/nasa8x/node-genesis-block.git genesis-block ) Myabe I am wrong, and I should do npm clear cache and install on the genesis-block directory and not in main coin directory what are your thoughts? thnks in advance!
|
|
|
|
Heisenberg_Hunter
Legendary
Offline
Activity: 1584
Merit: 1280
Heisenberg Design Services
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 08, 2021, 07:20:23 AM |
|
at my understandings, there is no package.json file, wich i dont know how to create or i missunderstand where in the tuto or process to create
what are your thoughts?
Installing package.json is kinda simple though. When you have enough time, try to give a read of what package.json does in : NPM Docs. You can install package.json by typing this command in terminal : This should probably create the package.json file for you in your directory and then try the procedure which I mentioned in post #16 Based on my previous experience on this altcoin creation and stack overflow answers, I believe you should be running an older version of Node.js but I am not really sure though! Some important links which helped me during the npm install process : 1. npm can't find package.json2. npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 08, 2021, 10:49:42 AM |
|
Installing package.json is kinda simple though. When you have enough time, try to give a read of what package.json does in : NPM Docs. You can install package.json by typing this command in terminal : This should probably create the package.json file for you in your directory and then try the procedure which I mentioned in post #16 Based on my previous experience on this altcoin creation and stack overflow answers, I believe you should be running an older version of Node.js but I am not really sure though! Some important links which helped me during the npm install process : 1. npm can't find package.json2. npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'its amazin that json page, i assumed that as much as simpler better, so i made next steps: 1- deleted package-lock.json and node_modules 2- step by step on terminal: npm cache clear --force npm install npm init -y
giving out: root@ubuntu:/home/asus/XxxxxCoin# npm init -y
Wrote to /home/asus/XxxxxCoin/package.json:
{ "name": "XxxxxCoin", "version": "1.0.0", "description": "XxxxxCoinCore integration/staging tree =====================================", "main": "index.js", "directories": { "doc": "doc", "test": "test" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/xxxxxxxxxxx/XxxxxCoin.git" }, "keywords": [], "author": "", "license": "ISC", "bugs": { "url": "https://github.com/xxxxxxxxx/XxxxxCoin/issues" }, "homepage": "https://github.com/xxxxxxxx/XxxxxCoin#readme" }
once done, NANO the package.json to edit some points such as keywords trying to add contact, author, etc. ****as it is unlimited the aditions you can go, I left it as much as simple with no aditions to the file so it will be easy to parse and close but then, when I go for it makes this error, wich even researching on the web i cannot understand for now: oot@ubuntu:/home/asus/XxxxxCoin# npm install npm ERR! code EJSONPARSE npm ERR! file /home/asus/XxxxxCoin/package.json npm ERR! JSON.parse Failed to parse json npm ERR! JSON.parse Unexpected string in JSON at position 651 while parsing '{ npm ERR! JSON.parse "name": "XxxxxCoin", npm ERR! JSON.parse "version": "' npm ERR! JSON.parse Failed to parse package.json data. npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-03-08T10_23_37_464Z-debug.log
errors i found: - parsing - filling up name and version? ![Huh](https://bitcointalk.org/Smileys/default/huh.gif) already is done in the file.... (¿?¿?¿?) - changing to JSON file and not java still researching this problems to try to solve them the incredible thing, is that once all this fails, if i execute: root@ubuntu:/home/asus/XxxxxCoin# npm install npm notice created a lockfile as package-lock.json. You should commit this file. up to date in 0.279s
and it works... I might be wrong from my point of view?¿ ps, my package.json used as testing: { "name": "XxxxxCoin", "version": "1.0.0", "description": "XxxxxCoinCore integration/staging tree =====================================", "main": "index.js", "directories": { "doc": "doc", "test": "test" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/zzzzzzzz/XxxxxCoin.git" }, "keywords": [], "author": "", "license": "ISC", "bugs": { "url": "https://github.com/zzzzzzzz/XxxxxCoin/issues" }, "homepage": "https://github.com/zzzzzzzz/XxxxxCoin#readme" }
|
|
|
|
mironkraft (OP)
Jr. Member
Offline
Activity: 78
Merit: 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 11, 2021, 05:11:17 PM |
|
bumping the wave! still learning and help needed ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif)
|
|
|
|
|