Skip to content

fix: Move jumbo transaction size check only at ingest #19118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static com.hedera.node.app.hapi.utils.CommonPbjConverters.fromPbj;
import static java.util.Objects.requireNonNull;

import com.google.common.annotations.VisibleForTesting;
import com.hedera.hapi.node.base.AccountID;
import com.hedera.hapi.node.base.HederaFunctionality;
import com.hedera.hapi.node.base.ResponseCodeEnum;
Expand Down Expand Up @@ -301,7 +300,6 @@ public TransactionInfo checkParsed(@NonNull final TransactionInfo txInfo) throws
try {
checkPrefixMismatch(txInfo.signatureMap().sigPair());
checkTransactionBody(txInfo.txBody(), txInfo.functionality());
checkJumboTransactionBody(txInfo);
return txInfo;
} catch (PreCheckException e) {
throw new DueDiligenceException(e.responseCode(), txInfo);
Expand Down Expand Up @@ -377,8 +375,7 @@ private void checkTransactionBody(@NonNull final TransactionBody txBody, HederaF
}
}

@VisibleForTesting
void checkJumboTransactionBody(TransactionInfo txInfo) throws PreCheckException {
public void checkJumboTransactionBody(TransactionInfo txInfo) throws PreCheckException {
final var jumboTxnEnabled = jumboTransactionsConfig.isEnabled();
final var allowedJumboHederaFunctionalities = jumboTransactionsConfig.allowedHederaFunctionalities();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ public TransactionInfo runAllChecks(
// 1. Check the syntax
final var maxBytes = maxIngestParseSize(configuration);
final var txInfo = transactionChecker.parseAndCheck(serializedTransaction, maxBytes);
// check jumbo size after parsing
transactionChecker.checkJumboTransactionBody(txInfo);
final var txBody = txInfo.txBody();
final var functionality = txInfo.functionality();

Expand Down