Hermes: Low Tail-Latency Via Prefix Consensus
Hermes is a two-round rotating-leader BFT protocol for processes that eliminates tail-latency stalls caused by slow or crashed leaders by utilizing prefix consensus to finalize the heaviest common prefix from any votes, thereby ensuring progress even when views expire.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine a group of friends trying to decide on a movie to watch, but they are scattered across the world, some have spotty internet, and a few mischievous friends are trying to sabotage the decision by sending fake links or pretending to be offline. This is the world of Byzantine Fault Tolerant (BFT) consensus. In computer science, this is how a network of computers agrees on a single truth—like the order of transactions in a blockchain—without trusting a single central boss. The goal is to reach an agreement quickly (low latency) even when some computers crash or act maliciously.
For years, these systems have relied on a "leader" to propose the next step. If the leader is fast and honest, everyone agrees quickly. But if the leader is slow or crashes, the whole group has to wait for a timer to run out, give up on that leader, and pick a new one. This creates a painful trade-off: set the timer long, and you wait forever for a broken leader; set it short, and you waste time abandoning leaders who were just a little slow. This "timeout dilemma" is the bottleneck that slows down the tail end of the system, making the slowest requests take forever to finish.
This paper introduces Hermes, a new protocol designed to solve this specific headache. Instead of giving up when a leader is slow, Hermes lets the group finish the work they can agree on, even if the leader fails. It turns a wasted timeout into a productive decision, ensuring that no matter what happens, the system keeps moving forward without losing the progress it has already made.
The Problem: The "Timeout Trap"
Imagine a relay race where the team captain (the leader) is supposed to hand the baton to the next runner. If the captain is fast, the race goes smoothly. But if the captain trips or drops the baton, the whole team has to stop and wait for a referee's whistle (the timeout) before they can pick a new captain and start over.
In traditional systems, this whistle is a gamble. If the referee blows it too early, they might stop a captain who was just running a bit slow but would have made it. If they wait too long, the team sits idle for ages while a broken captain tries to recover. Either way, the time spent waiting is "dead time"—no progress is made, and the race is stalled. This is the "tail latency" problem: the worst-case scenarios drag the whole system down.
The Solution: Hermes and the "Common Ground"
Hermes changes the rules of the game. Instead of treating a slow leader as a total failure, Hermes treats the group's partial agreement as a victory.
Here is how it works with a creative analogy: Imagine the team is trying to build a long tower out of blocks.
- The Old Way: The leader places a block. Everyone waits. If the leader stops, the team waits for the timeout, then throws away the whole tower and starts building a new one with a new leader.
- The Hermes Way: The leader starts placing blocks, but everyone also starts placing their own blocks simultaneously. If the leader is fast, the team builds the leader's tower perfectly. If the leader gets stuck, the team doesn't throw the tower away. Instead, they look at all the blocks everyone placed, find the longest section where everyone agrees on the order of the blocks, and declare that section "finished."
This is the core innovation: Prefix Consensus. In the old days, if two people voted for slightly different towers, their votes were considered a disagreement and discarded. Hermes says, "Wait, they agree on the bottom 90% of the tower! Let's lock that in and move on."
How Hermes Works: The Two-Round Dance
Hermes operates in "views" (rounds), each with a designated leader. It uses a clever two-step dance:
- Round 1 (The Proposal): Everyone broadcasts their own idea of what the next part of the tower should look like. The leader's idea is just one of many.
- Round 2 (The Vote):
- If the leader is fast: Everyone sees the leader's proposal, agrees, and votes for it. The tower grows by the full leader's block in just two message delays (2δ).
- If the leader is slow or crashes: The timer runs out. Instead of voting to "cancel" the round, everyone votes for the best possible agreement they can find among the proposals they received. They look for the "Heaviest Common Prefix" (HCP)—the longest sequence of blocks that everyone agrees on, even if their proposals diverged at the very end.
This means that even if the leader fails, the group doesn't lose the view. They finalize the common part of the tower and immediately start the next round. The "timeout" path, which used to be a dead end, now produces a result.
The Magic of "Prefixes" and "Skips"
To make this work with multiple lanes of data (like a highway with many lanes of traffic), Hermes uses a special encoding called parent-relative delta tipcuts.
Think of it like a "Choose Your Own Adventure" book where every page references the previous one. If a lane of traffic is missing a car (a block), Hermes doesn't say "error." It explicitly marks that spot as "skipped" and moves to the next car. This allows the system to compare different proposals even if they are missing different pieces. It's like comparing two stories: even if one story skips a paragraph and the other includes it, they can still agree on the beginning and the end, and the system locks in that agreement.
The Results: Speed and Safety
The paper proves mathematically that Hermes is safe (no two honest people will ever disagree on the finalized part) and live (the system will always keep moving).
- The Good Case: If the leader is honest and fast, Hermes is just as fast as the best existing systems, finalizing in 2δ (two message delays).
- The Bad Case: If the leader is slow or crashes, Hermes finalizes the common agreement in 2∆ + δ (where ∆ is the timeout and δ is the network delay). Crucially, this is faster than the old way of waiting for a full view change, because it skips the "wasted" time of discarding the view.
The authors show that by using erasure coding (a way of breaking data into pieces so it can be reconstructed even if some pieces are lost), Hermes keeps the communication costs low, even when dealing with many lanes of data.
Why This Matters
Hermes solves the "timeout dilemma" by making the timeout itself productive. It turns a moment of failure into a moment of progress. Instead of asking, "Did the leader make it?" and waiting to see, Hermes asks, "What did we all agree on?" and moves forward.
For a curious teenager, think of it like a group chat where everyone is trying to agree on a plan. If the person who usually suggests the plan gets stuck, the old way is to wait for them to reply or start a new chat with a new leader. Hermes is like saying, "Okay, they didn't reply, but look at all the ideas we sent. We all agree on the first three steps. Let's lock those in and start planning step four." It's a smarter, more resilient way to keep the group moving, no matter who drops the ball.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.