Lab 2 Details for MPCS 56600

Each lab will consist of a small problem and details of how to proceed. Each lab is intended to give every student hands-on experience with the core concepts and technologies covered during the course.  A student may concentrate, as a team member, on one technology over another for the final project, but labs are designed to give each and every student exposure to all the technologies that come into play.  You need to submit labs to the TAs for grading--see submission instructions below.  Generally, unless otherwise specified, you will have one week to complete each assigned lab.

See the syllabus for information on grading.  Turning in lab assignments on time is required, without exception, and all late deliveries will be penalized, regardless of cause.  Submit your assignments to the subversion repository according to the directions on the syllabus page.

You may write these solutions in any programming language of your choice.  Our suggestion is now is not the time to learn a new programming language along with the concepts themselves.  So our suggestion is to use whatever programming language you  know best.

Lab 2   Due: 4:00 pm, Tuesday, June 25, 2024

System Setup and Software Installation (Continued): 

BACKGROUND:

Like all programming problems, learning a new technology is not an exercise in reading but rather an exercise in thinking and typing.  This lab is designed to help you install the bitcoin core software we will be using throughout the course.  You will generally find the References section below helpful in addition to the required and recommended reading. 

This lab has no specific deliverable, and is not graded.

WHAT YOU NEED TO DO:

STEP 1:  Installing the Bitcoin Explorer toolset

For this, you will need to do several things to prepare your machine for building Bitcoin Explorer.  Again, these instructions will be for the Mac.  If you are running Linux, the commands will be very similar, but, depending on your particular flavor (e.g., ubuntu), you will likely need to run some apt gets, but your installation will generally be simpler.  Skip down to "Install Bitcoin Explorer."  Write piazza if you have questions.

On the Mac, the first thing to do is to make sure brew is installed.

Type:

$ brew -v

Hopefully, you will see something like this:

Homebrew 2.0.6
Homebrew/homebrew-core (git revision 4516e; last commit 2019-04-01)

If you don't, you'll need to install brew.  Go here and follow the simple instruction to "Install Homebrew". 

Now, install some brewskies.  Do the following:

brew install automake berkeley-db4 libtool miniupnpc openssl pkg-config protobuf qt libevent python3
brew install boost
brew install jq zmq wget

For the above, although slightly dated, you might find this site somewhat helpful.

Next, you will need to make sure you have installed XCode's common unix utilties. 

To do this, install xcode-select (this site may be helpful) with this command:

xcode-select --install


STEP 1 Linux/Debian/Ubuntu/Xubuntu aptitude equivalent

# basic requirements
apt-get install g++ python3 git
apt-get install automake libtool pkg-config miniupnpc openssl      
apt-get install libboost-all-dev                                   
apt-get install curl
apt-get install wget
# more specific
apt-get install libevent-dev                                       
apt-get install jq                                                 
apt-get install libzmq3-dev                                      
# heavier and more specific
apt-get install libdb5.3                                          
apt-get install protobuf-compiler                                  
apt-get install qtcreator 
	  


STEP 2 Install Bitcoin Explorer

Download Bitcoin Explorer from the github site here.  Scroll down in the web page until you come to instructions on installing.  Note there are several ways to install, one, building from scratch (instructions are there for Mac, Linux, and Windoze), second, using brew to install (on Mac).  Let's use brew to install Bitcoin Explorer.  (Linux/Windoze users simply follow the instructions on the web page for your OS).  Mac users, execute:

brew install bx

If all goes well, type the following:

bx | head

You should see the following:

Usage: bx COMMAND [--help]

Version: 3.4.0

and a list of the bx commands.  That's all good.


STEP 2 Linux/Debian/Ubuntu/Xubuntu equivalent - compile from source

# install libbitcoin with one, big .sh install file.
$ wget https://raw.githubusercontent.com/libbitcoin/libbitcoin/version3/install.sh
$ chmod +x install.sh
$ sudo   ./install.sh

# ... then, install bx
$ git clone https://github.com/libbitcoin/libbitcoin-explorer.git
$ cd libbitcoin-explorer
$    ./autogen.sh
$    ./configure
$    make
$    sudo make install
	  

References:

You may find the following references helpful (in addition to the links from previous labs):

Installing Bitcoin Core on ubuntu:  https://bitzuma.com/posts/getting-started-with-bitcoin-core-on-ubuntu/, and:  https://linuxhint.com/install-bitcoin-core-ubuntu/
Installing Bitcoin Core on Windoze:  https://www.deepdotweb.com/2017/05/05/tutorial-start-full-bitcoin-node-windows/
Blockchain Information (Bitcoin): https://blockchain.info
Coindesk Blockchain 101: https://www.coindesk.com/information/
Bitcoin Wiki:  https://en.bitcoin.it/wiki/Main_Page
Bitcoin FAQ: https://en.bitcoin.it/wiki/Help:FAQ
Bitcoin Developer’s Reference: https://bitcoin.org/en/developer-reference

Submission:

For Labs:

Each student should submit their LabN files and any supporting materials to the repo. Please include a README text file that contains any instructions or additional details for the TAs to assist with grading.

Setup:

When you open the invitation URL in a browser tab, you will have to complete the following steps:

Github may ask you to grant permission for GitHub Classroom to have access to your GitHub account. If you are asked this question, you should say yes and grant access to Github Classroom.

You must click “Accept this assignment” or your repository will not actually be created. Do not skip this step!

If you run into any issues, please ask for help on Ed.