Skip to content

crown ng testnet participation instructions

walkjivefly edited this page Nov 18, 2022 · 2 revisions

The latest version of this document may be found here

Config file (.crown/crown.conf not .crown/testnet3/crown.conf)

server=1
listen=1
addressindex=1
debug=1
addresstype=legacy
fallbackfee=0.00001
testnet=1
txindex=1
[test]
server=1
debug=1
listen=1
rpcport=8451
externalip="VPSIP"
rpcuser=testnetrpc
rpcpassword=1234rpc
addnode=92.60.46.27
addnode=92.60.46.28
addnode=92.60.46.29
addnode=92.60.46.26
addnode=92.60.46.30
addnode=92.60.46.31

Install Script (First install)

#!/bin/bash
# Download latest client (change version number only to install latest client)
wget https://github.com/Crowndev/crown/releases/download/0.0.0.53/linux.tar.xz
# Unpack zip file to a folder called "linux"
tar -xf linux.tar.xz
# Start client
./linux/crownd
# Give the client time to boot
sleep 5

Install Script (New Gen block)

#!/bin/bash
# Stop the client
./linux/crown-cli stop
# Give the client time to shutdown
sleep 5
# Delete old testnet.
rm -r linux ; rm -r linux.tar.xz ; rm -r .crown/testnet3
# Download latest client
wget https://github.com/Crowndev/crown/releases/download/0.0.0.53/linux.tar.xz
# Unpack zip file to a folder called "linux"
tar -xf linux.tar.xz
# Start client
./linux/crownd

Update Script (Only use if the same gen block is active)

#!/bin/bash
# Stop the client
./linux/crown-cli stop
# Give the client time to shutdown
sleep 5
# Delete old testnet client.
rm -r linux ; rm -r linux.tar.xz
# Download latest client
wget https://github.com/Crowndev/crown/releases/download/0.0.0.53/linux.tar.xz
# Unpack zip file to a folder called "linux"
tar -xf linux.tar.xz
# Delete old .crown files
rm -r .crown/testnet3/anchors.dat ; rm -r .crown/testnet3/assets ; rm -r .crown/testnet3/banlist.dat ; rm -r .crown/testnet3/blocks ; rm -r .crown/testnet3/budget.dat ; rm -r .crown/testnet3/chainstate ; rm -r .crown/testnet3/contracts ; rm -r .crown/testnet3/debug.log ; rm -r .crown/testnet3/fee_estimates.dat ; rm -r .crown/testnet3/indexes ; rm -r .crown/testnet3/.lock ; rm -r .crown/testnet3/mempool.dat ; rm -r .crown/testnet3/mncache.dat ; rm -r .crown/testnet3/mnpayments.dat ; rm -r .crown/testnet3/netfulfilled.dat ; rm -r .crown/testnet3/peers.dat ; rm -r .crown/testnet3/platform ; rm -r .crown/testnet3/settings.json ; rm -r .crown/testnet3/sncache.dat ; rm -r .crown/testnet3/snpayments.dat
# Start client
./linux/crownd

Create and load a new wallet

This command will create a new wallet called “testnet” which will load automatically at client boot, ./linux/crown-cli createwallet testnet false false "" false false true

This command will create a new wallet but will require loading at each boot, ./linux/crown-cli createwallet testnet

To load a wallet use, ./linux/crown-cli loadwallet testnet

Masternode Setup (CMD)

Make sure to have a VPS ready with at least 1GB Ram and 1 Core.

Step 1

First you need to make sure to have 10000 Crown to create the collateral needed for a Masternode.

Create a new address, ./linux/crown-cli getnewaddress Masternode1

This will create the address and name it “Masternode1”.

Step 2

Now send exactly 10000 Crown to your new address (Replace with your address) ./linux/crown-cli sendtoaddress n2pk3fCECXFMqWHHWKZP8shncdov6WRqui 10000 Crown

This will produce a transaction hash, save it.

Step 3

Now you need a key for your remote VPS ./linux/crown-cli createmasternodekey

This will produce the key hash, save it.

Step 4

Navigate to your masternode.conf within the testnet3 folder. Create a new entry to represent your Masternode (Replace VPS ip, key and transaction id.) MN1 185.170.215.188::18333 92zqBVDGqK39KEEsfDodcoW35u8nSgFYYciLhRZUoJtXXeKEoQm 0000cfb174098d07396064abda6a65b2544fcad441a66ceee21bb4586678cc95 1

Shut down and restart your Crown client.

Step 5

Now log in to your VPS. Enter the crown.conf file nano .crown/crown.conf

Paste this to the crown.conf file (Replace with your ip and key)

server=1
listen=1
listenonion=0
testnet=1
[test]
server=1
txindex=1
listen=1
debug=1
rpcport=8451
externalip=VPSIP
rpcuser=testnetrpc
rpcpassword=1234rpc
addnode=92.60.46.27
addnode=92.60.46.28
addnode=92.60.46.29
addnode=92.60.46.26
addnode=92.60.46.30
addnode=92.60.46.31
masternode=1
masternodeprivkey=MASTERNODEKEY

Shut down and restart the VPS.

Step 6

Go back to your local client (Where the collateral is held) Enter this ./linux/crown-cli startmasternode alias 0 MN1

You should see this result

{
“alias”: “MN1”,
“result”: “success”,
“error”: “”
}

Contracts (Change to your own details)

./linux/crown-cli createcontract yourissuingaddress contractname contractsymbol contract_url website_url description scriptcode

Contracts (Example)

./linux/crown-cli createcontract "mnYHVYz5vZLDxCeqgbvwVm2EXUcnKQeHmJ" "defunctecs" "deft" "https://crownplatform.com" "https://crownplatform.com/" "Testing Contracts" "" Result (Example)

{
  "txid": "bd91d211230f7cb54d14fd493897193699e9370519140a95ce31430242655040",
  "hex": "1968747470733a2f2f63726f776e706c6174666f726d2e636f6d04646566740a646566756e6374656373226d6e594856597a35765a4c447843657167627677566d32455855636e4b5165486d4a1154657374696e6720436f6e7472616374731a68747470733a2f2f63726f776e706c6174666f726d2e636f6d2f0046304402203b4157ace92d04ebfc2f669730242e380d64611916bfe8fcfd6ce0409f5bbce502202f9dd3da9c918927eb685746bdfd08621d0af9b3ef62c1ddb68c947219867aa7"
}

Assets (Change to your own details)

./linux/crown-cli createasset contract/asssetname contract/asset_symbol CRWtouseinissuance numberofassetstoissue expirytime type transferable convertible restricted limited contracthex

Assets (Example)

./linux/crown-cli createasset "RainCoin" "RIC" "1000" "100000" "1715352029" "1" "true" "true" "true" "true" "1968747470733a2f2f63726f776e706c6174666f726d2e636f6d04646566740a646566756e6374656373226d6e594856597a35765a4c447843657167627677566d32455855636e4b5165486d4a1154657374696e6720436f6e7472616374731a68747470733a2f2f63726f776e706c6174666f726d2e636f6d2f0046304402203b4157ace92d04ebfc2f669730242e380d64611916bfe8fcfd6ce0409f5bbce502202f9dd3da9c918927eb685746bdfd08621d0af9b3ef62c1ddb68c947219867aa7"

Result (Example)

f07e5b8e87913f380fe46fc58b43603f5b3d019d2a4f4f6c83e5c327b6b683bc

Proposal (Prepare)

./linux/crown-cli mnbudget prepare deftest1 https://crownplatform.com/ 120 350 mnueeaRXq5jxfRoYVYCtP9kEEMSU4kws8B 10 Result (Example)

365deb183c8adfff53816422a9753005399385f09004b919ad06d1f407193c1d

Proposal (Submit)

./linux/crown-cli mnbudget submit deftest1 https://crownplatform.com/ 120 350 mnueeaRXq5jxfRoYVYCtP9kEEMSU4kws8B 10 365deb183c8adfff53816422a9753005399385f09004b919ad06d1f407193c1d