Skip to content

Commit c71a3a1

Browse files
committed
feat(repair): implement blk repair structure and API
1 parent 53a5597 commit c71a3a1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/ballet/bmtree/fd_bmtree.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ struct __attribute__((packed)) fd_bmtree_node {
151151
};
152152
typedef struct fd_bmtree_node fd_bmtree_node_t;
153153

154+
FD_STATIC_ASSERT( sizeof(fd_bmtree_node_t) == 32, update FD_SHRED_MERKLE_ROOT_SZ );
155+
154156
/* bmtree_hash_leaf computes `SHA-256(prefix|data), where prefix is the
155157
first prefix_sz bytes of fd_bmtree_leaf_prefix. prefix_sz is
156158
typically FD_BMTREE_LONG_PREFIX_SZ or FD_BMTREE_SHORT_PREFIX_SZ.

src/disco/net/xdp/fd_xdp_tile.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ net_rx_packet( fd_net_ctx_t * ctx,
753753
} else if( FD_UNLIKELY( udp_dstport==ctx->repair_intake_listen_port ) ) {
754754
proto = DST_PROTO_REPAIR;
755755
out = ctx->repair_out;
756+
// if( FD_UNLIKELY( sz == REPAIR_PING_SZ ) ) out = ctx->repair_out; /* ping-pong */
757+
// else out = ctx->shred_out;
756758
} else if( FD_UNLIKELY( udp_dstport==ctx->repair_serve_listen_port ) ) {
757759
proto = DST_PROTO_REPAIR;
758760
out = ctx->repair_out;

src/discof/repair/fd_fec_repair.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ struct fd_fec_intra {
6666
ulong prev; /* internal use by dlist */
6767
ulong next; /* internal use by map_chain */
6868

69-
ulong slot; /* slot of the block this fec set is part of */
70-
ushort parent_off;
69+
ulong slot; /* slot of the block this fec set is part of */
70+
ushort parent_off; /* parent slot's offset from slot */
7171
uint fec_set_idx; /* index of the first data shred */
7272
long ts; /* timestamp upon receiving the first shred */
7373
ulong recv_cnt; /* count of shreds received so far data + coding */

0 commit comments

Comments
 (0)