Expand description
Where ubft_new keeps its mailboxes in HBM, and what crosses the wire.
A replica never sends a message in the usual sense. It RDMA-writes a few bytes into the same address of every peer’s HBM (each card has the same layout), and every replica reads its own HBM to see what peers wrote. So the layout is the protocol. rhdl_ubft keeps ubft_new’s layout word for word, which lets it run on ubft_new’s RoCE stack and host unchanged.
All addresses are 32-bit word indices into network_ptr (bytes = 4 ×
word). The mailboxes start after ubft_new’s heartbeat, log and deposit
areas, at UBFT_BASE_PTR.
This table is ubft_new’s layout (Mailbox::new). rhdl_ubft keeps the
regions, their order and the base, and widens three of them so that a
vote binds the value it is for (Mailbox::v2): a prepare is four words
(k, m, view, 0), and each vote and flag is two words (tag(view, k), m). The host reads none of the widened regions.
| Mailbox | Words | Index | What a peer writes there |
|---|---|---|---|
prepare | G_T · 2 | slot·2 + {0: k, 1: m} | the leader’s proposal: sequence k, value m |
will_cert | G_T · N | slot·N + node | fast path, first vote |
will_commit | G_T · N | slot·N + node | fast path, second vote |
commit | G_T · N | slot·N + node | slow path commit vote |
certify_valid | G_T · N | slot·N + node | “my certify share is in place” |
certify | G_T · N · 16 · SB | (slot·N + node)·16·SB + word | slow path: the node’s share (SB beats: Ed25519 1, DSig 26) |
vc | N · 4 | node·4 + {view, slot, k, m} | view change: what the node last saw |
vc_valid | N | node | view change record present |
newview | 4 | {view, slot, k, m} | the new leader’s decision |
newview_valid | 1 | new view present | |
view | 32 | reserved |
Structs§
- Mailbox
- The mailbox bases for a cluster of
nreplicas and a window ofgslots, computed exactly as ubft_new’subft()does at init.
Constants§
- UBFT_
BASE_ PTR - ubft_new’s
UBFT_BASE_PTR(globals.hpp): afterNUM_NODESheartbeat words, one sync group’s replication log (2 + 11·5proposals, 250,000 slots,2·11·5queue words) andNUM_NODESdeposit words. - UPSTREAM_
G_ T - ubft_new’s
G_T: slots in its window. - UPSTREAM_
NUM_ NODES - ubft_new’s
NUM_NODES: the largest cluster its constants are sized for.