Dero Daemon - derod

From DERO Wiki
(Redirected from Dero daemon)
Jump to navigation Jump to search

The Dero Daemon - derod

The Dero deamon ('the daemon', 'node') is a Peer-To-Peer service that miners connect to in order to validate blocks and mine coins. There are many remote nodes that can be connected to should one want not to host their own node, but running the daemon on ones own network is recommended to not only get extra mining rewards, but to also show ones support for the Dero network and ones dedication to privacy, security, and anonymity. The daemon can run in the background on a personal computer, or run as a service on a dedicated server. A computer that is both mining and running the daemon can connect to itself. The daemon provides a multitude of services for interaction with the blockchain, for requesting information from the blockchain, and for peer-to-peer peer discovery. As miners mine Miniblocks, every 10th miniblock is considered the integrator block, which has 9x the difficulty, settles the whole block, and is sent to the daemons integrator address as a reward. This means that daemons get 1/10th of a block mined on their node. For a daemon to accept miners to connect to it and be considered a valid node, it must first sync to the network. This is shown visibly by the two numbers separated by a slash in the bottom left of the daemon. This represents the current height of the blockchain. The daemon will get blockchain information from its peers and build the entire chain locally, however there is an option to skip most of the building of the chain. Not building a full node however somewhat restricts what can be done on a node, including mining.

Running derod

Assuming that you have installed Dero on your machine, you will need to run derod locally in order for wallets to be able to sync with the network (unless the wallet is using --remote), or the miners to be able to GetWork from the network (unless the miner is pointed at another node with --daemon-rpc-address).

Launching derod

Using the command prompt or terminal, navigate to the Dero folder, and run the derod executable:

On Windows, its derod-windows-amd64.exe

On Linux, it is derod-linux-amd64

On Mac, derod-darwin-universal

If built from source, its derod

You will need to wait for derod to sync with the network, which takes some time; but there are several options to get synced.

Flags at Launch

By running the --help , you will have the following message that you can run at launch.

./derod-linux-amd64 --help
derod 
DERO : A secure, private blockchain with smart-contracts
Usage:
 derod [--help] [--version] [--testnet] [--debug]  [--sync-node] [--timeisinsync] [--fastsync] [--socks-proxy=<socks_ip:port>] [--data-dir=<directory>] [--p2p-bind=<0.0.0.0:18089>] [--add-exclusive-node=<ip:port>]... [--add-priority-node=<ip:port>]... [--min-peers=<11>] [--max-peers=<100>] [--rpc-bind=<127.0.0.1:9999>] [--getwork-bind=<0.0.0.0:18089>] [--node-tag=<unique name>] [--prune-history=<50>] [--integrator-address=<address>] [--clog-level=1] [--flog-level=1]
 derod -h | --help
 derod --version
Options:
 -h --help     Show this screen.
 --version     Show version.
 --testnet  	Run in testnet mode.
 --debug       Debug mode enabled, print more log messages
 --clog-level=1	Set console log level (0 to 127) 
 --flog-level=1	Set file log level (0 to 127)
 --fastsync      Fast sync mode (this option has effect only while bootstrapping)
 --timeisinsync  Confirms to daemon that time is in sync, so daemon doesn't try to sync
 --socks-proxy=<socks_ip:port>  Use a proxy to connect to network.
 --data-dir=<directory>    Store blockchain data at this location
 --rpc-bind=<127.0.0.1:9999>    RPC listens on this ip:port
 --p2p-bind=<0.0.0.0:18089>    p2p server listens on this ip:port, specify port 0 to disable listening server
 --getwork-bind=<0.0.0.0:10100>    getwork server listens on this ip:port, specify port 0 to disable listening server
 --add-exclusive-node=<ip:port>	Connect to specific peer only 
 --add-priority-node=<ip:port>	Maintain persistant connection to specified peer
 --sync-node       Sync node automatically with the seeds nodes. This option is for rare use.
 --node-tag=<unique name>	Unique name of node, visible to everyone
 --integrator-address	if this node mines a block,Integrator rewards will be given to address.default is dev's address.
 --min-peers=<31>	  Node will try to maintain atleast this many connections to peers
 --max-peers=<101>	  Node will maintain maximim this many connections to peers and will stop accepting connections
 --prune-history=<50>	prunes blockchain history until the specific topo_height

Using derod

Screenshot from 2022-07-28 10-19-24.png
how to derod's output

For most, the daemon will just do its thing and there will be little to no interaction required.

For your convenience, you can watch the locally running instance sync with the network on the bottom line of the terminal.

However, the daemon can be interacted with, and a list of commands and their uses can be displayed by typing help in the daemon and pressing enter.

Screenshot from 2022-07-28 10-23-06.png
commands:
	help		this help
	diff		Show difficulty
	print_bc	Print blockchain info in a given blocks range, print_bc <begin_height> <end_height>
	print_block	Print block, print_block <block_hash> or <block_height>
	print_tx	Print transaction, print_tx <transaction_hash>
	status		Show general information
	peer_list	Print peer list
	syncinfo	Print information about connected peers and their state
	bye		Quit the daemon
	ban		Ban specific ip from making any connections
	unban		Revoke restrictions on previously banned ips
	bans		Print current ban list
	mempool_print		print mempool contents
	mempool_delete_tx		Delete specific tx from mempool
	mempool_flush		Flush regpool
	regpool_print		print regpool contents
	regpool_delete_tx		Delete specific tx from regpool
	regpool_flush		Flush mempool
	setintegratoraddress		Change current integrated address
	version		Show version
	exit		Quit the daemon
	quit		Quit the daemon