/** * Custom errors for the validator HA signer */ import type { SlotNumber } from '@aztec/foundation/branded-types'; import type { DutyType } from './db/types.js'; /** * Thrown when a duty has already been signed (by any node). * This is expected behavior in an HA setup - all nodes try to sign, * the first one wins, and subsequent attempts get this error. */ export declare class DutyAlreadySignedError extends Error { readonly slot: SlotNumber; readonly dutyType: DutyType; readonly blockIndexWithinCheckpoint: number; readonly signedByNode: string; constructor(slot: SlotNumber, dutyType: DutyType, blockIndexWithinCheckpoint: number, signedByNode: string); } /** * Thrown when the slashing-protection record for an in-flight signing operation can no longer be * updated because it is no longer owned by this node - for example, the stuck-duty cleanup loop * deleted the SIGNING row while the remote signer was slow. The produced signature must be * discarded rather than broadcast: with no protection record in place, a later attempt for the * same duty with different data would sign freely, which is slashable equivocation. */ export declare class SigningLockLostError extends Error { readonly slot: SlotNumber; readonly dutyType: DutyType; readonly nodeId: string; constructor(slot: SlotNumber, dutyType: DutyType, nodeId: string); } /** * Thrown when attempting to sign data that conflicts with an already-signed duty. * This means the same validator tried to sign DIFFERENT data for the same slot. * * This is expected in HA setups where nodes may build different blocks * (e.g., different transaction ordering) - the protection prevents double-signing. */ export declare class SlashingProtectionError extends Error { readonly slot: SlotNumber; readonly dutyType: DutyType; readonly blockIndexWithinCheckpoint: number; readonly existingMessageHash: string; readonly attemptedMessageHash: string; readonly signedByNode: string; constructor(slot: SlotNumber, dutyType: DutyType, blockIndexWithinCheckpoint: number, existingMessageHash: string, attemptedMessageHash: string, signedByNode: string); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZXJyb3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFFbEUsT0FBTyxLQUFLLEVBQUUsUUFBUSx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