From 471aef42e5ad0f4bbacf04dfe99686d3f5997f09 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 13 Feb 2024 13:41:53 -0800 Subject: [PATCH] fix(da): account for blob tx proto overhead --- celestia/celestia.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/celestia/celestia.go b/celestia/celestia.go index 4a031b7..baca5f6 100644 --- a/celestia/celestia.go +++ b/celestia/celestia.go @@ -25,8 +25,10 @@ const ( // see: https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-013-non-interactive-default-rules-for-zero-padding.md // square size (64) * two rows = 128 shares // 128 shares * 512 bytes per share = 65,536 bytes to account for padding - // 1,973,786 - 65,536 = 1,908,250 bytes - DefaultMaxBytes = 1908250 + // also account for cmproto.Data overhead for each blob tx = 65,536 bytes + // see: https://github.com/celestiaorg/celestia-core/blob/edd9b9d8c38100ec0731ece4ac5f111e3a17ce32/types/tx.go#L205-L211 + // 1,973,786 - 65,536 - 65,536 = 1,842,714 bytes + DefaultMaxBytes = 1842714 ) // CelestiaDA implements the celestia backend for the DA interface