Marmara Zincirini Kaynak Kodundan Kurma
Kaynak Kodundan Zinciri Kurma
Marmara Kredi Döngüleri blokzinciri kaynak kodundan kurulabilir. Bu zorunlu bir işlem değildir (önceden derlenmiş hali de kullanılabilir), ancak kaynaktan derleme yöntemi kişinin en son yapılan yazılım yamalarına ve yükseltmelerine anında güncelleme yapmasına izin vermesi nedeniyle en iyi bir uygulama olarak kabul edilmektedir.
Sistem gereksinimleri
Ubuntu için 16.04 veya 18.04 + sürümleri
64-bit İşlemci
Minimum 2 CPU
Minimum 4GB RAM (8GB+ önerilir)
OSX (versiyon > 10.11)
Minimum 4GB RAM (8GB+ önerilir)
Windows:
Linux makine veya Ubuntu Linux tabanlı Snala Makine
Bağımlılıkların yüklenmesi
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget curl bsdmainutils automake cmake clang ntp ntpdate nano -y
xcode-select --install
brew paketinin yüklü olduğundan emin olunuz
usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Aşağıdaki her biri komutu tek tek terminalde çalıştırınız
brew update
brew upgrade
brew tap discoteq/discoteq; brew install flock
brew install autoconf autogen automake
brew install gcc@8
brew install binutils
brew install protobuf
brew install coreutils
brew install wget
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget libcurl4-gnutls-dev bsdmainutils automake curl libsodium-dev cmake mingw-w64
Rust yükleyiniz
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup target add x86_64-pc-windows-gnu
Derleyiciyi POSIX thread modelini kullanacak şekilde yapılandırma yapınız
sudo update-alternatives --config x86_64-w64-mingw32-gcc
Yukarıdaki komutu çalıştırdıktan sonra, aşağıda belirtildiği gibi POSIX seçeneğini seçin:
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/x86_64-w64-mingw32-gcc-win32 60 auto mode
1 /usr/bin/x86_64-w64-mingw32-gcc-posix 30 manual mode
* 2 /usr/bin/x86_64-w64-mingw32-gcc-win32 60 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
Aşağıdaki komutu çalıştırınız:
sudo update-alternatives --config x86_64-w64-mingw32-g++
Having executing the above command, select the POSIX option as below:
There are 2 choices for the alternative x86_64-w64-mingw32-g++ (providing /usr/bin/x86_64-w64-mingw32-g++).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/x86_64-w64-mingw32-g++-win32 60 auto mode
1 /usr/bin/x86_64-w64-mingw32-g++-posix 30 manual mode
* 2 /usr/bin/x86_64-w64-mingw32-g++-win32 60 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1.
Marmara Reposunun Kaynağından İndirilmesi
cd ~
git clone https://github.com/marmarachain/marmara komodo --branch master --single-branch
Swap (Takas) Alanının 4 GB şeklinde ayarlanması (isteğe bağlı)
Swap (Takas) Alanı, işletim sistemi tarafından sabit diskinizde ayrılmış olan bir bölümdür. Eğer kullanılan sistemde 4 GB'lik RAM mevcutsa, RAM boyutunun tamamen dolup, cevap verememesi durumuna karşılık bu alanın ayarlanması tavsiye edilir.
Swap alanının olup olmadığını sudo swapon --show komutu ile kontrol edebilirsiniz. Sistemde swapfile mevcut olup en az 4 GB olacak şekilde ayarlanmadıysa bu durumda öncelik olarak sudo swapoff /swapfile komutuyla swap'ı kapatınız.
Aşağıdaki komutları kullanarak 4 GB RAM takas alanı oluşturabilirsiniz.sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Zcash parametrelerinin çekilmesi ve Derleme
cd komodo
./zcutil/fetch-params.sh
./zcutil/build.sh -j$(nproc)
./zcutil/build-mac.sh -j$(nproc)
./zcutil/build-win.sh -j$(nproc)
Bu adım tamamlandıktan sonra, komodod ve komodo-cli dosyalarını src klasörünün içerisinde bulunacaktır.
Windows işletim sisteminde derleme için komodod.exe ve komodo-cli.exe dosyalarını src klasörünün içerisinde bulunacaktır.
cd src
Önderlenmiş Dosyaların İndirilmesi
Yazılım Paketlerinin İndirilmesi
Marmara Kredi Döngüleri blokzincirinin önceden derlenmiş halini indirip, zip halinde olan dosyayı açıp kurulumu hızlıca tamamlayabilirisiniz. Bu zinciri kurmak için en kolay yöntem olup, her işletim sistemi için ilgili zcash parametre dosyalarının indirilmesini gerektirir. İlgili adımlar aşağıda verilmiştir.
Burada verilen linkten Marmara Linux binary dosyasını indirin. Dosyayı dilediğiniz bir alana taşıdıktan sonra aşağıda verilen komutları ilgili dizin yolunda termina üzerinden gerçekleştirin. linkten MCL-win.zip dosyasını yükledikten sonra .
Bağımlı paketleri indirin
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install libgomp1
Aşağıda verilen adımları dosyaları indirdiğiniz veya dosyaları kopyalamış olduğunuz dizinde yaptığınızdan emin olarak gerçekleştiriniz.
sudo apt install unzip
unzip MCL-linux.zip
sudo chmod +x komodod komodo-cli fetch-params.sh
./fetch-params.sh
Terminal ekranında aşağıdaki kodu yazınız
xcode-select –install
brew paketinin yülkü olduğundan emin olunuz
usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew install/master/install)"
Terminal ekranında komodod ve komodo-cli dosyalarının bulunduğu dizine gidiniz ve aşağıdaki kodu terminalde çalıştırınız.
./fetch-params.sh
Buradaki linkten MCL-win.zip dosyasını yükledikten sonra komodod.exe & komodo-cli.exe dosyalarını masaüstünde veya dilediğiniz bir yerde MCL isminde yeni dosyaya taşıdıktan sonra aşağıda yer alan dosyayı çift tıklama ile bu dizinde çalıştırınız.
fetch.params.bat
Marmarayı parametreler ile Başlatma
Marmarazincirini başlama parametreleri ile başlatma
komodod komutu MCL parametreleri ile birlikte kullanarak marmara zincirine bağlanılır. komodo-cli ise zincire yapılan RPC çağrıları için kullanılmaktadır.
komodod ve komodo-cli dosyalarının olduğu dizine gidip, aşağıdaki komutları terminal ekranında yazınız.
Marmara zincirini başlatmak için:
./komodod -ac_name=MCL -ac_supply=2000000 -ac_cc=2 -addnode=5.189.149.242 -addnode=161.97.146.150 -addnode=149.202.158.145 -addressindex=1 -spentindex=1 -ac_marmara=1 -ac_staked=75 -ac_reward=3000000000 &
Zinciri durdurmak için:
./komodo-cli -ac_name=MCL stop
Marmara zincirini başlatmak için:
komodod.exe -ac_name=MCL -ac_supply=2000000 -ac_cc=2 -addnode=5.189.149.242 -addnode=161.97.146.150 -addnode=149.202.158.145 -addressindex=1 -spentindex=1 -ac_marmara=1 -ac_staked=75 -ac_reward=3000000000 &
Zinciri durdurmak için:
komodo-cli.exe -ac_name=MCL stop
Marmara Zincirini Pubkey ile Başlatma*
Zİnciri parametrelerle başlatın, başlatma parametrelerine pubkey adresinizi eklemeyi unutmayınız. Örneğin:
./komodod -ac_name=MCL -ac_supply=2000000 -ac_cc=2 -addnode=5.189.149.242 -addnode=161.97.146.150 -addnode=149.202.158.145 -addressindex=1 -spentindex=1 -ac_marmara=1 -ac_staked=75 -ac_reward=3000000000 -gen -genproclimit=1 -pubkey=DO_NOT_USE_THIS_ADDRESS019n79b0921a1be6d3ca6f9e8a050mar17eb845fe46b9d756 &
Parametreler ile ilgili detaylı bilgi için burada yer alan linke bakınız.
(*) Zincir kurulumunuzda oluşan wallet.dat dosyası içerisinde bulunan pubkey ile zincirinizi başlatmak önemlidir. Eğer bir cüzdan adresi veya pubkey oluşturmadıysanız bunun için Cüzdan ve privkey başlığına bakınız.
Cüzdan ve privkey
Adres Oluşturma ve pubkey alma
Marmara Kredi Döngüsü oluşturabilmek için bir kullanıcının kendine ait pubkey'inin olması ve zinciri bu pubkey ile başlatması gerekir. Aksi takdirde kişi kendi pubkey'i ile başlatmadığı zincirde staking veya mining ödülü kazanamaz. Çünkü, staking veya mining'den kazanılan ödüller adrese gelmektedir.
Bir pubkey oluşturmak isterseniz bunun için Marmara Zincirini normal başlatma parametreleri ile başlatmanız ve sonrasında getnewaddress ve validatenewaddress API komutlarını çalıştırmanız gerekmektedir.
Then the dumpprivkey method has to be used to get the respective privkey. The Privkey received in this way consists of a hard to remember combination of letters and number. Note that keeping this privkey safe and secure and reachable only by you is very important and essential way to reach your assets.
Hence, one can generate a privkey from his/her own set of words and keep a record of these words to generate the respective privkey whenerever needed. For this, use convertpassphrase API command as instructed below.
Privkey and backup wallet
To get the respective privkey for a pubkey, one has to use dumpprivkey method. This method is used in case that the user used getnewaddress ve validatenewaddress API commands to get a pubkey.
If the user wants to import his owned private key to the wallet, he/she may issue the importprivkey method to add the respective private key to the wallet address.
Having a backup of the wallet.dat is very crucial for one since it holds the financial assets. Hence, it is highly recommended to take a backup and hold it securely in a safe location.
Wallet Info & pubkey
One may start the Marmara chain without pubkey and then use the setpubkey command to set the indicated pubkey for the chain. This method can be used in place of the pubkey launch parameter, when necessary. setpubkey method works only once per daemon start. It can't be used to change the pubkey that has already been set.
marmarainfo command returns important details about one's wallet such as the normal amount in the pubkey, the activated amount, the details of credit loops made, the total amount locked in credit loops, the number of credit loops closed and the details of credit loops closed.
getnewaddress
The getnewaddress method returns a new address for receiving payments.
./komodo-cli -ac_name=MCL getnewaddress
komodo-cli.exe -ac_name=MCL getnewaddress
DO_NOT_USE_THIS_ADDRESSgg5jonaes1J5L786
validateaddress
The validateaddress method returns information about the given address.
./komodo-cli -ac_name=MCL validateaddress RMC5GBzX2jw1yEyRgoYsTPeerSBL9Lu5SS
komodo-cli.exe -ac_name=MCL validateaddress RMC5GBzX2jw1yEyRgoYsTPeerSBL9Lu5SS
{
"isvalid": true,
"address": "RMC5GBzX2jw1yEyRgoYsTPeerSBL9Lu5SS",
"scriptPubKey": "76a91482a9bd6b506854c2cf2fa5f5bc43d17527865c1188ac",
"segid": 52,
"ismine": true,
"iswatchonly": false,
"isscript": false,
"pubkey": "028b319b15476166241ca6d2f7ebdc877fcba0dbc961f6529d4e2e4d533e6effa5",
"iscompressed": true,
"account": ""
}
convertpassphrase
This command is used to create a privkey from one's own seeds. Make sure that the 12 set of keywords have no special characters in them. For instance using seeds: "can create your own keywords and generate privkey from these whenever needed".
./komodo-cli -ac_name=MCL convertpassphrase "can create your own keywords and generate privkey from these whenever needed"
komodo-cli.exe -ac_name=MCL convertpassphrase "can create your own keywords and generate privkey from these whenever needed"
{
"agamapassphrase": "can create your own keywords and generate privkey from these whenever needed",
"address": "RCna416S62uNVAKMwRuFtmRH2X3xJuTidD",
"pubkey": "03a3c416d3bafe44448dcb3a56e5dd13db5cc3e6992051a61a2f5675b4796c0d7a",
"privkey": "9005f5b2593ab3e662e1330ceca848d62fb2021165c6484ac7037cb4efc5317e",
"wif": "UtqWJyhXjJWYigKyKCm5ML96LvSZFDfZrT2HYXAdGs8byZ3uCMzy"
}
importprivkey
The importprivkey method adds a private key to one's wallet. The command may take several arguments as described in burada yer alan linke bakınız. The simplest form of command for this is given below for demo purposes.
./komodo-cli -ac_name=MCL importprivkey "DONOTUSETHISxxxxxxxxxxxxxxxxx7KkCmRnnSg7iXvRUqhYoxC9Y"
komodo-cli.exe -ac_name=MCL importprivkey "DONOTUSETHISxxxxxxxxxxxxxxxxx7KkCmRnnSg7iXvRUqhYoxC9Y"
R9z796AehK5b6NCPeVkGUHSpJnawerf8oP
dumpprivkey
The dumpprivkey method reveals the private key corresponding to the indicated address. The command for this is given below for demo purposes.
./komodo-cli -ac_name=MCL dumpprivkey "PWqwYaWNEVT7V9SdfFHARWnoB7vcpSfdvs"
komodo-cli.exe -ac_name=MCL dumpprivkey "PWqwYaWNEVT7V9SdfFHARWnoB7vcpSfdvs"
DONOTUSETHISxxxxxxxxxxxxxxxxx7KkCmRnnSg7iXvRUqhYoxC9Y
Backup wallet.dat
Backing up the wallet.dat file is very essential as it holds the assets of one. One method to backup this file is to archive a copy of the file.
On a Linux machine, the file could be found in: ~/.komodo/MCL/wallet.dat
#Copy the wallet.dat file
cp -av ~/.komodo/MCL/wallet.dat ~/wallet.dat
#Rename the wallet.dat file
mv ~/wallet.dat ~/2020-08-09-wallet_backup.dat
# Make an archieve of the wallet.dat file
tar -czvf ~/2020-08-09-wallet_backup.dat.tgz ~/2020-08-09-wallet_backup.dat
# Move the final file to a secure location
On MacOS, the wallet.dat file is located here: ~/Library/Application\ Support/Komodo/MCL/wallet.dat
# Copy the file
cp -av ~/Library/Application\ Support/Komodo/MCL/wallet.dat ~/wallet.dat
# Rename file
mv ~/wallet.dat ~/2019-05-17-wallet_backup.dat
# To make archive
tar -czvf ~/2019-05-17-wallet_backup.dat.tgz ~/2019-05-17-wallet_backup.dat
# Move the final file to a secure location
On Windows machine, the file is located at: %HOMEPATH%\AppData\Roaming\Komodo\MCL\wallet.dat
setpubkey
It is very important to intiate the Marmara node by setting the pubkey. The chain can be launched with the parameters extended with the pubkey or the setpubkey command could be used after starting the marmara chain to by indicating the pubkey.
./komodo-cli -ac_name=MCL setpubkey pubkey
komodo-cli.exe -ac_name=MCL setpubkey pubkey
getinfo
getinfo command returns important details such as
-
the version of MARMARA through "version";
-
synchronization status of your node through synced (this parameter's value is true if the parameters "blocks" and "longestchain" are equal );
-
difficulty of the chain through "difficulty";
-
number of nearest connected nodes to the chain through "connections";
-
the pubkey with which you are connected to the chain through "pubkey":
./komodo-cli -ac_name=MCL getinfo
komodo-cli.exe -ac_name=MCL getinfo
{
"version": 3000300,
"protocolversion": 170009,
"KMDversion": "0.5.3",
"synced": true,
"notarized": 616208,
"prevMoMheight": 616208,
"notarizedhash": "0ba0864989083e050df8409b0d91bc4d910ba05aee691e68b172d1da62518bad",
"notarizedtxid": "786cbda956bfb058c5aa6fdfceafafbbf1e21d62efda8ce48dfd17ef8c2e1681",
"notarizedtxid_height": "mempool",
"KMDnotarized_height": 0,
"notarized_confirms": 0,
"walletversion": 60000,
"balance": 0.00000000,
"blocks": 616226,
"longestchain": 616226,
"tiptime": 1616766087,
"difficulty": 583612.9172907906,
"keypoololdest": 1606903639,
"keypoolsize": 101,
"paytxfee": 0.00000000,
"sapling": 61,
"timeoffset": 0,
"connections": 16,
"proxy": "",
"testnet": false,
"relayfee": 0.00000100,
"errors": "",
"pubkey": "028b319b15476166241ca6d2f7ebdc877fcba0dbc961f6529d4e2e4d533e6effa5",
"CCid": 2,
"name": "MCL",
"p2pport": 33824,
"rpcport": 33825,
"magic": -1687041972,
"premine": 2000000,
"reward": "3000000000",
"halving": "0",
"decay": "0",
"endsubsidy": "0",
"notarypay": "0",
"staked": 75
}
marmarainfo
marmarainfo command returns important details such as
-
the normal amount in the pubkey through "myPubkeyNormalAmount";
-
the activated amount through "myActivatedAmount";
-
the details of credit loops made through "Loops";
-
the total amount locked in credit loops through "TotalLockedInLoop";
-
the number of credit loops closed through "numclosed"; and
-
the details of credit loops closed through "closed".
./komodo-cli -ac_name=MCL marmarainfo 0 0 0 0 pubkey
komodo-cli.exe -ac_name=MCL marmarainfo 0 0 0 0 pubkey
{
"result": "success",
"myNormalAddress": "RMC5GBzX2jw1yEyRgoYsTPeerSBL9Lu5SS",
"myPubkeyNormalAmount": 0.00000000,
"myWalletNormalAmount": 0.00000000,
"myCCActivatedAddress": "RBHXWwAAGcZzfA5JmYCnDmeGziMbpSDmjp",
"myActivatedAmount": 0.00000000,
"myTotalAmountOnActivatedAddress": 0.00000000,
"myCCAddress": "RJy9KU8XKSWoZ3hUzPNyQdkox2P3g4wF8Z",
"myCCBalance": 0.00000000,
"Loops": [
],
"TotalLockedInLoop": 0.00000000,
"issuer": "028b319b15476166241ca6d2f7ebdc877fcba0dbc961f6529d4e2e4d533e6effa5",
"firstheight": 0,
"lastheight": 2147483647,
"minamount": 0.00000000,
"maxamount": 92233720368.54775807,
"currency": "MARMARA",
"n": 0,
"numpending": 0,
"issuances": [
],
"totalamount": 0.00000000,
"numclosed": 0,
"closed": [
],
"totalclosed": 0.00000000
}
Useful RPC Commands
komodod & komodo-cli
The komodod software application is the Smart Chain daemon that powers all Komodo blockchains.
The komodo-cli software application allows a developer to execute API calls to komodod via the command line.
RPC Commands
Marmara smart chain is 25% mineable and 75% stakeable where staking could only be done when users lock their coins in one of the two funds, namely; "Activated" and "Locked in Credit Loop" (LCL) funds.
marmaralock is used to activate the coins. Active coins are needed for staking and if there are none then even if the staking mode is on, no blocks would be found through staking.
The mode of the node may be checked using getgenerate command. Additionally, the setgenerate command is useful for setting the node to staking or mining mode.
marmaraunlock is used for converting the activated amount to normal account. Normal Amount is utilized for sending payments directly to an address through sendtoaddress command. The payment is made based on the Normal Amount available on the respective wallet with a small transaction fee deducted from normal coins.
getinfo command returns important details about the node such as the version of MARMARA, the synchronization status of one's node, difficulty of the chain, the number of nearest connected nodes to the chain, the pubkey with which one's node is connected to the chain.
For checking the node's near one's node, getpeerinfo command may be used.
The listaddressgroupings method lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions.
getaddressesbyaccount method returns the list of addresses for the given account.
One can check out the methods for Marmara Chain in more detail by issuing help in the terminal/command line with the blockchain name provided as in here.
marmaralock
marmaralock is used to activate the coins. The entire command is given below and the amount is to be replaced by the amount of coins such as 1000.
To see the activated coins, use marmarainfo command provided earlier and search for the value across the "myActivatedAmount" parameter.
In order to confirm marmaralock transaction, copy the hex returned through the JSON object and validate it through the sendrawtransaction command.
./komodo-cli -ac_name=MCL marmaralock amount
"result": "success",
"hex":"0400008085202f89020039b219200ae4b5c83d77bffce7a8af054d6fb..........e9181f6aac3e1beb1e260e9a1f49ed24e6ac00000000edeb04000000000000000000000000"
}
marmaraunlock
marmaraunlock is used deactivate the coins i.e. turn them into normal amount.
The amount parameter in the command is to be replaced by the amount of coins to be deactivated such as 500.
In order to confirm marmaraunlock transaction, copy the hex returned through the JSON object and validate it through the sendrawtransaction command.
./komodo-cli -ac_name=MCL marmaraunlock amount
sendrawtransaction
sendrawtransction method submits raw transaction (serialized, hex-encoded) to local nodes and the network.
This method has to be executed after the following commands issued:
-
marmaralock
-
marmaraunlock
-
marmarareceive
-
marmaraissue
If the above command gets successfully executed in the blockchain, it gives out a transaction id in response. One may check if this transaction is verified by searching the respective id in the Marmara Explorer.
Note that the raw transactions are collected in the mempool and a few blocks may be needed to found to see the transaction recorded on the block.
./komodo-cli -ac_name=MCL sendrawtransaction hex
setgenerate
This method is used to set the node to mining or staking mode. The commands presented below changes the node to staking mode.
Note that "staking": true will not be of use if you have no activated coins (if you have not locked the coins)!
The mode of the node is checked using getgenerate method.
./komodo-cli -ac_name=MCL setgenerate true 0
getgenerate
getgenerate command is used to check the mode of the node.
-
"staking": false means that staking is off.
-
"generate": true means that mining is active.
-
"numthreads": 1 refers to the number of cores used for mining. In this case, this parameter was set to one earlier.
./komodo-cli -ac_name=MCL getgenerate
{
"staking": false,
"generate": true,
"numthreads": 1
}
sendtoaddress
sendtoaddress command is used to send a payment to a given address. The amount is rounded to the nearest 0.00000001. A transaction fee is deducted for the transaction being made from one's Normal Amount.
This command directly sends payment to the specified address and should be used carefully. As, the payment sent through this method cannot be redeemed later.
./komodo-cli -ac_name=MCL sendtoaddress "MCL_address" amount
komodo-cli.exe -ac_name=MCL sendtoaddress "MCL_address" amount
Website may use cookies to personalize and facilitate maximum navigation of the User by this site. The User may configure his / her browser to notify and reject the installation of the cookies sent by us.
getpeerinfo
getpeerinfo command returns detailed information on nearest connected nodes to the chain around your node.
./komodo-cli -ac_name=MCL getpeerinfo
{
"id": 1,
"addr": "37.148.210.158:33824",
"addrlocal": "46.106.36.203:17932",
"services": "0000000070000005",
"lastsend": 1617004153,
"lastrecv": 1617004153,
"bytessent": 122607,
"bytesrecv": 8224441,
"conntime": 1617003195,
"timeoffset": -2,
"pingtime": 10.546878,
"version": 170009,
"subver": "/MagicBean:3.0.3beta1(bitcore)/",
"inbound": false,
"startingheight": 620149,
"banscore": 0,
"synced_headers": 620164,
"synced_blocks": 620164,
"inflight": [
],
"whitelisted": false
},
{ ....
}
]
marmaraamountstat
marmaraamountstat command is used to get all the activated, normal and locked in loop amount of the Marmara blockchain irrespective of the owner. If the begin_height and end_height inputs are set to zero(0), it gets the entire set of data from blocks.
./komodo-cli -ac_name=MCL marmaraamountstat begin_height end_height
{
"result": "success",
"BeginHeight": 50000,
"EndHeight": 60000,
"TotalNormals": 166854.85464948,
"TotalPayToScriptHash": 0.00000000,
"TotalActivated": 582681.11953150,
"TotalLockedInLoops": 237510.00000000,
"TotalUnknownCC": 0.02820000,
"SpentNormals": 161377.88109325,
"SpentPayToScriptHash": 0.00000000,
"SpentActivated": 382128.12128773,
"SpentLockedInLoops": 143510.00000000,
"SpentUnknownCC": 0.00000000
}
listaddressgroupings
listaddressgroupings is used to list the pairs of wallet addresses and respective normal amounts in them.
./komodo-cli -ac_name=MCL listaddressgroupings
Website may use cookies to personalize and facilitate maximum navigation of the User by this site. The User may configure his / her browser to notify and reject the installation of the cookies sent by us.
getaddressesbyaccount
getaddressesbyaccount is used to return the list of addresses for the given account.
./komodo-cli -ac_name=MCL getaddressesbyaccount ""
[
"RMC5GBzX2jw1yEyRgoYsTPeerSBL9Lu5SS"
]
Kredi Döngüleri Komutları
Marmara Versiyon 1
The current Marmara Credit loops currently work based on Protocol 1 which is in 100% collateralization mode. 100 % collateralization is made by issuer on behalf of both himself/herself and holder. Both issuer and holder have the 3x staking chance to get blockchain rewards. Issuer has the 3x staking chance until maturity date of credit whereas holder has the 3x staking chance until he/she endorses/transfers the credit to a new holder who will continue staking with the issuer. The Credit loops can be made using only activated coins
Terminoloji
Issuer: The person who first creates a credit in a credit loop. It is the person who forms the first node in the credit loop. The credit may be collateralized 100% or with even zero-collateralization until maturity date of a credit.
Bearer (Holder): The last node in a credit loop is always called bearer (holder). When someone transfers a credit in a loop, that node becomes immediately an endorser.
Endorser: All other nodes that fall between the issuer, which is the first node in the credit loop, and the last node, and transfer the credit to the next node.
Maturity: The time a credit expires. It is measured as blocks in estimation. The block per day is 1440 (60 blocks an hour times 24 hours a day). Suppose a credit is for 100 days, the maturity is 1440x100, i.e. 144,000 blocks.
Settlement: When a credit matures, settlement is made to the holder, the last node in a loop. Settlement may be automatic or manual.
Escrow: Trust based parties for Protocol 2. If EscrowOn is false, then 100% collateralization is used and settlement is automatic. There is no need for escrows in protocol 1 which works as complete trustless version.
Avalist: Avalists support issuer or endorsers with MCL as additional colletarization and can earn with 3x staking with those support. In case of non-redemption, their funds are utilized. Avalists are available only in Protocol 2. The parameter avalcount is always zero for protocol 1.
BlockageAmount: This is a term for protocol 2. An issuer may be asked to put some collateralization by a holder. In that case, the issuer gets benefit of 3x staking in protocol 2.
Dispute Expiry: It is grace period for solving non-redemption problem in credit loops in protocol 2. An issuer may have this time as blocks when creating a credit under protocol 2 without or insufficient collateralization. Before this period expires, an escrow should do all actions according to aggrement with the issuer to solve non-redemption. Otherwise, the escrow is penalized in the system.
Kredi Döngüsü Oluşturma için Önemli Komutlar
marmarareceive is used to get a credit from an issuer or an endorser. It has two uses which are when asking a credit from an issuer, i.e. the first node or when transfering the credit to a new bearer by the endorser.
marmaraissue is only used by the issuer, the first node to create/issue a credit. By this, a credit is also transferred to the first holder, i.e. the second node.
marmarareceivelist method could be used to see the receive requests made to the issuer himself/herself by using it with the pubkey parameter.
marmaracreditloop method could be used to display the credit loop between the issuer and the holder.
marmaraholderloops method returns the bearer's (holder) open and closed loops.
marmaratransfer method is used for transferring the credit loop to a new holder which in this case becomes the endorser.
sendrawtransaction method is used for verifying the transactions made by methods such as marmarareceive, marmaraissue and marmaratransfer.
Creating a Credit Loop
This is the case where two nodes are making a credit loop for the first time. This credit loop may be created for a sale of a good or service in the market. In such case, the holder (the one selling the product/service) should request for a credit from the issuer (the one paying the product/service) by writing down the marmarareceive command as indicated:
-
senderpk is the pubkey address of the issuer (the one paying the product/service)
-
amount is the payment amount. Please note that this amount should be available in activated fund of the issuer and if not then must be activated thru marmaralock command by th issuer.
-
currency is MARMARA
-
matures is the time that respective credit expires, 60 blocks an hour times 24 hours a day making 1440 blocks per day.
-
{"avalcount":"n"} is the number of avalists i.e. '{"avalcount":"0"}' for protocol 1. Replace n with 0 for Protocol 1.
./komodo-cli -ac_name=MCL marmarareceive senderpk amount currency matures '{"avalcount":"n"}'
This marmarareceive call generates a hex code. This HEXCODE needs to be verified by the holder by executing the sendrawtransaction command:
./komodo-cli -ac_name=MCL sendrawtransaction HEXCODE
Once this command is executed, a transaction id named txid gets generated. This txid along with the receiverpk needs to be communicated to the issuer to complete the credit loop. But, an alternative to this communication would be the use of marmarareceivelist method which could be used to see the receive requests made to the issuer himself/herself
marmarareceivelist
marmarareceivelist command is issued with a pubkey and a maxage parameter. This pubkey is the pubkey address of the issuer connected to the Marmara Chain and the max age by default is 24*60. The response of this command is a list of pair of txid's created by the respective pubkeys.
marmarareceivelist method would be executed by the issuer by using the following command. Replace the pubkey and maxage parameters with related inputs:
This marmarareceive call generates a hex code. This HEXCODE needs to be verified by the holder by executing the sendrawtransaction command.
./komodo-cli -ac_name=MCL marmarareceivelist pubkey maxage
"version": 2,
"txid": "5247d7d7e26eaaff51c67b0f9674........503e52c4e0d3440a.....",
"creationtxid": "0000000000000000000000000000000000000000000000000000000000000000",
"funcid": "B",
"amount": 1.00000000,
"matures": 1194769,
"receivepk": "......dcfd40df475c22c210........b49e9a065be6848390da458c",
"issuerpk": "0.....313a41befdfa50cbdd68b0d33b267e367cf8f5286826c069......"
}
marmaraissue
marmaraissue command is only used by issuer, the first node to create/issue a credit. By this, a credit is also transferred to the first holder, i.e. the second node. Many of the parameters for a credit loop is decided between the issuer and the first holder. marmaraissue method takes in the following arguments:
-
receiverpk is the pubkey of the receiver which is the holder.
-
"avalcount":"n" is the number of avalists i.e. '{"avalcount":"0"}' for protocol 1.
-
"autosettlement":"true"|"false" AutoSettlement is true due to 100% collateralization in Protocol 1.
-
"autoinsurance":"true"|"false" Autoinsurance is true due to 100% collateralization in Protocol 1.
-
"disputeexpires":"offset" Dispute expiry is set to 0 due to 100 collateralization in Protocol 1.
-
"EscrowOn":"true"|"false" EscrowOn is set to false due to 100% collateralization in Protocol 1.
-
"BlockageAmount":"amount blockage amount is set to 0 due to 100 collateralization in Protocol 1.
-
requesttxid is the txid generated by the holder communicated to the issuer.
./komodo-cli -ac_name=MCL marmaraissue receiverpk '{"avalcount":"n", "autosettlement":"true"|"false", "autoinsurance":"true"|"false", "disputeexpires":"offset", "EscrowOn":"true"|"false", "BlockageAmount":"amount" }' requesttxid
Typical Example of the command:
./komodo-cli -ac_name=MCL marmaraissue receiverpk '{"avalcount":"0", "autosettlement":"true", "autoinsurance":"true", "disputeexpires":"0", "EscrowOn":"false", "BlockageAmount":"0" }' requesttxid
komodo-cli.exe -ac_name=MCL marmaraissue receiverpk "{\"avalcount\":\"n\", \"autosettlement\":\"true"|"false\", \"autoinsurance\":\"true"|"false\", \"disputeexpires\":\"offset\", \"EscrowOn\":\"true"|"false\", \"BlockageAmount\":\"amount\"}" requesttxid
Typical Example of the command:
komodo-cli.exe -ac_name=MCL marmaraissue receiverpk "{\"avalcount\":\"0\" \"autosettlement\":\"true\" \"autoinsurance\":\"true\" \"disputeexpires\":\"offset\" \"EscrowOn\":\"false\" \"BlockageAmount\":\"0\"}" requesttxid
This marmaraissue command in turn returns a hex code response, and now the issuer has to execute the sendrawtransaction method to get the transaction executed on the blockchain.
This creates a credit loop between the issuer and the holder. The credits locked in a loop can be circulated to buy things during shopping. The issuer and the holder get 3 times of chances of staking on the MCL funds until the maturity of the credit loop.
marmaracreditloop
To display the credit loop between the issuer and the holder, the marmaracreditloop command may be executed:
txid is the baton transfer id of the Marmara Credit Loop.
./komodo-cli -ac_name=MCL marmaracreditloop txid
marmaraholderloops
This command returns the bearer's open and closed loops which can be constrainted by setting the first and last height and the minimum and maximum amount. The method returns all the available data if all the parameters are set to zero.
./komodo-cli -ac_name=MCL marmaraholderloops firstheight lastheight minamount maxamount pubkey
Transfering a Credit Loop
This is the case where a holder wishes to utilize the coins locked in loop by buying goods/services on the same credit loop created earlier. For such case, when the holder transfers a credit in a loop, that node immediately becomes an endorser. And in such way, the last node in a credit loop is always called the bearer (holder).
In other words, all endorsers are previously holders. One should bear in mind that endorsers lose the 3x staking power when a credit is transferred to a new holder.
The new holder makes a marmarareceive request to the endorser to get the credit for selling the goods/services by the marmarareceive command.
-
senderpk is the pubkey address of the endorser (the one buying the product/service)
-
batontxid is the baton transaction id of the previously created credit loop
-
{"avalcount":"n"} is the number of avalists i.e. {"avalcount":"0"} for protocol 1.
./komodo-cli -ac_name=MCL marmarareceive senderpk batontxid '{"avalcount":"n"}'
This marmarareceive call generates a hex code. This HEXCODE needs to be verified by the new holder by executing the sendrawtransaction command.
Once this sendrawtransaction command is executed, a transaction id named txid gets generated.
This txid along with the receiverpk needs to be communicated to the endorser to complete the credit loop.
But, an alternative to this communication would be the use of marmarareceivelist method which could be used by the endorser to see the receive requests made to himself/herself.
Then, the endorser executes the following marmaratransfer command to get the credits transferred to the new holder:
-
receiverpk is the pubkey of the receiver which is the new holder.
-
"avalcount":"n" is the number of avalists i.e. '{"avalcount":"0"}' for protocol 1 (n=0).
-
requesttxid is the txid generated by the new holder communicated to the endorser.
./komodo-cli -ac_name=MCL marmaratransfer receiverpk '{"avalcount":"n"}' requesttxid
Then, the endorser executes the sendrawtransaction command with the hex code resulting from marmaratransfer command.
In this way, the credit loops can circulate up to 1000th node within the maturity time to buy goods/services.