Where It All Started.

Where It All Started.

Life, Stock Trading, Investments, Business and Startup. Most are programming stuff.

Tag: crypto

Create Solana Validator RPC Only Node Part 2

This image has an empty alt attribute; its file name is image.png

If you haven’t checked out yet the first part, make sure to check it out on this link.

Setup the Solana Validator

Before you start, make sure you install the solana cli first which you can find the information on how to install the latest package here. Reboot your computer to make sure everything is going okay.

On this config we will connect directly as a validator (non-voting) for Solana mainnet-beta. First configure the Solana tools that you installed.

solana config set --url https://api.mainnet-beta.solana.com

Then run the sys-tuner for one time, this is to configure your computers internals to the recommended setup.

sudo $(command -v solana-sys-tuner) --user $(whoami) > sys-tuner.log 2>&1 &

This will run one-time, you need to run it after you reboot your system. There is also another way, on which you need to configure a systemd service. To configure a systemd service, create a file named solana-sys-tuner.service in the directory /etc/systemd/system.

sudo cat > /etc/systemd/system/solana-sys-tuner.service << EOF
[Unit]
Description=Solana System Tuner
After=network.target
Before=sol.service

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/home/ubuntu/solana-sys-tuner.sh

[Install]
WantedBy=multi-user.target
WantedBy=sol.service
EOF

This will create the service and now you can run sudo systemctl enable --now solana-sys-tuner.service to enable it at boot and start the service right now. You can also do the manual way without having to run the solana-sys-tuner binary, just follow this tutorial from the official documentation here.

Also don’t forget to create the solana-sys-tuner.sh on your user home root directory.

cat > ~/solana-sys-tuner.sh << EOF
#!/usr/bin/env bash
set -ex

exec /home/ubuntu/.local/share/solana/install/active_release/bin/solana-sys-tuner --user ubuntu
EOF

Now you can now start the validator, to start prepare first a validator keypair.

solana-keygen new -o ~/validator-keypair.json

This will create a validator keypair at your user home directory. Don’t forget to save the output generated BIP39 seedphrase. DON’T FORGET. Once done, if you forgot your public key, you can view it using the command solana-keygen pubkey ~/validator-keypair.json. You will need the public key for later commands.

Set the validator keypair in your Solana cli tool:

solana config set --keypair ~/validator-keypair.json

That’s all for configuration, we can now start the validator. Create an simple shell script to contain the run parameters of the solana-validator command, so it will be easier to modify and adjust later on.

cat > validator.sh << EOF
#!/usr/bin/env bash

set -e

exec solana-validator \
    --no-voting \
    --identity ~/validator-keypair.json \
    --known-validator 7Np41oeYqPefeNQEHSv1UDhYrehxin3NStELsSKCT4K2 \
    --known-validator GdnSyH3YtwcxFvQrVVJMm1JhTS4QVX7MFsX56uJLUfiZ \
    --known-validator DE1bawNcRJB9rVm3buyMVfr8mBEoyyu73NBovf2oXJsJ \
    --known-validator CakcnaRDHka2gXyfbEd2d3xsvkJkqsLw2akB3zsN1D2S \
    --only-known-rpc \
    --ledger /mnt/disks/solana-ledger \
    --accounts /mnt/disks/solana-account \
    --rpc-port 8899 \
    --rpc-bind-address 0.0.0.0 \
    --dynamic-port-range 8000-8020 \
    --entrypoint entrypoint.mainnet-beta.solana.com:8001 \
    --entrypoint entrypoint2.mainnet-beta.solana.com:8001 \
    --entrypoint entrypoint3.mainnet-beta.solana.com:8001 \
    --entrypoint entrypoint4.mainnet-beta.solana.com:8001 \
    --entrypoint entrypoint5.mainnet-beta.solana.com:8001 \
    --expected-genesis-hash 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d \
    --wal-recovery-mode skip_any_corrupted_record \
    --limit-ledger-size \
    --no-port-check \
    --enable-rpc-transaction-history \
    --full-rpc-api \
    --log /mnt/disks/solana-spare/logs/solana-validator.log
EOF

This validator flags specify that RPC is open to public, and its only rpc-mode due to the --no-voting flag. The flags also specify that the RPC transaction history is enabled which will make the ledger disk be big, check the flag --enable-rpc-transaction-history. Read every flags from the solana-validator binary by executing the --help flag.

Wait for a while, it will download a very big snapshot so you could catch up at the latest transactions. The ledger will only contain all the latest transaction history of the Solana chain. This will take time depending on the speed of your machine and speed of network. Once you see there are no percentage or anything, then its good to go.

Make sure its on the list of validator nodes using the solana gossip command.

solana gossip | grep <pubkey>

That’s all, now you’re part of the validators. Another thing, in order to run it on reboot add the systemd service file, create the file using the command below on same directory as the solana-sys-tuner.service.

sudo cat > /etc/systemd/system/sol.service << EOF
[Unit]
Description=Solana Validator
After=network.target
Wants=solana-sys-tuner.service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=ubuntu
LimitNOFILE=1000000
LogRateLimitIntervalSec=0
Environment="PATH=/bin:/usr/bin:/home/ubuntu/.local/share/solana/install/active_release/bin"
ExecStart=/home/ubuntu/validator.sh

[Install]
WantedBy=multi-user.target
EOF

Then enable it at boot using the command sudo systemctl enable --now sol.service. Make sure that it doesn’t have errors by checking the service status. Last thing to mention regarding logs as it can become large quickly, make sure to create a logrotate rule, the command below which I grabbed from the official documentation.

cat > logrotate.sol <<EOF
/home/sol/solana-validator.log {
  rotate 7
  daily
  missingok
  postrotate
    systemctl kill -s USR1 sol.service
  endscript
}
EOF

sudo cp logrotate.sol /etc/logrotate.d/sol
systemctl restart logrotate.service

That’s all, reboot and celebrate 🎉! Don’t forget to share and leave a comment if you like this kind of articles.

Create Solana Validator RPC Only Node Part 1

🛤 Validator RPC Node Disk Setup

The requirements for the Solana validator node can be found on the official Solana validator requirements page. Link below:

Solana Validator Requirements

In the current production setup, we use a n2-standard-64 machine which has 128GB of RAM64 Core8TB of Local SSD NVME. Make sure that its NVME as that is the requirements of the storage device for fast bootstrapping of large ledger data and accounts data. After provisioning the VM, we now start with the initial configuration of the VM.


👷‍♂️ Disk Setup

First, create a RAID0 device using the 24x 375GB Local SSD. Split the bought 24 Local SSD to three groups:

  • 12 – Transaction Ledger
  • 10 – Accounts
  • 2 – Logs and Spare Storage

To start creating the RAID0 devices on the transaction ledger you must execute this command:

sudo mdadm --create /dev/md0 --level=0 --raid-devices=12 \
  /dev/nvme0n1 /dev/nvme0n2 /dev/nvme0n3 /dev/nvme0n4 \
  /dev/nvme0n5 /dev/nvme0n6 /dev/nvme0n7 /dev/nvme0n8 \
  /dev/nvme0n9 /dev/nvme0n10 /dev/nvme0n11 /dev/nvme0n12

As you can see on the command flags, we pass the raid devices as 12 because that’s how many NVME drives we are trying to format. On the device name we named it block device /dev/md0 with level 0 RAID setup. After finishing the setup we no go to setting up the the accounts storage:

sudo mdadm --create /dev/md1 --level=0 --raid-devices=10 \
  /dev/nvme0n13 /dev/nvme0n14 /dev/nvme0n15 /dev/nvme0n16 \
  /dev/nvme0n17 /dev/nvme0n18 /dev/nvme0n19 /dev/nvme0n20 \
  /dev/nvme0n21 /dev/nvme0n22

Same command as the upper command, but look closely on the device block name and the number of raid devices. Make sure if you are using custom number of NVME drives, modify the raid devices first before appending the block device name. Lastly, the spare storage:

sudo mdadm --create /dev/md2 --level=0 --raid-devices=2 \
  /dev/nvme0n23 /dev/nvme0n24

This is the last command to add the block device for the spare storage. We now move on to formatting the devices to our preferred storage filesystem type. On our setup we are in favor of using ext4 fs, as it provides better redundancy and journaling.

sudo mkfs.ext4 -F /dev/md0
sudo mkfs.ext4 -F /dev/md1
sudo mkfs.ext4 -F /dev/md2

When formatting the devices are done, we now move on mounting the devices to our servers. Create the mount points which would be stored on the /mnt/disks/.

sudo mkdir -p /mnt/disks/solana-{ledger,account,spare}

Check if the directory is okay by running the ls command on /mnt/disks/ directory. Also, make sure all the directories read, write and access permissions is okay by running the chmod on the created directories.

sudo chmod a+w /mnt/disks/solana-ledger
sudo chmod a+w /mnt/disks/solana-account
sudo chmod a+w /mnt/disks/solana-spare

The command above will ensure that the correct write permission is on the disk mount points. Then create auto mount on boot by editing the /etc/fstab:

echo UUID=`sudo blkid -s UUID -o value /dev/md0` /mnt/disks/solana-ledger ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
echo UUID=`sudo blkid -s UUID -o value /dev/md1` /mnt/disks/solana-account ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
echo UUID=`sudo blkid -s UUID -o value /dev/md2` /mnt/disks/solana-spare ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab

This will create a specific record that will be inserted on the /etc/fstab containing the UUID and mount options. Now everything’s done, reboot the server and check if all the mount points been mounted by running the mount command.

If everything’s good, then you’re good to go to the next tutorial. In case you have to change the RAID0 arrays, remember to run this command on the specific RAID array device to delete it sudo mdadm -S /dev/md0.

Checked the second part here.

Meld A Cardano-based DeFi Gets 100M Staked Tokens

In only three days, Meld, a new decentralized financial system that emerged on the Cardano (ADA) blockchain, managed to stake 100 million of its native currency MELD.

Meld announced the milestone on Twitter, with the achievement contributing to the DeFi protocol’s goal of providing services for staking bitcoin as collateral for fiat loans.

According to Meld, it aims to reach the world’s unbanked, while depending on Cardano to target nations with a large crypto population.

Meld’s approach requires customers to deposit cryptocurrency that will be locked in the account before borrowing loans backed by Cardano based on the locked collateral.

In the case of Cardano, you do a soft link of the asset from your wallet to the stake pool. So you’re pledging or you’re voting with your tokens. Your tokens always stay or your coins always stay in your wallet, but they’re locked up and they can’t be used for anything else,

Ken Olling, CEO of Meld

Meld permitted token holders to commit over 620 million ADA, almost $1 billion, in order to create the groundwork for the system. As a result, the platform was able to raise $10 million through a private token sale as part of a fundraising round.

Meld also used the ISPO crowdfunding model, with the staking pool quickly filling up with 64 million ADA. Within five days, the ISPO had four additional pools opened that filled up with 133 million ADA.

Users will be open to choose between a six-month lock or 12 months with a 12 percent and a 15 percent annual percentage rate, respectively.

Meld has also worked with Tingo, an African mobile operator, to incorporate the app.
In addition, the DeFi protocol is collaborating with Polygon, Vent Finance, and ADAmatic to link the Polygon and Cardano blockchains.

New Crypto Malware Targets Browser Wallet Extensions

New malware that can corrupt crypto wallets and extensions has been discovered, putting investors at risk of being hacked.

A type of malware known as Mars Stealer — an upgraded version of information bootlegger Oski Stealer – has surfaced to prey on web browsers, crypto extensions, and crypto wallets, according to a new blog post by network security specialist 3xp0rt.

Internet Explorer, Firefox, Microsoft Edge, and Thunderbird are some of the most common online browsers that are affected by the infection.

It also targets wallets like Bitcoin Core and its derivatives, as well as crypto extensions like MetaMask, TronLink, Binance Chain Wallet, and Coinbase Wallet. MultiDoge and Ethereum wallets might also be harmed in the future.

The virus, according to 3xp0rt, only targets crypto extensions on browsers that use Chromium instead of Opera.

Mars Stealer, according to the cybersecurity expert, works by gaining access to a computer’s internal library files and performing a sophisticated sequence of technical code reconfigurations to carry out its tasks.

According to 3xp0rt:

Mars Stealer is an improved version of Oski Stealer. [It] has added [functionality]: anti-debug check, crypto extension stealing, but Outlook stealing is missing. The code has been refactored, but some algorithm remained stupid as in Oski Stealer.

The virus targets sensitive data saved in the wallet.dat file to steal a user’s wallet information. According to the internet security expert, the file contains information such as the address and private key access data. A grabber, loader, and self-removal function are also included in the virus.

Bitcoin (BTC) Still Bullish According To BlockTower

The continuous Bitcoin volatility, according to BlockTower Capital’s general partner Michael Bucella, should not come as a surprise because it is part of the asset’s development trajectory.

Bucella told CNBC that while Bitcoin is still a new asset class that is still growing, the future picture is still bright.

The price drop of Bitcoin below $35,000, according to Bucella, is also a chance for ordinary investors to re-enter the market.

Bitcoin is still firmly in growth mode, and if you look at a logarithmic chart, it’s still a long term bull trend. It’s still a young asset class, this is not all too surprising volatility, and Bitcoin and Ether were structurally low and declining over the last year

As a result of the sector’s wealth creation, he admitted that the large crypto growth forecasted for 2021 would not be sustainable. Because the increase overlooked basic reasons, it is difficult for the asset to maintain its price above $50,000, according to Bucella.

The asset’s decline began in the previous two months, when it fell below the $40,000 threshold. The top-ranked cryptocurrency was trading at $33,600 at press time, down more than 6% in the past 24 hours.

Similarly, he has urged investors not to be concerned about the market’s current volatility, stating that the digital currency would continue to rise rapidly in the future.

Historically, the high volatility of Bitcoin has enticed investors to participate, but according to Invesco, the circumstance will deter traders from doing so.
As a result, the investing juggernaut predicts that the Bitcoin bubble will break in 2022.

Google Going Crypto

As the firm looks to provide a wider range of financial services, including cryptocurrencies, Google has hired veteran PayPal CEO Arnold Goldberg to manage its payments division.

Google’s action comes after years of debating whether or not to invest directly in the embryonic blockchain technology. Twitter’s investment in crypto infrastructure, as well as Facebook’s efforts into the metaverse, look to be catching up to the internet giant.

Also Google hired a new “Founding Leader” for blockchain project, Venkataraman.

According to his LinkedIn page, Venkataraman, who has worked for Google for more than 18 years, brings more than 25 years of experience as a software engineer with firms such as IBM, as well as more than 10 years in paid advertising for the internet giant, to the table.

Polkadot (DOT) And Its Web3 Vision Of Parachains

Polkadot has unveiled the first of its parachains (or parallelized chain). The goal of parachains is to improve the interoperability of numerous blockchains. The Polkadot team spent five years developing the parachains, which were then auctioned off to teams. The marketplace plans to increase its current parachain slot allotment from five to 100.

According to Gavin Wood founder of Polkadot, the additional Relay Chain helps in coordinating the consensus and communication between parachains:

And as the ecosystem grows, especially with nascent emergence of metaverses, dozens of protocols will become increasingly visible. In that scenario, there will not be a single blockchain, but we will have several interconnected chains.

And he also added that the vision was to have multiple parachain model:

The parachain model was created with the belief that the future of Web3 will involve many different types of blockchains working together. Just as the current version of the internet caters to different needs, blockchains need to be able to provide a variety of services. Parachains solve this

Ethereum (ETH) Client Incentive Program To Reward Developers

Developers teams will get incentives in ETH that will be unlocked over time as part of the program. Each client team will receive 144 validators in total, or 4,608 ETH, worth about $17.8 million at current pricing. The program’s structure links teams with the network’s long-term health and guarantees that they are rewarded for developing secure software. The ETH 1 and ETH 2 Beacon chains will be merged sometime in the first quarter of 2022. Since the London update in early August, the network has burned 1.19 million ETH. At current pricing, this is worth over $4.6 billion, which corresponds to around 7,000 ETH (or $27 million) being burned per day.

The incentive program is setup to “ensure that client teams have a strong incentive to maintain the core Ethereum network over the long term.”. The teams eligible for the program include Besu, Erigon, Go Ethereum (Geth), Lighthouse, Lodestar, Nethermind, Nimbus, Prysm, and Teku.

The funds will be available immediately but withdrawals will be vested over several years.

Payroll Solutions Company Deel Integrates Stablecoin USDC And Solana (SOL)

Deel, a fintech company that specializes in payroll, has added two additional coins to its crypto portfolio. Contractors can now get their payments in USDC or Solana, the proof-of-stake blockchain’s native asset. Salary payments in bitcoin, ether, and XRP were previously supported on the site. In October, Deel secured $425 million in a Series D funding round.

Contractors will need a coinbase account in order to take advantage of the new functionality. Deel, according to their statements that cryptocurrencies offers a faster way for people to get paid with lower processing fees.

Deel’s clients include the likes of Coinbase, BlockFi, and Rarible.

Shiba Inu (SHIB) Tokens Can Now Be Used In Avalanche (AVAX) Network

Shiba Inu ($SHIB), a meme-inspired cryptocurrency that saw its price explode earlier this year, has been added to the Avalanche Bridge. The bridge will allow users to transfer their SHIB onto the Avalanche blockchain. Wrapped ether can be locked in the ChainBridge contract so an equivalent token on Avalanche can be minted. Shiba was listed for a spot trading pair on one of the world’s largest cryptocurrency exchanges this week, ByBit.

Avalanche has detailed that the Avalanche-Ethereum Bridge is a “two-way token bridge that enables seamless ERC-20 and ERC-721 transfers between Avalanche (via the C-Chain) and Ethereum.