Commit 84ecbaf
committed
perf(fiber-da): per-item concurrent Uploads on Submit
Fan out one goroutine per item in fiber DA Submit, calling fiber.Upload
concurrently with the caller's ctx. Settlement throughput now scales
linearly with the batch size: previously ev-node's submitter could
only have one Upload in flight per stream (header + data, mutex-locked
in submitter.go), and each Submit further serialized the batch into
one big flatten-encoded blob. With fan-out, a Submit of N items
becomes N concurrent Uploads, and Fibre's ~1.5 s per-Upload latency
amortizes across N.
The result-aggregation honors submitToDA's "prefix of successes"
contract: SubmittedCount = N means items [0..N) succeeded and the
caller will retry [N..end). Reporting interleaved successes would
double-submit blobs and waste escrow; matching prefix semantics keeps
the retry contract intact even when individual Uploads fail
out-of-order.
Pair changes in submitting/da_submitter.go:
- limitBatchBySize gains a maxItems cap (was total-bytes-only). Each
item is still bounded by maxItemBytes (chain ceiling), but the
total batch is now bounded by item count, letting multiple
full-size items flow through one Submit.
- retryPolicy adds MaxItems with a sensible non-fiber default of 1
(preserves legacy single-item-per-Submit semantics for backends
that flatten a batch into one blob).
- For the fiber backend, MaxItems is bumped to 16 — covers a 5 min
run at 1 b/s production with 4–8 pending blocks while leaving
headroom for memory pressure under MaxBlobSize-sized items.
Wire-format follow-up (see TODO in fiber_client.go::Submit): the
retrieve path in this file still uses splitBlobs which assumes the
old single-prefixed-blob format. Per-item Uploads now produce raw
blobs with their own BlobIDs; retrieve needs an update to read each
BlobID separately. The bench's aggregator-only setup never invokes
retrieve so this is unblocked for measurement but blocks merging to
production until addressed.1 parent ef84e01 commit 84ecbaf
2 files changed
Lines changed: 125 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
105 | 145 | | |
106 | 146 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 147 | + | |
115 | 148 | | |
116 | 149 | | |
117 | | - | |
| 150 | + | |
118 | 151 | | |
119 | | - | |
| 152 | + | |
120 | 153 | | |
121 | 154 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 155 | + | |
125 | 156 | | |
126 | 157 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 158 | + | |
| 159 | + | |
132 | 160 | | |
133 | 161 | | |
134 | 162 | | |
135 | 163 | | |
136 | 164 | | |
137 | 165 | | |
138 | 166 | | |
139 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
140 | 175 | | |
141 | 176 | | |
142 | 177 | | |
143 | 178 | | |
144 | | - | |
145 | | - | |
| 179 | + | |
| 180 | + | |
146 | 181 | | |
147 | 182 | | |
148 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
48 | 68 | | |
49 | 69 | | |
50 | 70 | | |
| |||
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
| 80 | + | |
60 | 81 | | |
61 | 82 | | |
62 | 83 | | |
| |||
578 | 599 | | |
579 | 600 | | |
580 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
581 | 609 | | |
582 | 610 | | |
583 | 611 | | |
584 | 612 | | |
585 | 613 | | |
586 | | - | |
| 614 | + | |
587 | 615 | | |
588 | 616 | | |
589 | 617 | | |
| |||
694 | 722 | | |
695 | 723 | | |
696 | 724 | | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
701 | 745 | | |
702 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
703 | 750 | | |
704 | | - | |
| 751 | + | |
705 | 752 | | |
706 | | - | |
| 753 | + | |
707 | 754 | | |
708 | 755 | | |
709 | 756 | | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | 757 | | |
715 | 758 | | |
716 | 759 | | |
717 | | - | |
| 760 | + | |
718 | 761 | | |
719 | 762 | | |
720 | 763 | | |
| |||
0 commit comments