Skip to content

guardian and relayer daemons (the off-chain half of the bridge) #3

Description

@dendisuhubdy

The wire format is frozen (spec/ATTESTATION.md) and all five verifiers pin their accept/reject to the 39 shared vectors, but nothing runs the format end to end: no guardian daemon watches a chain and signs, and no relayer daemon submits attestations. Until both exist, no token moves.

Guardian daemon (one per guardian, keys on distinct operators/hosts — no host may hold five):

  • watch lock events on the four source chains (MessagePublished on EVM/TVM, PostedMessage PDAs on Solana) and Rand's rand_getBridgeBurn log;
  • wait the emitter's consistency level before signing (Ethereum 1/finalized, BSC 15, Tron 19/solidified, Solana 1);
  • rebuild the body from the event plus block timestamp, emitter chain id and emitter address, then sign mu = keccak256(keccak256(body)) — secp256k1, low-s, over the wire bytes exactly;
  • after a guardian-set rotation, re-sign in-flight transfers under the current set (the superseded set's grace window is 86,400 s; rotations themselves must be signed by the current set);
  • never sign a body whose emitter the destination would reject (registered emitters table, to_chain/token_chain rules, fee <= amount, amount within u64).

Relayer daemon (permissionless; anyone may submit):

  • submit lock attestations to Rand as BridgeAttest and burn attestations to the home endpoint's release;
  • Solana specifics: prepend an idempotent create-ATA instruction for the recipient's associated token account, keep the transaction within 1,232 bytes (address lookup tables if the guardian set ever grows), retry same-slot ["msg", sequence] PDA collisions on lock;
  • handle CommitmentExists on Rand by re-sealing the deposit note (deposit_note recomputes it) — see the fullnode issue on commitment front-running;
  • EVM: nothing special — release(bytes) and submitGuardianSetUpgrade(bytes) are open calls; gas pricing is the only policy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions