Validator Consolidation
The Pectra upgrade introduces major improvements to the process of validator creation and management across both Ethereum and SSV staking APIs. These enhancements improve scalability, enable larger validator's effective balance (up to 2048 ETH), and streamline flows using 0x02
type of withdrawal credentials.
You can now consolidate your stakes and merge multiple existing validators into one to share a single withdrawal address. By this measure, the following benefits can be gained:
- Easing the process of validator management
- Reducing the number of active validators tied to the same withdrawal address
- Migrating the withdrawal credentials from the
0x01
type to0x02
which enables auto compounding and simplifies future staking operations - Preparing the infrastructure for advanced staking operations, such as top-ups and partial withdrawals
To consolidate multiple validators:
- Create the consolidation request.
- Sign and broadcast the transaction.
Request examples are provided using cURL.
The flow is supported for both Ethereum and SSV validators via the same endpoint.
1. Create Consolidation Request
Send a POST request to /api/v1/eth/staking/direct/tx/consolidation-validators to prepare a transaction for merging several source validators into a target one.
Note that the maximum effective balance of the target validator is 2048 ETH.
Example request:
curl --request POST \
--url https://api.p2p.org/api/v1/eth/staking/direct/tx/consolidation-validators \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--data '
{
"withdrawalAddress": "0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb",
"sourcePubkeys": [
"0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39",
"0x4Ef81c0018aB0DCbBdC8915D26efAcEa7CDef61eE9aBdddcBdAD2f2F04c5b6E4fBA6F5afD1Ad46267c1DC8544E690fE4"
],
"targetPubkey": "0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39"
}
'
withdrawal address
— withdrawal address for the target validator.sourcePubkeys
— list of public keys belonging to the source validators.targetPubkey
— public key of the target validator.
Example response:
{
"error": null,
"result": {
"list": [
{
"serializeTx": "0x02f87883088bb080840422bd...334caaf5e9c0",
"gasLimit": "1000000",
"data": "0xad9049587a26e8db61f6...1549f334caaf5e9",
"value": "1",
"chainId": 560048,
"type": 2,
"maxFeePerGas": "2211533588",
"maxPriorityFeePerGas": "69385672"
}
]
}
}
serializeTx
— serialized unsigned transaction.gasLimit
— maximum gas limit for this block.data
— transaction data.value
— amount this transaction is sending in Wei.chainId
— chain ID this transaction is authorized on, as specified by EIP-155.type
— EIP-2718 type of this transaction envelope.maxFeePerGas
— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei.maxPriorityFeePerGas
— price per unit of gas in Wei, which is added to the EIP-1559 block's base fee. This added fee is used to incentivize miners to prioritize this transaction.
2. Sign and Broadcast Transaction
Use serializeTx
from the previous step to sign and send the signed transaction to the Ethereum network.
By broadcasting this transaction, you are queueing the consolidation request. After the transaction is processed in the chain's queue, the source validator will be closed, and the resulting target validator will use the 0x02
type of withdrawal credentials.
Updated 12 days ago