C 312: Joining Samchain (15 pts.)

What you need:

Joining Samchain

in a Terminal, execute this command:
multichaind samchain@chain.samsclass.info:4414 -daemon
The node joins the blockchain, as shown below.

Configuring RPC

On your Ubuntu server, in a Terminal, execute these commands:
cat ~/.multichain/samchain/multichain.conf
grep rpc-port ~/.multichain/samchain/params.dat
You see the username, password, and port number, as shown below.

Now you need to enter those credentials into the GUI configufation file.

Execute this command:

sudo nano /var/www/html/multichain-web-demo/config.txt
Enter the port and password into this file, adding five new lines, as shown below.

Adjust the port number and password to the correct values.

another.name=Samchain
another.rpchost=127.0.0.1
another.rpcport=4415
another.rpcuser=multichainrpc
another.rpcpassword=3Spvm1qsMg21mEoqd42dZFLa1uD7g1bQE2FZCAmoLTQQ

To save the file, press Ctrl+X, Y, Enter.

Using the GUI

In a Web browser, open the GUI controlling your multichain node.

At the top left, click "Multichain Demo".

A list of available chains appears, as shown below. Click Samchain.

You see basic information about the Samchain, as shown below.

Note your address, on the right side. When I did it, my address began with "1Mo", as shown below.

Viewing Your Permissions

In the GUI, at the top, click Permissions.

On the left side, in the "Current Permissions" section, the first entry shows your permissions: "none", as shown below.

Getting Permissions

Open a new browser tab and go to

http://chain.samsclass.info/samcoin.htm

Enter your address in the "Grant" section, as shown below, and click SUBMIT.

The next page shows the "curl" command used to grant those permissions, and its result. The command succeeded, returning an "error" field of "null", as shown below.

Click your browser's Back button to return to the Samcoin Blockchain page.

Viewing Your Permissions

In your node's GUI, at the top, click Permissions.

Now you have send and receive permissions, as shown below.

Getting a Samcoin

In the Samcoin Blockchain page, enter your address in the "Faucet" section, as shown below, and click SUBMIT.

The next page shows the "curl" command used to grant those permissions, and its result.

Viewing Your Balance

In the GUI, at the top, click Send.

Now you have one Sampenny, as shown below.

Getting More Sampennies

Use the "Get Five Sampennies!" form twice, as shown below.

Now your balance should be 11 Sampennies, as shown below.

Performing an Atomic Exchange Transaction

Enter your address into the "Atomic Exchange" form as shown below. Click SUBMIT.

On the next page, highlight and copy the blob of hexadecimal text, as shown below.

In the GUI, at the top, click Accept.

Paste the blob of text into the "Offer hexadecimal" field. Click"Decode Offer".

The offer will exchange ten sampennies for one samdime, as shown below.

Click "Complete Offer". Now you have a samdime, as shown below.

Reading a Stream

In the GUI, at the top, click "View Streams".

In the "Flag" stream, click the Subscribe button, as shown below.

Click Flag, as shown below.


C 312.1: Reading a Stream (15 pts)

Find the flag, which is covered by a green box in the image below.


Sources

Installing MultiChain

Posted 6-18-18 by Sam Bowne
FREE SOFTWARE stream added 6-19-18
Samdime added 6-20-18
Code for config file added 6-20-18