Skip to content
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

refactor(gear): move runtime parameter constants into gear-core #4530

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

Conversation

playX18
Copy link
Member

@playX18 playX18 commented Mar 10, 2025

Moves runtime parameter constants into a separate file under gear-core and then replaces all their definitions with the constant usage.

@playX18 playX18 added the A0-pleasereview PR is ready to be reviewed by the team label Mar 10, 2025
@playX18 playX18 requested a review from breathx March 10, 2025 08:25
@playX18 playX18 self-assigned this Mar 10, 2025
@playX18
Copy link
Member Author

playX18 commented Mar 10, 2025

Hadn't noticed the compile error because of the fact that gear-core is a dev-dependency for Vara runtime. It can be fixed by moving it to regular dependencies. Is that a proper way to handle that or maybe constants should be moved entirely to a new crate like gear-core-constants?

@@ -151,8 +152,8 @@ where
gas_multiplier: GasMultiplier::one(),
costs: Default::default(),
max_pages: MAX_WASM_PAGES_AMOUNT.into(),
outgoing_limit: 1024,
outgoing_bytes_limit: 64 * 1024 * 1024,
outgoing_limit: OUTGOING_LIMIT,
Copy link
Member

Choose a reason for hiding this comment

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

wdyt if we remove this constants from configs at all? or provide some default constructor with them not to miss anything, @grishasobol ?

Copy link
Member

Choose a reason for hiding this comment

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

And remove runtime constants?

Copy link
Member

Choose a reason for hiding this comment

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

ah ok. see now it's already removed.

what about ?
mailbox_threshold
max_reservations
max_pages
gas_multiplier and e.t.c

@breathx breathx added A3-gotissues PR occurred to have issues after the review and removed A0-pleasereview PR is ready to be reviewed by the team labels Mar 13, 2025
@playX18 playX18 requested a review from breathx March 14, 2025 08:25
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.

pls wait for @grishasobol opinion here

@breathx breathx added A0-pleasereview PR is ready to be reviewed by the team and removed A3-gotissues PR occurred to have issues after the review labels Mar 17, 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.

a few things more to be considered

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants