Skip to content

Commit e8f57e3

Browse files
authored
fix: Move jumbo transaction size check only at ingest (#19118)
Signed-off-by: ibankov <[email protected]>
1 parent d41653d commit e8f57e3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/TransactionChecker.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static com.hedera.node.app.hapi.utils.CommonPbjConverters.fromPbj;
2222
import static java.util.Objects.requireNonNull;
2323

24-
import com.google.common.annotations.VisibleForTesting;
2524
import com.hedera.hapi.node.base.AccountID;
2625
import com.hedera.hapi.node.base.HederaFunctionality;
2726
import com.hedera.hapi.node.base.ResponseCodeEnum;
@@ -301,7 +300,6 @@ public TransactionInfo checkParsed(@NonNull final TransactionInfo txInfo) throws
301300
try {
302301
checkPrefixMismatch(txInfo.signatureMap().sigPair());
303302
checkTransactionBody(txInfo.txBody(), txInfo.functionality());
304-
checkJumboTransactionBody(txInfo);
305303
return txInfo;
306304
} catch (PreCheckException e) {
307305
throw new DueDiligenceException(e.responseCode(), txInfo);
@@ -377,8 +375,7 @@ private void checkTransactionBody(@NonNull final TransactionBody txBody, HederaF
377375
}
378376
}
379377

380-
@VisibleForTesting
381-
void checkJumboTransactionBody(TransactionInfo txInfo) throws PreCheckException {
378+
public void checkJumboTransactionBody(TransactionInfo txInfo) throws PreCheckException {
382379
final var jumboTxnEnabled = jumboTransactionsConfig.isEnabled();
383380
final var allowedJumboHederaFunctionalities = jumboTransactionsConfig.allowedHederaFunctionalities();
384381

hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/ingest/IngestChecker.java

+2
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ public TransactionInfo runAllChecks(
198198
// 1. Check the syntax
199199
final var maxBytes = maxIngestParseSize(configuration);
200200
final var txInfo = transactionChecker.parseAndCheck(serializedTransaction, maxBytes);
201+
// check jumbo size after parsing
202+
transactionChecker.checkJumboTransactionBody(txInfo);
201203
final var txBody = txInfo.txBody();
202204
final var functionality = txInfo.functionality();
203205

0 commit comments

Comments
 (0)