YouTube2Text

RLNC vs Reed-Solomon: Optimal Blockchain Data Coding Explained | MIT's Muriel Médard — Transcript

by Optimum · 5,609 words · 1,002 segments · language en · Watch on YouTube

Full transcript

  1. 0:06Hi Moritz. Uh good to have this chat
  2. 0:08with you today uh to talk about
  3. 0:11Reed-Solomon and random linear network
  4. 0:13coding RLNC. Uh
  5. 0:16you and I at this point I think we go
  6. 0:18way back
  7. 0:19uh but maybe let's introduce ourselves.
  8. 0:22Uh I'll start. Uh I'm Muriel Médard. I'm
  9. 0:25co-founder CEO of Optimum.
  10. 0:29I hold the NEC chair in software science
  11. 0:31and engineering uh
  12. 0:33in the
  13. 0:34electrical electrical engineering
  14. 0:35computer science department at MIT. Uh
  15. 0:39and that's actually uh how I met Moritz
  16. 0:42uh when he was visiting from uh
  17. 0:44Technical University of Munich and
  18. 0:46Moritz uh if you want to introduce
  19. 0:48yourself.
  20. 0:49Yeah, thank you. Um first of all,
  21. 0:51pleasure to have this chat. Um my name
  22. 0:53is Moritz Grundmann. I have been
  23. 0:56um working on coding for some time now
  24. 1:00at Technical University of Munich and uh
  25. 1:02visiting you at MIT where we worked on
  26. 1:05uh
  27. 1:06actually error correction coding
  28. 1:08together.
  29. 1:09Um and yeah, today we're going to talk
  30. 1:11about uh random linear network coding
  31. 1:14and Reed-Solomon coding and all of that
  32. 1:17sort of
  33. 1:18in the um in the context of blockchain
  34. 1:22and
  35. 1:23um I'm looking forward to our chat.
  36. 1:25Yeah, me too. Me too. So
  37. 1:27uh maybe for our listeners we can start
  38. 1:30with what is coding. Uh some of the
  39. 1:32people who will be listening to this
  40. 1:34uh know full well what it is, might um
  41. 1:37be specialists even. Uh some of the
  42. 1:40folks uh might just be coding curious.
  43. 1:43Uh
  44. 1:44and you know, you mentioned that we
  45. 1:46started working together on uh error
  46. 1:48correction errors
  47. 1:51uh which is data being corrupted, being
  48. 1:53wrong and erasures which is data
  49. 1:56missing, unavoidable in the real world.
  50. 2:00Um and you need to actually have ways to
  51. 2:03manage uh these potentially
  52. 2:07lethal consequences of having data being
  53. 2:10wrong or missing. And what does
  54. 2:14coding do? Coding actually splits the
  55. 2:17data into pieces
  56. 2:20often in blockchain we call them shards
  57. 2:23and then it adds some redundancy.
  58. 2:26Effectively, it creates equations.
  59. 2:29Um and with these equations which add
  60. 2:32extra
  61. 2:35uh redundancy or I I prefer calling it
  62. 2:37repair always rather than redundancy.
  63. 2:40Um then we can actually reconstruct the
  64. 2:42original data.
  65. 2:44Um I don't know. What do you prefer?
  66. 2:45Repair or redundancy? How do you like to
  67. 2:48call it, Moritz? So yeah, I mean I guess
  68. 2:50you were the first person who called I
  69. 2:52heard calling it
  70. 2:53repair. I like that that word a lot
  71. 2:56because it's a much more positive,
  72. 2:58right? It has a it has a positive um
  73. 3:01intention behind it. We want to preserve
  74. 3:03the information content or um in in the
  75. 3:06message actually. So I guess
  76. 3:09repair is a much better word. Yes. Yeah,
  77. 3:11but we we will
  78. 3:13slip back often into calling it
  79. 3:14redundancy which is more common
  80. 3:17terminology for it. You know, redundancy
  81. 3:20somehow sounds a bit superfluous.
  82. 3:22Repair, as you said, is much more
  83. 3:23positive. Like you have to fix it, you
  84. 3:25know, it's the code is there to fix the
  85. 3:28problem. You shouldn't think of it as
  86. 3:29superfluous.
  87. 3:31Um yeah, absolutely. So
  88. 3:33um
  89. 3:35Reed-Solomon or RS we hear a lot about
  90. 3:39it. You know, these codes have been
  91. 3:40around uh longer than you and I have
  92. 3:43been and even I have been on this earth.
  93. 3:46Um they're definitely widely used in
  94. 3:49storage uh
  95. 3:50in point to point communications.
  96. 3:54Um I'd love to hear how you described
  97. 3:57our we how you describe Reed-Solomon
  98. 4:00codes.
  99. 4:01Uh yeah. Um I mean Reed-Solomon codes in
  100. 4:04a sense uh
  101. 4:06they are sort of the prototypical code,
  102. 4:09like the first code probably you come
  103. 4:11across when you think about error
  104. 4:14correction coding or when you learn it
  105. 4:15in class, for example.
  106. 4:18So the idea is actually
  107. 4:19pretty simple, I would think. So
  108. 4:22um
  109. 4:23given that I have um
  110. 4:26given that I have a
  111. 4:28let's say let's say
  112. 4:30polynomial, let's say a a function. So
  113. 4:32the easiest representation probably
  114. 4:34everyone knows from school is
  115. 4:36is a line.
  116. 4:38Um I can describe this line by any two
  117. 4:41points on this line, right? So
  118. 4:44but um I can also say, "Okay, I'm going
  119. 4:46to not generate two points, but maybe
  120. 4:48four or six or eight points." And then
  121. 4:50when I give these
  122. 4:52two, four, six, or eight points to
  123. 4:53someone else
  124. 4:54they I can maybe drop two
  125. 4:57maybe two um maybe one point is going to
  126. 5:00um I'm going to mess something up and
  127. 5:02and the coordinates uh uh distorted. So
  128. 5:05um
  129. 5:06I can eventually re uh sort of
  130. 5:09recreate the original line out of any um
  131. 5:13any uh two um correct points in that in
  132. 5:17that sense. So I can I can drop um I can
  133. 5:20drop some. This is like the first and
  134. 5:23probably very simple way of creating
  135. 5:26uh redundancy and um
  136. 5:29therefore re
  137. 5:30uh regenerating or like uh
  138. 5:33getting the
  139. 5:34um the original information back
  140. 5:36um in set of lossy or also uh
  141. 5:40lossy environments. So
  142. 5:42um
  143. 5:44I like your description, by the way. I
  144. 5:45think that's much more intuitive. I I
  145. 5:46always use equations cuz I'm used to
  146. 5:49thinking in terms of equations, but I
  147. 5:51like your line much better. You know,
  148. 5:54it's like if you have a line
  149. 5:56all you need is two points. If you lose
  150. 5:58a few, you're okay.
  151. 6:00Uh
  152. 6:01Yeah, definitely.
  153. 6:02>> That's that's a much nicer way to to
  154. 6:04describe it, much more intuitive. I'm
  155. 6:06I'm going to borrow that one just so you
  156. 6:09know.
  157. 6:10>> [laughter]
  158. 6:11[gasps]
  159. 6:11>> Um yeah. And and you know, as as you
  160. 6:15said, you know, the core intuition is
  161. 6:17you're treating the message as a
  162. 6:18polynomial. I mean, a line is a
  163. 6:20polynomial. It's just a pretty simple
  164. 6:22polynomial of degree one.
  165. 6:25Uh my favorite polynomial for sure. Um
  166. 6:28and you know, as we said, you use this
  167. 6:31in so many different systems, whether
  168. 6:33it's storage um media
  169. 6:37um uh often this is called uh forward
  170. 6:40error correction. And we talked about
  171. 6:42errors and erasures. There's a little
  172. 6:44bit of a
  173. 6:45uh of an unfortunate coincidence of the
  174. 6:49E letter because sometimes people talk
  175. 6:51about FEC as forward error correction,
  176. 6:54sometimes they call it forward erasure
  177. 6:56correction, and there's a natural
  178. 6:58confusion that comes out of the fact
  179. 7:00that erasure and error both start with
  180. 7:02an E. Um and um
  181. 7:04it's you know, there's definitely
  182. 7:06connections, but they're trying to do
  183. 7:07different things, right? And and um if
  184. 7:10you think of Reed-Solomon codes, of
  185. 7:11course, they were originally
  186. 7:13designed for error correction with some
  187. 7:16properties in mind.
  188. 7:18Uh some of them are actually very
  189. 7:20constraining
  190. 7:22uh because they were
  191. 7:24designed for error correction. And uh
  192. 7:27wanted to, you know, hear about your uh
  193. 7:30how you view those constraints.
  194. 7:32Yeah, sure. I mean, I can I can share
  195. 7:34some um
  196. 7:36some image here. Let me give me a second
  197. 7:39to share.
  198. 7:40Um
  199. 7:42share my screen.
  200. 7:45So
  201. 7:46um basically what we see here
  202. 7:49um we just talked about we just talked
  203. 7:52about redundancy or repair, so to speak.
  204. 7:55Um
  205. 7:56when we think about Reed-Solomon codes
  206. 7:58and we see Reed-Solomon codes on the
  207. 8:00left side
  208. 8:02um we see that
  209. 8:04they don't um they don't allow you to
  210. 8:08combine any sort of
  211. 8:10um
  212. 8:12combination of how much information or
  213. 8:14how many many many many pieces you want
  214. 8:16to trans you want to transmit
  215. 8:19um either uncoded or encoded and the the
  216. 8:22rate at which you want to transmit it,
  217. 8:23like how much
  218. 8:25um how much uh redundancy you add to
  219. 8:27each one of those. So you can see, for
  220. 8:29example
  221. 8:30um you have a length uh length n code.
  222. 8:35So you have, for example, a 32 um a
  223. 8:39length n equals 32 code 32
  224. 8:42n equals 32 um code and you have
  225. 8:46um
  226. 8:47only specific
  227. 8:49um specific uh
  228. 8:52code rates, like redundancy rates you
  229. 8:54can add to this code. Like the
  230. 8:56core underlying reason for this is
  231. 8:58basically
  232. 9:00um
  233. 9:02the fact that we have to construct a
  234. 9:04polynomial in the first place
  235. 9:06um and we do that over a so-called um
  236. 9:09finite field which has inherent
  237. 9:11properties that sort of restrict the um
  238. 9:14the length or like the
  239. 9:16the two properties of the code that um
  240. 9:19that define that define its um
  241. 9:22its its repair.
  242. 9:24And we see on the other hand that
  243. 9:27um when we think about like purely
  244. 9:30random ways of um constructing codes,
  245. 9:33codes which are not defined by core
  246. 9:35polynomials we don't have these
  247. 9:37constraints, right? So
  248. 9:39um we see here that sort of any
  249. 9:42combination of um
  250. 9:45code length n and uh pair
  251. 9:48are possible which is um
  252. 9:51yeah, just just a very very illustrative
  253. 9:54thing that
  254. 9:56Reed-Solomon
  255. 9:57Yeah, yeah. It on the left-hand side and
  256. 10:00and just just to remind our listeners
  257. 10:02that the rate here
  258. 10:04indicates what percentage of the
  259. 10:07transmitted data is actually payload.
  260. 10:10So one means that the rate is
  261. 10:14including absolutely no repair slash
  262. 10:17redundancy.
  263. 10:19All of the data is payload
  264. 10:21and so as you have a lower rate, you
  265. 10:24have more redundancy. So you have more
  266. 10:26ability to fix as we've talked about,
  267. 10:29but on the other hand it comes at a cost
  268. 10:31of transmitting data which is not
  269. 10:34information bearing. And as you show,
  270. 10:37by the way, wanted to thank
  271. 10:39our colleague collaborator
  272. 10:41Ritson, my collaborator,
  273. 10:44Ken Duffy, who's the
  274. 10:46chair of the math department at
  275. 10:47Northeastern University here in Boston
  276. 10:49who who first came up with this very
  277. 10:51nice
  278. 10:53way to visualize
  279. 10:55what coding is doing. But yeah, what you
  280. 10:56see on the left-hand side is it's it's
  281. 10:58almost all white space. It's basically
  282. 11:01space that is not available to you for
  283. 11:04design, right? So it's a it's a really
  284. 11:06really constraining thing to be working
  285. 11:09with codes
  286. 11:10where you're artificially
  287. 11:13restricting yourself to
  288. 11:15basically giving up on most of the
  289. 11:17design space.
  290. 11:19Yes, totally. Yeah.
  291. 11:22So no, no, thank you. Thank you for
  292. 11:24walking us through through through that
  293. 11:26picture. Now, we've been talking right
  294. 11:29now about a Reed-Solomon which as we
  295. 11:31mentioned was really designed originally
  296. 11:34for point-to-point system meaning
  297. 11:36there's a single entity node,
  298. 11:41you know,
  299. 11:42user who does the coding and it sends it
  300. 11:45to one node that does the decoding that
  301. 11:50reconstruction fixing that we've talked
  302. 11:52about. But of course in the network,
  303. 11:56you don't just have one sender, one
  304. 11:58receiver. Well, you could, that's the
  305. 11:59world's simplest network formed by a
  306. 12:02single link. Not very exciting. Not
  307. 12:04exactly blockchain ready.
  308. 12:08And to be able to think about a network
  309. 12:11at large,
  310. 12:13um
  311. 12:14then you really need to figure out how
  312. 12:17the information is being managed within
  313. 12:21the node.
  314. 12:22Now, you could just, you know, put
  315. 12:25blinders on and pretend that the entire
  316. 12:27network is a single link. But you'd be
  317. 12:30losing so much because effectively
  318. 12:32you're
  319. 12:34pretending that the network is not there
  320. 12:37and you're not taking advantage of the
  321. 12:40potentially really rich topology and
  322. 12:42capabilities that the network is giving
  323. 12:44you, right?
  324. 12:45It's like you have this square peg which
  325. 12:48is a Reed-Solomon code, you have this
  326. 12:50round hole and you're just going to take
  327. 12:52a hammer and pretend it goes in, right?
  328. 12:54And
  329. 12:55and you know, we we know that that's
  330. 12:57that's not the best thing.
  331. 12:59And so, you know,
  332. 13:01again going back to restrictions, it's
  333. 13:03not just restrictions in terms of that
  334. 13:06design space that we just saw that's,
  335. 13:08you know, vast white space of, you know,
  336. 13:12unused design area,
  337. 13:14but it's also unused space inside the
  338. 13:17network because the intermediate nodes
  339. 13:19are not contributing
  340. 13:21to the overall repair, maintenance,
  341. 13:25effectively robustness, and efficiency
  342. 13:28of the data.
  343. 13:29And I wanted to hear how you describe
  344. 13:32how RLNC, which we mentioned at the
  345. 13:35beginning is randomly network coding,
  346. 13:36and of course you just showed
  347. 13:38in that figure some random coding. It
  348. 13:41was not network coding, it was at a
  349. 13:43single node. But how RLNC changes this,
  350. 13:46how how you explain it again to to your
  351. 13:49colleagues. Yeah.
  352. 13:51I mean I really I mean I think the point
  353. 13:53to start here if we start RS is that we
  354. 13:56really talk about um
  355. 13:58a different problem definition at this
  356. 14:00point, right? You mentioned it.
  357. 14:02We were talking also in the example that
  358. 14:04I gave about
  359. 14:06I'm going to give you data, I might drop
  360. 14:08some of it,
  361. 14:10some of it might get corrupted. That's
  362. 14:12the typical point-to-point link, right?
  363. 14:14DVDs
  364. 14:16or similar point-to-point channels we've
  365. 14:20seen in in in communication systems.
  366. 14:22Now,
  367. 14:23when we talk about networks,
  368. 14:27things get
  369. 14:29are different, right?
  370. 14:31Because the coding operation, we can
  371. 14:34still use we can in theory still use
  372. 14:36something like Reed-Solomon codes and we
  373. 14:38would
  374. 14:39only use coding at the edges.
  375. 14:41But we don't use all of the
  376. 14:45intermediate nodes which might also
  377. 14:48participate in the coding operation.
  378. 14:51And therefore might also help in sort of
  379. 14:55recovering recovering erasures. We
  380. 14:58network level we mostly talk about
  381. 15:00erasures.
  382. 15:01Packets being dropped, packets getting
  383. 15:04lost.
  384. 15:05And random linear network coding is a
  385. 15:09very unique kind of network code in that
  386. 15:13it just says
  387. 15:16the way we do coding
  388. 15:18at intermediate nodes, also at edge
  389. 15:21nodes,
  390. 15:22is basically random. Like
  391. 15:25we don't really give the nodes any
  392. 15:28instructions on what they do. They just
  393. 15:31form random equations, recombine them,
  394. 15:34and then send them along.
  395. 15:36Because you might think about, yeah,
  396. 15:37well, now if the whole network does
  397. 15:39coding, how does everyone even know what
  398. 15:42they what they have to do, right? But
  399. 15:45random linear network coding says just
  400. 15:47combine
  401. 15:49packets randomly and you're going to be
  402. 15:51fine in the end.
  403. 15:52And this is a huge saving in complexity
  404. 15:56and makes the makes the whole system so
  405. 15:58simple. But
  406. 16:00I guess
  407. 16:01you are the best person to talk about it
  408. 16:03in a sense because it's been
  409. 16:05one of your one of your, let's say,
  410. 16:08longest-standing works, random linear
  411. 16:10network coding, going back
  412. 16:12>> Yeah. to the early 2000s.
  413. 16:14Yeah, yeah, absolutely. And actually I
  414. 16:17remember when we were working on this
  415. 16:20along with, you know, wonderful
  416. 16:22collaborators
  417. 16:24including one from TU Munich, well, at
  418. 16:27the time it was University of Ulm, Ralf
  419. 16:28Koetter,
  420. 16:29and my student Tracy Ho and many other
  421. 16:34wonderful colleagues.
  422. 16:35Um
  423. 16:37I remember that we got so much pushback
  424. 16:38because people really thought that you
  425. 16:40had to be able to do better
  426. 16:42by being very very clever.
  427. 16:45And
  428. 16:46you know, that somehow if I had more
  429. 16:48information, if I had state information
  430. 16:50about what node was doing what, what
  431. 16:53shard was at which node, you know,
  432. 16:55surely you can do better than just
  433. 16:58choosing coefficients randomly. And you
  434. 17:01know, by randomly we don't mean
  435. 17:04with some sort of perfect pseudo noise
  436. 17:06sequence at all. Randomly really means
  437. 17:09just you know,
  438. 17:12not in weird constrained ways that might
  439. 17:15work wrong.
  440. 17:18Yes. And
  441. 17:20that did you know there was a lot of
  442. 17:22pushback because it seems
  443. 17:23counterintuitive as you say, it's very
  444. 17:25simple. It's kind of funny, it's very
  445. 17:27simple from a
  446. 17:30implementation perspective, it's
  447. 17:32definitely extremely suitable for
  448. 17:35something like
  449. 17:37blockchain which is decentralized,
  450. 17:41but conceptually it really requires a
  451. 17:43leap of faith.
  452. 17:45And
  453. 17:49you know, people tried so much to do
  454. 17:51things instead. Well, could you take a
  455. 17:52Reed-Solomon and change it? Could you
  456. 17:54take other kinds of codes? And we've
  457. 17:55talked about Reed-Solomon and of course
  458. 17:57there are many other, let's say,
  459. 17:59traditional codes like
  460. 18:02fountain codes, we transform codes, you
  461. 18:04know,
  462. 18:05Raptor codes and so on.
  463. 18:07Or to a little different in that they
  464. 18:10adapt on the fly how much redundancy or
  465. 18:13repair they put in.
  466. 18:15But all of those codes are still
  467. 18:17end-to-end as you say at the edges of
  468. 18:20the network.
  469. 18:21And I think to me what's most surprising
  470. 18:25is that
  471. 18:28RLNC is not just optimum, but that the
  472. 18:30difference between the optimum
  473. 18:33and the suboptimum
  474. 18:35like a Reed-Solomon, like a Raptor, is
  475. 18:38not, you know, 5%, 10%. I mean sometimes
  476. 18:40you're like, okay, it's not optimum, but
  477. 18:42who cares, right? I'm close enough. It's
  478. 18:45it's, you know, exponentially growing as
  479. 18:48the network gets larger.
  480. 18:50I'd love to hear how you describe the
  481. 18:52intuition for for why that is. You know,
  482. 18:56yeah, cuz I think you always have such
  483. 18:58good ways of describing that. Sure.
  484. 19:01I can share like another
  485. 19:03um
  486. 19:04another short
  487. 19:06image of that. So
  488. 19:09we've been talking about the difference
  489. 19:11of
  490. 19:12encoding end-to-end versus using
  491. 19:15leveraging the entire network
  492. 19:18to do coding.
  493. 19:20And and that is really where the core
  494. 19:24difference in especially in throughput
  495. 19:26is taking place.
  496. 19:28So
  497. 19:29we can look at like a very simple
  498. 19:31example, right? So
  499. 19:34we have two nodes which want to
  500. 19:36communicate
  501. 19:38a message and the message has to
  502. 19:40traverse through
  503. 19:43let's say two other nodes, right? So we
  504. 19:45have these two purple nodes.
  505. 19:48And in the one example we use a typical
  506. 19:51end-to-end encoding and in the other
  507. 19:53example, we use
  508. 19:55um
  509. 19:56network coding like random linear
  510. 19:58network coding, which actually uses
  511. 20:00these intermediate nodes to
  512. 20:02um do, let's say, uh additional coding
  513. 20:05or to to do coding themselves. So, what
  514. 20:08we see in the
  515. 20:09in the first um in the first
  516. 20:11instantiation when we have end-to-end
  517. 20:13coding is that
  518. 20:14losses compound, right? We talked about
  519. 20:17coding being this idea of adding
  520. 20:20um
  521. 20:22how do you say it? Adding repair. Um
  522. 20:24uh adding redundancy, and
  523. 20:27um
  524. 20:28this redundancy, if we uh think about
  525. 20:30erasures, is is getting lost along the
  526. 20:32way.
  527. 20:33So, that if I wanted to um securely
  528. 20:37transmit uh a message from A to B in an
  529. 20:40end-to-end coded setting, um I would I
  530. 20:44would have to account for the entirety
  531. 20:47of the losses that happen along the way
  532. 20:49to make sure that the message is
  533. 20:51arriving at the end.
  534. 20:52Now,
  535. 20:54what happens in um
  536. 20:57random linear network coding or um
  537. 20:59when when we use coding at intermediate
  538. 21:01nodes,
  539. 21:02call it recoding,
  540. 21:04um is that
  541. 21:06every one of those nodes
  542. 21:10um kind of
  543. 21:12uh does does its own coding operation in
  544. 21:15a sense. So, the
  545. 21:18quality
  546. 21:19or the the the losses don't compound
  547. 21:24path from source to sink,
  548. 21:27but
  549. 21:28so, the the um the overall quality is
  550. 21:31kind of the quality of the weakest of
  551. 21:34those of those links. So, in that sense,
  552. 21:36we have in the first example, we have uh
  553. 21:39um 37% of losses. Um in the second
  554. 21:43example, we only have 10% of losses.
  555. 21:46Um
  556. 21:47and this is really the um if you think
  557. 21:51about it, these
  558. 21:53if I make the chain even longer,
  559. 21:55then in one example, with each and every
  560. 21:58hop, I have to add more and more
  561. 22:00redundancy in the first place, while in
  562. 22:02the second example, um it doesn't
  563. 22:04matter, right? So, the chain can
  564. 22:07can stay
  565. 22:08uh can get as as long as it wants. Um
  566. 22:12I still um only have to add the same
  567. 22:15amount of redundancy up front if I
  568. 22:17really want to make uh uh a safe um
  569. 22:21a safe transmission here. And this is
  570. 22:23sort of where the one of the core
  571. 22:26um advantages where the random linear
  572. 22:28network coding lies, but um
  573. 22:31Yeah, yeah, absolutely. No, no, I think
  574. 22:33you you you you explained it
  575. 22:35beautifully, and I think you know, you
  576. 22:37mentioned compound. It's really the
  577. 22:38difference between simple interest and
  578. 22:40compound interest. Yes. Uh and and you
  579. 22:44know, they grow exponentially apart.
  580. 22:47That's That's the whole power of it. And
  581. 22:49so,
  582. 22:50with uh random linear network coding,
  583. 22:53you can do what you mentioned, that
  584. 22:54recoding, because you can basically
  585. 22:57create codes on the fly from whatever
  586. 23:02coded pieces, whatever equations you
  587. 23:04have, you can make equations out of all
  588. 23:06the equations without having to recover
  589. 23:08the original data.
  590. 23:09Uh whereas in traditional systems, uh
  591. 23:12traditionally coded systems like
  592. 23:14Reed-Solomon, you actually have to get
  593. 23:16back to the original data. So, you can
  594. 23:18either just forward along
  595. 23:21or you have to decode, recover the
  596. 23:24original data, and start over again.
  597. 23:26Um
  598. 23:28And you know, that separation, which
  599. 23:31looks almost like a subtlety, just a
  600. 23:33technical subtlety,
  601. 23:35is actually massively powerful. And so,
  602. 23:40you know, it's not like, "Oh, it's all
  603. 23:41close to as good." No, it's
  604. 23:43exponentially worse to do a Reed-Solomon
  605. 23:46code, you know.
  606. 23:48Uh and again, this was something which
  607. 23:49early on, I think a lot of people had
  608. 23:51trouble getting their heads around, you
  609. 23:53know.
  610. 23:54Um because it seems so counterintuitive.
  611. 23:58Um but you know, you can try it out and
  612. 24:00see see right away the the the the
  613. 24:03difference. Um it's you know,
  614. 24:07it kicks in. It kicks in very, very
  615. 24:09quickly. So, yeah, no, thank you. Thank
  616. 24:12you for for stopping us to this. So,
  617. 24:13okay, so we've we've talked about RLNC
  618. 24:15encoding, um Reed-Solomon coding. I
  619. 24:18should mention, you know, that you know,
  620. 24:20the the the recovery is often is what we
  621. 24:23usually call decoding. We talked about
  622. 24:24that repair. Um that actually is very
  623. 24:27simple for erasure
  624. 24:29uh erasure codes.
  625. 24:31Um and you can decode a Reed-Solomon or
  626. 24:34RLNC or anything else
  627. 24:36always in the same way. Um you basically
  628. 24:39just have this reconstruction from a
  629. 24:43bunch of equations, and it's very fast.
  630. 24:45It's very simple.
  631. 24:48And so, the the decoding itself for
  632. 24:50these erasures uh
  633. 24:52is actually quite universal, right? It's
  634. 24:54It's the same decoder that you can use
  635. 24:56for all of those. So, you can mix and
  636. 24:57match. Uh and and still keep the same
  637. 25:00decoder. So, we have just a few minutes
  638. 25:02left. Uh I want us to jump to uh the
  639. 25:05blockchain applications, right? So,
  640. 25:07we've talked about the fact that RLNC is
  641. 25:09decentralized,
  642. 25:10you know, a priori decentralization goes
  643. 25:13really well hand in hand with
  644. 25:14blockchain. Um but let's talk a little
  645. 25:17bit about where coding shows up right
  646. 25:19now. Um and um you know,
  647. 25:24of course, we're both at Optimum, and we
  648. 25:27are using Mom P2P, which is RLNC-based
  649. 25:30gossip. Um we're uh been working with
  650. 25:34Ethereum validators.
  651. 25:37Um and you know, we're going soon onto
  652. 25:40just a few weeks, uh we're going to
  653. 25:42mainnet, uh which is extremely exciting.
  654. 25:46Um but you know, um traditional
  655. 25:49uh you know, as we mentioned, suboptimal
  656. 25:51codes are used, for instance, in Solana
  657. 25:53with Turbine, um Rotor, which is the the
  658. 25:57next version that's coming up in Solana
  659. 25:59with um Alpenglow is also going to be
  660. 26:01using Reed-Solomon.
  661. 26:04Uh we mentioned Raptor codes. Monad uses
  662. 26:06those. Um and you know, wanted to hear a
  663. 26:11little bit your view of why this matters
  664. 26:14in blockchain.
  665. 26:15Yeah, I mean, the I think there's
  666. 26:17actually two interesting
  667. 26:20kind of uh
  668. 26:22sort of applications of of coding in
  669. 26:24blockchain that we've known uh so far.
  670. 26:26So, one is like really the obvious one,
  671. 26:28right? That we've just talked about,
  672. 26:30which is um
  673. 26:32propagation of of payloads.
  674. 26:34Um if we talk about Ethereum,
  675. 26:37um we think about uh either either
  676. 26:40blocks or also blobs,
  677. 26:42nowadays blob columns.
  678. 26:45Um
  679. 26:46and if we uh
  680. 26:47the the other kind of application is
  681. 26:49really what we call data availability
  682. 26:51sampling. Now, sticking with um
  683. 26:54sticking with uh block propaga- with the
  684. 26:57propagation uh so far,
  685. 26:59um I would think there is two kind of
  686. 27:02different um different systems. There's
  687. 27:05one um sort of the uh permissionless
  688. 27:09uh
  689. 27:10uh
  690. 27:10meshes, which is um all the
  691. 27:13network meshes, which is Ethereum would
  692. 27:15be would be an example for that. And the
  693. 27:17other one would be
  694. 27:19more of a structured uh broadcast
  695. 27:21architecture, where you have a
  696. 27:23permissioned set of nodes. Uh Ethereum
  697. 27:26Solana um
  698. 27:27or or Monad would be part of that. And a
  699. 27:30more, let's say, structured tree along
  700. 27:33which the messages are propagated. Um
  701. 27:36now, coding is useful in both of those
  702. 27:38cases, and um we have built with uh
  703. 27:44uh Mom P2P, the first um gossip protocol
  704. 27:47that uses RLNC, first for uh Ethereum.
  705. 27:51And
  706. 27:53um
  707. 27:54we have seen we've seen uh amazing gains
  708. 27:57in that sense. So,
  709. 27:59talked about with uh Zajida last time
  710. 28:01about the latency improvements that
  711. 28:03we've seen in Hoodie.
  712. 28:05Um
  713. 28:06and the reason why this is um why this
  714. 28:09is important is um
  715. 28:11severalfold. I mean, I guess you can
  716. 28:13uh talk about it from a commercial
  717. 28:15perspective much more
  718. 28:17than I can, but
  719. 28:18um we see especially in these last
  720. 28:21couple of months that um the Ethereum
  721. 28:24network has, for example, um
  722. 28:27been put under strain by
  723. 28:30um a lot of new messages being produced,
  724. 28:31especially in the context of Fusaka,
  725. 28:33with blob columns being propagated. So,
  726. 28:37um
  727. 28:38it needs faster um data propagation, and
  728. 28:41coding is uh the the number one tool to
  729. 28:44do that.
  730. 28:45And RLNC, the the optimal one.
  731. 28:47But um
  732. 28:49yeah, that's uh that's about the
  733. 28:52Yeah, no, that that that's that's great.
  734. 28:54That's a great description. And also, as
  735. 28:56you said, sort of it's it's inherent to
  736. 28:58the need for scaling, right? As we said,
  737. 29:01one is scaling,
  738. 29:04you know, in a way which is getting
  739. 29:06exponentially worse, and ours is
  740. 29:08scale-free, right? And you can't beat
  741. 29:10that, you know. You can't beat scaling.
  742. 29:12You can try.
  743. 29:14>> [laughter]
  744. 29:14>> Um you also mentioned uh DAS. I wanted
  745. 29:17to just spend a couple of minutes
  746. 29:18talking about uh the data availability.
  747. 29:21Yes. Uh
  748. 29:23this is like the second kind of
  749. 29:24application of
  750. 29:25>> Yeah. which is
  751. 29:27also like an interesting one. Um
  752. 29:29uh quite counterintuitive. So, the idea
  753. 29:33is that um I want to have a way to check
  754. 29:37if some data is available without
  755. 29:39actually downloading it.
  756. 29:41Which uh sounds kind of
  757. 29:43counterintuitive, because the easiest
  758. 29:44approach would be, let's say, you have
  759. 29:46some data, and I don't I just ask you if
  760. 29:49if you have it and if you do then I just
  761. 29:52then I just believe you but we in a
  762. 29:54trustless environment I need to get some
  763. 29:57confirmation right some sort of sort of
  764. 30:00proof for that.
  765. 30:01And the idea is that usually
  766. 30:04in the beginning people used
  767. 30:06erasure codes like also Reed-Solomon
  768. 30:09codes to say
  769. 30:10okay if I
  770. 30:12get just a bunch of just some
  771. 30:16coded pieces
  772. 30:17then I can be probabilistically sure
  773. 30:20that
  774. 30:22I could if I wanted to download the the
  775. 30:24entire thing.
  776. 30:26And um
  777. 30:28the the the basic premise behind this is
  778. 30:31that if enough people were to sample
  779. 30:34coded pieces then
  780. 30:37you would have to withhold at least a
  781. 30:40certain percentage of of pieces for me
  782. 30:43to be for for us to be unable to decode
  783. 30:46and therefore I would I wouldn't take
  784. 30:47that.
  785. 30:49So it's like
  786. 30:51I uh
  787. 30:53I'm asking I'm asking you for some
  788. 30:55information and I'm not asking you
  789. 30:58directly for it but for some encoded
  790. 30:59version of it and
  791. 31:02in order for you to not give it to me
  792. 31:04it's very unlikely
  793. 31:05that I'm not not going to catch you.
  794. 31:08So
  795. 31:09um
  796. 31:10Yeah I did just just to interrupt you
  797. 31:12know the the way I like to to describe
  798. 31:14it I don't know you know it's like so
  799. 31:15it's you know my mother was a history
  800. 31:17professor and you know suppose you had
  801. 31:19to do a history exam and rather than ask
  802. 31:21somebody what was the date of this
  803. 31:23battle and the date of this and the date
  804. 31:24of that you go just give me the sum of
  805. 31:27the dates. You know what is the
  806. 31:28likelihood unless they know each and
  807. 31:30every date that they're going to get the
  808. 31:32sum correct you know.
  809. 31:34Yeah yeah that's that's a pretty good
  810. 31:36description I mean
  811. 31:37>> It's like the one question exam.
  812. 31:40>> [laughter]
  813. 31:41>> Exactly so
  814. 31:43so so No partial no partial credit.
  815. 31:48Yeah
  816. 31:49I think it's actually a pretty good
  817. 31:50pretty good analogy so the
  818. 31:52if you think about and now we come back
  819. 31:54to Reed-Solomon and fixed rate coding
  820. 31:56again these kind of codes they give you
  821. 31:58sort of
  822. 31:59a fixed set of questions you can ask.
  823. 32:01>> That's right. You can only ask the sum
  824. 32:04of the
  825. 32:04the sum of the
  826. 32:06dates and that's it you know and
  827. 32:09of course pretty soon the the students
  828. 32:11will learn that you do that
  829. 32:12>> [laughter]
  830. 32:13>> and learn that one thing.
  831. 32:15Yeah definitely definitely. And and also
  832. 32:19here like one one thing that you we've
  833. 32:20also been looking into is what if you
  834. 32:23actually make that
  835. 32:25question space if you want to stick with
  836. 32:27that metaphor
  837. 32:28what if you make that flexible? Right.
  838. 32:32Now what happens if I actually tell you
  839. 32:35which
  840. 32:37dates of the battles you have to sum up
  841. 32:39and you have to answer me.
  842. 32:41And this is essentially what random
  843. 32:43linear network coding
  844. 32:45does.
  845. 32:47And I also have an illustration for that
  846. 32:50so
  847. 32:50>> Yeah yeah absolutely. Yeah it's like
  848. 32:52give me five times the
  849. 32:54the year of the treaty of X with you
  850. 32:57know two times the battle of Y and
  851. 33:00>> [laughter]
  852. 33:01>> Exactly exactly.
  853. 33:03So
  854. 33:04um
  855. 33:05the the idea here is
  856. 33:07now we have
  857. 33:09usually
  858. 33:11systems in in use today use use fixed
  859. 33:14rate codes we see systems with LDPC
  860. 33:16codes and also 2D Reed-Solomon codes.
  861. 33:20Um And by the way we we haven't talked
  862. 33:22about LDPCs with the yet another of
  863. 33:24these classical codes.
  864. 33:27Exactly. Yeah they were actually
  865. 33:29invented by my
  866. 33:32doctoral advisor Bob Gallager. It was in
  867. 33:34the 60s it was his doctoral thesis yeah.
  868. 33:38So yeah you can you can go like this is
  869. 33:4019 I think 1960 exactly Reed-Solomon
  870. 33:43code and this is 1967 or something like
  871. 33:45Uh 62.
  872. 33:47Uh 62 okay yeah that's uh
  873. 33:51Yeah yeah yeah and actually the kinds of
  874. 33:53codes that are used in
  875. 33:55um which are you know product {slash}
  876. 33:58tensor codes that are used for instance
  877. 34:01in Celestia and these systems are
  878. 34:03actually invented
  879. 34:05even though the the Reed-Solomon was
  880. 34:07invented later the general format of the
  881. 34:08code was invented by Bob Gallager's
  882. 34:11advisor also at MIT who was Peter Elias.
  883. 34:15Uh so there's yeah there's
  884. 34:18Yeah so it's
  885. 34:19>> line there. Yeah it's all inter
  886. 34:21intertwined RLC 2D and
  887. 34:23>> Yeah
  888. 34:24yeah it's it's all in the academic
  889. 34:25family yeah. Yes definitely definitely.
  890. 34:28So what we basically see here is that
  891. 34:32we're staying in our metaphor these are
  892. 34:33like the number of questions that I have
  893. 34:35to
  894. 34:36that I have to ask uh
  895. 34:39if I want to check data availability and
  896. 34:41this is the
  897. 34:42probability that I'm going to get that
  898. 34:45I'm going to get fooled right that I'm
  899. 34:46going to
  900. 34:47>> Yeah the student didn't actually know
  901. 34:48but gets lucky. Exactly just gets lucky
  902. 34:51that I answered a question correctly.
  903. 34:54Um
  904. 34:55And by the way this is a logarithmic
  905. 34:57scale right so you're multiplying by 10
  906. 35:00every time so
  907. 35:01a change here actually shows a huge gap.
  908. 35:05Yes so this would be
  909. 35:0710% probability this would be point 001%
  910. 35:12probability. Yeah.
  911. 35:15And what we see here is basically
  912. 35:17I can get to the same kind of certainty
  913. 35:22about data being available
  914. 35:25by just asking two questions
  915. 35:28as if I were to ask 70 questions from
  916. 35:30the predefined set or 150 from the
  917. 35:34from the other predefined set it's like
  918. 35:36I can either ask real novel questions
  919. 35:39and I have the student has to actually
  920. 35:41learn and understand the material or I
  921. 35:43ask like
  922. 35:45a huge amount of
  923. 35:48previously
  924. 35:49let's say preparable questions
  925. 35:52and and sort of my confidence in the
  926. 35:55student actually knowing what's going on
  927. 35:57is
  928. 35:58it's going to be it's going to be the
  929. 35:59same so
  930. 36:01I might be better off just asking two
  931. 36:04really novel
  932. 36:04>> two smart questions rather than a whole
  933. 36:07lot of not so well designed questions
  934. 36:10absolutely absolutely.
  935. 36:12We should probably wrap up we've gone
  936. 36:13way over because we've been having fun
  937. 36:16I don't know if you had any
  938. 36:18um parting thoughts I mean my my view is
  939. 36:21you know
  940. 36:22uh
  941. 36:24Reed-Solomon codes are excellent for the
  942. 36:26job they were designed to do a long long
  943. 36:28time ago.
  944. 36:29Um
  945. 36:31they were never meant to be used in
  946. 36:32networks they were never meant to be
  947. 36:34used in blockchain and never meant to be
  948. 36:36used in a decentralized way. Um and um
  949. 36:41you know
  950. 36:42there really is a good reason for using
  951. 36:45the best tech.
  952. 36:46You know
  953. 36:47um not just because it's cool and you
  954. 36:49know you you you want to be have the the
  955. 36:52nice and shiny thing but uh
  956. 36:55it's it's a big difference between
  957. 36:58approximately 1960s technology and doing
  958. 37:01the latest and greatest but you know I'm
  959. 37:04biased I guess you're biased too but
  960. 37:06I'll let you talk to
  961. 37:07>> [laughter]
  962. 37:08>> I'll let you share your bias I've shared
  963. 37:10my bias. Yeah but actually interesting
  964. 37:12to to to to see again the the kind of
  965. 37:15line that goes through
  966. 37:17RS or like product code um
  967. 37:20embedded RS
  968. 37:22LDPC and then RLC all developed kind of
  969. 37:24at the same chair by if I remember. And
  970. 37:27I think the the thing that we really
  971. 37:29need to
  972. 37:30that I would want to stress here is the
  973. 37:33thing about problem statements right I
  974. 37:35mean we really talking about
  975. 37:38different kind of problems that each one
  976. 37:39of those codes solves in the end and
  977. 37:43RLC is mathematically optimal for
  978. 37:48the problem of recovering erasures in
  979. 37:50networks and that's why we built Mumble
  980. 37:54P2P
  981. 37:56and that's why we can also why we expect
  982. 38:00why why the performance of RLC scales so
  983. 38:02well
  984. 38:04in in the networks that that we
  985. 38:06encounter in blockchain systems.
  986. 38:09Yes so when we say we're optimum it's
  987. 38:10actually provable.
  988. 38:12Yes. How often can you say that?
  989. 38:15No
  990. 38:15I really am optimum.
  991. 38:17Well it's that was so much fun. Thank
  992. 38:19you so much
  993. 38:21and I hope all listeners enjoyed this
  994. 38:24conversation as much as we enjoyed
  995. 38:26having it and will generate
  996. 38:29conversations locally and as always
  997. 38:32please follow us on X
  998. 38:35um
  999. 38:36go to our website to see some of the
  1000. 38:38latest and greatest and stay tuned for
  1001. 38:41Mainnet.
  1002. 38:44Thanks all right.

About this transcript

This page contains the full transcript of RLNC vs Reed-Solomon: Optimal Blockchain Data Coding Explained | MIT's Muriel Médard by Optimum, generated from the public captions YouTube serves with the video. The transcript has 5,609 words across 1,002 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.