hiero-ledger / hiero-ledger/hiero-consensus-node

System contracts should charge gas based on dispatched transactions

Open
#14,287 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Epic Hedera Smart Contract Service Team Promoted
Dominant language
Java
Stars
407
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

Problem

Currently, system contracts that dispatch transactions to other services for processing calculate gas independently of these calls. Alternatively, dispatched transactions can return the needed fees of all child transactions and the system contract can use this information to convert the returned fees into gas charges. This alternative will require less maintenance going forward and will result in more consistency in comparison to the equivalent HAPI call.

Solution
### Tasks
- [ ] Research current dispatch considerations
- [ ] support returning **all** builders created in the context of a dispatch, not just the builder for the dispatched transaction
- [ ] return the fees used by child transactions in builders when a transaction is dispatched
- [ ] convert the fees into gas and use this amount for gas requirements for the system contract
- [ ] remove existing code that calculate fees independently in dispatching system contracts.
Alternatives

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by researching the current dispatch considerations and tracing how system contracts build dispatched transactions and calculate fees. The work is complete when all builders created during a dispatch are returned, child-transaction fees are converted into gas for system-contract requirements, and independent fee calculations are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.