# MN (5k)

## Masternode on Ubunutu Server 22.04 tutorial

### **VPS REQUIREMENTS** <a href="#vps-requirements" id="vps-requirements"></a>

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FEvQj6H7z0vN375OKKA56%2Fimage.png?alt=media&#x26;token=0ad04817-136f-407f-97b6-896cf023d0f9" alt=""><figcaption></figcaption></figure></div>

### STEP 1 <a href="#step-1" id="step-1"></a>

Open your Windows wallet.

**Go to Tools -> Console.**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FqcpBaJN1xytZwS6KDvPW%2F1.png?alt=media&#x26;token=48237d2c-a322-4ccb-896c-e720f3b8861a" alt=""><figcaption></figcaption></figure></div>

### STEP 2

Type the following RPC command, to create an address for the masternode fee:

<mark style="color:purple;">**getnewaddress**</mark>

Example output

**37az8YDThNngYpvVV29xgNbfz1U1Tkmt8e**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FRXeXvzPqp4zE6VFjAxS4%2F2.png?alt=media&#x26;token=0632bd2a-433e-4880-8509-fabac6fda536" alt=""><figcaption></figcaption></figure></div>

### STEP 3

Go back to your wallet overview.

**Press on the toolbar button "Send".**

Enter the address from the RPC command **“getnewaddress”** behind the text **"Pay To:". (Example: 37az8YDThNngYpvVV29xgNbfz1U1Tkmt8e)**

Enter the following amount of coins behind the text **"Amount:": 1**

Press on the button **"Send".**

Wait until the transaction is confirmed by **3** blocks.

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2F4LnTVFBrgHd32dRUpfxE%2F3.png?alt=media&#x26;token=55bf05e7-9037-4cec-b8e8-5b000f4fca36" alt=""><figcaption></figcaption></figure></div>

### STEP 4

### Go back to the console of your wallet.

Type the following RPC command, to create an address for the masternode collateral:

<mark style="color:purple;">**getnewaddress**</mark>

Example output

**3FW4rUD9nfemYzYUtT5ptttBcPPoBafkDy**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FObM8CrjO6x9OuGZzuka0%2F4.png?alt=media&#x26;token=19996242-531a-4180-aa7a-e0047d03bdf9" alt=""><figcaption></figcaption></figure></div>

### STEP 5

Go back to your wallet overview.

Press on the toolbar button **"Send".**

Enter the address from the RPC command **“getnewaddress”** behind the text **"Pay To:". (Example: 3FW4rUD9nfemYzYUtT5ptttBcPPoBafkDy)**

**Regular Masternode:** Enter the following amount of coins behind the text **"Amount:": 5,000**

Press on the button **"Send".**

Wait until the transaction is confirmed by 3 blocks.

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FkBMUtkkFmsF3nuaDClHr%2F5.png?alt=media&#x26;token=3f27736c-205e-4d0e-923f-4230fb1426c5" alt=""><figcaption></figcaption></figure></div>

### STEP 6

Go back to the console of your wallet.

Identify the transaction with the following RPC command:

<mark style="color:purple;">**masternode outputs**</mark>

Example output

**{ "9c68da43e465e73e9b15a3141b93fd573b854a0c90d1d43489a8c54a21b1734f": "1" }**

<figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2F6niSM5jJ1dLRIZr96HPZ%2F6.png?alt=media&#x26;token=4be51df9-2772-4712-a1af-749d876f8e0c" alt=""><figcaption></figcaption></figure>

### STEP 7

Generate a BLS key pair with the the following RPC command:

<mark style="color:purple;">**bls generate**</mark>

Example output

**{ "secret": "51156f25c0939ab9d0dc6737a1ddb4b417f0651dbe0b8d18dbdab8ce49d12eaf", "public": "8441155d856b823e77bfe5e72a9c369713d5d7d5ebe1a9b4b7a3f4ecb4262e99cdd9ffcc5cc3125296224cc90d379ab9" }**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FhZWBX3fjjEvnx2xchl0x%2F7.png?alt=media&#x26;token=9ce37628-c970-4ce7-aa96-91aa043c9cd0" alt=""><figcaption></figcaption></figure></div>

### STEP 8

Type the following RPC command, to create an address for the owner of the masternode:

<mark style="color:purple;">**getnewaddress**</mark>

Example output

**35oqfo6YsXZopLkwY2b1mfDgitV6E2Xj71**

Type the following RPC command, to create an address for used for proposal voting:

<mark style="color:purple;">**getnewaddress**</mark>

Example output

**3JRxdFGnPEU9rSNVr2vhHnB3uaxwRMAuQx**

Type the following RPC command, to create an address to receive the masternode reward:

<mark style="color:purple;">**getnewaddress**</mark>

Example output

**3KGbVsX6y5763Kr2z8YdbzkuGNcHTYcNL9**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FV9eAFrn9buDAAzPppzK1%2F8.png?alt=media&#x26;token=cbc72d86-6cda-4c9e-ba51-4abfae5c7b70" alt=""><figcaption></figcaption></figure></div>

### STEP 9

Prepare the ProRegTx transaction by modifying the following line. **Regular Masternode**

**protx register\_prepare 9c68da43e465e73e9b15a3141b93fd573b854a0c90d1d43489a8c54a21b1734f 1 159.87.31.63:17754 35oqfo6YsXZopLkwY2b1mfDgitV6E2Xj71 8441155d856b823e77bfe5e72a9c369713d5d7d5ebe1a9b4b7a3f4ecb4262e99cdd9ffcc5cc3125296224cc90d379ab9 3JRxdFGnPEU9rSNVr2vhHnB3uaxwRMAuQx 0 3KGbVsX6y5763Kr2z8YdbzkuGNcHTYcNL9 37az8YDThNngYpvVV29xgNbfz1U1Tkmt8e**

**9c68da43e465e73e9b15a3141b93fd573b854a0c90d1d43489a8c54a21b1734f** - Transaction id from the RPC command “masternode outputs”.

**1** - Single digit from the RPC command “masternode outputs”.

**159.87.31.63:17754** - External IPv4 address of your VPS.

**35oqfo6YsXZopLkwY2b1mfDgitV6E2Xj71**  - Address of the owner of the masternode.

**8441155d856b823e77bfe5e72a9c369713d5d7d5ebe1a9b4b7a3f4ecb4262e99cdd9ffcc5cc3125296224cc90d379ab9** - “public” value from the RPC command “bls generate”.

**3JRxdFGnPEU9rSNVr2vhHnB3uaxwRMAuQx**  - Address used for proposal voting.

**3KGbVsX6y5763Kr2z8YdbzkuGNcHTYcNL9**  - Address to receive the masternode reward.

**37az8YDThNngYpvVV29xgNbfz1U1Tkmt8e** - Address to where you send the masternode amount fee.

Paste the modified line into your console.

Example output

**{ "tx": "030001000103a39e52d2742cd228f3c3c497e93bc0902a9d908a1a56e0f9db1fe81360ed5c0100000000feffffff012282d717000000001976a91440acc3161d2764202bab50c3f74fc5604b78ea4f88ac00000000d10200000000004f73b1214ac5a88934d4d1900c4a853b57fd931b14a3159b3ee765e443da689c0100000000000000000000000000ffff9f571f3f455a2d2adae30569d2773b1b6aac72e1ebf21d4fb1848441155d856b823e77bfe5e72a9c369713d5d7d5ebe1a9b4b7a3f4ecb4262e99cdd9ffcc5cc3125296224cc90d379ab9b7a1254b5050a1c1d63b8d41b4185c2e9c79f82a00001976a914c0d3e4497d4c96abfc8b0f8a16871ee518d59d0488acd650296cd81d52f6cc6dd4b185a8b7821714a62111c04b8a00236c0d2034f4d600", "collateralAddress": "3FW4rUD9nfemYzYUtT5ptttBcPPoBafkDy", "signMessage": "3KGbVsX6y5763Kr2z8YdbzkuGNcHTYcNL9|0|35oqfo6YsXZopLkwY2b1mfDgitV6E2Xj71|3JRxdFGnPEU9rSNVr2vhHnB3uaxwRMAuQx|197481a4e1e221e359ad7955d09d453142da54497b1480436d8c073669369746" }**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2F3USZf0B98EPecfWmmC5G%2F9.PNG?alt=media&#x26;token=05c1fbdc-91cf-4f33-b2f2-986de76c3772" alt=""><figcaption></figcaption></figure></div>

### STEP 10

Sign the ProRegTx transaction by modifying the following line.

**signmessage "3FW4rUD9nfemYzYUtT5ptttBcPPoBafkDy" "3KGbVsX6y5763Kr2z8YdbzkuGNcHTYcNL9|0|35oqfo6YsXZopLkwY2b1mfDgitV6E2Xj71|3JRxdFGnPEU9rSNVr2vhHnB3uaxwRMAuQx|197481a4e1e221e359ad7955d09d453142da54497b1480436d8c073669369746"**

**3FW4rUD9nfemYzYUtT5ptttBcPPoBafkDy** - “collateralAddress” value from the RPC command “protx register\_prepare”.

**3KGbVsX6y5763Kr2z8YdbzkuGNcHTYcNL9|0|35oqfo6YsXZopLkwY2b1mfDgitV6E2Xj71|3JRxdFGnPEU9rSNVr2vhHnB3uaxwRMAuQx|197481a4e1e221e359ad7955d09d453142da54497b1480436d8c073669369746** - “signMessage” value from the RPC command “protx register\_prepare”.

Paste the modified line into the console of your wallet.

Example output

**H3zwesHueBqjSIHQJsBTsFjdmdR+RCtaoLhJazAE4QaiC65cakBJ3+6/BUTK6g3mC8rkUsXNO9Z3vUWZXiWCFHQ=**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2FHCmokTUDZoInmcCj1ld0%2F10.png?alt=media&#x26;token=50cbbc12-d28d-4cd2-aeee-99924002648e" alt=""><figcaption></figcaption></figure></div>

### STEP 11

Submit the ProRegTx transaction by modifying the following line.

**protx register\_submit 030001000103a39e52d2742cd228f3c3c497e93bc0902a9d908a1a56e0f9db1fe81360ed5c0100000000feffffff012282d717000000001976a91440acc3161d2764202bab50c3f74fc5604b78ea4f88ac00000000d10200000000004f73b1214ac5a88934d4d1900c4a853b57fd931b14a3159b3ee765e443da689c0100000000000000000000000000ffff9f571f3f455a2d2adae30569d2773b1b6aac72e1ebf21d4fb1848441155d856b823e77bfe5e72a9c369713d5d7d5ebe1a9b4b7a3f4ecb4262e99cdd9ffcc5cc3125296224cc90d379ab9b7a1254b5050a1c1d63b8d41b4185c2e9c79f82a00001976a914c0d3e4497d4c96abfc8b0f8a16871ee518d59d0488acd650296cd81d52f6cc6dd4b185a8b7821714a62111c04b8a00236c0d2034f4d600 H3zwesHueBqjSIHQJsBTsFjdmdR+RCtaoLhJazAE4QaiC65cakBJ3+6/BUTK6g3mC8rkUsXNO9Z3vUWZXiWCFHQ=**

**030001000103a39e52d2742cd228f3c3c497e93bc0902a9d908a1a56e0f9db1fe81360ed5c0100000000feffffff012282d717000000001976a91440acc3161d2764202bab50c3f74fc5604b78ea4f88ac00000000d10200000000004f73b1214ac5a88934d4d1900c4a853b57fd931b14a3159b3ee765e443da689c0100000000000000000000000000ffff9f571f3f455a2d2adae30569d2773b1b6aac72e1ebf21d4fb1848441155d856b823e77bfe5e72a9c369713d5d7d5ebe1a9b4b7a3f4ecb4262e99cdd9ffcc5cc3125296224cc90d379ab9b7a1254b5050a1c1d63b8d41b4185c2e9c79f82a00001976a914c0d3e4497d4c96abfc8b0f8a16871ee518d59d0488acd650296cd81d52f6cc6dd4b185a8b7821714a62111c04b8a00236c0d2034f4d600** - “tx” value from the RPC command “protx register\_prepare”.

**H3zwesHueBqjSIHQJsBTsFjdmdR+RCtaoLhJazAE4QaiC65cakBJ3+6/BUTK6g3mC8rkUsXNO9Z3vUWZXiWCFHQ=** - Output from the RPC command “signmessage”.

Paste the modified line into the console of your wallet.

Example output

**afc2f48037ca2bb6384d71869f143a2cf7712cf301a13f17d94fb1ee12f2270e**

<div align="left"><figure><img src="https://1623967177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPkgo3Y6zGEKp4v7QMPf%2Fuploads%2Fh2LhvEJa7GTl3Za98hLR%2F11.png?alt=media&#x26;token=c5a900be-d602-41e5-b4b1-89f2f7553cd9" alt=""><figcaption><p>is done!</p></figcaption></figure></div>
