# Hive Witness

Hive witnesses<ref>HIVE Whitepaper (2020) https://hive.io/whitepaper.pdf</ref> are block producers for the Hive blockchain that operate servers called witness or consensus nodes. They also take part in governance activities: setting [price feeds](/wiki/Price-Feed), Hive [account creation fees](/wiki/Account-Creation), [HBD savings](/wiki/Hive-Backed-Dollar#Savings) interest rates and accepting protocol changes in blockchain [hardforks](/wiki/Hard-Fork)<ref>Hard Fork: What It Is in Blockchain, How It Works, Why It Happens https://www.investopedia.com/terms/h/hard-fork.asp</ref>. Any Hive user can run a witness node by setting up the required hardware, installing the software, creating special signing keys and syncing the node to the Hive blockchain<ref> https://developers.hive.io/quickstart/#quickstart-hive-full-nodes</ref>. Thereafter, they need to attract votes in order to be ranked, as the ranking system determines how many blocks a witness gets to produce.

## Block production
When blocks are produced by a blockchain, there are 3 main methods of reaching consensus<ref>What Are Consensus Mechanisms in Blockchain and Cryptocurrency? https://www.investopedia.com/terms/c/consensus-mechanism-cryptocurrency.asp</ref> for the data in the ledger:

1. **Mining** - Proof of Work (PoW), where computers compete to solve algorithms to produce a block
2. **Proof of Stake** (PoS) - block producers are chosen based on the size of their staked tokens on a network
3. **Delegated Proof of Stake** (DPoS) - members of the network use their staked tokens to vote to choose which block producers are selected

Hive uses [DPos](/wiki/Delegated-Proof-Of-Stake). The first 20 witnesses produce blocks on a rotating schedule in randomized order, witnesses ranked 21 and lower are treated as backup witnesses and given opportunities to produce blocks in proportion to the amount of staked support they receive.
Hive [Blocks](/wiki/Block) are produced at three second intervals, which allows for high speed transactions.
If a witness is unable to sign a block due to any kind of technical issue, the block is skipped and that particular witness is recorded as having missed a block. Production then continues with the next scheduled witness .

10% of the daily inflation<ref>Cryptocurrency Inflation and Deflation https://corporatefinanceinstitute.com/resources/cryptocurrency/cryptocurrency-inflation-deflation/</ref> is distributed among the witnesses who sign blocks, in proportion to the number of blocks they sign.

## Witness activities
Witnesses must run a witness node which signs blocks that validate transactions and participate in Hive governance, namely

1. Setting dependable and consistent [price feeds](/wiki/Price-Feed) to promote exchange rate stability, price accuracy and dependable monetary policy<ref>Monetary policy of cryptocurrencies, explained https://cointelegraph.com/explained/monetary-policy-of-cryptocurrencies-explained</ref>
2. Setting new [account creation fees](/wiki//Account-Creation).
3. Setting the [HBD saving interest rate](/wiki/Hive-Backed-Dollar#Savings) on HBD which is transferred to savings within the wallet. HBD not in savings doesn't attract interest.
4. Applying protocol changes to the blockchain ledger: the community may agree on a major shift that requires changes in the core protocol of the blockchain, which is called a [[Hard Fork]].
Hardforks and key protocol changes on Hive are taking effect when they are accepted by 17 out of 20 consensus witnesses. Witnesses accept protocol changes by updating their nodes to the latest version. Those that do not update their node to the latest version will be unable to produce blocks once a hardfork has taken effect.

## Voting for Witnesses
All Hive accounts with Hive Power, that is Hive staked in their wallets, may vote for up to 30 witnesses. The total amount of staked Hive voting for each witness is used to rank consensus witnesses. While the only task that is required to become a witness is running a consensus node, witnesses usually attract votes based on the services they supply to the Hive community, such as developing [Dapps](/wiki/Decentralized-Application) or working on the Hive core code.
Voting for witnesses is accessed from a users wallet requires using your Active Posting authority. Some frontends like [[Peakd]] or [[Ecency]] have a witness-voting in their settings.

## Setting up a witness
To foster more decentralization, anybody is encouraged to setup a witness server. Hardware requirements have been lowered considerably over the last years, and with the availability of docker images and tutorials<ref>https://peakd.com/hive-121566/@stayoutoftherz/wie-man-einen-hive-witness-node-aufsetzt-ein-tutorial-fur-computerlaien</ref> it's also possible for users without specialized IT-skills.

## Further Reading
[[Blockchain]]
[[Price Feed]]
[[Reward Pool]]
[[Hive Node]]