Hive Dev Quickstart walkthrough (Step 1) - private local testnet
Background: I want to have a better understanding of the Hive ecosystem and blockchain. I will walk through the developer documentation and add my own personal notes as I go along. This information may help you if you're looking into becoming a developer or want a better understanding of the Hive Blockchain.
This journey will not cover the Node install and operations. I will be more focused on the development environment for now. In the future, I’ll focus on the node install and operation .
OS: Fedora/Redhat/Centos
Technology used : Docker
Quickstart-hive-full-nodes guide : https://developers.hive.io/quickstart/#quickstart-testnet
Docker image: https://hub.docker.com/r/inertia/tintoy
Tinman repo: https://gitlab.syncad.com/hive/tinman#running-testnet-witness-node-s-
Coding language ( Python ): https://developers.hive.io/tutorials/#tutorials-python
Docker run command (This creates the container from the docker image inertia/tintoy:latest)
( docker run --name hive-testnet -d -p 2001:2001 -p 8080:8080 -p 8090:8090 -p 8091:8091 -p 8092:8092 inertia/tintoy:latest )
The primary port needed for testing is 8090
OS Firewall issue : Fedora includes firewalld. You will need to open port 8090 if you wish to access the service remotely. Run the below commands to open port 8090
firewall-cmd --list-ports
firewall-cmd --add-port=8090/tcp --permanent
firewall-cmd --reload ( This may not work fully and require a service restart )
systemctl restart firewalld
Python:
Use pip to install beem
Beem source : https://github.com/holgern/beem
Beem project page : https://pypi.org/project/beem/
pip3 install beem
Install openssl-devel and python-devel
yum install gcc openssl-devel python-devel
Beem basic usage:
Type “beempy” and this will take you to the CLI
If you type currentnode , it will output the current node you are connected to.
beempy> currentnode
+----------+-----------------+
| Key | Value |
+----------+-----------------+
| Node-Url | https://anyx.io |
| Version | 1.25.0 |
| Chain | hive |
You’ll notice you are not connected to your test node. Beem will connect to the public nodes by default.
To connect your local test node use the command below.
beempy --node http://IP:8090
The three user accounts I will use for testing are tnman,porter and mandagoi. No particular reason for using these accounts. You can obtain the private keys for the accounts by running the below commands
docker exec -it <container_ID> get_dev_key tintoy owner-tnman active-tnman posting-tnman memo-tnman
docker exec -it <container_ID> get_dev_key tintoy owner-porter active-porter posting-porter memo-porter
docker exec -it <container_ID> get_dev_key tintoy owner-mandagoi active-mandagoi posting-mandagoi memo-mandagoi
((this step may not be needed as even when using the old snapshot. I was able to work with the testnet. More reading may be required to learn about the snapshot json file ))
Run a snapshot as the snapshot file in the docker image is dated for April 2021
/root/ve/tinman/bin/tinman snapshot -s https://anyx.io | pv -l > snapshot.json
(The above command took an hour to complete.)
If pv is not installed run apt install pv
Next run /root/ve/tinman/bin/tinman sample -i snapshot.json -o sample-snapshot.json
And remove snapshot.json
----------------------------- user accounts --------------
To grab some users accounts for testing i used the curl command
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_witness_accounts", "params":["a",10], "id":1}' http://localip:8090
https://developers.hive.io/apidefinitions/#condenser_api.lookup_witness_accounts-curl-examples
Returned dataset
{
"jsonrpc": "2.0",
"result": [
"mandagoi",
"mangou007",
"maninayton",
"mantaxr",
"mapetoke",
"marc5",
"marcbrands",
"marcelhattingh",
"marcj11",
"marcus747"
],
"id": 1
}
Next step will be to walk through the Python tutorials
https://developers.hive.io/tutorials-python/using_keys_securely.html
Leave Hive Dev Quickstart walkthrough (Step 1) - private local testnet to:
Read more #leofinance posts
Best Posts From expire0
We have not curated any of expire0's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From expire0
- Polygon reaches 100% network utilization within 24 hours
- Ngnix Docker setup Guide from scratch: Web 3 development Part 1
- Splinterlands: Bronze III Blues , 30 days of playing
- Hive Dev Quickstart walkthrough (Step 1) - private local testnet
- Why are people still using Ethereum
- Back at it. I got my mojo back . Blockchain training
- How to claim your ENS airdrop on Nov. 8th
- Halloween Kills -Summary Review
- Desktop build born date 10/1/2021
- Plex metadata mismatch
- Top youtuber "Omi in the Hellcat" indicted on Tax Evasion charges
- The Gateway (2021) Movie
- Candyman officially released to theaters
- Secure Messaging app {Anom} created by the FBI
- I made it to the promise land
- Brave Browser password manager
- My journey with learning Crypto
- Liquid exchange hacked for 80 Million in Crypto
- Tivo Device and Plex H.264 media