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

Reevaluate the use of cache in the gas test scripts

Open
#19,638 0 comments 0 reactions 0 assignees View on GitHub
Hedera Smart Contract Service
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

We've encountered issues where values cached across different test runs cause unexpected test failures due to transactions being invalid (e.g. trying to burn a wrong token_id that doesn't exist but was saved from previous runs).

Separately, there are some items that are saved to cache but are never retrieved (like `evm::deterministic::contract`, which only add complexity when reading the code.

We should reevaluate whether the cache is necessary and needed for our intended use case - running the script periodically on CI.

Expected outcome is to either:
- remove the cache, if its use is unjustified
- explain (in a comment) why the cache is worthy, and how it can be improved so that it doesn't cause issues (possibly create a follow up ticket)

Contributor guide

Open the contributing guide

Research direction

Start with the gas test scripts and trace where cached values are written and retrieved, including the evm::deterministic::contract entry. Run the scripts across repeated test runs to reproduce stale transaction data. Done means the cache is removed, or its purpose and safeguards are documented with any follow-up work identified.

Written by the indexing model from the issue text.

Assessment

Domain
ci-cd, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.