Bitcoin Forum
June 19, 2019, 06:15:42 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] Distributed EXchange VM on your laptop: obelisk + mastercoin-tools + UI  (Read 1410 times)
grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
May 13, 2014, 02:18:35 PM
 #1

A local VM of masterchain.info can run on your laptop: obelisk + mastercoin-tools + UI

Now you can play with the bitcoin 2.0 distributed exchange of masterchain.info web hybrid wallet (https://bitcointalk.org/index.php?topic=583370.0) locally on your laptop
Install it via virtualbox.

The vm image (a.k.a appliance) is available for download on:
https://masterchain.info/downloads/mint2b.ova (open virtualization format version 1.0)
or using zsync:
zsync http://obelisk.secseq.com/mint2b.ova.zsync
md5sum:
143b942d8f114e510995fcbe7f605e40  mint2b.ova
size: 1440306688

Import the appliance to VirtualVox.
you may need to enable vboxnet0 (see http://islandora.ca/content/fixing-missing-vboxnet0 ) if virtual box complains on missing vboxnet0.

and access your local fresh webserver:
http://192.168.56.102 (or 101).
it will look and function exactly like masterchain.info
you will have all wallet features, including transactions creations for send/sell/accept

you can ssh dev@192.168.56.102
password dev

Code:
# to update mastercoin-tools and masterchain-world to the latest version
cd ~/masterchain-mint2b/mastercoin-tools
git pull
cd ~/masterchain-mint2b/masterchain-world
git pull

Code:
# to sync parse and validate using obelisk *once*
cd ~/masterchain-mint2b/mastercoin-tools/
sh msc_cron.sh
# make sure to clean the locks before on /tmp/m*.lock
# it may take long minutes depending on your bandwidth to the obelisk,
# how busy the obelisk is, and how many blocks behind your parsing setup is

Warning: there is no firewall and no security measures were taken (including default password), so if you expose the appliance on the Internet - make sure to fix that!

---------------------------------------------------------------------------------------------------------------------------------------------------------------------
If you want to create the appliance yourself from scratch (or just interested how I made it), scroll down and follow instructions:


v
v
v
v
v


v
v
v
v


v
v
v


v
v


v




clean install ubuntu-14.04-server-amd64.iso on virtualbox
100GB disk, 1GB RAM
NIC1 - default (NAT)
NIC2 - Host-only Adapter (will be 192.168.56.102 or 101)

user: dev
password: dev

Code:
apt-get update
apt-get upgrade
apt-get install wget git ssh vim tmux zsync nginx python-simplejson python-ecdsa python-setuptools python-git uwsgi uwsgi-plugin-python
git clone https://github.com/richardkiss/pycoin.git
cd pycoin
sudo python setup.py install
cd
mkdir masterchain-mint2b
cd mastechain-mint2b
git clone https://github.com/grazcoin/mastercoin-tools.git
git clone https://github.com/masterchain/masterchain-world.git
cd
wget https://raw.githubusercontent.com/spesmilo/sx/master/install-sx.sh
sudo sh install-sh.sh

# update/add files (already available inside the vm):
/etc/nginx/sites-available/default
/etc/rc.local
~/scripts/killtree.sh
~/worker1/worker.cfg
~/.sx.cfg (to external server)
~/.tmux.conf
~/masterchain-mint2b/mastercoin-tools/msc_compare.py
~/masterchain-mint2b/mastercoin-tools/msc_compare_cron.sh

Code:
# prepare directory for web app logs
sudo mkdir /var/log/masterchain
sudo chown dev:dev /var/log/masterchain

Code:
# update some symlinks
cd ~/masterchain-mint2b/masterchain-world/www
rm -rf general addr
ln -s ../../mastercoin-tools/general
ln -s ../../mastercoin-tools/addr
ln -s ../../mastercoin-tools/tx
ln -s ../../mastercoin-tools/offers
ln -s ../../mastercoin-tools/mastercoin_verify
ln -s ../../mastercoin-tools/currencies.json
ln -s ../../mastercoin-tools/values.json
ln -s ../../mastercoin-tools/revision.json
cd mastercoin_verify/addresses
# for backward compat:
ln -s 1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P-1 0
ln -s 1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P-2 1

Code:
# to sync last state from masterchain.info (recommended at least once, or if some major parsing change was done).
cd ~/masterchain-mint2b/mastercoin-tools/
wget https://masterchain.info/downloads/
tar xfz masterchain-snapshot.tar.gz
rm masterchain-snapshot.tar.gz


If you are also into playing ...... so continue below:

Code:
# for a full obelisk node that runs locally:
# retrieve a snapshot of the blockchain on your host:
# zsync http://obelisk.secseq.com/obelisk_blockchain.tar.zsync
# extract it:
# tar xf obelisk_blockchain.tar
# copy it into virtualbox
# scp -dpr blockchain dev@192.168.1.102:worker1/
# run the obelisk
cd ~/worker1
obworker

# update .sx.cfg with
service = "tcp://localhost:9091"

Code:
# to run a consensus checker:
sh msc_compare_cron.sh
# and check results on
# http://192.168.56.102/general/MSC-difference.txt

# to start parsing from a specific block (e.g. 300000)
python msc_parse.py -r ~/masterchain-mint2b/mastercoin-tools -s 300000 > parsed.log

# to validate without bitcoin balance
python msc_validate -d -b > validated.log


1560968142
Hero Member
*
Offline Offline

Posts: 1560968142

View Profile Personal Message (Offline)

Ignore
1560968142
Reply with quote  #2

1560968142
Report to moderator
1560968142
Hero Member
*
Offline Offline

Posts: 1560968142

View Profile Personal Message (Offline)

Ignore
1560968142
Reply with quote  #2

1560968142
Report to moderator
1560968142
Hero Member
*
Offline Offline

Posts: 1560968142

View Profile Personal Message (Offline)

Ignore
1560968142
Reply with quote  #2

1560968142
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1560968142
Hero Member
*
Offline Offline

Posts: 1560968142

View Profile Personal Message (Offline)

Ignore
1560968142
Reply with quote  #2

1560968142
Report to moderator
1560968142
Hero Member
*
Offline Offline

Posts: 1560968142

View Profile Personal Message (Offline)

Ignore
1560968142
Reply with quote  #2

1560968142
Report to moderator
grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
May 13, 2014, 02:20:42 PM
 #2

reserved

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!