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

[gas] Fix potential data race in gas object check #4588

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Sep 13, 2022

Not sure what conditions would trigger a real problem in prod, fix it just in case.
When checking gas and creating gas meter, we should also make sure we use the requested version instead of latest version.
Resolves #4597

Copy link
Contributor

@mystenmark mystenmark left a comment

Choose a reason for hiding this comment

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

Good find!

@lxfind lxfind merged commit ac4716f into main Sep 14, 2022
@lxfind lxfind deleted the gas-fix-potential-data-race branch September 14, 2022 20:51
@@ -90,7 +91,7 @@ where
#[instrument(level = "trace", skip_all)]
async fn check_gas<S>(
store: &SuiDataStore<S>,
gas_payment_id: ObjectID,
gas_payment: &ObjectRef,
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically the digest isn't necessary and we can just pass the ID and version here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential data race in checking gas object
3 participants