Operate a Bonded DA Node
Register a DA node with a SOL bond, top up or withdraw bond, answer on-chain challenges, and claim earned SOL availability fees.
DA node operators bond SOL on chain in a DaNode PDA (["da_node", operator], 126 bytes), store assigned coded ciphertext shards at each blob's retention depth d, serve sampling and reconstruction queries, and earn the node share of SOL availability fees.
Prerequisites
- A Solana operator wallet holding at least
ProtocolConfig.min_node_bondSOL plus rent for theDaNodePDA (126bytes) and transaction fees - An HTTPS endpoint URL (up to 256 characters) serving coded cell requests
- Check the current minimum bond via
GET /v1/network/telemetry(minNodeBondLamports)
1. Register and Bond SOL (register_node)
You can register directly on /nodes with your connected wallet, or build the unsigned v0 register_node transaction through @alder/contract / @alder/sdk:
import { createAlderSdk } from '@alder/sdk'
const sdk = createAlderSdk('http://127.0.0.1:42102')
const telemetry = await sdk.api.telemetry()
console.log('Min bond (lamports):', telemetry.minNodeBondLamports)
const regBuild = await sdk.api.buildRegisterNode({
operator: operatorPubkeyBase58,
endpoint: 'https://da-node-01.example.com',
bondLamports: telemetry.minNodeBondLamports, // must be >= min_node_bond
region: 'us-east',
})
// Sign regBuild.transactionBase64 with the operator wallet, then submit:
const submitted = await sdk.api.submitTransaction({
id: regBuild.id,
signedTransactionBase64: signedBase64,
})
console.log('Node PDA:', regBuild.nodePda, 'sig:', submitted.signature)On chain, register_node hashes endpoint into endpoint_hash: [u8; 32], transfers bond_lamports from operator into the DaNode PDA via the System Program, sets status = NodeStatus::Active, and emits NodeRegistered.
2. Top Up or Withdraw Bond
Topping Up (top_up_bond)
Adding SOL bond increases DaNode.bonded_lamports. If a node was previously Slashed or Unbonding and the new balance reaches min_node_bond, top_up_bond automatically restores status = NodeStatus::Active:
const topUpBuild = await sdk.api.buildTopUpBond(operatorPubkeyBase58, {
operator: operatorPubkeyBase58,
amountLamports: '1000000000', // 1 SOL
})Withdrawing (withdraw_bond)
withdraw_bond transfers SOL directly from the DaNode PDA back to operator while preserving PDA rent exemption and unclaimed earned_fee_balance:
- Active custody and challenge guards: fails with
AlderError::OpenChallengesExist(6023) ifopen_challenge_count > 0andAlderError::UnbondCooldownActive(6024) until the Solana slot reachesnode.unbond_unlock_slot(the latestexpiry_slotamong blobs attested by this node). - Partial withdrawal: remaining
bonded_lamportsmust stay>= config.min_node_bond, or the program fails withAlderError::BondTooLow(6004). - Full withdrawal (
amount_lamports == bonded_lamports): setsbonded_lamports = 0and transitionsstatustoNodeStatus::Unbonding.
const withdrawBuild = await sdk.api.buildWithdrawBond(operatorPubkeyBase58, {
operator: operatorPubkeyBase58,
amountLamports: '500000000', // 0.5 SOL
})3. Responding to Missing-Cell Challenges (respond_challenge)
Monitor GET /v1/challenges or the challenge.opened SSE event on /v1/events. When a challenge targets your nodeOperator for (blobId, row, col), respond before deadlineSlot:
const respondBuild = await sdk.api.buildRespondChallenge(challengeId, {
nodeOperator: operatorPubkeyBase58,
cellDataBase64: localCellBytesBase64,
})
// Sign respondBuild.transactionBase64 with operator wallet and submit via submitTransactionThe program verifies challenge.status == ChallengeStatus::Open, slot <= challenge.deadline_slot, and the full Merkle inclusion proof of cell_data at (row, col) against blob.commitment_root on chain, then marks the challenge Resolved and decrements open_challenge_count. Missing deadline_slot allows any caller to invoke slash_node, deducting slash_bps of bonded_lamports (split 50/50 between the challenger and config.fee_recipient).
4. Claiming Earned SOL Fees (claim_node_fees)
When attest_availability settles a blob, the node share of the SOL fee (fee - protocol_fee) vests inside BlobRecord.escrowed_fee until expiry_slot. Once expiry_slot is reached, alder-keeper executes expire_blob on chain, transferring the vested SOL into the DaNode PDA and crediting earned_fee_balance (assuming blob.failed_challenges == 0; if the node was slashed on that blob, the vested fee forfeits to fee_recipient). Claim accumulated fees at any time on /nodes or via the API:
const claimBuild = await sdk.api.buildClaimNodeFees(operatorPubkeyBase58, {
operator: operatorPubkeyBase58,
})
// Sign claimBuild.transactionBase64 with operator wallet and submitCalling claim_node_fees when earned_fee_balance == 0 fails with AlderError::NothingToClaim (6021).
Operator Error Reference
| Program Error | Code | Cause |
|---|---|---|
BondTooLow | 6004 | Initial bond or post-withdrawal remaining bond is below min_node_bond |
InsufficientBond | 6006 | Requested withdrawal exceeds bonded_lamports or available lamports above rent + earned fees |
NodeNotActive | 6014 | Node is not Active or has zero remaining bond |
ChallengeWindowElapsed | 6018 | respond_challenge arrived after deadline_slot |
NothingToClaim | 6021 | earned_fee_balance is zero |
OpenChallengesExist | 6023 | withdraw_bond blocked while open_challenge_count > 0 |
UnbondCooldownActive | 6024 | withdraw_bond blocked until unbond_unlock_slot |
Next Steps
- Read the full node account layout and instructions in `alder_da` Program Reference.
- Understand how SOL availability fees split between nodes and
ALDRbuyback-and-burn in `ALDR` Tokenomics.