Science | Exploring Validator Costs for Ethereum 2.0

Written by: Jim McDonald

Translation: Jhonny

Source: Unitimes

When the Ethereum 2.0 beacon chain launches later this year, it will require validators to protect the network. Running a validator will bring potential rewards and penalties; a common question is "How much money can I make by participating in verification?" The answer to this question requires two pieces of information: one is how much money the verifier can make, and the other is verification How much does the cost of the player need. This article focuses on the second issue.

To recap, running the Ethereum 2.0 beacon chain node software (hereinafter referred to as the "node") will require:

  • A computer capable of running a node (and associated validator client software) on it;
  • Connect to the network to communicate with other nodes so that the nodes have the latest information on the status of the beacon chain; and
  • Both computers and networks need to have sufficient uptime so that validators can participate in certification and receive rewards when needed.

Beacon nodes can run independently of the verifier client (for example, just to monitor the status of the entire Ethereum 2.0 network), but the verifier client must connect to a beacon node so that the verifier knows what needs to be proven (relevant (Read: The Ethereum Foundation: Participating in Eth2 Staking (Part 0)). Although the verifier may use other people's beacon nodes during the proof process, this makes the verifier dependent on the node's good behavior (such as ensuring sufficient uptime), so all serious verifiers will You want to run your own beacon nodes.

When running a validator, there are three main cost sources: setup costs, infrastructure costs, and operating costs. The setup cost is paid in advance in one lump and will not accumulate; the infrastructure cost is paid on a monthly basis, which is approximately the same every month; the operating cost is also paid on a monthly basis, but the changes between months may be very large. Over time, the expected change in the cost of the validator is shown in the following figure (note: the cost analysis in this article is speculative and fictitious, because the current beacon chain has not yet started):

Figure 1: Changes in validator costs over time, green for setup costs, red for infrastructure costs, and blue for operating costs

Costs are often considered purely monetary, but they also involve opportunity costs when managing long-term infrastructure.

Opportunity cost is the cost of doing one thing instead of the other: if you work for two hours, you get $ 100, but you choose to watch a movie in those two hours, your chance to watch that movie The cost is $ 100. Another way to see the cost of standby is to ask how much you value your time: if you do n’t choose to spend three hours replacing your hard drive, you choose to spend half a day among hundreds of available servers Pick one. How much time will it cost you to make this choice? The time cost mentioned in this article refers to the opportunity cost; individuals and companies need to make their own judgments about the value of this time.

Let's analyze each of the three cost sources mentioned above:

Setup cost

Setup costs are the time you spend on selecting, building, configuring, and testing hardware, operating systems, and software in order to run a verifier on a beacon node.

01. Selecting hardware

There is a lot of hardware that can be used to run nodes. The most basic requirement is that the hardware needs to be powerful enough to run the node software, and reliable enough, and does not require frequent maintenance. In addition, there are many decisions that may need to be made that will affect your choices, such as the size of the server, how much noise is running (this is important if the server is placed at home), and how much it consumes And more (see below for more information).

You might decide to use a service provided by a hosting provider, but many of the same problems persist. For example, how many CPUs does the service provider have? How fast are they? How much memory and how much storage should I choose? Should I spend extra money on a dedicated server instead of a virtual dedicated server? Choose independent disk, software RAID or hardware RAID? What is the network bandwidth?

Although using a hosting provider means that you are renting a server from a provider, rather than buying a server from a vendor, most of the above decisions still need to be made by you.

02. Select Operating System

There are two operating system choices: Windows-based and Linux-based. They all have many products and / or distributions that offer different features, require different levels of expertise to operate, and more. Safety and uptime are critical, and maintainability is next. There is no obvious "best" choice for an operating system, so choices often boil down to a combination of familiarity and features.

03. Select software

At the time of writing, there are 6 different implementations of the Ethereum 2.0 beacon chain node software, which are in different states of preparation. In addition to being written in different languages, they are often targeted at different markets: some provide a great experience on low-end hardware, some provide the features needed to run dozens or hundreds of validators, and so on.

The choice of software should be guided by the hardware and operating system previously selected and need to know the number of validators that will be running. Each software implementation needs to be evaluated to determine which is the most appropriate (note: for example, some beacon node software implementations are more suitable than other implementations to run multiple verifier instances and need to be evaluated).

04. Configure hardware, operating system, and software

Once the hardware, operating system, and software have been selected, they need to be configured. This will require setup (installing and starting software) and locking (removing unnecessary software, closing open ports, etc.). Configuring automated operating system updates, adding monitoring and similar features can help reduce future maintenance costs.

infrastructure

Infrastructure costs are relatively fixed and are paid monthly.

01. Depreciation costs

Depreciation cost is a large cost when running the verifier service. It means that the cost of the computer running the verifier process is spread over a period of time (taking into account its life). For computer equipment, the time period is generally 36 months, so the monthly depreciation cost is calculated as follows:

Depreciation cost = hardware cost / 36

For example, a regular desktop computer may cost $ 600, so the monthly depreciation cost is:

Depreciation cost = 600/36 = $ 16.66

02. Electricity cost

Power costs are a recurring cost and are highly dependent on the hardware used. Ethereum 2.0 validators need to be online to get the maximum reward, so the electricity bill will increase. Power consumption (power) is calculated in Watts, and electricity costs are usually measured in kilowatt hours (KWh), which is one kilowatt of electricity per hour. The monthly cost is calculated as follows:

Electricity cost = power consumption * electricity duration * KWh cost

For example, the power consumption of an ordinary desktop computer is 150 watts (0.15 kW) per hour, the reference electricity price (KWh) is about $ 0.10, and the monthly electricity bill (assuming 30 days per month) is:

Electricity cost = 0.15 * 24 * 30 * 0.10 = 10.8 USD.

03. Network connection costs

Network costs for home network connections are usually a flat monthly fee, which makes them easy to calculate. In addition, the network is usually a shared resource, other systems share the same connection, and allow sharing costs.

However, many server hosting providers use a pay-per-gigabyte model where the more data used, the higher the end-month charges. If a node wants to better grasp the state of the Ethereum 2.0 beacon chain and obtain the highest reward, it needs to communicate with other nodes as much as possible, but due to this model of paying by GB, the nodes communicate with The more nodes, the more fees come from the hosting provider. Ultimately, you need to consider the increased costs and increased returns to choose a suitable balance.

04. Operating system costs

You can run Ethereum 2.0 nodes on Windows or Linux-based operating systems. For many, the former is more familiar, but there is a license fee to pay. If the operating system is purchased, its depreciation cost can be calculated based on the hardware depreciation cost calculation method.

Operating cost

Similar to infrastructure costs, operating costs are paid on a monthly basis, but the size of operating costs may change significantly from month to month. The reason is that the work that needs to be performed occurs irregularly, and when it happens, the cost will be significant. For example, upgrading an operating system may take several hours and is updated every six months; it is not possible to spread this time to half an hour each month.

01. Maintenance of hardware / operating system / software

Hardware failures, full disks, and end of software life cycles: These facts mean that sometimes it is necessary to take action to ensure that nodes continue to operate.

Maintenance costs fall into two categories: the time it takes to perform maintenance, and the loss of funds during maintenance. In order to minimize the occurrence of these two, it is best to perform preventive maintenance on a regular basis; however, this will require a monitoring system, which itself needs to be managed and maintained.

It is easy to spend a lot of time on maintenance activities, so it is important to be able to accurately calculate the time spent on maintenance to ensure that the cost of maintenance is proportional to the validator rewards available during that period.

02. Software upgrade

The Ethereum 1.0 network has shown in the past few years that nodes need to be upgraded from time to time. Sometimes in response to bugs, sometimes in order to implement protocol changes, improve performance, and so on. Upgrades are similar to maintenance, except that upgrades can be planned in advance so that they can be performed at the most convenient time for the node operator.

03. Re-evaluation of node implementation

Node software will not stagnate, neither will the companies that build the software. For example, the Parity team recently announced that they will no longer support their Ethereum 1.0 client, which some companies have been using for many years. As node implementations change, it will be important to re-evaluate their features and performance in order to switch to a different implementation when more appropriate.

Cost increase

The cost mentioned above is based on the fact that you run a fixed number of validators, so what if you want to run more validator instances at a later time? What will happen to costs?

During phase 0, most of the work is performed by the beacon nodes, and the verifier only signs the occasional data segments. Therefore, regardless of the number of validators you run, the overall cost remains relatively stable, with the occasional need to purchase new infrastructure.

Figure 2: Projected cost growth trend of adding validators during phase 0

Phase 1 will introduce more work for validators, so as the number of validators you run increases, this will result in the need for additional servers. As a result, costs will increase more frequently as new servers need to be purchased, configured, and maintained.

Figure 3: Projected cost growth trend of adding validators during Phase 1

Phase 2 will introduce a very large amount of work for each validator, and as a result, each server will only run a relatively small number of validators. This means that as the number of validator instances you run increases, the corresponding cost will more likely be consistent with it.

Figure 4: Projected cost growth trend of adding validators during Phase 2

to sum up

Running a validator in Ethereum 2.0 will bring many costs, such as setup costs, hardware and software depreciation costs, and ongoing maintenance costs. The biggest cost will likely soon turn into time cost in maintenance work and other occasional work. Getting the best revenue requires keeping costs low without sacrificing security or uptime, and you must consider how costs will increase accordingly as Ethereum 2.0's Phases 1 and 2 arrive.