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

[Pectra] gas costs of the pointer_loop not exactly match the spec test

Open
#25,776 0 comments 0 reactions 1 assignee Claimed by @gkozyryatskyy View on GitHub
Hedera Smart Contract Service Team Promoted
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

### Description

During running [execution-spec-tests](https://github.com/gkozyryatskyy/execution-spec-tests) for Pectra, I noticed that `test_pointer_contract_pointer_loop` is failing because of the wrong number of loop iterations fitting within the `gasLimit` provided by the test.

- Test failure: Storage mismatch: got 0x73 (115), expected 0x70 (112). The node is resolving an extra level of indirection in a pointer→contract→pointer loop, suggesting incorrect behavior when a pointer targets a contract that itself points back.

### Steps to reproduce
1. Set up local Hedera with Pectra feature branches for all the services.
- Use [23725-Enable-EVM-spec-tests](https://github.com/hashgraph/hedera-evm-testing/tree/23725-Enable-EVM-spec-tests) branch of `hedera-evm-testing` to set it up
- Consensus Node: Branch [feature/hedera-evm-pectra-support-v2](https://github.com/hiero-ledger/hiero-consensus-node/tree/feature/hedera-evm-pectra-support-v2) should be at [this path](https://github.com/hashgraph/hedera-evm-testing/blob/23725-Enable-EVM-spec-tests/evm-functional-testing/test.sh#L13)
- Relay: Branch [pectra-upgrade](https://github.com/hiero-ledger/hiero-json-rpc-relay/tree/pectra-upgrade) should be at [this path](https://github.com/hashgraph/hedera-evm-testing/blob/23725-Enable-EVM-spec-tests/evm-functional-testing/test.sh#L25)
- Mirror Node: Images should be replaced at [mn-values.yaml](https://github.com/hashgraph/hedera-evm-testing/blob/23725-Enable-EVM-spec-tests/evm-functional-testing/local/mn-values.yaml#L5) file
- run with `./test.sh solo start`

2. Run specific spect test from [23725-Enable-EVM-spec-tests](https://github.com/gkozyryatskyy/execution-spec-tests/tree/23725-Enable-EVM-spec-tests) branch
```
uv run execute remote -rA --verbose --fork=Prague \
--rpc-endpoint=http://localhost:37546/ \
--rpc-seed-key=0xde78ff4e5e77ec2bf28ef7b446d4bec66e06d39b6e6967864b2bf3d6153f3e68 \
--rpc-chain-id=298 \
--sender-funding-txs-gas-price='710 gwei' \
--default-gas-price=710_000_000_000 \
--sender-fund-refund-gas-limit=1_000_000 \
--seed-account-sweep-amount='100000000 ether' \
--eoa-fund-amount-default=8_000_000_000_000_000_000_000 \
--transaction-gas-limit=12_500_000 \
--tx-wait-timeout=15 \
--html=tests/prague/eip7623_report.html \
--self-contained-html \
"tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py::test_pointer_contract_pointer_loop[fork_Prague-state_test]"
```

3. Test failed with `AssertionError: Storage value at 0x00 of 0xade9cd2b62ad30bcb346f999fbff372ef16faa30 is 0x0000000000000000000000000000000000000000000000000000000000000073,expected 0x70.`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.