hiero-ledger / hiero-ledger/hiero-sdk-cpp

[Intermediate]: Support Jumbo EthereumTransaction (HIP-1086)

Open
#912 2 comments 0 reactions 0 assignees View on GitHub
priority: medium skill: intermediate status: ready for dev
Dominant language
C++
Stars
42
Forks
108
Avg merge
11h 45m
Merged PRs (30d)
2

Description

## 🧩 Intermediate Friendly

This issue is a good fit for contributors who are already familiar with the Hiero C++ SDK and feel comfortable navigating the codebase.

Intermediate Issues often involve:
- Exploring existing implementations
- Understanding how different components work together
- Making thoughtful changes that follow established patterns

The goal is to support deeper problem-solving while keeping the task clear, focused, and enjoyable to work on.

---

## 👾 Description of the Issue

[HIP-1086: Jumbo EthereumTransaction](https://github.com/hiero-ledger/hiero-improvement-proposals/blob/main/HIP/hip-1086.md) allows Ethereum transactions up to 128KB to be sent directly to the network without using the Hedera File Service (HFS).

The C++ SDK currently has a 5KB limit that triggers HFS usage for larger transactions:

```cpp
// src/sdk/main/include/EthereumFlow.h, line 92
static constexpr unsigned int MAX_ETHEREUM_DATA_SIZE = 5120U;
```

With jumbo transactions now supported, users should just use `EthereumTransaction` directly, and `EthereumFlow` should be deprecated.

---

## 💡 Proposed Solution

### 1. Update the Size Limit

Change `MAX_ETHEREUM_DATA_SIZE` from 5KB to 128KB:

```cpp
// In EthereumFlow.h
static constexpr unsigned int MAX_ETHEREUM_DATA_SIZE = 128000U; // 128KB jumbo limit
```

### 2. Deprecate EthereumFlow

Add deprecation notice to `EthereumFlow` class:

```cpp
/**
* @deprecated Use EthereumTransaction instead. With the introduction of jumbo
* transactions, it should always be less cost and more efficient to use
* EthereumTransaction instead.
*/
class [[deprecated("Use EthereumTransaction instead - jumbo transactions are more efficient")]]
EthereumFlow
{
// ...
};
```

---

## 👩‍💻 Implementation Steps

1. **Update constant**: Change `MAX_ETHEREUM_DATA_SIZE` to `128000U` in `EthereumFlow.h`

2. **Add deprecation**: Add `[[deprecated]]` attribute to `EthereumFlow` class

3. **Update documentation**: Add comment explaining why the class is deprecated

4. **Add integration tests**: Add tests for:
- `EthereumTransaction` with large calldata (e.g., 120KB) - should succeed directly
- `EthereumFlow` with calldata below 128KB - should succeed without HFS
- `EthereumFlow` with calldata above 128KB - should use HFS fallback

5. **Verify existing tests**: Ensure existing tests still pass

---

## ✅ Acceptance Criteria

To help get this change merged smoothly:

- [ ] **Constant updated**: `MAX_ETHEREUM_DATA_SIZE` changed to `128000U`
- [ ] **Deprecation added**: `EthereumFlow` class marked deprecated with clear message
- [ ] **Integration tests added**: Jumbo transaction tests
- [ ] **Existing tests pass**: No regression in existing functionality
- [ ] **Review:** All code review feedback addressed

---

## 📋 Step-by-Step Contribution Guide

To help keep contributions consistent and easy to review, we recommend following these steps:

- [ ] Comment `/assign` to request the issue
- [ ] Wait for assignment
- [ ] Fork the repository and create a branch
- [ ] Set up the project using the instructions in `README.md`
- [ ] Make the requested changes
- [ ] Sign each commit using `-s -S`
- [ ] Push your branch and open a pull request

Read [Workflow Guide](docs/training/workflow.md) for step-by-step workflow guidance.
Read [README.md](README.md) for setup instructions.

❗ Pull requests **cannot be merged** without `S` and `s` signed commits.
See the [Signing Guide](docs/training/signing.md).

---

## 🤔 Additional Information

### Files to Modify

| File | Changes |
|------|---------|
| `src/sdk/main/include/EthereumFlow.h` | Update constant, add deprecation |
| `src/sdk/tests/integration/EthereumTransactionIntegrationTests.cc` | Add jumbo transaction test |
| `src/sdk/tests/integration/EthereumFlowIntegrationTests.cc` | Add jumbo transaction tests (if exists, or create) |

### Test Network Required

Integration tests require a running Hiero network. See existing integration tests for setup patterns, or use the CI workflow with `solo-action`.

### References

| Document | Purpose |
|----------|---------|
| [HIP-1086](https://github.com/hiero-ledger/hiero-improvement-proposals/blob/main/HIP/hip-1086.md) | Jumbo EthereumTransaction specification |

### Why Deprecate EthereumFlow?

With jumbo transactions (HIP-1086):
- **Cost**: Direct `EthereumTransaction` is cheaper (no file storage fees)
- **Efficiency**: Single transaction vs multiple (FileCreate + FileAppend + EthereumTransaction)
- **Simplicity**: No file management needed

HFS fallback only needed for transactions over 128KB, which is rare.

If you have questions while working on this issue, feel free to ask!

You can reach the community and maintainers here:
[Hiero-SDK-C++ Discord](https://discord.com/channels/905194001349627914/1337424839761465364)

Whether you need help finding the right file, understanding existing code, or confirming your approach — we're happy to help.

Contributor guide

Open the contributing guide

Research direction

Start with HIP-1086 and src/sdk/main/include/EthereumFlow.h, then inspect the existing integration tests in src/sdk/tests/integration/EthereumTransactionIntegrationTests.cc and EthereumFlowIntegrationTests.cc. Update the documented limit and deprecation state, add coverage for jumbo EthereumTransaction and EthereumFlow fallback behavior, and verify the existing integration suite passes against a running Hiero network.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
backend-api-design, blockchain, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.