Skip to content

feat: implement Jumbo Transaction support and enhance pre-requisite validation for eth_sendRawTransaction #3722

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 23 commits into from
May 13, 2025

Conversation

quiet-node
Copy link
Contributor

@quiet-node quiet-node commented Apr 24, 2025

Description

This PR introduces a feature flag to allow the Relay to handle jumbo transactions, making it possible to process large transaction payloads directly rather than splitting them across the Hedera File System. Additionally, the PR includes several code improvements for better clarity and added validation.

Key Changes

  • Added JUMBO_TX_ENABLED feature flag (currently set to false as default value) that allows transactions to bypass size limit checks
  • Improved transaction validation process with the following changes:
    • Reworked transaction size precheck logic for simpler implementation, also bumped the total transaction size limit to 130KB
    • Added callDataSize precheck to validate callData field against 128KB limit.
    • Added contractCodeSize precheck to validate smart contract deployments against EIP-170 limit (24KB)
    • Renamed functions for better clarity and separation of concerns:
      • parseRawTxAndPrecheckvalidateRawTransaction
      • parseTxIfNeededparseRawTransaction
  • Added a new acceptance test file, sendRawTransactionExtension.spec.ts, to isolate eth_sendRawTransaction-feature-related tests and reduce the load on the rpc_batch1 suite.

Fixes #3573
Fixes #3460

@quiet-node quiet-node added the enhancement New feature or request label Apr 24, 2025
@quiet-node quiet-node added this to the 0.68.0 milestone Apr 24, 2025
@quiet-node quiet-node self-assigned this Apr 24, 2025
@quiet-node quiet-node linked an issue Apr 24, 2025 that may be closed by this pull request
@quiet-node quiet-node changed the title feat: allowed Relay to use Jumbo Transaction behind a feature flag feat: allowed Relay to use Jumbo Transaction Apr 24, 2025
@quiet-node quiet-node changed the title feat: allowed Relay to use Jumbo Transaction feat: implement jumbo transaction support and enhance pre-requisite validation for eth_sendRawTransaction Apr 24, 2025
@quiet-node quiet-node changed the title feat: implement jumbo transaction support and enhance pre-requisite validation for eth_sendRawTransaction feat: implement Jumbo Transaction support and enhance pre-requisite validation for eth_sendRawTransaction Apr 24, 2025
Copy link

github-actions bot commented Apr 24, 2025

Test Results

 21 files  + 1  266 suites   - 18   39m 41s ⏱️ +18s
637 tests + 6  624 ✅  -  1  5 💤 +1  8 ❌ +6 
759 runs   - 14  746 ✅  - 21  5 💤 +1  8 ❌ +6 

For more details on these failures, see this check.

Results for commit 16de375. ± Comparison against base commit 64a04c2.

This pull request removes 2 and adds 8 tests. Note that renamed tests count towards both.
"after all" hook in "@release @web-socket-batch-1 JSON-RPC requests validation" ‑ RPC Server Acceptance Tests Acceptance tests @release @web-socket-batch-1 JSON-RPC requests validation "after all" hook in "@release @web-socket-batch-1 JSON-RPC requests validation"
should execute "eth_sendRawTransaction" and deploy a contract with more than max transaction fee ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-1 RPC Server Acceptance Tests RPC Server Acceptance Tests Transaction related RPC Calls should execute "eth_sendRawTransaction" and deploy a contract with more than max transaction fee
@release should execute "eth_sendRawTransaction" and deploy a contract with code size within the CONTRACT_CODE_SIZE_LIMIT - 24kb limit ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Prechecks contractCodeSize @release should execute "eth_sendRawTransaction" and deploy a contract with code size within the CONTRACT_CODE_SIZE_LIMIT - 24kb limit
@release should execute "eth_sendRawTransaction" with Jumbo Transaction ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Jumbo Transaction @release should execute "eth_sendRawTransaction" with Jumbo Transaction
@release should execute "eth_sendRawTransaction" with regular transaction size within the CALL_DATA_SIZE_LIMIT - 128kb limit ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Prechecks callDataSize @release should execute "eth_sendRawTransaction" with regular transaction size within the CALL_DATA_SIZE_LIMIT - 128kb limit
@release should execute "eth_sendRawTransaction" with regular transaction size within the SEND_RAW_TRANSACTION_SIZE_LIMIT - 130kb limit ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Prechecks transactionSize @release should execute "eth_sendRawTransaction" with regular transaction size within the SEND_RAW_TRANSACTION_SIZE_LIMIT - 130kb limit
@release should fail "eth_sendRawTransaction" for contract with code size exceeding the CONTRACT_CODE_SIZE_LIMIT - 24kb limit ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Prechecks contractCodeSize @release should fail "eth_sendRawTransaction" for contract with code size exceeding the CONTRACT_CODE_SIZE_LIMIT - 24kb limit
@release should fail "eth_sendRawTransaction" when transaction size exceeds the CALL_DATA_SIZE_LIMIT - 128kb limit ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Prechecks callDataSize @release should fail "eth_sendRawTransaction" when transaction size exceeds the CALL_DATA_SIZE_LIMIT - 128kb limit
@release should fail "eth_sendRawTransaction" when transaction size exceeds the SEND_RAW_TRANSACTION_SIZE_LIMIT - 130kb limit ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Prechecks transactionSize @release should fail "eth_sendRawTransaction" when transaction size exceeds the SEND_RAW_TRANSACTION_SIZE_LIMIT - 130kb limit
@release should pass precheck and execute "eth_sendRawTransaction" for a regular transaction i.e. non contract deployment transaction with data exceeding the CONTRACT_CODE_SIZE_LIMIT - 24kb limit ‑ RPC Server Acceptance Tests Acceptance tests @sendRawTransactionExtension Acceptance Tests Prechecks contractCodeSize @release should pass precheck and execute "eth_sendRawTransaction" for a regular transaction i.e. non contract deployment transaction with data exceeding the CONTRACT_CODE_SIZE_LIMIT - 24kb limit

♻️ This comment has been updated with latest results.

@quiet-node quiet-node marked this pull request as ready for review April 24, 2025 03:46
@quiet-node quiet-node requested review from a team as code owners April 24, 2025 03:46
Copy link

@Ferparishuertas Ferparishuertas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls review the comments and adress them to be able to be in sync with the funtional needs

@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch from 790a3db to e683d8f Compare April 24, 2025 16:02
@quiet-node quiet-node marked this pull request as draft April 24, 2025 16:05
@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch 3 times, most recently from 100b63d to 1a6bc54 Compare April 24, 2025 16:48
@quiet-node quiet-node marked this pull request as ready for review April 24, 2025 17:07
@quiet-node quiet-node requested a review from a team as a code owner April 24, 2025 19:20
@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch from daf1742 to 7e2de4c Compare April 24, 2025 19:24
@quiet-node quiet-node marked this pull request as draft April 24, 2025 19:36
@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch from 7e2de4c to 402d938 Compare April 24, 2025 19:58
@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch from 7aff97d to 6dce594 Compare April 24, 2025 20:36
@quiet-node quiet-node marked this pull request as ready for review April 24, 2025 20:36
@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch from 02003be to 734bbaf Compare April 24, 2025 23:03
@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch from d6abc77 to 8d55464 Compare May 9, 2025 16:04
quiet-node added 4 commits May 9, 2025 11:06
Signed-off-by: Logan Nguyen <[email protected]>

Revert "fix: removed unused code"

This reverts commit dc7afb0.

Reapply "fix: removed unused code"

This reverts commit 22e72e9806c6fd60218000a0f970fa8ea2886523.
This reverts commit 2dc2ff5.
Signed-off-by: Logan Nguyen <[email protected]>
@quiet-node quiet-node force-pushed the 3573-jumbo-transaction-logic-feature-flag branch from 9de3b8a to 4c0e41d Compare May 12, 2025 15:24
@quiet-node quiet-node requested a review from andrewb1269hg May 12, 2025 16:11
Copy link
Contributor

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM at first sight.

Copy link
Contributor

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tyvm!

@konstantinabl konstantinabl self-requested a review May 13, 2025 15:41
Copy link
Contributor

@andrewb1269hg andrewb1269hg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review and approve .github/workflows/acceptance.yml

@quiet-node quiet-node merged commit d7d6380 into main May 13, 2025
43 of 44 checks passed
@quiet-node quiet-node deleted the 3573-jumbo-transaction-logic-feature-flag branch May 13, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jumbo transaction logic + feature flag [UBER EPIC] Jumbo TX: HIP 1096
7 participants