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

[core] Fix input object generation #7940

Merged
merged 4 commits into from
Feb 3, 2023
Merged

Conversation

tnowacki
Copy link
Contributor

  • packages used in type arguments were not included in input objects

@vercel
Copy link

vercel bot commented Jan 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Comments Updated
explorer ⬜️ Ignored (Inspect) Feb 3, 2023 at 10:58PM (UTC)
explorer-storybook ⬜️ Ignored (Inspect) Feb 3, 2023 at 10:58PM (UTC)
frenemies ⬜️ Ignored (Inspect) Feb 3, 2023 at 10:58PM (UTC)
wallet-adapter ⬜️ Ignored (Inspect) Feb 3, 2023 at 10:58PM (UTC)

Copy link
Member

@amnn amnn left a comment

Choose a reason for hiding this comment

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

Note that there was another issue that came up during the incident where if the package for a type argument does not exist, a validator could end up waiting forever for it, so holding off on the accept until we know what the implications of that are, but the change does look good, cc @bmwill who was dealing with that.

.collect()
}

fn type_argument_packages(packages: &mut BTreeSet<ObjectID>, type_argument: &TypeTag) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: This could be a top-level function, and probably the name should hint that it's accumulating the package names into packages, how about add_type_argument_packages?

@tnowacki
Copy link
Contributor Author

tnowacki commented Feb 1, 2023

Note that there was another issue that came up during the incident where if the package for a type argument does not exist, a validator could end up waiting forever for it, so holding off on the accept until we know what the implications of that are,

That should be covered? though I'm not sure exactly how that bug came about.
This would add the type arguments as an input object, so the certificate should not get generated if the object does not exist for that validator?

@lxfind
Copy link
Contributor

lxfind commented Feb 1, 2023

That should be covered? though I'm not sure exactly how that bug came about.

Yes this will be covered by this PR.

@tnowacki tnowacki requested a review from amnn February 1, 2023 22:05
@bmwill
Copy link
Contributor

bmwill commented Feb 2, 2023

Does this mean we could get rid of this error type since these should be impossible now? https://github.com/MystenLabs/sui/blob/main/crates/sui-types/src/messages.rs#L1550

@tnowacki
Copy link
Contributor Author

tnowacki commented Feb 2, 2023

Does this mean we could get rid of this error type since these should be impossible now? https://github.com/MystenLabs/sui/blob/main/crates/sui-types/src/messages.rs#L1550

Ya know... this should have been a big hint to us in retrospect

@tnowacki tnowacki enabled auto-merge (squash) February 3, 2023 20:57
@tnowacki tnowacki merged commit 717465d into MystenLabs:main Feb 3, 2023
lxfind pushed a commit that referenced this pull request Feb 7, 2023
- packages used in type arguments were not included in input objects
@tnowacki tnowacki deleted the inputs branch March 31, 2023 20:45
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.

4 participants