Skip to content

feat(gtest): introduce calculate_reply_for_handle in gtest #4659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

techraed
Copy link
Member

Resolves #4627 .

  1. Adjust random generation logic (remove check_epoch, store random in global storage, update each epoch)
  2. Move to global static almost every storage in gtest
  3. Introduce overlay for each storage used in gtest (except for gas allowance)

@techraed techraed self-assigned this May 15, 2025
@techraed techraed added A0-pleasereview PR is ready to be reviewed by the team D5-tooling Helper tools and utilities labels May 15, 2025
Copy link
Member

@breathx breathx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo gtest worth following refactoring:

  1. move all thread-local storages into one file
struct Overlayable<T> {
    storage: RefCell<T>,
    overlay: Option<RefCell<T>>, // or just RefCell<T>
}
  1. use p.2 for each storage in place without code copypasting. all of them should refer to one threadlocal OVERLAY_ENABLED: bool on each access

@techraed
Copy link
Member Author

techraed commented Jun 4, 2025

  1. move all thread-local storages into one file

It would be nice moving everything to one place, but there are 2 considerations:

  1. gear-common must have auxiliary gas tree, as it's used for property tesing
  2. global storages in gtest are not related to gear-common. So moving everything from gear-common to gtest seems ok, but look at p.1

what do you think?

@techraed
Copy link
Member Author

  1. move all thread-local storages into one file

It would be nice moving everything to one place, but there are 2 considerations:

  1. gear-common must have auxiliary gas tree, as it's used for property tesing
  2. global storages in gtest are not related to gear-common. So moving everything from gear-common to gtest seems ok, but look at p.1

what do you think?

Discussed, continuing on this

@techraed techraed requested a review from breathx June 23, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview PR is ready to be reviewed by the team D5-tooling Helper tools and utilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: impl calculateReplyForHandle within gtest
2 participants