From 41becc535b15a27c512c9a595d1c72010b608592 Mon Sep 17 00:00:00 2001 From: danbaruka <46156791+danbaruka@users.noreply.github.com> Date: Wed, 4 Mar 2026 22:15:39 +0400 Subject: [PATCH] fix(evolution): update maximum reference script size limit to 204,800 bytes --- packages/evolution/src/sdk/builders/TxBuilderImpl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/evolution/src/sdk/builders/TxBuilderImpl.ts b/packages/evolution/src/sdk/builders/TxBuilderImpl.ts index a25125aa..3eb371fd 100644 --- a/packages/evolution/src/sdk/builders/TxBuilderImpl.ts +++ b/packages/evolution/src/sdk/builders/TxBuilderImpl.ts @@ -203,11 +203,11 @@ export const calculateReferenceScriptFee = ( yield* Effect.logDebug(`[RefScriptFee] Total reference script size: ${totalScriptSize} bytes`) - if (totalScriptSize > 200_000) { - // maxRefScriptSizePerTx from Conway ledger rules (CIP-0069 / CIP-0112) + if (totalScriptSize > 204_800) { + // maxRefScriptSizePerTx: 200 * 1024 = 204,800 bytes (200 KiB). Hardcoded in Conway era, becomes a protocol parameter in Dijkstra era. return yield* Effect.fail( new TransactionBuilderError({ - message: `Total reference script size (${totalScriptSize} bytes) exceeds maximum limit of 200,000 bytes` + message: `Total reference script size (${totalScriptSize} bytes) exceeds maximum limit of 204,800 bytes` }) ) }