Windows 10 VirtualBox N33Bcoin

From CompleteNoobs
Revision as of 21:49, 21 April 2025 by AwesomO (talk | contribs) (Created page with "==Installing Virtual box in windows 10 == ===depends on c++=== https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version * https://aka.ms/vs/17/release/vc_redist.x64.exe ===VirtualBox and extension pack=== https://www.virtualbox.org/wiki/Downloads * https://download.virtualbox.org/virtualbox/7.1.8/VirtualBox-7.1.8-168469-Win.exe * https://download.virtualbox.org/virtualbox/7.1.8/Oracle_Virtu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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:
https://creativecommons.org/share-your-work/public-domain/cc0

The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.

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.

Installing Virtual box in windows 10

depends on c++

https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version

VirtualBox and extension pack

https://www.virtualbox.org/wiki/Downloads

Ubuntu 1804 iso

https://cdimage.ubuntu.com/ubuntu-mate/releases/18.04/release/

Windows open ports pass firewall

  • Run "PowerShell" As Administrator
netsh advfirewall firewall add rule name="N33Bcoin Mainnet" dir=in action=allow protocol=TCP localport=3333

netsh advfirewall firewall add rule name="N33Bcoin Testnet" dir=in action=allow protocol=TCP localport=13333

  • verify with:
netsh advfirewall firewall show rule name="N33Bcoin Mainnet"

netsh advfirewall firewall show rule name="N33Bcoin Testnet"

Install Ubuntu 1804 in VirtualBox

Did unattended install with 2GB ram and 25gb HD.

  • NOTE: you may want to change display resolution. MENU (TOP RIGHT) > Preferences > Displays

Your going to want Ubuntu pro.

  • Ubuntu pro is free for upto 5 boxes/installs running at once

Sign up to ubuntu and on the https://ubuntu.com/pro/dashboard you will see a long token Like:K34ssudkjVFe5334sDF For some reason when installing through VirtualBox Unattended install user is not in the sudo group and cannot use sudo.

  • which to root user

su root

  • Adduser to sudoers

adduser vboxuser sudo

  • Need to update and upgrade before adding pro

apt update && apt upgrade -y

  • Upgrade 1804 to PRO for updates - Recommended Step, not required.

pro attach YOUR_LONG_TOKEN

  • again after pro, update & upgrade & restart

apt update && apt upgrade -y && reboot

Installing depends to build coin

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

Download N33Bcoin

  • Now thats done we can carry on

cd ~/

  • Download N33Bcoins

wget https://raw.github.com/CompleteNoobs/N33Bcoin/main/N33Bcoin.0.0.1.tar.gz

  • Check Sum should return:0695dceaa4a88967560695f92c753d2fe4abc0f1b0cfb2673bf945fc83fb1225

sha256sum N33Bcoin.0.0.1.tar.gz

  • 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: -j2 will use 2 cores (i have 4 cores with 2 in the vm), you can use just make (will use 1 core) or use any amount of cores you want from system with -j<number>

make -j2

Start Coin and Config

  • Start node

src/n33bcoind -daemon

If you forgot to include -daemon:

The -daemon will have n33bcoind run in background, as a daemon. If you did not include you can use the kill command to close.

  • ps aux | grep n33bcoin
vboxuser  12345  1.0  0.5 123456 7890 ?  S  12:00  0:01 src/n33bcoind
  • kill -9 <number>
  • stop node

src/n33bcoin-cli stop

  • $EDITOR is a place holder for an editor of your choice - use nano or can be done in gui with pluma

$EDITOR ~/.n33bcoin/n33bcoin.conf

rpcuser=coinuser
rpcpassword=coinpassword
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
rpcport=3366
daemon=1
server=1
addnode=node.n33b.com:3333
  • Note: once daemon=1 is included in n33bcoin.conf, you no longer need to append -daemon

src/n33bcoind

  • Get address

src/n33bcoin-cli getnewaddress

Install n33bcoin

  • Installing n33bcoin means we no longer are required to use path
  • Make sure you are in correct path:

cd ~/N33Bcoin/

  • Install n33bcoin

sudo make install

mining

sudo apt install -y build-essential libcurl4-openssl-dev git

cd ~

git clone https://github.com/pooler/cpuminer.git

cd cpuminer

./autogen.sh

./configure

make

sudo make install


  • OK lets mine us some coins
    • Syntax:minerd -o <pool_url> -u <username> -p <password> --coinbase-addr=<public_key>

minerd -a sha256d -o http://127.0.0.1:3366 -u coinuser -p coinpassword --coinbase-addr=19S2thMqbYhwB6doLYQamStkzEyuqZs5Yn

  • Generate your own address (don’t use the example 19S2thMqbYhwB6doLYQamStkzEyuqZs5Yn)


  • YAY, back to the days when you could find bitcoin blocks with a simple CPU

Wallet Basics

Get Balance

  • getbalance

n33bcoin-cli getbalance

  • If you found a block, it will me immature for another 100 blocks, but you can see them in your immature_balance by using getwalletinfo
    • immature_balance: Mined coins not yet spendable (wait for 100 confirmations).
  • getwalletinfo

n33bcoin-cli getwalletinfo

list 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

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
  • 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"
  }
]

Address With Label

  • Create New Address With Label
    • Syntax: getnewaddress "<Label>"
  • 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>"