hiero-ledger / hiero-ledger/hiero-consensus-node
Revisit gas limit value returned by `gaslimit` opcode
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
The `gaslimit` opcode returns the gas limit set in the transaction. Even if `gaslimit` is executed within a `call`, it still returns the gas limit of the transaction (instead of the gas limit set in the `call` instruction).
This means that the gas limit returned by the `gaslimit` opcode does not match the block's gas limit. The JSON-RPC Relay is returning `30_000_000` as the block gas limit. PR https://github.com/hiero-ledger/hiero-json-rpc-relay/pull/2938 introduced [this change](https://github.com/hiero-ledger/hiero-json-rpc-relay/pull/2938/files#diff-9777a19c40f9c155f6bdbd9aa430e329bcaa4781bffdb96e0046a85450500f4c). It claims that in "the hedera ecosystem, there is a limit of up to `15 000 000` gas per sec". However, [HIP-1249](https://hips.hedera.com/hip/hip-1249) changes this behavior.
The `gaslimit` opcode needs to be revisited to clearly define its behavior in a Hiero network.
In any case, whatever the decision is, both `gaslimit` opcode and the Relay's gas limit block response should be consistent.
Contributor guide
Research direction
Start by reviewing the gaslimit opcode behavior described here, HIP-1249, and the linked JSON-RPC Relay PR #2938. Determine the intended Hiero-network behavior and identify how the opcode and Relay block gas-limit response can be made consistent; the issue is done when that behavior is clearly defined and both responses agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100