How to Mine/Stake MCL (Marmara) Coin on Windows?

Marmara Blockchain and Marmara Credit Loops have been running towards 110777 which is the hard fork height where improvements will start in full. The Marmara mainnet has reached its 77th day. Updates including new improvements were also made.

The main purpose of the new hardfork is to make the system a DeFi (Decentralized Finance) system to run in real economy. This is achieved by empowering the holder (bearer) of a credit loop to join in 3x staking, removing the need for coin locking for endorsers to join in credit loops. The system is much simpler now. Both issuer and the last node, bearer of a credit loop together benefit from 3x staking. A credit loop may be circulating 1000 times instead of 64. Also each step starting from issuing to settlement can be traced easily after the hard fork.

The new hard fork will be active in just an hour when writing this article. Explanations about mining and staking for MCL coin on Linux can be found at Marmara Chain on Github.

This article gives step by step explanations on how to mine and stake MCL coins on Marmara Chain for Windows users easily.

What is Marmara Credit Loops?

Before explaining how to mine/stake MCL coins on Marmara Blockchain, it is necessary to mention a few points.

Marmara Chain, or Marmara Credit Loops, is a project inspired by the use of Post-dated Cheques and Promissory Notes to created a p2p platform to transfer all mutual credits into a blockchain platform. It is a project developed to keep all types of these credit instruments in blockchain but to solve the biggest problems while doing so. The greatest problem is known as non-redemption. That’s why MCL Coin production mechanisms have been developed to support this.

The following video briefly explains the process of how nonredemption problem is solved in mutual credits on Marmara Chain.

Marmara Credit Loops are maintained on Marmara Blockchain and 30 MCL coins are rewarded in each block that appears approximately every minute. Since the coins are produced in the system to eliminate the non-redemption, half of the coins that are released as locked (active). Only 25% of the coins produced are through Mining. The remaining 75% is produced by Staking. In order to produce coins by using the staking method, it is absolutely necessary to activate/lock coins in wallets.

Again, a new method of staking has been developed in order to solve the non-redemption problem: Boosted Staking through Credit Loops. For this, on the 75% staking side, if you activate/lock your coins in credit loops, you can have a chance of staking 3x (3 times) more than ordinary staking with normal activated coins. Since we believe most of coins are locked as activated or boosted in credit loops, the total coin supply was set as unlimited with a restriction of approximately 15 millions annually. Half of them comes out as activated while majority is expected to be locked in credit loops.

By leaving how to make Credit Loops to another article, we exlain here basic mining and staking for MCL coins under Windows platform.

Mining/Staking MCL on Marmara Chain

STEP 1: Install Komodo Ocean MCL Wallet

First, install the Wallet application running on Windows from the link below.

Download and Run Komodo Ocean Wallet For MCL
https://yadi.sk/d/XEpft5hC0l9W5g

DOWNLOADING ZCASH PARAMETER FILES
Marmara Blockchain is an independent smart chain forked from Komodo Blockchain then enhanced with smart contracts for managing the credit loops. However, it has the basic features of Komodo. Komodo, on the other hand, has the basic features of both Zcash and Bitcoin since it was forked from the Zcash system where Bitcoin was forked first. Therefore, Marmara Blockchain has the advanced features of Bitcoin, Zcash and Komodo. First of all, you need to load the Zcash parameters. For this, you need to run the fetch-params.bat file in the directory you downloaded above (we downloaded it to the mclocean directory) only once. This will load the zcash parameter files. Otherwise it will not work.

IMPORTANT
If you run it right away, it will start loading Komodo blockchain, not Marmara Blockchain. Therefore, before running, you must make a shortcut to the exe file (komodo-qt-mcl.exe file) (right click and enter the following line on the shortcut after the properties section). Here the zipped file has been opened to the directory named c:\mclocean. You replace it with the appropriate directory.

c:\mclocean\komodo-qt-mcl.exe -ac_name=MCL -ac_supply=2000000 -ac_cc=2 -addnode=37.148.210.158 -addnode=37.148.212.36 -addressindex=1 -spentindex=1 -ac_marmara=1 -ac_staked=75 -ac_reward=3000000000

You need to write the MCL parameters by going to short cut and in the target field as follows:-

Inserting the parameters for MCL in target field

STEP 2: Download Marmara Chain Blocks

Wait for Komodo Ocean Wallet to download all blocks from the past after it was run. You will see a screen like the one below. It will look zero in balance.

KOMODO OCEAN WALLET FOR MCL

In the next sections, you will need to enter the commands manually on the command line. You can access the console for commands by entering the Debug window from the Help Option.

You can type commands in Help/Debug Window

IMPORTANT NOTE: FAST DOWNLOAD OF BLOCKS

It will take time to download all blocks of the Marmara Blockchain as of January 2020. If you want to download it as soon as possible, download the daily updated bootstrap file from the link below and open it under the Windows folder below.

C:\Users\user\AppData\Roaming\Komodo\MCL

Marmara Blockchain Bootstrap file link

https://eu.bootstrap.dexstats.info/MCL-bootstrap.tar.gz

STEP 3: Synchronize Blocks with Other Nodes

In a blockchain, each node maintains the same database, ie records. You need to synchronize your blocks with other nodes in the system. To understand this, you can find out if all blocks are downloaded using the getinfo command in the command line and whether you are synchronized with other nodes in the blockchain. The following screen output is an example for a synchronized blockchain;

A synchronized chain

STEP 4: Obtaining the New Wallet Number and the corresponding PUBKEY

Now that you are synchronized with other nodes in the blockchain, you are ready to generate MCL coins with Mining and Staking. However, the wallet and a related Pubkey number must be determined in order for the coin you mine/stake to be available.

The first one required for this is to get a new wallet number with the getnewaddress command, and then to get a pubkey using the validateaddress.
It is shown in the example below. Do not forget to write your wallet number instead of the wallet number;

getnewaddress
validateaddress “Your Wallet Number starting with R”

SAMPLE;
getnewaddress
RJC4oeUU4naNbJsjyCHeTLrhUFhaJsmf6Y

validateaddress RJC4oeUU4naNbJsjyCHeTLrhUFhaJsmf6Y

Validating and setting a PUBKEY Address

You can do mining and staking operations using the pubkey obtained here. In the example above, “pubkey=0328995343047082b78f35cbebf8dee153dcf8499ec97c3f20b56617a265189e2b”. So this is the wallet pubkey address where coins produced when we do mining and staking will come.

NOTE: You have take your private key of your wallet and keep it in a safe place. First, let’s get the private key for the relevant wallet.

STEP 5: Backing Up Your Wallet’s Private Key

If you do not save your wallet’s private key, you will not be able to access the coins you produce again when your machine is formatted, etc. Therefore, take the private key of the wallet with the dumpprpivkey command and save it in a safe place.

Getting private key for the wallet

USAGE: dumpprivkey “Your Wallet address starting with R”

Example;

dumpprivkey “RJC4oeUU4naNbJsjyCHeTLrhUFhaJsmf6Y”

MINING AND STAKING

STEP 6: Pubkey Setting for Mining / Staking
You are now ready to produce MCL with Mining/Staking in your Wallet.

Of course, after setting your Pubkey number on Komodo Ocean Wallet.

Related command for this;
Usage: setpubkey “Your pubkey_number”
Sample;
setpubkey
0328995343047082b78f35cbebf8dee153dcf8499ec97c3f20b56617a265189e2b
You will see a result like the screen below.

Settig publey for mining/staking

When you use the getinfo command, you will now see your pubkey number.

Pubkey should be seen with getinfo after setpubkey

STEP 7: Mining and Staking MCL Coins

The commands for mining and staking are below.

MINING first

Usage: setgenerate true n
Instructs mining with n cores in compuer.
Uses all processor cores when n = -1.

Sample;
“Mining” with 2 cores;
setgenerate true 2

“Mining” with all cores;
setgenerate true -1

Staking
To earn rewards with Staking;

setgenerate true 0

NOTE: Remember! To earn rewards with Staking, you must activate/lock coins. For this, please read step 8.

Shutdown for both Mining and Staking
It is sufficient to use the “setgenerate false” command.

STEP 8: COIN LOCKING/ACTIVATION

To be able to do staking in Marmara Blockchain, it is necessary to lock / activate coins. Coins are locked indefinitely and are used for collateralization. In order to make a Credit Loop, you must have enough active/locked coin as much as the credit issued (Version 1).

Coin Activation is Simple. It is performed in the following 2 steps.
1. marmaralock n
2. sendrawtransaction hex

In the first step, the amount of n is specified for activation

In the second step, the associated hex is registered in the blockchain.
SAMPLE;
In the example below, 30 MCL is locked.
marmaralock 30
{“Result”: “success”,
“Hex”: “0400008 ………… long string …………… .0000000”}
sendrawtransaction “0400008 ………… long string …………… .0000000”

As a result it will give a hex code. Sample; c4c55036da0c2416de4e61e6097082ec3e4ac0f0ffd17826aaf74b9c8d2c2d5d

NOTE: Mining will use your processor power a lot. If you do not have strong cards and processors, we recommend staking instead of mining. However, you need to activate/lock MCL coins for staking. To activate/lock, you can make some mining at the beginning or get it from the sellers in Discord group or exchanges.

FOR MORE HELP

You can get help in related channels such as mining and staking on Marmara Discord server. You can also follow other resources below.

Discord Group: https://discord.gg/8mBSKC7
Twitter: http://twitter.com/marmarachain
Web: http://marmara.io
Marmara Blockchain Explorer: http://explorer.marmara.io
Marmara Chain Github: http://github.com/marmarachain

Professor, Industrial Engineering Blockchain Enthusiast