Skip to main content

FAQ: mining and resources

1. What type of rig should I use for mining HTR?

It is not feasible anymore to mine HTR using neither a CPU nor a GPU. For mining HTR, it is strongly recommended the use of an Application-Specific Integrated Circuit (ASIC). Check the current Hathor hash rate accessing the Explorer graphical tool.

2. How long does Hathor Network need to mine a block?

On average, each block takes 30 seconds to be mined.

3. How can I do PoW for transactions sent from my wallet since I don't have a mining rig?

Transactions sent from Hathor wallets are mined in our public transaction mining service by default. But you could also run your own mining service. More information can be found in the article On the scalability of the public Tx Mining Service.

4. How can I run the chain locally with no nodes and make my own chain from it?

This involves running a private network. All details of how to go through this procedure are available in the RFC-0033: Private Network Guide.

5. Is Hathor compatible with Ethereum Virtual Machine?

No, Hathor is not EVM compatible. There are no plans for an EVM because it needs Turing completeness. Hathor aims to be Turing incomplete to obtain good performance and also for security reasons.

EVMs are also very slow, complex, and expensive. The Hathor architecture can support an EVM but there are more cons than pros when thinking about being Turing-complete.

6. How can I validate an address?

For JavaScript projects, there is the hathor-wallet-lib with some logic to validate addresses. The lib must be added to the project through the command

npm install @hathor/wallet-lib

and the following code snippet can be used:

import walletLib from '@hathor/wallet-lib';

const testnet = new walletLib.Network('testnet');
const mainnet = new walletLib.Network('mainnet');
const testAddress = 'WdaaBTSs5tuh3qSZ4TMxL3sYUsdkh2EDku';

const address = new walletLib.Address(testAddress, { network: testnet });
console.log(address.isValid()); // true

const address2 = new walletLib.Address(testAddress, { network: mainnet });
console.log(address2.isValid()); // false

For direct address validation without the hathor-wallet-lib dependency, you can replicate the Address class's validation method. Basically, this validation involves three steps:

    1. Make sure the address is 25 bytes
    1. Check address checksum
    1. Validate byte version - the first byte corresponds to the mainnet

The third option is to use the full node API for this. When running your own node, you can use the validate_address endpoint.