Skip to content
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 @@ -102,6 +102,7 @@
import com.hedera.node.config.ConfigProvider;
import com.hedera.node.config.Utils;
import com.hedera.node.config.data.BlockStreamConfig;
import com.hedera.node.config.data.GovernanceTransactionsConfig;
import com.hedera.node.config.data.HederaConfig;
import com.hedera.node.config.data.NetworkAdminConfig;
import com.hedera.node.config.data.QuiescenceConfig;
Expand Down Expand Up @@ -506,10 +507,14 @@ public Hedera(
boundaryStateChangeListener = new BoundaryStateChangeListener(storeMetricsService, configSupplier);
hintsService = hintsServiceFactory.apply(appContext, bootstrapConfig);
historyService = historyServiceFactory.apply(appContext, bootstrapConfig);
final GovernanceTransactionsConfig governanceConfig =
bootstrapConfig.getConfigData(GovernanceTransactionsConfig.class);
final int maxTransactionBytes = governanceConfig.isEnabled()
? governanceConfig.maxTxnSize()
: bootstrapConfig.getConfigData(HederaConfig.class).transactionMaxBytes();
utilServiceImpl = new UtilServiceImpl(appContext, (txnBytes, config) -> daggerApp
.transactionChecker()
.parseSignedAndCheck(
txnBytes, config.getConfigData(HederaConfig.class).transactionMaxBytes())
.parseSignedAndCheck(txnBytes, maxTransactionBytes)
.txBody());
tokenServiceImpl = new TokenServiceImpl(appContext);
consensusServiceImpl = new ConsensusServiceImpl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.hedera.node.config.converter.CongestionMultipliersConverter;
import com.hedera.node.config.converter.EntityScaleFactorsConverter;
import com.hedera.node.config.converter.LongPairConverter;
import com.hedera.node.config.converter.PermissionedAccountsRangeConverter;
import com.hedera.node.config.converter.SemanticVersionConverter;
import com.hedera.node.config.data.AccountsConfig;
import com.hedera.node.config.data.BlockNodeConnectionConfig;
Expand All @@ -16,6 +17,7 @@
import com.hedera.node.config.data.ContractsConfig;
import com.hedera.node.config.data.FeesConfig;
import com.hedera.node.config.data.FilesConfig;
import com.hedera.node.config.data.GovernanceTransactionsConfig;
import com.hedera.node.config.data.HederaConfig;
import com.hedera.node.config.data.JumboTransactionsConfig;
import com.hedera.node.config.data.LedgerConfig;
Expand All @@ -27,6 +29,7 @@
import com.hedera.node.config.types.CongestionMultipliers;
import com.hedera.node.config.types.EntityScaleFactors;
import com.hedera.node.config.types.LongPair;
import com.hedera.node.config.types.PermissionedAccountsRange;
import com.hedera.pbj.runtime.io.buffer.Bytes;
import com.swirlds.config.api.Configuration;
import com.swirlds.config.api.ConfigurationBuilder;
Expand Down Expand Up @@ -69,10 +72,12 @@ public BootstrapConfigProviderImpl() {
.withConfigDataType(OpsDurationConfig.class)
.withConfigDataType(JumboTransactionsConfig.class)
.withConfigDataType(FeesConfig.class)
.withConfigDataType(GovernanceTransactionsConfig.class)
.withConverter(Bytes.class, new BytesConverter())
.withConverter(SemanticVersion.class, new SemanticVersionConverter())
.withConverter(CongestionMultipliers.class, new CongestionMultipliersConverter())
.withConverter(EntityScaleFactors.class, new EntityScaleFactorsConverter())
.withConverter(PermissionedAccountsRange.class, new PermissionedAccountsRangeConverter())
.withConverter(LongPair.class, new LongPairConverter());

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,14 @@ public Stream<DynamicTest> privilegedAccountIsExemptFromThrottles() {
public Stream<DynamicTest> canNotPutJumboInsideOfBatch() {
final var payloadSize = 127 * 1024;
final var payload = new byte[payloadSize];
return hapiTest(atomicBatch(jumboEthCall(CONTRACT_CALLDATA_SIZE, FUNCTION, payload))
.hasPrecheck(TRANSACTION_OVERSIZE)
// If we use subprocess network, the transaction should fail at gRPC level
.orUnavailableStatus());
return hapiTest(
cryptoCreate(PAYER).balance(ONE_HUNDRED_HBARS),
atomicBatch(jumboEthCall(CONTRACT_CALLDATA_SIZE, FUNCTION, payload)
.batchKey(PAYER))
.payingWith(PAYER)
.hasPrecheck(TRANSACTION_OVERSIZE)
// If we use subprocess network, the transaction should fail at gRPC level
.orUnavailableStatus());
}
}
}
Loading
Loading