Skip to main content

Module layout

Module layout 

Source
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.

MailboxWordsIndexWhat a peer writes there
prepareG_T · 2slot·2 + {0: k, 1: m}the leader’s proposal: sequence k, value m
will_certG_T · Nslot·N + nodefast path, first vote
will_commitG_T · Nslot·N + nodefast path, second vote
commitG_T · Nslot·N + nodeslow path commit vote
certify_validG_T · Nslot·N + node“my certify share is in place”
certifyG_T · N · 16 · SB(slot·N + node)·16·SB + wordslow path: the node’s share (SB beats: Ed25519 1, DSig 26)
vcN · 4node·4 + {view, slot, k, m}view change: what the node last saw
vc_validNnodeview change record present
newview4{view, slot, k, m}the new leader’s decision
newview_valid1new view present
view32reserved

Structs§

Mailbox
The mailbox bases for a cluster of n replicas and a window of g slots, computed exactly as ubft_new’s ubft() does at init.

Constants§

UBFT_BASE_PTR
ubft_new’s UBFT_BASE_PTR (globals.hpp): after NUM_NODES heartbeat words, one sync group’s replication log (2 + 11·5 proposals, 250,000 slots, 2·11·5 queue words) and NUM_NODES deposit 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.