Hopr

Hopr Relay States Before Payment Reconciliation

Hopr separates relay work from final payment: a valid packet carries a signed ticket, a matching downstream acknowledgement proves successful forwarding, and only a winning acknowledged ticket can reach redemption. Tracking those transitions prevents operators from treating a stored ticket, a relay proof, and an on-chain balance update as the same event.

The timeline begins before packet creation, passes through ticket commitment and acknowledgement, and then branches to a losing result, accepted redemption, or channel closure. Each boundary has different evidence and a different stop condition.

Key takeaway: Relay work becomes a reconciled payment only after acknowledgement, a winning-ticket check, accepted redemption, and a matching channel-state update.

Packets, Proofs, and Payment Records

The packet, its attached ticket, and the payment channel describe separate parts of one relay service. The packet carries application data, the ticket commits economic value, and the channel limits what can later be claimed.

Before a packet leaves, the relevant outgoing channel must be OPEN, point in the required payment direction, use the current epoch, and hold enough balance for the proposed ticket. Packet construction also binds the ticket to a channel identifier, an index, a winning probability, and a Proof of Relay challenge. If the necessary open channel is absent, a multi-hop ticket for that edge cannot be created.

The committed state begins when the sender signs the completed ticket and attaches it to the packet. Commitment does not mean the relay has earned payment. It records a conditional obligation whose challenge can be solved only after the next node processes the packet and returns the right acknowledgement material.

These working labels help operators read the timeline, but they do not replace protocol types. A verified ticket has passed issuer and field checks. An unacknowledged ticket is the pending record held after forwarding. An acknowledged ticket contains the response needed for the winning test.

What Changes When a Relay Forwards a Packet?

Forwarding moves the incoming ticket from validation into a pending proof state. The relay checks its signature, channel relationship, epoch, amount, available balance, and Proof of Relay hint. It then stores the verified ticket as unacknowledged, creates a replacement ticket for the next relay, and forwards the transformed packet. If a required downstream channel is not OPEN, forwarding stops.

The next node sends an acknowledgement back to the previous relay. A successful acknowledgement carries the secret needed to finish that relay's ticket challenge. Failed packet processing also produces a random acknowledgement, so the mere arrival of an acknowledgement cannot establish success. The relay must validate the signature, derive the expected hint, locate the stored ticket, and reconstruct the challenge response.

Acknowledgement Before Winning Status

Acknowledgement completes the relay proof, not the payment. A matching response changes the stored record from unacknowledged to acknowledged and proves the relevant downstream forwarding step. The node then derives the material used to test whether the ticket wins. Acknowledged, winning, redeemable, and redeemed are therefore separate states. Collapsing them into one paid label hides the point where a valid relay receives no claimable ticket.


When Does a Ticket Become Redeemable?

A ticket becomes redeemable after acknowledgement, derivation of the domain-bound VRF data used for a claim, and a successful winning test. The relay combines its own secret with the valid downstream acknowledgement, derives the ticket response, and computes the verifiable random function data tied to the redeemer and execution domain.

An acknowledged ticket is winning only when its derived luck value falls below the winning probability encoded in that ticket. A losing ticket still records completed relay work, but it carries no amount the relay can claim. This probabilistic split lets many off-chain tickets represent relay activity without turning every packet into a blockchain transaction.

Redeemable status is still not settlement. The claim must pass the ticket signature, channel identifier, epoch, index, challenge response, winning proof, and balance checks. The matching channel must exist and must not be CLOSED. Any mismatch leaves the channel unchanged, even when the local ticket record had already been classified as winning.

Channel State Versus Ticket State

Channel state controls whether new obligations or existing claims can use a particular payment direction. The protocol defines OPEN, PENDING_TO_CLOSE, and CLOSED states. Each channel also carries a balance, ticket index, and epoch, all of which redemption uses to reject stale or inapplicable tickets.

An OPEN channel supports new multi-hop tickets and valid claims. PENDING_TO_CLOSE blocks the source from using the channel for new relay traffic while preserving a notice period for the destination to claim pending rewards. CLOSED ends further channel operations and makes unclaimed tickets unusable against that channel.

Ticket state answers a different question: how far has one relay obligation progressed? A signed ticket can become verified, unacknowledged, acknowledged, winning, redeemable, and finally redeemed. Some transitions occur entirely off-chain. Only accepted redemption changes the economic fields in global channel state.

The two timelines meet at strict boundaries. Ticket epoch must equal channel epoch, the claim index cannot trail the channel ticket index, and the channel needs enough balance for the amount. This is why a locally valid proof can coexist with an ineligible claim. The cryptography may establish relay work while later channel state prevents payment.

Payment Reconciliation Across State Boundaries

Reconciliation occurs when a valid winning-ticket redemption changes the authoritative channel record. Successful redemption decreases the channel balance by the ticket amount. It also moves the channel ticket index to the redeemed ticket's index plus its index offset. Together, those changes show the claim affected channel accounting rather than remaining a local expectation.

A submitted claim does not provide that evidence by itself. Submission can fail validation or wait without producing the required state change. Compare the accepted redemption with the resulting balance, ticket index, and epoch before marking payment reconciled. If an index advances beyond an older ticket, that older claim may no longer satisfy the redemption rule even if its relay proof remains valid.


Which Evidence Confirms the Relay Cycle Is Complete?

Completion depends on the branch the ticket takes. A losing acknowledged ticket ends without a channel debit. A winning ticket remains economically pending until an accepted redemption updates its channel or closure makes the ticket unclaimable. The following checks separate a finished relay proof from a reconciled payment:

Which Evidence Confirms the Relay Cycle Is Complete?: Packet forwarding indicates an attempted service, acknowledgement establishes the relay proof, the winning test determines claimability, and the channel update establishes payment. If one boundary lacks evidence, keep every later state unconfirmed rather than inferring it from an earlier event.

Open full-size image

Packet forwarding indicates an attempted service, acknowledgement establishes the relay proof, the winning test determines claimability, and the channel update establishes payment. If one boundary lacks evidence, keep every later state unconfirmed rather than inferring it from an earlier event.


Closing the Channel Without Losing Claimable Work

Channel closure ends the channel's payment lifecycle. When the source initiates closure, the channel enters PENDING_TO_CLOSE. New relay use stops, but the destination can still claim eligible rewards during the notice period. The closing timestamp and applicable notice rule determine the remaining claim window.

The notice period is measured from shared block timestamps, so a local wall-clock estimate is not authoritative. Pending winning tickets need review before the period expires. The destination can also close a non-closed channel unilaterally, but any unclaimed rewards become unavailable after that transition.

CLOSED is the exited state: the balance resets to zero, the epoch advances, and no later reward claim can use the former channel state. An old ticket may remain in local storage, yet its epoch and closed channel make it ineligible. The next decision is whether any acknowledged winning tickets remain claimable before initiating or finalizing closure.

Hopr: what people ask

Does Every Relayed Packet Create an on-chain Transaction?

No, relayed packets do not each create an on-chain transaction. The payment channel carries many relay obligations without requiring one blockchain transaction for every packet. Each hop uses a signed probabilistic ticket, and the relay stores it off-chain while waiting for acknowledgement. Only acknowledged tickets that meet the winning condition can move toward redemption. This shifts packet-level activity away from the ledger while preserving an on-chain route for valid claims.

Can opposite-direction Channels Exist Between the Same Two Nodes?

Yes, opposite-direction channels can exist between the same two nodes. Hopr payment channels are unidirectional, so each direction has its own balance, ticket index, epoch, and lifecycle status. A claim must match the directional channel identifier recorded in its ticket. Activity in the reverse channel does not automatically settle the claim, update its accounting, or make its ticket valid.

Which Ticket Fields Tie a Claim to Current Channel State?

Several ticket fields bind a claim to current channel state. The channel identifier, channel epoch, ticket index, index offset, amount, and signature connect the ticket to the payment record used for redemption. The encoded winning probability and challenge govern later win and Proof of Relay checks. Matching node identities alone are insufficient because the current epoch, index, balance, and cryptographic proof must also pass validation.

When Should a Relay Discard an Unacknowledged Ticket?

A relay should discard an unacknowledged ticket after the applicable waiting period passes without a matching acknowledgement. The protocol does not place one universal duration inside the ticket. Before changing the record, the relay must distinguish a delayed acknowledgement from an invalid one: the signature must verify, and the derived hint must locate the stored ticket. An unmatched or invalid acknowledgement does not complete the ticket.

Can Aggregated Winning Tickets Be Treated as Settled Payments?

No, aggregation does not prove a payment has settled. A transferable winning-ticket record supports off-chain aggregation or transfer, but it is not evidence that channel balances changed. Conversion into redeemable form still requires checks covering the issuer, signature, winning condition, and domain-bound proof. Settlement then requires an accepted claim against eligible channel state and the corresponding accounting update.

Do Direct Packets Create Payable Relay Tickets?

No, a direct packet does not create a payable relay ticket. For a zero-hop packet sent from sender to recipient, the protocol still constructs a ticket, but its amount, index, and channel epoch are zero, and its winning probability is zero. Any channel between those endpoints is ignored for this case. The structure keeps packet handling consistent without paying for intermediate relay work that did not occur.

Last updated -