5.1
Primer on keys
When we talk about keys, we are talking cryptographic sets of public-private keys. In blockchain realms, these are most often denoted by hexidecimal numbers. How those are generated is beyond the scope of this course. However, in Ethereum, think of a public key as describing an address where assets are stored (tokens/contracts, etc.), and the corresponding private key as the password that allows modifications of assets at that address1.
The public key can be derived from the private key, but not the other way around, so the public key is generally safe to distribute to others. Anyone can send tokens to any address if they have the public key, but only the private key allows moving the tokens from that address.
A digital wallet creates and stores the public/private key pair and can "sign" transactions with the private key to allow transactions from that address to be recorded on the blockchain.
For Rocket Pool, there are important keys to be aware of for both the Consensus and Execution Layers.
Now that Ethereum consensus is via Proof-of-Stake rather than Proof-of-Work, besides a standard Ethereum wallet (e.g. a Rocket Pool node wallet), those wishing to run a validator also require a set of validator keys and withdrawal keys. One node wallet/address can control multiple validators.
Note that the Rocket Pool smartnode aids users in creating these keys.
Validator Keys
Validator keys are used for signing the Consensus Layer transactions as required for a validator to perform its PoS duties (attestations, block proposals, etc.). Validator transactions happen quickly and constantly, thus, validator keys must be in a hot wallet (exposed to the internet) for the validator client manager. Of course, this poses a security risk, but one which can be mitigated (see below).
A validator is created, or activated, by sending 32 ETH to the Beacon Chain's Deposit contract. Along with the 32 ETH, this transaction also sends parameters called the deposit data. This data includes the new validator's public key and information on where withdrawals from this validator should go.
For a Rocket Pool Node Operator, the smartnode stack will help take your deposits, bundle it into a minipool, send it to the Beacon Deposit contract and generate the keys you need.
Withdrawal Keys
Note: There are two different "withdrawal" addresses that come up often. There is the Node withdrawal address, which tells your minipool where to send funds you personally have earned, and the address that the validator's withdrawal credentials use as described below. I will try to be clear on which is being discussed.
A validator's information, as stored in the Beacon Deposit contract, has a field called the Withdrawal Credentials. This field contains an address on the Execution Layer (EL) where rewards from validator duties are sent (called skimming), as well as, where unstaked ETH from exited validators is returned.
Previously, this field's value began with the characters 0x00
which signifies an older Ethereum key type (from PoW days). For validators to be able to withdraw staked funds (bonds and rewards), they will have a new key type that begins with the prefix 0x01
and points to an address on the EL.
Consider the Withdrawal Credentials:
0x010000000000000000000000e839a3e9efb32c6a56ab7128e51056585275506c
of transaction
0xf861929b69445fa24b98b2690a4de8a19126c0ef41640a4edcb707203db88282
which was a 32 ETH deposit to the Beacon Deposit contract (you can look up this transaction on beaconcha.in or etherscan, for example).
The prefix, 0x01
, shows that withdrawals from the validator will go to an address on the EL, and the end of the data, e839a3e9efb32c6a56ab7128e51056585275506c
, is the public key representing where the funds will go.
This design change in withdrawal keys has the benefit of allowing a validator's withdrawal credentials to point to a contract rather than a just a wallet. This change was pushed in large part by Rocket Pool to allow validators created from pooled deposits to send assets to contracts (like the minipool contracts) that could distribute funds to different entities, e.g. active and passive stakers, without needing to be controlled by a custodian or other human interaction. For Rocket Pool, the validator's Withdrawal Credentials in the Beacon Chain Deposit contract points back to your minipool contract.
The minipool contract helps properly figure out how much of the funds the Node Operator versus the rETH contract should get, then sends those amounts to the Node Operator withdrawal address and rETH contract.
There is ETH given out apart from the Consensus Layer validator payouts. These Execution Layer payouts for tips and MEV are discussed in section 5.4.
These occur via a separate mechanism than the validator duty payouts. To get these payments, a validator must have set the fee recipient2 key in their Consensus Layer node clients. The fee recipient is an Ethereum wallet address. When a validator is chosen to propose a block, EL fees are sent to this address. It is not stored on-chain! There is a trust assumption that the Validator Client and Beacon Node Client (both Consensus Layer Clients) are passing the fee recipient, properly. This is why you should run your own clients rather than trusting a third party. The Rocket Pool smartnode helps you run your own clients and properly pass the fee recipient to them.
Rocket Pool users can either use the RP fee distributor (a contract to help split rewards between active and passive stakers) for their fee recipient or they can opt into the Smoothing Pool section 5.3.
Rocket Pool Nodes and Node Withdrawal Keys
An RP node is a computer running EL and CL clients. CL clients include a Validator Client (VC) and Beacon Node (BN). These clients sync the EL and CL chains to a local database. A user creates or associates an Ethereum wallet to this client pair and registers with the smartnode stack (this wallet will contain the validator keys to sign transactions). This entity, registered onchain with Rocket Pool, is now a Rocket Pool Node.
As discussed above, initially your Node's withdrawal address is the same as your Node address. Remember, your Rocket Pool Node address is an Ethereum wallet needed to facilitate creating minipools and thus activating validators. The Node withdrawal address is where your minipool contract sends all your rewards and where it returns your bond when you exit your minipool.
If someone gained your Node keys, they would take control of all your validator funds. However, these two keys need not be the same. In fact, you must change your Node withdrawal address to keep your funds secure. It is highly recommended to change your Node withdrawal address to a cold wallet, like a Trezor or Ledger.
Separate Node wallet and Node withdrawal keys means:
Because the Node's validator keys must be accessed during validating, they are exposed on your Node. This comes with major security issues. However, if the Node withdrawal address is changed from the Node wallet address and one's validator keys are compromised, they can still get all their funds.
There is risk that a bad actor might try to get their validator slashed, but the bad actor can never get the validator funds themselves.
Once the Node's withdrawal address is changed, it can only be changed again by that address, not the original Node wallet.
1 Strictly speaking, an Ethereum address (location on the blockchain) is not the public key, but is derived from it.
2 Previously, the fee recipient was called the coinbase.
Further information on how wallets, keys, and addresses relate can be seen and experimented with on the amazing eth.build website. It includes many helpful tutorials, as well.