alderconfidential DA on Solana
Guides

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_bond SOL plus rent for the DaNode PDA (126 bytes) 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:

ts
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:

ts
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) if open_challenge_count > 0 and AlderError::UnbondCooldownActive (6024) until the Solana slot reaches node.unbond_unlock_slot (the latest expiry_slot among blobs attested by this node).
  • Partial withdrawal: remaining bonded_lamports must stay >= config.min_node_bond, or the program fails with AlderError::BondTooLow (6004).
  • Full withdrawal (amount_lamports == bonded_lamports): sets bonded_lamports = 0 and transitions status to NodeStatus::Unbonding.
ts
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:

ts
const respondBuild = await sdk.api.buildRespondChallenge(challengeId, {
  nodeOperator: operatorPubkeyBase58,
  cellDataBase64: localCellBytesBase64,
})
// Sign respondBuild.transactionBase64 with operator wallet and submit via submitTransaction

The 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:

ts
const claimBuild = await sdk.api.buildClaimNodeFees(operatorPubkeyBase58, {
  operator: operatorPubkeyBase58,
})
// Sign claimBuild.transactionBase64 with operator wallet and submit

Calling claim_node_fees when earned_fee_balance == 0 fails with AlderError::NothingToClaim (6021).

Operator Error Reference

Program ErrorCodeCause
BondTooLow6004Initial bond or post-withdrawal remaining bond is below min_node_bond
InsufficientBond6006Requested withdrawal exceeds bonded_lamports or available lamports above rent + earned fees
NodeNotActive6014Node is not Active or has zero remaining bond
ChallengeWindowElapsed6018respond_challenge arrived after deadline_slot
NothingToClaim6021earned_fee_balance is zero
OpenChallengesExist6023withdraw_bond blocked while open_challenge_count > 0
UnbondCooldownActive6024withdraw_bond blocked until unbond_unlock_slot

Next Steps