N33Bcoin 0.0.1
Please Select a Licence from the LICENCE_HEADERS page |
And place at top of your page |
If no Licence is Selected/Appended, Default will be CC0 Default Licence IF there is no Licence placed below this notice!
When you edit this page, you agree to release your contribution under the CC0 Licence LICENCE:
More information about the cc0 licence can be found here: You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. Licence: Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; moral rights retained by the original author(s) and/or performer(s); publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; rights protecting the extraction, dissemination, use and reuse of data in a Work; database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. |
Start up HardWare
- OS (local) Ubuntu-Mate 24.04 - this tut is done on a clean install of ubuntu-mate 24.04
- Hardware: HP EliteDesk G1 - ram = 8GB - HD = 120GB ssd - CPU = i5-4590S CPU @ 3.00GHz
- Hardware: Thinkpad X270 - Ram - HD - CPU
- Server VPS ubuntu-server 24.04
- vultr.com
Software OS
- Will be using Ubuntu 24.04 as main OS - but to build this version of litecoin 0.14.2 we will be using ubuntu 18.04 in a lxc container - trying to build in 24.04 was a huge side quest that is not that much fun.
Coin Params for N33Bcoin 0.1 POW
- Are Coin Params
- Name of coin = N33Bcoin
- Symbol coin = N33B
- Premined Coins= 33% 11,111,111 coins to be used to rewards contributors. the how is currently unknown, will work out as we go.
- MaxCoins = 33,333,333
- Rewards = 333
- Halving Period = 33,333 blocks = every 231 days
- Block interval = 10 mins # will leave at 10 for starters
- Time Stamp 1733333333 2024-12-04 17:28:53
- Time Stamp Message "N33B's for Noob's at CompleteNoobs.com"
- Genesis Block for are Coin
Genesis Keys
First we are going to need a public private key pair. Link to pub/priv key creation
- Public Key
049bd17782313a0263154a37b7adb5f773e3a95e08eba879d6a8f1c9e614e41b33f85129d0f9820a464d2ae136abaa4144d258df6729dfd7c6a18498148b59fadf
- Keep private key safe, you just need pub key for now
We then use are public key along with are coin parameter with GenesisH0 to create a 'Nonce', 'Merkel hash' and 'Genesis hash'. For are 'MainNet', 'TestNet' and 'RegNet'
Main Net parameters
python2 genesis.py -a SHA256 -z "N33B's for Noob's at CompleteNoobs.com" -t 1733333333 -b 0x1d00ffff -p 049bd17782313a0263154a37b7adb5f773e3a95e08eba879d6a8f1c9e614e41b33f85129d0f9820a464d2ae136abaa4144d258df6729dfd7c6a18498148b59fadf -v 33300000000
- TimeStampMessage:
N33B's for Noob's at CompleteNoobs.com
- UnixTimeStamp:
1733333333
- Nonce:
221118658
- nBits:
0x1d00ffff
- Merkel:
96908dea6891a3cc8751ed962736bbc1f4129c5c2fa7f44333def15ce86c4388
- Genesis:
0000000091635cd5cc6736960f1fb22d91475b7835a55793bd034342be5ed2c4
Test Net parameters
python2.5 genesis.py -a SHA256 -z "N33B's for Noob's at CompleteNoobs.com" -t 1733333334 -b 0x1e0ffff0 -p 049bd17782313a0263154a37b7adb5f773e3a95e08eba879d6a8f1c9e614e41b33f85129d0f9820a464d2ae136abaa4144d258df6729dfd7c6a18498148b59fadf -v 33300000000
- TimeStampMessage:
N33B's for Noob's at CompleteNoobs.com
- UnixTimeStamp:
1733333334
- Nonce:
511144
- nBits:
0x1e0ffff0
- Merkel:
96908dea6891a3cc8751ed962736bbc1f4129c5c2fa7f44333def15ce86c4388
- Genesis:
000001b7cbb2e5ae084fdd6934c9962fd8ff27cb7c27e02e415d2da6fe214a8c
Reg Net parameters
python2.5 genesis.py -a SHA256 -z "N33B's for Noob's at CompleteNoobs.com" -t 1733333335 -b 0x207fffff -p 049bd17782313a0263154a37b7adb5f773e3a95e08eba879d6a8f1c9e614e41b33f85129d0f9820a464d2ae136abaa4144d258df6729dfd7c6a18498148b59fadf -v 33300000000
- TimeStampMessage:
N33B's for Noob's at CompleteNoobs.com
- UnixTimeStamp:
1733333335
- Nonce:
0
- nBits:
0x207fffff
- Merkel:
96908dea6891a3cc8751ed962736bbc1f4129c5c2fa7f44333def15ce86c4388
- Genesis:
65ea097e012bad431eb912fc43abcc7c809d648a85cda433e73a0a9f9409a127
Now we have are parameters, we can start creating are own coin, but first lets change some file names to match the name of are coin.
Source we are forking from Bitcoin 0.14.3
Home Directory
cd ~
Download bitcoin 0.14.3
wget https://bitcoincore.org/bin/bitcoin-core-0.14.3/bitcoin-0.14.3.tar.gz
- sha256sum bitcoin-0.14.3.tar.gz
416717ab5ef94f8458da2b12e4cd742ca08f5ad3817b65fc73811e06ac949f87
extract
tar xvf bitcoin-0.14.3.tar.gz
Change Directory Name to new/forked coin name
mv bitcoin-0.14.3 N33Bcoin
cd N33Bcoin
- Current work director path is
/home/$USER/N33Bcoin/
Renaming
Renaming Bitcoin to N33Bcoin
Run these command in the /home/$USER/N33Bcoin/ Directory
- Lowercase
find . -type f -exec sed -i 's/bitcoin/n33bcoin/g' {} +
- UpperCase
find . -type f -exec sed -i 's/Bitcoin/N33Bcoin/g' {} +
- Name.1
find . -type f -exec sed -i -e 's/bitcoin/noobcoin/g' -e 's/bitcoind\.1/n33bcoind.1/g' {} +
Change Name for Docs
To rename files in a directory (e.g., /home/$USER/N33B/N33Bcoin/doc/man/
):
- Before:
bitcoin-cli.1 bitcoind.1 bitcoin-qt.1 bitcoin-tx.1 Makefile.am
- After:
n33bcoin-cli.1 n33bcoind.1 n33bcoin-qt.1 n33bcoin-tx.1 Makefile.am
- Manual Way:
mv -v bitcoin-cli.1 n33bcoin-cli.1
- Using mv with a for Loop:
cd /home/$USER/N33B/N33Bcoin/doc/man
for file in bitcoin*; do mv -v "$file" "${file/bitcoin/n33bcoin}"; done
-v
shows each rename action.
Change Names for Files
Unlike forking litecoin, the method we just used to rename all bitcoin words to n33bcoin created some problems, unlike litecoin 0.14.2, the word 'bitcoin' can be found in a lot of file names.
Example: the file libbitcoinconsensus.pc.in
is still called libbitcoinconsensus.pc.in
but inside make and config files, it is now know as libn33bcoinconsensus.pc.in
so it will look for a file called libn33bcoinconsensus.pc.in
and not libbitcoinconsensus.pc.in
, still will lead to a lot of breakages.
- Easy Fix: Change all file names which include the word
bitcoin
ton33bcoin
- install
rename
sudo apt install rename
- Run commands in
/home/$USER/N33Bcoin/
Directory - See all file which contain the name
bitcoin
find . -type f -name "*bitcoin*"
- Rename/convert all
bitcoin
in file names ton33bcoin
find . -type f -name "*bitcoin*" -exec rename 's/bitcoin/n33bcoin/' {} +
Editing Files
Are Files are located in path:/home/$USER/N33B/N33Bcoin
Example: src/amount.h
full path would be /home/$USER/N33B/N33Bcoin/src/amount.h
OverView of Files to edit
- Comment Out
** Lines: 74 - 77 Comment Out
These are Lines we Don't need, but are not deleting just commenting out, so line numbers remain the same.
Comment out by placing a //
at the beginning of the line.
- src/amount.h
- Line 31: Edit Max Coins
- src/validation.cpp
- Line 1166: This BLOCK of code will contain premined and Block rewards
- src/qt/bitcoinunits.cpp
- Line 39 Block: change coin symbol LTC to N33B
- src/chainparams.cpp
- Line 53: Global Change Time Stamp Message
- Line 54: Global Change Pub Key
- Line 73: MainNet Change Halving Interval
- Line 74: MainNet BIP34Height
- Line 75: MainNet BIP34Hash
- Line 76: MainNet BIP65Height
- Line 77: MainNet BIP66Height
- Lines 85 - 103: MainNet Deployment and Chain Work Section
- Line 110: MainNet Change Magic Bytes - Script included
- Line 114: MainNet Change Main Net Default Port
- Line 117: MainNet Change Main Net Nonce TimeStamp Coin_Rewards
- Line 119: MainNet Change Genesis Hash
- Line 120: MainNet Change Merkel Hash
- Line 144: MainNetChange Coin Number and Genesis Hash
- Lines 145 - 156 Comment Out
- Line 161: MainNet Change Time Stamp
- Line 162: MainNet Change Number Of Transactions
- Line 177: TestNet Halving Interval
- Line 178: TestNet BIP34Height
- Line 179: TestNet BIP34Hash
- Line 180: TestNet BIP65Height
- Line 181: TestNet BIP66Height
- Line 184: TestNet Block Times
- Lines 189 - 207: TestNet Deployment Section
- Line 213: TestNet Default Port
- Line 216: TestNet Time Stamp and Nonce
- Line 218: TestNet Genesis Hash Block
- Line 219: TestNet Merkel Hash Block
- Line 245: TestNet CheckPointData Genesis Hash Block Number
- Line 250: TestNet Time Stamp
- Line 251: TestNet Block Number
- Lines 267 - 270 RegressionNet BIP Consensus
- Line 301: RegressionNet Default Port
- Line 304: RegressionNet Time Stamp Nonce Coin_Rewards
- Line 306: RegressionNet Genesis Block Hash
- Line 307: RegressionNet Merkel Hash
- Line 319: RegressionNet Genesis Hash
- src/chainparamsbase.cpp
- Line 35: MainNet RCP Port
- Line 48: TestNet RPC Port
- Line 62: Regession Net RPC Port
src/amount.h
On line 31 we will edit are Max coins:
static const CAmount MAX_MONEY = 21000000 * COIN;
will change this to 33,333,333 coins
static const CAmount MAX_MONEY = 33333333 * COIN;
src/validation.cpp
Path /home/$USER/N33B/N33Bcoin/src/validation.cpp
The block of code we are looking for starts on line 1166:
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) { int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; // Force block reward to zero when right shift is undefined. if (halvings >= 64) return 0; CAmount nSubsidy = 50 * COIN; // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. nSubsidy >>= halvings; return nSubsidy; }
On line 1173 you should see this line:
CAmount nSubsidy = 50 * COIN;
This is the rewards for mining coins, the default is 50, we are changinf rewards to 333 coins per block mined.
CAmount nSubsidy = 333 * COIN;
Premined coins
We also need to add a contidtion for are premined coins - in the first block will mine 33%, thats 11,111,111 coins
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) { int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; // Force block reward to zero when right shift is undefined. if (halvings >= 64) return 0; CAmount nSubsidy; if (nHeight == 1) nSubsidy = 11111111 * COIN; else nSubsidy = 333 * COIN; // Subsidy is cut in half every 33,333 blocks which will occur approximately every 231 days. nSubsidy >>= halvings; return nSubsidy; }
This condition means IF first block reward 11,111,111 coins, Else(after first blocked mined) rewards per block are 333 coins.
What's Changed and Why:
What's Changed and Why:
- CAmount nSubsidy;
- The variable `nSubsidy` is now declared but not immediately assigned a value. This allows flexibility to set its value based on certain conditions.
- New Condition: `if (nHeight == 1)
- This new condition checks if the block height is 1, meaning this is the very first block in the blockchain (often called the "genesis block").
- This condition is used to assign a special, much larger subsidy for the first block.
- nSubsidy = 11111111 * COIN;
- If it is the first block (`nHeight == 1`), the subsidy is set to 11,111,111 coins. This is a huge reward for the genesis block, likely for initial distribution or other specific reasons.
- else nSubsidy = 333 * COIN;
- For all other blocks (not the first one), the reward is set to 333 coins. This is a significant change from the original 50 coins, suggesting a different reward structure for this cryptocurrency.
src/qt/n33bcoinunits.cpp
- Line 39: Code Block
QString N33BcoinUnits::name(int unit) { switch(unit) { case BTC: return QString("BTC"); case mBTC: return QString("mBTC"); case uBTC: return QString::fromUtf8("μBTC"); default: return QString("???"); } }
- Change BTC your coin symbol to N33B
QString N33BcoinUnits::name(int unit) { switch(unit) { case BTC: return QString("N33B"); case mBTC: return QString("mN33B"); case uBTC: return QString::fromUtf8("μN33B"); default: return QString("???"); } }
src/chainparams.cpp
Line 53 Change Time Stamp Message
const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
To
const char* pszTimestamp = "N33B's for Noob's at CompleteNoobs.com";
Line 54 Change Genesis Pub Key
54 const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
We are going to change to the public key we used to create are genesis block.
const CScript genesisOutputScript = CScript() << ParseHex("049bd17782313a0263154a37b7adb5f773e3a95e08eba879d6a8f1c9e614e41b33f85129d0f9820a464d2ae136abaa4144d258df6729dfd7c6a18498148b59fadf") << OP_CHECKSIG;
Line 73 HalvingInterval
consensus.nSubsidyHalvingInterval = 210000;
Block intervals of bitcoin is every 10 mins, as you can see on #Line 80 Target Block Creation
- 60 mins per hour x 24 hours per day = 1440 mins a day
- 1440 mins at one block each 10 mins = 144 block per day ish
- 144 * 365 = 52,560 blocks per year ish
- 52,560 * 4 = 210,240 blocks every four years ish
So bitcoin halves its rewards every 4 years ish as it passes 210,000 blocks and carrys on halving every 210,000 blocks later.
We reward 333 coins per block and will be out of coins around 667,334 blocks.
- Preminded 11,111,111 coins
- 22,222,222 left
- at 333 per block all will be gone in 66,733 blocks time unless we halve before then
- We are going to keep are block time of 10 mins and have a halving at 33,333 blocks so it will halve around 231 days
consensus.nSubsidyHalvingInterval = 33333;
Line 74 - 77 MainNet BIP Section
74 consensus.BIP34Height = 227931; 75 consensus.BIP34Hash = uint256S("0x000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8"); 76 consensus.BIP65Height = 388381; // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0 77 consensus.BIP66Height = 363725; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931
- Set BIP34/65/66 to 0 for new chain—modern rules from genesis. Adjust BIP34 to 100 if mining fails.
- Replace with your Hash on line 75 BIPHash
74 consensus.BIP34Height = 0; 75 consensus.BIP34Hash = uint256S("0x0000000091635cd5cc6736960f1fb22d91475b7835a55793bd034342be5ed2c4"); 76 consensus.BIP65Height = 0; 77 consensus.BIP66Height = 0;
Line 85 - 103 MainNet Deployment and Chain Work Section
Line 86
Default: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
- Reason changed: Bitcoin’s 2008 start date is irrelevant—set to 0 for immediate activation on new chain.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;
Line 87
Default: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008
- Reason changed: 2008 timeout disables it—set to far future so test deployment never expires.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 9999999999;
Line 91
Default: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1462060800; // May 1st, 2016
- Reason changed: Bitcoin’s 2016 start is moot—set to 0 for CSV active from genesis.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0;
Line 92
Default: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017
- Reason changed: 2017 timeout disables it—set to far future so CSV stays active.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 9999999999;
Line 96
Default: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1479168000; // November 15th, 2016
- Reason changed: Bitcoin’s 2016 start doesn’t apply—set to 0 for SegWit from genesis.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 0;
Line 97
Default: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017
- Reason changed: 2017 timeout disables it—set to far future so SegWit stays active.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 9999999999;
Line 100
Default: consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003f94d1ad391682fe038bf5");
- Reason changed: Bitcoin’s 2017 work is massive—set to 0 for a new chain with no work yet.
Changed: consensus.nMinimumChainWork = uint256S("0x00");
Line 103
Default: consensus.defaultAssumeValid = uint256S("0x00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90"); //453354
- Reason changed: Bitcoin’s block 453354 is irrelevant—set to N33Bcoin’s genesis hash for fast sync from block 0.
Changed: consensus.defaultAssumeValid = uint256S("0x0000000091635cd5cc6736960f1fb22d91475b7835a55793bd034342be5ed2c4");
Before and After Changes
85 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; 86 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008 87 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008 89 // Deployment of BIP68, BIP112, and BIP113. 90 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0; 91 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1462060800; // May 1st, 2016 92 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017 94 // Deployment of SegWit (BIP141, BIP143, and BIP147) 95 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1; 96 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1479168000; // November 15th, 2016 97 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017 99 // The best chain should have at least this much work. 100 consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003f94d1ad391682fe038bf5"); 102 // By default assume that the signatures in ancestors of this block are valid. 103 consensus.defaultAssumeValid = uint256S("0x00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90"); //453354
- Set CSV/SegWit to active from genesis (nStartTime = 0, nTimeout = far future). Reset chain work to minimal. Set assume valid to genesis hash.
85 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; 86 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0; 87 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 9999999999; 89 // Deployment of BIP68, BIP112, and BIP113. 90 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0; 91 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0; 92 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 9999999999; 94 // Deployment of SegWit (BIP141, BIP143, and BIP147) 95 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1; 96 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 0; 97 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 9999999999; 99 // The best chain should have at least this much work. 100 consensus.nMinimumChainWork = uint256S("0x00"); 102 // By default assume that the signatures in ancestors of this block are valid. 103 consensus.defaultAssumeValid = uint256S("0x0000000091635cd5cc6736960f1fb22d91475b7835a55793bd034342be5ed2c4");
Line 110 Magic Bytes
- Link to Hex numbers explaned
- Link to python script for random values
The pchMessageStart array is a crucial component in cryptocurrency network protocols, often referred to as the "magic bytes" or "network magic." It serves as a unique identifier for a specific cryptocurrency network.
These values are in hexadecimal format, representing four bytes that form a sequence unlikely to occur in normal data.
If you're creating a new cryptocurrency by forking Bitcoin, you should change these values.
Using unique values prevents your new coin's network from interfering with Bitcoin's network or other existing networks.
110 pchMessageStart[0] = 0xf9; 111 pchMessageStart[1] = 0xbe; 112 pchMessageStart[2] = 0xb4; 113 pchMessageStart[3] = 0xd9;
- Gonna change mine to
pchMessageStart[0] = 0xfe; pchMessageStart[1] = 0x93; pchMessageStart[2] = 0xd2; pchMessageStart[3] = 0xe2;
Line 114 Change Main Net Default Port
- Line 114
nDefaultPort = 8333;
- Changing to port 3333
nDefaultPort = 3333;
Line 117 Change Main Net Nonce TimeStamp Coin_Rewards
- Original
genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN);
- Syntax of line 117
genesis = CreateGenesisBlock(<UNIX_TIME_STAMP>, <NONCE>, <DIFF_BITS>, <NHEIGHT>, <AMOUNT_OF_COINS_REWARD> * COIN);
- we are just going to append/change are UnixTimeStamp, Nonce and CoinReward
genesis = CreateGenesisBlock(1733333333, 221118658, 0x1d00ffff, 1, 333 * COIN);
Line 119 Change Genesis Hash
assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
- Change to your genesis hash for Main Net
assert(consensus.hashGenesisBlock == uint256S("0x0000000091635cd5cc6736960f1fb22d91475b7835a55793bd034342be5ed2c4"));
Line 120 Change Merkel Hash
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
- Change to your merkel hsh for Main net
assert(genesis.hashMerkleRoot == uint256S("0x96908dea6891a3cc8751ed962736bbc1f4129c5c2fa7f44333def15ce86c4388"));
Check Point - Lines 142 - 157
142 checkpointData = (CCheckpointData) { 143 boost::assign::map_list_of 144 ( 11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d")) 145 ( 33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6")) 146 ( 74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20")) 147 (105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97")) 148 (134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe")) 149 (168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763")) 150 (193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317")) 151 (210000, uint256S("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e")) 152 (216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e")) 153 (225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932")) 154 (250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214")) 155 (279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40")) 156 (295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983")) 157 };
These lines contain a blocknumber and there hash value, we are starting a new coin and these have no value to us.
We have one genesis block.
( 11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"))
- We are going to append/change line 144, to block zero and are Main net genesis block hash.
( 0, uint256S("0x0000000091635cd5cc6736960f1fb22d91475b7835a55793bd034342be5ed2c4"))
and comment out the remaining lines in this code block. lines 145 - 156
142 checkpointData = (CCheckpointData) { 143 boost::assign::map_list_of 144 ( 0, uint256S("0x0000000091635cd5cc6736960f1fb22d91475b7835a55793bd034342be5ed2c4")) 145 // ( 33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6")) 146 // ( 74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20")) 147 // (105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97")) 148 // (134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe")) 149 // (168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763")) 150 // (193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317")) 151 // (210000, uint256S("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e")) 152 // (216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e")) 153 // (225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932")) 154 // (250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214")) 155 // (279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40")) 156 // (295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983")) 157 };
Line 161 Change Time Stamp
161 1483472411, // * UNIX timestamp of last known number of transactions
- Change to the time stamp we are using
1733333333, // * UNIX timestamp of last known number of transactions
Line 162 Change Number Of Transactions
184495391, // * total number of transactions between genesis and that timestamp
- Change to Zero
0, // * total number of transactions between genesis and that timestamp
TestNet Halving Interval
177 consensus.nSubsidyHalvingInterval = 210000;
- Change to same as are main net
consensus.nSubsidyHalvingInterval = 33333;
Lines 178 - 181 TestNet BIP section
178 consensus.BIP34Height = 21111; 179 consensus.BIP34Hash = uint256S("0x0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8"); 180 consensus.BIP65Height = 581885; // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6 181 consensus.BIP66Height = 330776; // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182
- Change values to zero and replace TestNet Genesis Hash
178 consensus.BIP34Height = 0; 179 consensus.BIP34Hash = uint256S("0x000001b7cbb2e5ae084fdd6934c9962fd8ff27cb7c27e02e415d2da6fe214a8c"); 180 consensus.BIP65Height = 0; 181 consensus.BIP66Height = 0;
Lines 189 - 207 TestNet Deployment Section
Line 190
Default: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
- Reason changed: Bitcoin’s 2008 start is irrelevant—set to 0 for immediate activation on TestNet.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;
Line 191
Default: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008
- Reason changed: 2008 timeout disables it—set to far future so test deployment never expires.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 9999999999;
Line 195
Default: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1456790400; // March 1st, 2016
- Reason changed: Litecoin’s 2016 start doesn’t apply—set to 0 for CSV from genesis.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0;
Line 196
Default: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017
- Reason changed: 2017 timeout disables it—set to far future so CSV stays active.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 9999999999;
Line 200
Default: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1462060800; // May 1st 2016
- Reason changed: Litecoin’s 2016 start doesn’t apply—set to 0 for SegWit from genesis.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 0;
Line 201
Default: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017
- Reason changed: 2017 timeout disables it—set to far future so SegWit stays active.
Changed: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 9999999999;
Line 204
Default: consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000001f057509eba81aed91");
- Reason changed: Litecoin’s work is irrelevant—set to 0 for a new TestNet chain.
Changed: consensus.nMinimumChainWork = uint256S("0x00");
Line 207
Default: consensus.defaultAssumeValid = uint256S("0x00000000000128796ee387cf110ccb9d2f36cffaf7f73079c995377c65ac0dcc"); //1079274
- Reason changed: Litecoin’s block 1079274 doesn’t apply—set to TestNet genesis for fast sync.
Changed: consensus.defaultAssumeValid = uint256S("0x000001b7cbb2e5ae084fdd6934c9962fd8ff27cb7c27e02e415d2da6fe214a8c");
TestNet Default Port - Line 213
213 nDefaultPort = 18333;
- Change to another port , picking 13333
nDefaultPort = 13333;
Line 216: TestNet Time Stamp and Nonce
216 genesis = CreateGenesisBlock(1296688602, 414098458, 0x1d00ffff, 1, 50 * COIN);
- change/append timestamp, nonce and coin rewards - TimeStamp, Nonce, nBits and CoinRewards from your Test Net
genesis = CreateGenesisBlock(1733333334, 511144, 0x1e0ffff0, 1, 333 * COIN);
Line 218: TestNet Genesis Hash Block
218 assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"));
- Changed to
218 assert(consensus.hashGenesisBlock == uint256S("0x000001b7cbb2e5ae084fdd6934c9962fd8ff27cb7c27e02e415d2da6fe214a8c"));
Line 219: TestNet Merkel Hash Block
219 assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
- Changed to
assert(consensus.hashGenesisBlock == uint256S("0x96908dea6891a3cc8751ed962736bbc1f4129c5c2fa7f44333def15ce86c4388"));
Line 245 TestNet checkpointData
Default: ( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")),
- Reason changed: Bitcoin TestNet checkpoint irrelevant—set to height 0 with N33Bcoin TestNet genesis hash for new chain.
Changed: ( 0, uint256S("000001b7cbb2e5ae084fdd6934c9962fd8ff27cb7c27e02e415d2da6fe214a8c")),
- Note: Removed "0x" from hash string—matches Bitcoin style, prevents parsing error in uint256S.
Line 250 - Testnet chainTxData TimeStamp
250 1483546230,
- Change to your timestamp
1733333334,
Line 251 - Testnet chainTxData block count
251 12834668,
- change block count to zero
0,
RegTest BIP Section
Line 267
Default: consensus.BIP34Height = 100000000; // BIP34 has not activated on regtest (far in the future so block v1 are not rejected in tests)
- Reason changed: Delays BIP34—set to 0 for modern rules from genesis, consistent with MainNet/TestNet.
Changed: consensus.BIP34Height = 0;
Line 268
Default: consensus.BIP34Hash = uint256();
- Reason changed: Empty hash irrelevant—set to RegTest genesis for BIP34 activation at block 0.
- NOTE: the
S
at the end ofuint256S
append the S, remove the0x
or it would be too long and make sure RegNet Hash is wrapped in "comment-hash". - The quotes
""
tell the compiler that this is a string, not a number. - uint256S will parse the string as a hexadecimal value and construct the uint256 object accordingly.
Changed: consensus.BIP34Hash = uint256S("65ea097e012bad431eb912fc43abcc7c809d648a85cda433e73a0a9f9409a127");
Line 269
Default: consensus.BIP65Height = 1351; // BIP65 activated on regtest (Used in rpc activation tests)
- Reason changed: Bitcoin’s test height—set to 0 for BIP65 from genesis, matches MainNet/TestNet.
Changed: consensus.BIP65Height = 0;
Line 270
Default: consensus.BIP66Height = 1251; // BIP66 activated on regtest (Used in rpc activation tests)
- Reason changed: Bitcoin’s test height—set to 0 for BIP66 from genesis, matches MainNet/TestNet.
Changed: consensus.BIP66Height = 0;
Line 298: RegressionNet Default Port
298 nDefaultPort = 18444;
- change port number
nDefaultPort = 13337;
Line 301 RegressionNet Time Stamp Nonce Coin_Rewards
301 genesis = CreateGenesisBlock(1296688602, 2, 0x207fffff, 1, 50 * COIN);
- Change to your timestamp , nonce and coin rewards
genesis = CreateGenesisBlock(1733333335, 0, 0x207fffff, 1, 333 * COIN);
Line 303: RegressionNet Genesis Block Hash
303 assert(consensus.hashGenesisBlock == uint256S("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
- replace with your reg net genesis hash
assert(consensus.hashGenesisBlock == uint256S("0x65ea097e012bad431eb912fc43abcc7c809d648a85cda433e73a0a9f9409a127"));
Line 304 RegressionNet Merkel Hash
304 assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
- replace with your reg net merkel hash
assert(genesis.hashMerkleRoot == uint256S("0x96908dea6891a3cc8751ed962736bbc1f4129c5c2fa7f44333def15ce86c4388"));
Line 316: RegressionNet Genesis Hash
316 ( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"))
- change to your reg nets genesis hash
( 0, uint256S("0x65ea097e012bad431eb912fc43abcc7c809d648a85cda433e73a0a9f9409a127"))
src/chainparamsbase.cpp - API ports
Changing RPC port number info:
When forking Litecoin, changing the nRPCPort = 8332; is generally recommended, though not strictly necessary. Here are the reasons and benefits for doing so:
Avoiding Conflicts: If you run both Bitcoin and your forked cryptocurrency on the same machine or network, keeping the same RPC port (9332) would cause a conflict. By changing the port number, you ensure that both services can run simultaneously without interfering with each other.
Network Configuration: Different cryptocurrencies should ideally use different ports to avoid confusion and ensure clear network configuration. This helps in managing firewall rules and network policies more effectively.
Security: Using a non-standard port for your forked cryptocurrency can add a layer of security through obscurity. While not a robust security measure, it can help reduce the risk of automated attacks targeting known ports like 8332.
Customization: Changing the RPC port is part of customizing your fork to distinguish it from Bitcoin. This can be important for branding and ensuring that users and developers recognize it as a separate entity.
In summary, while it's not mandatory to change the RPC port when forking Bitcoin, doing so can help avoid conflicts, improve network management, and provide a clearer distinction between your fork and the original Bitcoin network.
line 35 - Main net RCP port
nRPCPort = 8332;
RPC port is used to connect to coin api, its used to create a web wallet and moblie wallet.
nRPCPort = 3366;
Line 48 - test net RPC port
nRPCPort = 18332;
Changing to 12333
nRPCPort = 12333;
line 62 - regession net RPC port
nRPCPort = 18332;
Changing to 12345
nRPCPort = 12345;
- We are pretty much done with customizing the code base, we just need an IP address to append to chainparams.cpp and we are good to go.
src/chainparamsseeds.h
- Delete content of
src/chainparamsseeds.h
and replace with just:
#ifndef BITCOIN_CHAINPARAMSSEEDS_H #define BITCOIN_CHAINPARAMSSEEDS_H static SeedSpec6 pnSeed6_main[] = {}; static SeedSpec6 pnSeed6_test[] = {}; #endif // BITCOIN_CHAINPARAMSSEEDS_H
The chainparamsseeds.h
file contains hardcoded seed nodes for the main network (pnSeed6_main), which are currently set to Bitcoin’s seed nodes (e.g., IPs like 2.7.8.12 on port 8333). These seeds will cause your node to attempt connections to Bitcoin peers, which isn’t what we want for N33Bcoin.
- By modifying the seed arrays for both mainnet and testnet to empty, we can keep the file structure intact while removing the Bitcoin seed nodes, preventing are node from trying to connect to them.
Hexadecimal - Chainparamsseeds.h - Quick Notes
Hex Symbol Values: 0,1,2,3,4,5,6,7,8,9,a=10,b=11,c=12,d=13,e=14,f=15 Hex is in a Block of 2, [01]=1, The First number/symbol (the one on the left), is Times by 16, and the Second number/symbol is added. 01 = 0x16, plus 1 = 01 A4 = 10x16, plus 4 = 164 E4 = 14x16, plus 4 = 228 FF = 15X16, plus 15 = 255 To work out the values of 104.194.157.52 and port 3333 static SeedSpec6 pnSeed6_main[] = {}; static SeedSpec6 pnSeed6_test[] = {}; IPv6 Mapping: {{Use 10 0x00, 2 0xff, then the 4 hex bytes} <port>}. 104 in hex: 6x16 = 96 + 8 = 104 InHex= '68' 194 in hex: c(12)x16=192 + 2 = 194 InHex= 'c2' 157 in hex: 9x16=144 + d(13)= 157 InHex= '9d' 52 in hex: 3x16=48 + 4 = 52 InHex= '34' #ifndef BITCOIN_CHAINPARAMSSEEDS_H #define BITCOIN_CHAINPARAMSSEEDS_H static SeedSpec6 pnSeed6_main[] = {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xc2,0x9d,0x34} 3333}; static SeedSpec6 pnSeed6_test[] = {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xc2,0x9d,0x34} 3333}; #endif // BITCOIN_CHAINPARAMSSEEDS_H
Container and VPS Setup
Most VPS providers frown on mining unless it’s their explicit service—fair enough, it hogs resources! To work around this, we’ll:
- Spin up an Ubuntu 18.04 container locally (18.04 keeps coin building simple).
- Pair it with a low-cost VPS running Ubuntu 24.04, tunneling all traffic from the container to the VPS’s public IP.
This setup gives us:
- A public-facing IP without poking holes in our home router.
- Local mining control, keeping private keys secure—because a VPS is just someone else’s machine, and we don’t trust it with our keys!
LXD Quick Container Setup
LXD Quick Container Setup
- Its pretty simple once you know.
Installing and setup LXD
sudo snap install lxd
sudo lxd init
- Just press ENTER for all defaults
- add user to lxd group (optional), will mean you do not need sudo to use lxc commands
- NOTE: you will need to logout and login for changes to take effect.
sudo adduser $USER lxd
a way to apply group changes without logging out and back in - tip
- These changes only apply to the current terminal session. If you open a new terminal session you have to repeat.
On Ubuntu 24.04 using Bash, you can use the newgrp command. Here's how you can do it:
- First, add your user to the lxd group:
sudo adduser $USER lxd
Then, to apply the changes immediately without logging out, use:
newgrp lxd
The newgrp command starts a new shell session with the updated group membership. This allows you to immediately use the permissions granted by the new group without logging out and back in. Alternatively, you can also use:
exec sudo su -l $USER
This command will replace your current shell with a new login shell for your user, which will have the updated group memberships.
Both of these methods will apply the group changes immediately, allowing you to use LXD commands without having to log out and back in.
- Remember, these changes only apply to the current terminal session.
If you open a new terminal window, you might need to run the command again or log out and back in for the changes to take effect system-wide.
Launching your container
- for the Build its important we use 18.04
- May want to get ubuntu pro free for 5 devices - to keep 1804 updated
- https://ubuntu.com/pro/dashboard
lxc launch ubuntu:18.04 n33b
- syntax
<command> <image> <container_name>
lxc launch ubuntu:18.04 n33b
- explained
To create and start your first LXC container, use the following command:
lxc launch ubuntu:18.04 n33b
This command does the following:
- lxc launch: Tells LXD to create and start a new container
- ubuntu:18.04: Specifies the image to use (Ubuntu 18.04 in this case)
- n33b: This is the name you're giving to your new container
After running this command, LXD will download the Ubuntu 18.04 image (if it hasn't already) and create a new container named "n33b" based on this image.
To see other available images, you can use:
lxc image list images:
This will show a list of available images from the default remote. You can also specify different versions or distributions, for example:
lxc launch ubuntu:20.04 mycontainer
for Ubuntu 20.04lxc launch debian:10 mydebian
for Debian 10lxc launch centos:8 mycentos
for CentOS 8
To get more detailed information about available images, use:
lxc image list images: | grep -i ubuntu
Replace "ubuntu" with any other distribution name to see its available versions.
Remember, the container name (like "n33b" in the example) must be unique within your LXD installation.
- If you see this error - you need to use sudo or add user to lxd group
lxc launch ubuntu:18.04 n33b Error: LXD unix socket "/var/snap/lxd/common/lxd/unix.socket" not accessible: permission denied
- To see your container
lxc ls
Login to container
lxc exec n33b bash
- Prompt should now be changed to
root@n33b:~#
root@<container_name>:~#
- This would be a good time to sign up to and enable ubuntu pro in the 1804 container https://ubuntu.com/pro/dashboard
sudo pro attach C12trandomcharsXFVhrRSveGOd4
- Update container
apt update && apt upgrade -y
Ubuntu Pro for 1804 Containers
- super useful for ubuntu 1804, with pro has support till 2027
- Free For Five Boxes/Devices
https://ubuntu.com/pro/dashboard
sudo pro attach 8dc6560abd396b3871f37b80ec
sudo pro status
sudo pro detach
In Container wireguard installation and setup
Install wireguard
apt install wireguard -y
- This will be the Client - for the container
Create Directory for Keys
mkdir ~/wireguard
- As we are logged in as root this path will be /root/wireguard
cd ~/wireguard
Generate the private and public keys
umask 077
- umask 077 sets the most restrictive default file permissions, allowing access only to the file's owner.
wg genkey | tee privatekey | wg pubkey > publickey
- This will create two files, privatekey and publickey, in the ~/wireguard directory.
- The Private key will be used for the Client Wireguard Config file
cat privatekey
=kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08=
- The Public key will be used for the Server Wireguard Config File
cat publickey
=o/gsEsee7FfFFvzQI9OdD3LvHYu3CkRobeZcpbjM6n0=
- The Config file for wireguard is located in the
/etc/wireguard/
directory- Both Client and Server config file will be stored in this directory path.
/etc/wireguard/wg0.conf
Template of a /etc/wireguard/wg0.conf
file:
[Interface] PrivateKey = <client_private_key> # Client's private key Address = 10.0.0.2/24 # Client's IP address in the VPN [Peer] PublicKey = <server_public_key> # Server's public key Endpoint = <server_ip>:51820 # Server's IP and WireGuard port AllowedIPs = 0.0.0.0/0 # Route all traffic through the VPN PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
$EDITOR /etc/wireguard/wg0.conf
- Append your Client Private Key
PrivateKey = kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08=
- Append your servers IP address
Endpoint = 12.34.56.78:51820
[Interface] PrivateKey = kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08= # Client's private key Address = 10.0.0.2/24 # Client's IP address in the VPN [Peer] PublicKey = <server_public_key> # Server's public key Endpoint = 12.34.56.78:51820 # Server's IP and WireGuard port AllowedIPs = 0.0.0.0/0 # Route all traffic through the VPN PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
- Will Append Server Public Key Later
FireWall Notes:
- My host and container do not have firewalls setup
- If they did, we would allow port 51820 udp
Enable IP forwarding to allow traffic to pass through the VPN server:
$EDITOR /etc/sysctl.conf
- uncomment line 28
#net.ipv4.ip_forward=1
Save and Exit
sysctl -p
- DO NOT ENABLE WIREGUARD YET!
- Need to setup server and return to append/complete the client config before enabling wireguard.
Server Setup
First login to your server, update and reboot
ssh root@12.34.56.78
apt update && apt upgrade -y && reboot
Give it a minute or two and log back into server.
Auto Update Server
- You may want to apply auto updates to your server.
- https://www.completenoobs.com/noobs/Ubuntu_unattended-upgrades
Firewall
- Check if firewall enabled - it should be by default on server
ufw status
- At this stage we are just going to allow 22 are ssh port and 51820 the port wireguard uses by default.
Will return
Status: inactive
If inactive Or the rules applied if enabled
Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6)
If not enabled already make sure you allow port 22 for your ssh first
ufw allow 22/tcp
- check with
ufw status
now we can enable - If not already enabled.
ufw enable
Allow the Wireguard port 51820:
ufw allow 51820/udp
This would do for now - we will do the rest once wireguard up and running.
If you Entered wrong port number and would like to change/delete rule:
First check current rules.
ufw status
delete a UFW rule you made by mistake.
ufw delete allow 433/tcp
Or you can use a numbered rule list.
ufw status numbered
Will list rules by number.
ufw delete <RULE_NUMBER>
ufw delete 2
Now re-enter rule to allow correct port number and protocol.
Installing wireguard
- Install wireguard on server
apt install wireguard
Create directory for wireguard keys
- create directory for keys
mkdir ~/wireguard
cd ~/wireguard
- Set File permissions
umask 077
- Generate Public and Private Keys
wg genkey | tee privatekey | wg pubkey > publickey
- See Pub Key
cat publickey
= VASQkU11QiXNkDxm2B6M9f2jnV9UUhjHV7E21XQleiA=
- See Priv key
cat privatekey
= 0FDqowMNvNFQ3d8+phQs3a4zDYEggmgeML1uin08M1w=
Find your network interface name on Server
- Find your network interface name on Server using the following command:
ip -o -4 route show to default | awk '{print $5}'
- Returns:
enp1s0
- Note you network interface name for the
/etc/wireguard/wg0.conf
file.- Your network interface name might be called something else like eth0 note this and replace where you see enp1s0 in the servers wg0.conf file.
Server Wireguard /etc/wireguard/wg0.conf
Template
[Interface] Address = 10.0.0.1/24 # Replace with the IP address/subnet you want to use for the VPN ListenPort = 51820 # Default WireGuard port PrivateKey = <server_private_key> # Replace with the contents of your privatekey file # (Optional) Save configuration on shutdown SaveConfig = true # Change '''enp1s0''' to your network interface on both lines. ## To see your servers network interface use this command: ## ip -o -4 route show to default | awk '{print $5}' PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o enp1s0 -j MASQUERAD [Peer] PublicKey = <client_public_key> # Replace with the public key of the client AllowedIPs = 10.0.0.2/32 # The IP address that the client will use PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
Details we need to append to are /etc/wireguard/wg0.conf
- <server_private_key>: Replace this with the contents of your privatekey file.
- <client_public_key>: Replace this with the public key from the client device that will connect to this server.
- AllowedIPs: Specifies which IP addresses are allowed to use this connection. This typically includes the client’s WireGuard IP and any subnets you want to route.
- enp1s0 If your network interface name is diff then change/correct on both lines
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o <INTERFACE_NAME> -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o <INTERFACE_NAME> -j MASQUERAD
Create are /etc/wireguard/wg0.conf
file for Server
$EDITOR /etc/wireguard/wg0.conf
[Interface] Address = 10.0.0.1/24 # Replace with the IP address/subnet you want to use for the VPN ListenPort = 51820 # Default WireGuard port PrivateKey = 0FDqowMNvNFQ3d8+phQs3a4zDYEggmgeML1uin08M1w= # Replace with the contents of your privatekey file # (Optional) Save configuration on shutdown SaveConfig = true PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o enp1s0 -j MASQUERAD [Peer] PublicKey = o/gsEsee7FfFFvzQI9OdD3LvHYu3CkRobeZcpbjM6n0= # Replace with the public key of the client AllowedIPs = 10.0.0.2/32 # The IP address that the client will use PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
Save and Exit, that should be all done.
Enable IP forwarding to allow traffic to pass through the VPN server
vi /etc/sysctl.conf
- uncomment line 28
#net.ipv4.ip_forward=1
Save and Exit
sysctl -p
The Server Side is now ready.
- Start the WireGuard interface:
wg-quick up wg0
- Enable WireGuard to start on boot:
systemctl enable wg-quick@wg0
We are now done with server, can go back to client.
Back in container
NOTE: This is for the lxc container and not the host
- edit and append the server public key to /etc/wireguard/wg0.conf
$EDITOR /etc/wireguard/wg0.conf
[Interface] PrivateKey = kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08= # Client's private key Address = 10.0.0.2/24 # Client's IP address in the VPN [Peer] PublicKey = VASQkU11QiXNkDxm2B6M9f2jnV9UUhjHV7E21XQleiA= # Server's public key Endpoint = 12.34.56.78:51820 # Server's IP and WireGuard port AllowedIPs = 0.0.0.0/0 # Route all traffic through the VPN PersistentKeepalive = 25
- now hopefully all good lets start wireguard and test
wg-quick up wg0
- This command should return the IP of the Server
curl ifconfig.me
- If container returns same IP as server :) we are good to go, enable wireguard on startup.
systemctl enable wg-quick@wg0
Now we have a Public IP for are Coin, lets return to host and finish are coin.
Back to Server
Lets finish the firewall rules on are server.
Now to allow the ports we are going to be using:
- Main Net default port 3333
ufw allow 3333/tcp
- Test Net default port 13333
ufw allow 13333/tcp
- Reg Net default port 13337
ufw allow 13337/tcp
- RPC ports
- Main Net 3366
ufw allow 3366/tcp
- Test Net 12333
ufw allow 12333/tcp
- Reg Net 12345
ufw allow 12345/tcp
Now we are going to forward these ports to our container on the other end of WireGuard:
- Need to do these for each port, but for now just the MainNet port 3333 others will be used on other nodes.
sudo iptables -t nat -A PREROUTING -p tcp -d <SERVER_PUBLIC_IP> --dport <PORT_NUMBER> -j DNAT --to-destination <WIREGUARD_CLIENT_IP>:<PORT_NUMBER>
sudo iptables -A FORWARD -p tcp -d <WIREGUARD_CLIENT_IP> --dport <PORT_NUMBER> -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
- Example: Allowing Main Net port 3333 to forward from container to server.
- SERVER_PUBLIC_IP: 12.34.56.78 (place holder)
- WIREGUARD_CLIENT_IP: 10.0.0.2 (This can be found on your Client/Containers /etc/wireguard/wg0.conf file "Address = 10.0.0.2/24 # Client's IP address in the VPN")
- PORT_NUMBER: 3333
sudo iptables -t nat -A PREROUTING -p tcp -d 12.34.56.78 --dport 3333 -j DNAT --to-destination 10.0.0.2:3333
sudo iptables -A FORWARD -p tcp -d 10.0.0.2 --dport 3333 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
- Make the iptables rules persistent across reboots
sudo apt install iptables-persistent
sudo iptables-save > /etc/iptables/rules.v4
Back to Host
Now we have
- A container with a public IP address
- Source code for are coin
Lets append are IP adress to are src/chainparams.cpp
file and make a exportable/shareable backup.
Append IP to src/chainparams.cpp
If i was going to change or add ips/domains do i need to recomplie? Yep:
Yes, if you want to change or add new IPs/domains in the `CDNSSeedData` section of `src/chainparams.cpp`, you will need to edit the file and recompile the code.
The `CDNSSeedData` entries are hardcoded into the source code, and when you compile the code, these values are baked into the resulting binary. Therefore, any changes to the seed nodes will require:
- Editing the `src/chainparams.cpp` file**: Modify the list of `CDNSSeedData` entries to include your new IPs or domains.
- Recompiling the source code**: Once you've made your changes, you need to recompile the project so that the new seed nodes are included in the binary.
- Restarting your nodes**: After recompiling, you would need to distribute the new binary to your nodes and restart them to ensure they use the updated seed list.
This process is necessary because the seed nodes are part of the initial configuration that helps nodes discover peers when they first start up. Any changes to these seeds require the software itself to be updated and redeployed.
Main Net DNS lines 123 - 127
$EDITOR /home/$USER/N33B/N33Bcoin/src/chainparams.cpp
- Line 123
src/chainparams.cpp
123 vSeeds.push_back(CDNSSeedData("n33bcoin.sipa.be", "seed.n33bcoin.sipa.be", true)); // Pieter Wuille, only supports x1, x5, x9, and xd
We are going to Change to are servers address
vSeeds.push_back(CDNSSeedData("12.34.56.78", "12.34.56.78", true));
At current time we only have one default node, so we comment out line 124 to 127
vSeeds.push_back(CDNSSeedData("12.34.56.78", "12.34.56.78", true)); // vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me", true)); // Matt Corallo, only supports x9 // vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.n33bcoin.dashjr.org")); // Luke Dashjr // vSeeds.push_back(CDNSSeedData("n33bcoinstats.com", "seed.n33bcoinstats.com", true)); // Christian Decker, supports x1 - xf // vSeeds.push_back(CDNSSeedData("n33bcoin.jonasschnelli.ch", "seed.n33bcoin.jonasschnelli.ch", true)); // Jonas Schnelli, only supports x1, x5, x9, and xd
Test net DNS lines 224 - 227
- Line 224 - ip adderss
224 vSeeds.push_back(CDNSSeedData("testnetn33bcoin.jonasschnelli.ch", "testnet-seed.n33bcoin.jonasschnelli.ch", true));
Change to server ip
vSeeds.push_back(CDNSSeedData("12.34.56.78", "12.34.56.78", true));
and comment out the other 3 lines
vSeeds.push_back(CDNSSeedData("12.34.56.78", "12.34.56.78", true)); // vSeeds.push_back(CDNSSeedData("petertodd.org", "seed.tbtc.petertodd.org", true)); // vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me")); // vSeeds.push_back(CDNSSeedData("n33bcoin.schildbach.de", "testnet-seed.n33bcoin.schildbach.de"));
Create BackUp Tar Archive
At this point you may want to make a backup.
- In work directory =
/home/$USER/N33B
tar -zcvf N33Bcoin.0.0.1.tar.gz N33Bcoin
- Going to save in directory
/home/$USER/N33B
- Syntax =
tar -zcvf /path/to/save/archive_name.tar.gz /path/to/directory_name
Now we Should have N33Bcoin.0.0.1.tar.gz
lets start building are coin.
Move N33Bcoin.0.0.1.tar.gz to Container
Lets Move are source code to are container.
- File on Host:
/home/$USER/N33B/N33Bcoin.0.0.1.tar.gz
- Container Name:
n33b
- Container Name can be found with
lxc list
- Container Name can be found with
- On Host:
lxc file push /home/$USER/N33B/N33Bcoin.0.0.1.tar.gz n33b/home/ubuntu/
- ubuntu is the name of the ubuntu containers default user account
Return to container as user ubuntu
lxc exec n33b -- su - ubuntu
Now are source code N33Bcoin.0.0.1.tar.gz
should be in are home directory. Before we start using it, we need to install and build some dependencies software.
Build and Install Berkeley DB
- In the Container - as user 'ubuntu' in /home/ubuntu directory.
sudo apt update && sudo apt upgrade -y
sudo apt install build-essential
sudo apt install autoconf libtool pkg-config libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libevent-dev libcanberra-gtk-module libdb++-dev qtbase5-dev qt5-qmake libdb-dev libdb++-dev -y
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
sha256sum db-4.8.30.NC.tar.gz
- hash should return:
12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
tar -xf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
export BDB_PREFIX=$(pwd)
../dist/configure --disable-shared --enable-cxx --with-pic --prefix=$BDB_PREFIX CXXFLAGS="-fno-builtin-__atomic_compare_exchange"
Try the build:
make
sudo make install
If you received error, are you building in ubuntu 18.04? these build instrutions are reproduable for 18.04 and not other versions of ubuntu.
- A block chain requires min 2 nodes, so this would be a good time to snapshot your container.
SNAPSHOT your container
- This will save loads of time creating a second node later.
- In a Terminal on HOST
- Stop Container
lxc stop n33b
- snapshot
lxc snapshot n33b one
- start container
lxc start n33b
- Log in as ubuntu user
lxc exec n33b -- su - ubuntu
Build the Coin
Just for the Genesis Node, or it will not work, it will try to sync with another node, which it can not do as its at block 0.
- edit the file
src/rpc/mining.cpp
and comment out the lines 471 and 472:
// if (IsInitialBlockDownload()) // throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "N33Bcoin is downloading blocks...");
If you stopped container to snapshot and logged back in (or using another terminal), then we need to re-set var.
cd ~/db-4.8.30.NC/build_unix
export BDB_PREFIX=$(pwd)
- Now thats done we can carry on
cd ~/
- extract
tar xzvf N33Bcoin.0.0.1.tar.gz
- Make sure in correct path/directory
cd ~/N33Bcoin
./autogen.sh
./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/"
- Note:
-j3
will use 3 cores (i have 4 cores), you can use justmake
(will use 1 core) or any amount of cores you want from system
make -j3
If you run into errors you can use:
make > ../build.log 2>&1
This is print build info into file build.log
Run Coin
- Path
cd /home/ubuntu/N33Bcoin/src
Going to first play around with Regression make sure everything is working, its supereasy to mine.
- Running regtest first will also create
~/.n33bcoin/
directory which we can create aren33bcoin.conf
file for mainnet.
Running Regression Net
- run reg net
./n33bcoind -regtest -daemon
get blockchain info
./n33bcoin-cli -regtest getblockchaininfo
- at the top you should see regtest
"chain": "regtest",
get wallet info
./n33bcoin-cli -regtest getwalletinfo
{ "walletversion": 130000, "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 0, "keypoololdest": 1744462932, "keypoolsize": 100, "paytxfee": 0.00000000, "hdmasterkeyid": "d047e9559ee0a6657fe3011fe6f707fe3c2d797b" }
Generate 10 blocks
./n33bcoin-cli -regtest generate 10
[ "16fe73d5011e8e05cadb9e9dea43e58aa154ffcca891659cc59fbdfafe6f001c", "7803e298b6c57f8fc7ddac5da0e0696cc67524c9ee2bbbbbecdccfb01b364e79", "7c92afb2faed00d051edd22f85218416c394cd45ddadf413b9df808c0414ca7e", "29fe7bb17c984bd33c7e3d9cb4fa3ce1e47760ac22accded3aa25fd49aa87d91", "56d234a030af699a6aa824c8d95a9fabdcf56c9491ed30331ca2159188741c89", "272827808aad1efe0e752789acf6a28f25bc4ba2da905a8a6f5da00016ba286b", "23711e3856cf2e018ef02782eb546e87c9604781da6855bd136ef51fa5dd23e5", "7bd7e1e6183094c75e37d6605451ce7e7e1c23347e3b5c279c33196af916b1f2", "1c7e5fc29dc7c9b3a56e8f35becc3a0a8005e79ac1a84278f8a1f37c067f67b3", "3ac84dcf8be2849b347369de7bf6bb49d780cdf41e2c4abbe2ea0ae1b89bd26e" ]
Check Balance
./n33bcoin-cli -regtest getbalance
0.00000000
- You mined 10 blocks and have zero coins! that is because the coins have not mutured, it takes 100 blocks for newly created coins to muture and show up in your wallet.
- you can see your immature_balance with the
getwalletinfo
command.
./n33bcoin-cli -regtest getwalletinfo
{ "walletversion": 130000, "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 11114108.00000000, "txcount": 10, "keypoololdest": 1744462932, "keypoolsize": 100, "paytxfee": 0.00000000, "hdmasterkeyid": "d047e9559ee0a6657fe3011fe6f707fe3c2d797b" }
Get new addresses
./n33bcoin-cli -regtest getnewaddress
mhbyaq1oW4guMzVBefrj2yECXNzdHdiuXb
Find addresses your wallet is currently using
- To see all your current public addresses use
listreceivedbyaddress 0 true
./n33bcoin-cli -regtest listreceivedbyaddress 0 true
Mine to specific address
./n33bcoin-cli -regtest generatetoaddress 101 "your-mainnet-address"
./n33bcoin-cli -regtest generatetoaddress 101 "mhbyaq1oW4guMzVBefrj2yECXNzdHdiuXb"
Coins Matured
./n33bcoin-cli -regtest getbalance
11114441.00000000
- and Immatured coins
./n33bcoin-cli -regtest getwalletinfo
{ "walletversion": 130000, "balance": 11114441.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 33300.00000000, "txcount": 111, "keypoololdest": 1744462932, "keypoolsize": 100, "paytxfee": 0.00000000, "hdmasterkeyid": "d047e9559ee0a6657fe3011fe6f707fe3c2d797b" }
stop regtest net
- stop regtest
./n33bcoin-cli -regtest stop
Main Net
- Running
-regtest
should of created a~/.n33bcoin
directory for you.
- Create
n33bcoin.conf
$EDITOR ~/.n33bcoin/n33bcoin.conf
rpcuser=coinuser rpcpassword=coinpassword rpcallowip=127.0.0.1 rpcport=3366 daemon=1 server=1 rpcbind=127.0.0.1
- run/start coin
./n33bcoind
- NOTE: if you did not create a n33bcoin.conf file and apply 'daemon=1', you can use the -daemon flag
./n33bcoind -daemon
Some debug tips:
- If n33bcoin hangs -
ps aux | grep n33bcoind
- The
kill -9 PID_NUMBER
- Also note: there is nothing wrong with turning it off and on again.
- The
./n33bcoind -debug=1
- log is at ~/.n33bcoin/debug.log
./n33bcoind -debug=1 -printtoconsole
- will output to terminal, no output to debug.log
Create and Add second node - the easy way
Why a Dummy Node is Needed to Avoid 500 Internal Server Error
and Ensure Syncing
A dummy node is required for mining on the genesis node (main node) and to ensure other nodes can sync with your N33Bcoin network. Without it, you may encounter errors like:
[2025-04-20 11:49:32] HTTP request failed: The requested URL returned error: 500 Internal Server Error
Why does this happen? The main node needs at least one active peer to process the getblocktemplate
RPC call used by minerd
for mining. If the node is in Initial Block Download (IBD) or has no peers, this call fails, causing the 500 error. Additionally, if the main node is in IBD, it won’t serve blocks to other nodes, preventing them from syncing (e.g., stuck at blocks: 0
).
How the dummy node fixes it:
- Running a dummy node (e.g., on
127.0.0.1:3334
) provides an active peer, allowinggetblocktemplate
to succeed and mining to start. - Mining generates new blocks, updating the chain tip’s timestamp, which helps the main node exit IBD.
- Once out of IBD, the main node can serve blocks to other nodes, enabling them to sync (e.g., to
blocks: 428
).
Why it’s easy to forget: The dummy node isn’t a standard Bitcoin requirement—it’s specific to N33Bcoin’s setup, possibly due to custom peer or RPC logic. Always run a dummy node when mining or syncing new nodes.
If you get the 500 error: Start a dummy node and add it to the main node’s peers with addnode
. See the next section for setup instructions.
Warning: Without a dummy node, mining will fail, and new nodes won’t sync. Always include this step in your setup and document it to avoid surprises!
After first node ruuing with:
./n33bcoind
- create a directory for second node
mkdir ~/.n33bcoin2
- make config file
$EDITOR ~/.n33bcoin2/n33bcoin.conf
- Note changed ports (change to username and password not necessary, its optional.)
rpcuser=coinuser1 rpcpassword=coinpassword1 rpcallowip=127.0.0.1 rpcport=3367 daemon=1 server=1 rpcbind=127.0.0.1 port=3334
- start node2 - note ports
./n33bcoind -daemon -datadir=/home/ubuntu/.n33bcoin2 -port=3334 -rpcport=3367
- Connect node
./n33bcoin-cli -rpcport=3366 addnode "127.0.0.1:3334" "add"
- Check node one
./n33bcoin-cli -rpcport=3366 -rpcuser=coinuser -rpcpassword=coinpassword getblocktemplate
- Check node two
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 getblocktemplate
Default Node User and Second Node User management
- The default user will be your main node ~/.n33bcoin/
- To use second node ~/.n33bcoin2/ you have to use/append non default port in commands:
- To run commands on second node, Add/Append
-rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1
- rpcport, rpcuser, rpcpassword these values can be found in the
~/.<node_name>/n33bcoin.conf
file
- rpcport, rpcuser, rpcpassword these values can be found in the
- To run commands on second node, Add/Append
- For default wallet/node can use:
./n33bcoin-cli getwalletinfo
- Or to specify (optional) can use, the main nodes rpcport, rpcuser and rpcpassword followed by <command>:
./n33bcoin-cli -rpcport=3366 -rpcuser=coinuser -rpcpassword=coinpassword getblocktemplate
- For the second node we created - we do need to specify
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 getwalletinfo
How to stop second node:
- To run commands on a second or third ...ETC node - you need to enter:
-rpcport=<value>
-rpcuser=<username>
-rpcpassword=<password>
- followed by the command you wish to run on node
getbalance
- Remember you store all these details in your
n33bcoin.conf
file for your node.
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 stop
Mining blocks on your blockchain
Well you can try with:
./n33bcoin-cli generate 1
But instead of seeing
[ "some-block-hash" ]
Your going to get empty brackets
[ ]
I cant remember the reason for this. But i know the fix. Install Mining software
Address to send mined coins to
First lets get a public key/address we can mine to.
- Find old addresses
./n33bcoin-cli listreceivedbyaddress 0 true
- Create new address
./n33bcoin-cli getnewaddress
- The address i will use
1yGkMwmVbPELpXyZugffaP2sLEzWBPXpj
Cpu Miner Install
cd ~
sudo apt update
sudo apt install -y build-essential libcurl4-openssl-dev
git clone https://github.com/pooler/cpuminer.git
cd cpuminer
./autogen.sh
./configure
make
sudo make install
Mine some Coins
- OK lets mine us some coins
- Syntax:
minerd -o <pool_url> -u <username> -p <password> --coinbase-addr=<public_key>
- Syntax:
minerd -a sha256d -o http://127.0.0.1:3366 -u coinuser -p coinpassword --coinbase-addr=1yGkMwmVbPELpXyZugffaP2sLEzWBPXpj
- YAY, back to the days when you could find bitcoin blocks with a simple CPU
[2025-04-12 19:31:17] Binding thread 0 to cpu 0 [2025-04-12 19:31:17] Binding thread 1 to cpu 1 [2025-04-12 19:31:17] 4 miner threads started, using 'sha256d' algorithm. [2025-04-12 19:31:17] Binding thread 2 to cpu 2 [2025-04-12 19:31:17] Binding thread 3 to cpu 3 [2025-04-12 19:31:17] Long-polling activated for http://127.0.0.1:3366 [2025-04-12 19:31:17] thread 1: 2097152 hashes, 10099 khash/s [2025-04-12 19:31:17] thread 0: 2097152 hashes, 10094 khash/s [2025-04-12 19:31:17] thread 3: 2097152 hashes, 10093 khash/s [2025-04-12 19:31:17] thread 2: 2097152 hashes, 10032 khash/s [2025-04-12 19:32:17] thread 2: 601912088 hashes, 10080 khash/s [2025-04-12 19:32:17] thread 0: 605611536 hashes, 10108 khash/s [2025-04-12 19:32:17] thread 3: 605564904 hashes, 10102 khash/s [2025-04-12 19:32:17] thread 1: 605946928 hashes, 10104 khash/s [2025-04-12 19:33:17] thread 2: 604824240 hashes, 10080 khash/s [2025-04-12 19:33:17] thread 0: 606506104 hashes, 10109 khash/s [2025-04-12 19:33:17] thread 1: 606263288 hashes, 10109 khash/s [2025-04-12 19:33:17] thread 3: 606114016 hashes, 10102 khash/s [2025-04-12 19:34:17] thread 0: 596676992 hashes, 9883 khash/s [2025-04-12 19:34:17] accepted: 1/1 (100.00%), 40174 khash/s (yay!!!) [2025-04-12 19:34:17] LONGPOLL pushed new work [2025-04-12 19:34:17] thread 2: 597009344 hashes, 9856 khash/s [2025-04-12 19:34:17] thread 1: 596347864 hashes, 9882 khash/s [2025-04-12 19:34:17] thread 0: 184 hashes, 8762 khash/s [2025-04-12 19:34:17] thread 3: 596226344 hashes, 9881 khash/s [2025-04-12 19:35:11] thread 0: 525714288 hashes, 9775 khash/s [2025-04-12 19:35:17] thread 0: 58652240 hashes, 9780 khash/s [2025-04-12 19:35:18] thread 1: 592942512 hashes, 9784 khash/s [2025-04-12 19:35:18] thread 3: 592834720 hashes, 9780 khash/s [2025-04-12 19:35:18] thread 2: 591387224 hashes, 9754 khash/s [2025-04-12 19:36:17] thread 1: 577261400 hashes, 9784 khash/s [2025-04-12 19:36:17] thread 2: 575496480 hashes, 9756 khash/s [2025-04-12 19:36:17] thread 3: 576993520 hashes, 9776 khash/s [2025-04-12 19:36:17] thread 0: 586785384 hashes, 9780 khash/s [2025-04-12 19:37:17] thread 3: 586568712 hashes, 9700 khash/s [2025-04-12 19:37:17] thread 2: 585369888 hashes, 9645 khash/s [2025-04-12 19:37:18] thread 1: 587018480 hashes, 9656 khash/s [2025-04-12 19:37:18] thread 0: 586791168 hashes, 9631 khash/s [2025-04-12 19:37:43] thread 0: 247017896 hashes, 9757 khash/s [2025-04-12 19:37:43] accepted: 2/2 (100.00%), 38758 khash/s (yay!!!) [2025-04-12 19:37:43] LONGPOLL pushed new work [2025-04-12 19:37:43] thread 2: 250694904 hashes, 9748 khash/s [2025-04-12 19:37:43] thread 1: 250409704 hashes, 9773 khash/s [2025-04-12 19:37:43] thread 0: 21504 hashes, 8650 khash/s [2025-04-12 19:37:43] thread 3: 253010016 hashes, 9764 khash/s
- By default minerd will use all cores - if you want to limit to number of core use the
-t <number_of_cores>
minerd -a sha256d -o http://127.0.0.1:3366 -u coinuser -p coinpassword --coinbase-addr=1yGkMwmVbPELpXyZugffaP2sLEzWBPXpj -t 2
[2025-04-12 19:43:05] 2 miner threads started, using 'sha256d' algorithm. [2025-04-12 19:43:05] Long-polling activated for http://127.0.0.1:3366 [2025-04-12 19:43:05] thread 1: 2097152 hashes, 11359 khash/s [2025-04-12 19:43:05] thread 0: 2097152 hashes, 11327 khash/s
- Next we mine on till we have at least 101 blocks so are coins are matured.
After 101 blocks - Mature Coins
- now we should have some coins in are wallet that we can use, YAY
./n33bcoin-cli getbalance
11112110.00000000
- and lets check the account of are second node
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 getbalance
- Lets get the address of are second node to send some coins
listreceivedbyaddress 0 true
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 listreceivedbyaddress 0 true
- Or we could generate a new address with
getnewaddress
1Ak9irgvsb6GecB5TUnoTdMZ9EpqvpJhfz
Now lets send some coins
Wallet Basics
Now we have coins we can use - matured coins
Get balance
getbalance
./n33bcoin-cli getbalance
Find Account Addresses
listreceivedbyaddress 0 true
./n33bcoin-cli listreceivedbyaddress 0 true
Create New Address
getnewaddress
./n33bcoin-cli getnewaddress
Sending coins
- Syntax:
./n33bcoin-cli sendtoaddress "<address>" <amount>
./n33bcoin-cli sendtoaddress "1Ak9irgvsb6GecB5TUnoTdMZ9EpqvpJhfz" 33
- This comand will return a hash in your terminal out put.
f4e5e498a204c0ddc50eff3a96c21df9c7dea4145f58850878e0b73d609033b7
- and Check balance of second node to see balance:
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 getbalance
33.00000000
See Transaction Details from hash
- the transaction hash is from the above send coins example
- Syntax:
n33bcoin-cli gettransaction "<transaction_hash>"
./n33bcoin-cli gettransaction "f4e5e498a204c0ddc50eff3a96c21df9c7dea4145f58850878e0b73d609033b7"
{ "amount": -33.00000000, "fee": -0.00004520, "confirmations": 4, "blockhash": "000000001de9c3c29b7e56f0b99915819e9b05390f4dfa6131975e0be2353025", "blockindex": 1, "blocktime": 1744553765, "txid": "f4e5e498a204c0ddc50eff3a96c21df9c7dea4145f58850878e0b73d609033b7", "walletconflicts": [ ], "time": 1744553764, "timereceived": 1744553764, "bip125-replaceable": "no", "details": [ { "account": "", "address": "1Ak9irgvsb6GecB5TUnoTdMZ9EpqvpJhfz", "category": "send", "amount": -33.00000000, "vout": 0, "fee": -0.00004520, "abandoned": false } ], "hex": "020000000150a37ad36c761374df6a14c20bd2c016208358bf1f20af06c5acbe4827250ee7000000006a4730440220582f2094aca19d63744d8d128c3dea907cddd4eeb5728d6f064c4168d7a36b9c0220649b2397635fe0b8899fea4535b0072e856a164235f8ab8feb91f3dbfa9e3ddc012103dd8d842cd0c2b167b507b9e8ee580fc726262bb218abc5c6487668b72e5673a3feffffff020001b2c4000000001976a9146ae24c8430bcd30bc1b812f946229fcc563eb0ef88ac589a23fc060000001976a9141e0606800605f94643f5da7e0a31e435e030855788acbe000000" }
List Transactions from account
listtransactions
./n33bcoin-cli listtransactions
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 listtransactions
- This command will show all transactions send and receive.
[ { "account": "", "address": "1Ak9irgvsb6GecB5TUnoTdMZ9EpqvpJhfz", "category": "receive", "amount": 33.00000000, "label": "", "vout": 0, "confirmations": 6, "blockhash": "000000001de9c3c29b7e56f0b99915819e9b05390f4dfa6131975e0be2353025", "blockindex": 1, "blocktime": 1744553765, "txid": "f4e5e498a204c0ddc50eff3a96c21df9c7dea4145f58850878e0b73d609033b7", "walletconflicts": [ ], "time": 1744553766, "timereceived": 1744553766, "bip125-replaceable": "no" } ]
list received transactions by address
listreceivedbyaddress
./n33bcoin-cli listreceivedbyaddress
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 listreceivedbyaddress
[ { "address": "1Ak9irgvsb6GecB5TUnoTdMZ9EpqvpJhfz", "account": "", "amount": 33.00000000, "confirmations": 6, "label": "", "txids": [ "f4e5e498a204c0ddc50eff3a96c21df9c7dea4145f58850878e0b73d609033b7" ] } ]
Address With Label
- Create New Address With Label
- Syntax:
getnewaddress "<Label>"
- Syntax:
- NOTE: Label name is case sensitive.
./n33bcoin-cli getnewaddress "Mining"
1AteBLozx2DE1mXyXSoZryjGjaoUyaLYiB
- See Accounts in Label
./n33bcoin-cli getaddressesbyaccount "Mining"
- a Label can hold many addresses
[ "1AteBLozx2DE1mXyXSoZryjGjaoUyaLYiB" ]
- Lists transactions for the labeled account.
./n33bcoin-cli listtransactions "Mining"
- Tracking with a label - Shows total balance for addresses in the labeled account.
./n33bcoin-cli getbalance "Mining"
- Label an existing address - Assigns an existing address to a named account.
./n33bcoin-cli setaccount "<address>" "<label>"
- Change Label of Address
./n33bcoin-cli setaccount "<address>" "<newlabel>"
Backup Wallets and Restore/Reclaim
To test wallet exports and back ups we are going to create a third node.
This keeps are main wallet and the wallet of are second node safe.
Or If you feel up for it, feel free to play/use/learn with your main wallet.
- Create a directory for third node
mkdir ~/.n33bcoin3
- Create config file
$EDITOR ~/.n33bcoin3/n33bcoin.conf
- Note: changed ports (change to username and password not necessary, its optional.)
rpcuser=coinuser2 rpcpassword=coinpassword2 rpcallowip=127.0.0.1 rpcport=3368 daemon=1 server=1 rpcbind=127.0.0.1 port=3335
- Start node 3
./n33bcoind -daemon -datadir=/home/ubuntu/.n33bcoin3 -port=3335 -rpcport=3368
- Connect node
./n33bcoin-cli -rpcport=3366 addnode "127.0.0.1:3335" "add"
- Check node three
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getblocktemplate
- See Address (pub key)
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 listreceivedbyaddress 0 true
1EhA5fkapYWrhs2oAf2AqvF4WYMPM28GqL
- I have sent 33 n33bcoin's to this address.
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getwalletinfo { "walletversion": 130000, "balance": 33.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 1, "keypoololdest": 1744568061, "keypoolsize": 100, "paytxfee": 0.00000000, "hdmasterkeyid": "8afde14085be2139ff008667c345b3697bea9cea" }
Encrypt Wallet
- IMPORTANT NOTE! IF YOU LOSE/FORGET PASSPHRASE, YOU LOST YOUR WALLET!
Encrypting your wallet, will require passphrase to see private_keys and to send coins from your account, but you can still check balance and the basic chain info without passphrase.
- Syntax
./n33bcoin-cli encryptwallet "<passphrase>"
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 encryptwallet "pa55word"
OutPut:
wallet encrypted; N33Bcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup.
Test Encryption
Syntax: ./n33bcoin-cli dumpprivkey <address>
This command should need passphrase if wallet locked.
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
can be used in place of a real address
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 dumpprivkey 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
If wallet LOCKED - you will see
error code: -13 error message: Error: Please enter the wallet passphrase with walletpassphrase first.
If wallet UNLOCKED but address not in wallet - you will see
- This is because there is no address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
in your wallet and error code -5 indicates address not found in the wallet, but it passed the lock so, yay
- This is because there is no address
error code: -5 error message: Invalid N33Bcoin address
If address exists in your wallet and wallet is UNLOCKED - you will see the private key:
6vJYM3RFWh7MyLVrPbgzgibUgqxMzWUCCbuH3GcfDRTqfoNQjBb
IMPORTANT: Never share your actual private keys with anyone. The example above is for demonstration purposes only.
open encrypted wallet
- Syntax ./n33bcoin-cli walletpassphrase "<passphrase>" <time_in_seconds_to_stay_open>
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 walletpassphrase "Pa55word" 60
Change PassPhrase
- Syntax:
./n33bcoin-cli walletpassphrasechange "<old_passphrase>" "<new_passphrase>"
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 walletpassphrasechange "Pa55word" "StrongPass123!@#456"
Back Up WALLET.DAT
- You can make a backup of your wallet.dat file whether its encrypted or un-encrypted.
- not-encrypted you just copy into a directory and you and anyone else has full access.
- encrypted, you need to know the passphase the file is encrypted with to have access.
- Both Export and Import the backup wallet.dat the same way, expect one asks for passphase and the other does not.
Make copy of wallet.dat
backupwallet
- Syntax:
./n33bcoin-cli backupwallet /path/to/export/wallet-backup.file
./n33bcoin-cli backupwallet ~/wallet-backup.node3
Stop node 3 and delete wallet.dat
- Stop node - Note: RPC PORT
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 stop
- not gonna delete, just move, only so many times i wanna learn that lesson.
mv ~/.n33bcoin3/wallet.dat ~/oldwallet.dat
- Start Node 3 - this will create a new
wallet.dat
file
./n33bcoind -daemon -datadir=/home/ubuntu/.n33bcoin3 -port=3335 -rpcport=3368
- Check Balance
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getwalletinfo
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getwalletinfo { "walletversion": 130000, "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 0, "keypoololdest": 1744572042, "keypoolsize": 100, "paytxfee": 0.00000000, "hdmasterkeyid": "bb4e27a7896ae19acdf3b43244f82b59f5164c7c" }
- Check addresses
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 listreceivedbyaddress 0 true
- Its a diff/new address, because its a new wallet.
"address": "1JwAmtR9T8xa49daoHQhf54tBdyabby2m2",
Restore Wallet.dat
- Stop Node 3
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 stop
- Move old wallet to Node 3 Directory
- This command will write over the new wallet.dat file currently in directory - in effect deleting it.
mv ~/wallet-backup.node3 ~/.n33bcoin3/wallet.dat
- Start Node 3
./n33bcoind -daemon -datadir=/home/ubuntu/.n33bcoin3 -port=3335 -rpcport=3368
- Check balance
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getbalance
11148007.99990960
OH NUTZ
- By mistake i backed up main wallet.
./n33bcoin-cli backupwallet ~/wallet-backup.node3
- Intended to backup node3 - the correct command would of been
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 backupwallet ~/wallet-backup.node3
Good Thing we just moved the node3 wallet and not deleted or 33 n33bcoins would of been in a dead account.
This is why you should learn about bitcoin on n33bcoins and not the bitcoin main net blockchain.
Lets restore from the moved wallet ~/oldwallet.dat
- Stop node3
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 stop
- Move oldwallet back to node3
mv ~/oldwallet.dat ~/.n33bcoin3/wallet.dat
- Start Node 3
./n33bcoind -daemon -datadir=/home/ubuntu/.n33bcoin3 -port=3335 -rpcport=3368
- Check balance
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getbalance
33.00000000
YAY
Dump Entire Wallet with dumpwallet
- Exports all private keys, addresses, and wallet metadata to a plain text file for a comprehensive backup.
- Syntax
./n33bcoin-cli dumpwallet /path/to/export/n33bcoin-wallet.txt
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 dumpwallet ~/ssshhh.txt
cat ~/ssshhh.txt
- Yep its all in plain text!
# Wallet dump created by N33Bcoin v0.14.3.0-g150612e # * Created on 2025-04-13T22:54:50Z # * Best block at time of backup was 212 (000000009f5f7189bd4334895fd1c903ae904525abb5768feb98b81282a1949e), # mined on 2025-04-13T18:34:02Z # extended private masterkey: xprv9s210pEDlspXiamstilrandotypinhDXRTQ1TatJNSL3fxs9QaLLjRV1FZH9zw2VcErU498hsd3pynuyDR2clongrandome4Msz5 L1XJ0pald6SZXP4sKdVcDETpsdoWeksd4er5hhPsdFG1PPV 2025-04-13T18:14:21Z change=1 # addr=1HtmEDdpk5SJAp3nGCnaAD5gKZc2Er4qG hdkeypath=m/0'/0'/82' about 100 lines like the one above and ends with: # End of dump
Import Dumped Wallet
To test import works we are gonna, stop node3, move wallet.dat, start node3, check new wallet got auto generated again. then import are ssshhh.txt file and see if restored.
Check wallet node 3 pre-test
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getwalletinfo
{ "walletversion": 130000, "balance": 33.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 1, "keypoololdest": 1744575092, "keypoolsize": 101, "unlocked_until": 0, "paytxfee": 0.00000000, "hdmasterkeyid": "0a0e6e94e4a184e773e4a3e3244adc4352935afa" }
Stop node 3
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 stop
Move wallet.dat
mv ~/.n33bcoin3/wallet.dat ~/wallet.node3
Start node 3
./n33bcoind -daemon -datadir=/home/ubuntu/.n33bcoin3 -port=3335 -rpcport=3368
Check wallet node 3 - when deleted/changed
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getwalletinfo
{ "walletversion": 130000, "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 0, "keypoololdest": 1744586216, "keypoolsize": 100, "paytxfee": 0.00000000, "hdmasterkeyid": "b0d8b6b86990cde25bfbc1d1e3e71035bf7c6ed2" }
Import Restore from Dumped Wallet
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 importwallet ~/ssshhh.txt
Check wallet node 3 when restored
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getwalletinfo
{ "walletversion": 130000, "balance": 33.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 1, "keypoololdest": 1744586216, "keypoolsize": 100, "paytxfee": 0.00000000, "hdmasterkeyid": "b0d8b6b86990cde25bfbc1d1e3e71035bf7c6ed2" }
Off Line Storage and Importation
- Create a offline key pair, using a python script that can run off a live linux iso.
- Going to send coins from node 3 to off line address.
- Going to import to wallet 2 by sweeping private wif key.
Create Offline Keypair
- https://www.completenoobs.com/noobs/N33Bcoin_Address_Generator_Bitcoin
- We have used the N33Bcoin_Address_Generator to create the following key pair which we will use for this test.
noob@noob-ThinkPad-T470:~/Gen/py-pub-prv$ python3 gen.py Enter your seed (12 words or any random input): hithere Generated n33bcoin Key Pair: Private Key: 3e4748d72b0a0c5d4538b52a2ade025a0f52a1e8642384ac14e5af0f90b8ab8a Public Key: 04c4cab1795312dafbf2532c7b238d448b55fa151a3d4e059cb49b47fb7244fb8767981b561c067494f9f3a6357024bb4fa71d12d692a733f7a0583d6fa7276548 n33bcoin Address: 13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG WIF Private Key: 5JHiQDRUFhw9HzSJFVmHjzpHDaF7TXP8A5hFDHssVvyQA2yVRTH
Send from node 3 to offline address
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 sendtoaddress 13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG 10
Check its in address
- Can take a few blocks before you can see it.
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 importaddress 13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG "external" false
- Syntax:
./n33bcoin-cli importaddress 13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG "external" false
importaddress
The RPC command to import a Bitcoin address as a watch-only address into the wallet
13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG
The Bitcoin address you are importing. After import, the wallet will monitor this address for incoming transactions, but cannot spend from it since you do not have the private key
"external"
An optional label assigned to the imported address. This helps you organize or identify addresses in your wallet
false
The rescan parameter. Setting it to false means the wallet will not rescan the blockchain for historical transactions involving this address. Only new transactions (after import) will be tracked. If set to true (default), the wallet would scan the entire blockchain for past transactions involving the address, which can take a long time (but not in are case as we have new blockchain).
getreceivedbyaddress
- TESTED - Balance is only shown on account that imported the address as a address to watch.
- Took about 10 mins to show balance.
./n33bcoin-cli -rpcport=3368 -rpcuser=coinuser2 -rpcpassword=coinpassword2 getreceivedbyaddress 13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG
10.00000000
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 getreceivedbyaddress 13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG
0.00000000
./n33bcoin-cli -rpcport=3366 -rpcuser=coinuser -rpcpassword=coinpassword getreceivedbyaddress 13j4do7QupXYPVtgmkkbP2gfe8ETnErrnG
0.00000000
Receive funds from private key
- Current Funds in Node/Wallet 2
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 getbalance
52.00000000
- Import the keys
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 importprivkey 5JHiQDRUFhw9HzSJFVmHjzpHDaF7TXP8A5hFDHssVvyQA2yVRTH true
- Check balance
./n33bcoin-cli -rpcport=3367 -rpcuser=coinuser1 -rpcpassword=coinpassword1 getbalance
62.00000000
Import is instant.
Create Second Server and Sync Blockchain
- Creating second server in a container and forwarded to another VPS IP, to see if network syncs.
Is Port Forwarding Required for the Second Node?
Why set up port forwarding? Port forwarding (using iptables to forward port 3333
to the second node) allows the node to receive incoming connections from other N33Bcoin nodes. This ensures reliable syncing with the main node and enables the second node to share blockchain data with others, strengthening the network.
Is it required?
- To mine: No. Mining uses local RPC calls (
127.0.0.1:3366
) and outbound connections to the main node (104.194.157.52:3333
). As long as the main node is up, mining works without port forwarding. Note: You may need a dummy node to avoid errors. - To act as a peer: Yes. To allow other nodes to connect and sync from the second node (e.g., via
144.172.89.93:3333
), port forwarding is required. Without it, the node can sync but won’t serve blocks to others.
Tip: Keep port forwarding enabled for robust syncing and to support the N33Bcoin network, especially if you plan to add more nodes.
Launch container
lxc launch ubuntu:18.04 n33b-node
lxc exec n33b-node bash
pro attach <longKey>
apt update && apt upgrade -y && apt install ubuntu-advantage-tools wireguard -y
Setup Wireguard
- This is the same as the last time, in this tut i am going to keep the same keys in tut, to save time. PS: You can use same keys on many connections (not the best idea).
Create Directory for Keys
mkdir ~/wireguard
- As we are logged in as root this path will be /root/wireguard
cd ~/wireguard
Generate the private and public keys
umask 077
- umask 077 sets the most restrictive default file permissions, allowing access only to the file's owner.
wg genkey | tee privatekey | wg pubkey > publickey
- This will create two files, privatekey and publickey, in the ~/wireguard directory.
- The Private key will be used for the Client Wireguard Config file
cat privatekey
=kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08=
- The Public key will be used for the Server Wireguard Config File
cat publickey
=o/gsEsee7FfFFvzQI9OdD3LvHYu3CkRobeZcpbjM6n0=
- The Config file for wireguard is located in the
/etc/wireguard/
directory- Both Client and Server config file will be stored in this directory path.
/etc/wireguard/wg0.conf
Template of a /etc/wireguard/wg0.conf
file:
[Interface] PrivateKey = <client_private_key> # Client's private key Address = 10.0.0.2/24 # Client's IP address in the VPN [Peer] PublicKey = <server_public_key> # Server's public key Endpoint = <server_ip>:51820 # Server's IP and WireGuard port AllowedIPs = 0.0.0.0/0 # Route all traffic through the VPN PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
$EDITOR /etc/wireguard/wg0.conf
- Append your Client Private Key
PrivateKey = kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08=
- Append your servers IP address
Endpoint = 12.34.56.78:51820
[Interface] PrivateKey = kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08= # Client's private key Address = 10.0.0.2/24 # Client's IP address in the VPN [Peer] PublicKey = <server_public_key> # Server's public key Endpoint = 12.34.56.78:51820 # Server's IP and WireGuard port AllowedIPs = 0.0.0.0/0 # Route all traffic through the VPN PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
- Will Append Server Public Key Later
FireWall Notes:
- My host and container do not have firewalls setup
- If they did, we would allow port 51820 udp
Enable IP forwarding to allow traffic to pass through the VPN server:
$EDITOR /etc/sysctl.conf
- uncomment line 28
#net.ipv4.ip_forward=1
Save and Exit
sysctl -p
- DO NOT ENABLE WIREGUARD YET!
- Need to setup server and return to append/complete the client config before enabling wireguard.
Server Setup
First login to your server, update and reboot
ssh root@12.34.56.78
apt update && apt upgrade -y && reboot
Give it a minute or two and log back into server.
Auto Update Server
- You may want to apply auto updates to your server.
- https://www.completenoobs.com/noobs/Ubuntu_unattended-upgrades
Firewall
- Check if firewall enabled - it should be by default on server
ufw status
- At this stage we are just going to allow 22 are ssh port and 51820 the port wireguard uses by default.
Will return
Status: inactive
If inactive Or the rules applied if enabled
Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6)
If not enabled already make sure you allow port 22 for your ssh first
ufw allow 22/tcp
- check with
ufw status
now we can enable - If not already enabled.
ufw enable
Allow the Wireguard port 51820:
ufw allow 51820/udp
This would do for now - we will do the rest once wireguard up and running.
If you Entered wrong port number and would like to change/delete rule:
First check current rules.
ufw status
delete a UFW rule you made by mistake.
ufw delete allow 433/tcp
Or you can use a numbered rule list.
ufw status numbered
Will list rules by number.
ufw delete <RULE_NUMBER>
ufw delete 2
Now re-enter rule to allow correct port number and protocol.
Installing wireguard
- Install wireguard on server
apt install wireguard
Create directory for wireguard keys
- create directory for keys
mkdir ~/wireguard
cd ~/wireguard
- Set File permissions
umask 077
- Generate Public and Private Keys
wg genkey | tee privatekey | wg pubkey > publickey
- See Pub Key
cat publickey
= VASQkU11QiXNkDxm2B6M9f2jnV9UUhjHV7E21XQleiA=
- See Priv key
cat privatekey
= 0FDqowMNvNFQ3d8+phQs3a4zDYEggmgeML1uin08M1w=
Find your network interface name on Server
- Find your network interface name on Server using the following command:
ip -o -4 route show to default | awk '{print $5}'
- Returns:
enp1s0
- Note you network interface name for the
/etc/wireguard/wg0.conf
file.- Your network interface name might be called something else like eth0 note this and replace where you see enp1s0 in the servers wg0.conf file.
Server Wireguard /etc/wireguard/wg0.conf
Template
[Interface] Address = 10.0.0.1/24 # Replace with the IP address/subnet you want to use for the VPN ListenPort = 51820 # Default WireGuard port PrivateKey = <server_private_key> # Replace with the contents of your privatekey file # (Optional) Save configuration on shutdown SaveConfig = true # Change '''enp1s0''' to your network interface on both lines. ## To see your servers network interface use this command: ## ip -o -4 route show to default | awk '{print $5}' PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o enp1s0 -j MASQUERAD [Peer] PublicKey = <client_public_key> # Replace with the public key of the client AllowedIPs = 10.0.0.2/32 # The IP address that the client will use PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
Details we need to append to are /etc/wireguard/wg0.conf
- <server_private_key>: Replace this with the contents of your privatekey file.
- <client_public_key>: Replace this with the public key from the client device that will connect to this server.
- AllowedIPs: Specifies which IP addresses are allowed to use this connection. This typically includes the client’s WireGuard IP and any subnets you want to route.
- enp1s0 If your network interface name is diff then change/correct on both lines
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o <INTERFACE_NAME> -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o <INTERFACE_NAME> -j MASQUERAD
Create are /etc/wireguard/wg0.conf
file for Server
$EDITOR /etc/wireguard/wg0.conf
[Interface] Address = 10.0.0.1/24 # Replace with the IP address/subnet you want to use for the VPN ListenPort = 51820 # Default WireGuard port PrivateKey = 0FDqowMNvNFQ3d8+phQs3a4zDYEggmgeML1uin08M1w= # Replace with the contents of your privatekey file # (Optional) Save configuration on shutdown SaveConfig = true PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o enp1s0 -j MASQUERAD [Peer] PublicKey = o/gsEsee7FfFFvzQI9OdD3LvHYu3CkRobeZcpbjM6n0= # Replace with the public key of the client AllowedIPs = 10.0.0.2/32 # The IP address that the client will use PersistentKeepalive = 25 # Send a keepalive packet every 25 seconds
Save and Exit, that should be all done.
Enable IP forwarding to allow traffic to pass through the VPN server
vi /etc/sysctl.conf
- uncomment line 28
#net.ipv4.ip_forward=1
Save and Exit
sysctl -p
The Server Side is now ready.
- Start the WireGuard interface:
wg-quick up wg0
- Enable WireGuard to start on boot:
systemctl enable wg-quick@wg0
We are now done with server, can go back to client.
Back in container
NOTE: This is for the lxc container and not the host
- edit and append the server public key to /etc/wireguard/wg0.conf
$EDITOR /etc/wireguard/wg0.conf
[Interface] PrivateKey = kPL8S4y1GJPMTqqNhoD31+qjsEbM3jIcGWNhRtS8J08= # Client's private key Address = 10.0.0.2/24 # Client's IP address in the VPN [Peer] PublicKey = VASQkU11QiXNkDxm2B6M9f2jnV9UUhjHV7E21XQleiA= # Server's public key Endpoint = 12.34.56.78:51820 # Server's IP and WireGuard port AllowedIPs = 0.0.0.0/0 # Route all traffic through the VPN PersistentKeepalive = 25
- now hopefully all good lets start wireguard and test
wg-quick up wg0
- This command should return the IP of the Server
curl ifconfig.me
- If container returns same IP as server :) we are good to go, enable wireguard on startup.
systemctl enable wg-quick@wg0
Now we have a Public IP for are Coin, lets return to host and finish are coin.
Back to Server
Lets finish the firewall rules on are server.
Now to allow the ports we are going to be using:
- Main Net default port 3333
ufw allow 3333/tcp
- Test Net default port 13333
ufw allow 13333/tcp
- Reg Net default port 13337
ufw allow 13337/tcp
- RPC ports
- Main Net 3366
ufw allow 3366/tcp
- Test Net 12333
ufw allow 12333/tcp
- Reg Net 12345
ufw allow 12345/tcp
Now we are going to forward these ports to our container on the other end of WireGuard:
- Need to do these for each port, but for now just the MainNet port 3333 others will be used on other nodes.
sudo iptables -t nat -A PREROUTING -p tcp -d <SERVER_PUBLIC_IP> --dport <PORT_NUMBER> -j DNAT --to-destination <WIREGUARD_CLIENT_IP>:<PORT_NUMBER>
sudo iptables -A FORWARD -p tcp -d <WIREGUARD_CLIENT_IP> --dport <PORT_NUMBER> -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
- Example: Allowing Main Net port 3333 to forward from container to server.
- SERVER_PUBLIC_IP: 12.34.56.78 (place holder)
- WIREGUARD_CLIENT_IP: 10.0.0.2 (This can be found on your Client/Containers /etc/wireguard/wg0.conf file "Address = 10.0.0.2/24 # Client's IP address in the VPN")
- PORT_NUMBER: 3333
sudo iptables -t nat -A PREROUTING -p tcp -d 12.34.56.78 --dport 3333 -j DNAT --to-destination 10.0.0.2:3333
sudo iptables -A FORWARD -p tcp -d 10.0.0.2 --dport 3333 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
- Make the iptables rules persistent across reboots
sudo apt install iptables-persistent
sudo iptables-save > /etc/iptables/rules.v4
In Container Building N33Bcoin
- Push over N33Bcoin.0.0.1.tar.gz to the container n33b-node.
lxc file push N33Bcoin.0.0.1.tar.gz n33b-node/home/ubuntu/
OR Download from github
- Download from Github, sha256sum=
0695dceaa4a88967560695f92c753d2fe4abc0f1b0cfb2673bf945fc83fb1225
wget https://raw.github.com/CompleteNoobs/N33Bcoin/main/N33Bcoin.0.0.1.tar.gz
- Login to container as user ubuntu
lxc exec n33b-node -- su - ubuntu
- extract
tar xvf N33Bcoin.0.0.1.tar.gz
Install depends and Build and Install Berkeley DB
- In the Container - as user 'ubuntu' in /home/ubuntu directory.
sudo apt update && sudo apt upgrade -y
sudo apt install build-essential
sudo apt install autoconf libtool pkg-config libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libevent-dev libcanberra-gtk-module libdb++-dev qtbase5-dev qt5-qmake libdb-dev libdb++-dev -y
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
sha256sum db-4.8.30.NC.tar.gz
- hash should return:
12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
tar -xf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
export BDB_PREFIX=$(pwd)
../dist/configure --disable-shared --enable-cxx --with-pic --prefix=$BDB_PREFIX CXXFLAGS="-fno-builtin-__atomic_compare_exchange"
Try the build:
make
sudo make install
Build N33Bcoin
- Make sure in correct path/directory
cd ~/N33Bcoin
./autogen.sh
./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/"
- Note:
-j3
will use 3 cores (i have 4 cores), you can use justmake
(will use 1 core) or any amount of cores you want from system
make -j3
- Before running - make sure first node up and running
Troubleshooting Syncing Issues on the Second Node
If your second node (e.g., 144.172.89.93
) fails to sync (e.g., stuck at blocks: 0
), the main node (104.194.157.52
) may be in Initial Block Download (IBD), preventing it from serving blocks. Here’s what I faced and how I fixed it:
- Problem: The second node didn’t sync because the main node was in IBD, likely due to a chain tip older than 24 hours.
- Initial Fix:
- Started a dummy node on the main node (
127.0.0.1:3334
) for an active peer . - Mined on the main node:
minerd -a sha256d -o http://127.0.0.1:3366 -u coinuser -p coinpassword --coinbase-addr=<your-address> -t 2
This created new blocks (e.g., toblocks: 441
), exiting IBD and enabling sync.
- Started a dummy node on the main node (
- Test: I deleted the second node and recreated it from scratch, running both the main and dummy nodes on the genesis server. The second node synced to
blocks: 441
while the main node was mining. - Observation: In one test, I thought syncing worked without mining, but mining was active on the main node, advancing the chain to
blocks: 441
. Possible factors for sync success:- Recent chain tip from mining kept the main node out of IBD.
- Dummy node provided a peer, preventing IBD re-entry.
- iptables rule for port
3333
enabled inbound connections (i did once not forward the correct port, make sure you check your ip rules withcat /etc/iptables/rules.v4
to make sure you entered the correct ones. ).
- If Syncing Fails: Mine on the main node with the dummy node running.
Note: Syncing may not require ongoing mining if the main node’s chain tip is recent, but mining is needed to exit IBD. Test and share your findings!
Warning: If the second node won’t sync, the main node may be in IBD. Start the dummy node and mine to exit IBD.
n33b-node
src/n33bcoind -daemon
src/n33bcoin-cli stop
$EDITOR ~/.n33bcoin/n33bcoin.conf
rpcuser=coinuser rpcpassword=coinpassword rpcallowip=127.0.0.1 rpcport=3366 daemon=1 server=1 rpcbind=127.0.0.1 debug=rpc debug=mining
src/n33bcoind
- Now Second n33bcoin node is running lets check sync
src/n33bcoin-cli getpeerinfo
[ { "id": 0, "addr": "104.194.157.52:3333", "addrlocal": "144.172.89.93:52636", "services": "000000000000000d", "relaytxes": true, "lastsend": 1745157772, "lastrecv": 1745157771, "bytessent": 1277, "bytesrecv": 1198, "conntime": 1745157770, "timeoffset": 0, "pingtime": 0.303657, "minping": 0.303657, "version": 70015, "subver": "/Satoshi:0.14.3/", "inbound": false, "addnode": false, "startingheight": 441, "banscore": 0, "synced_headers": 441, "synced_blocks": 441, "inflight": [ ], "whitelisted": false, "bytessent_per_msg": { "addr": 110, "feefilter": 32, "getaddr": 24, "getheaders": 701, "headers": 106, "ping": 32, "pong": 32, "sendcmpct": 66, "sendheaders": 24, "verack": 24, "version": 126 }, "bytesrecv_per_msg": { "addr": 55, "feefilter": 32, "getheaders": 701, "headers": 106, "ping": 32, "pong": 32, "sendcmpct": 66, "sendheaders": 24, "verack": 24, "version": 126 } }, { "id": 1, "addr": "104.194.157.52:57050", "addrlocal": "144.172.89.93:3333", "services": "000000000000000d", "relaytxes": true, "lastsend": 1745157771, "lastrecv": 1745157771, "bytessent": 1198, "bytesrecv": 1222, "conntime": 1745157770, "timeoffset": 0, "pingtime": 0.296047, "minping": 0.296047, "version": 70015, "subver": "/Satoshi:0.14.3/", "inbound": true, "addnode": false, "startingheight": 441, "banscore": 0, "synced_headers": 441, "synced_blocks": 441, "inflight": [ ], "whitelisted": false, "bytessent_per_msg": { "addr": 55, "feefilter": 32, "getheaders": 701, "headers": 106, "ping": 32, "pong": 32, "sendcmpct": 66, "sendheaders": 24, "verack": 24, "version": 126 }, "bytesrecv_per_msg": { "addr": 55, "feefilter": 32, "getaddr": 24, "getheaders": 701, "headers": 106, "ping": 32, "pong": 32, "sendcmpct": 66, "sendheaders": 24, "verack": 24, "version": 126 } }, { "id": 2, "addr": "104.194.157.52:57060", "addrlocal": "144.172.89.93:3333", "services": "000000000000000d", "relaytxes": true, "lastsend": 1745157771, "lastrecv": 1745157771, "bytessent": 1198, "bytesrecv": 1222, "conntime": 1745157770, "timeoffset": 0, "pingtime": 0.316404, "minping": 0.316404, "version": 70015, "subver": "/Satoshi:0.14.3/", "inbound": true, "addnode": false, "startingheight": 441, "banscore": 0, "synced_headers": 441, "synced_blocks": 441, "inflight": [ ], "whitelisted": false, "bytessent_per_msg": { "addr": 55, "feefilter": 32, "getheaders": 701, "headers": 106, "ping": 32, "pong": 32, "sendcmpct": 66, "sendheaders": 24, "verack": 24, "version": 126 }, "bytesrecv_per_msg": { "addr": 55, "feefilter": 32, "getaddr": 24, "getheaders": 701, "headers": 106, "ping": 32, "pong": 32, "sendcmpct": 66, "sendheaders": 24, "verack": 24, "version": 126 } } ]
src/n33bcoin-cli getblockchaininfo
ubuntu@n33b-node:~/N33Bcoin$ src/n33bcoin-cli getblockchaininfo { "chain": "main", "blocks": 441, "headers": 441, "bestblockhash": "0000000062cd06f3080c9bf30d15506fe6c20869e8cbc88217c99e389952a8ef", "difficulty": 1, "mediantime": 1745152094, "verificationprogress": 0.03058041491289009, "chainwork": "000000000000000000000000000000000000000000000000000001ba01ba01ba", "pruned": false, "softforks": [ { "id": "bip34", "version": 2, "reject": { "status": true } }, { "id": "bip66", "version": 3, "reject": { "status": true } }, { "id": "bip65", "version": 4, "reject": { "status": true } } ], "bip9_softforks": { "csv": { "status": "defined", "startTime": 0, "timeout": 9999999999, "since": 0 }, "segwit": { "status": "defined", "startTime": 0, "timeout": 9999999999, "since": 0 } } }
From first node
./n33bcoin-cli getblockchaininfo { "chain": "main", "blocks": 441, "headers": 441, "bestblockhash": "0000000062cd06f3080c9bf30d15506fe6c20869e8cbc88217c99e389952a8ef", "difficulty": 1, "mediantime": 1745152094, "verificationprogress": 0.02034601825250813, "chainwork": "000000000000000000000000000000000000000000000000000001ba01ba01ba", "pruned": false, "softforks": [ { "id": "bip34", "version": 2, "reject": { "status": true } }, { "id": "bip66", "version": 3, "reject": { "status": true } }, { "id": "bip65", "version": 4, "reject": { "status": true } } ], "bip9_softforks": { "csv": { "status": "defined", "startTime": 0, "timeout": 9999999999, "since": 0 }, "segwit": { "status": "defined", "startTime": 0, "timeout": 9999999999, "since": 0 } } }
- Both nodes/blockchains are in sync, nice