Skip to content

Conversation

@ANISH-SR
Copy link
Contributor

@ANISH-SR ANISH-SR commented Nov 25, 2025

Summary of Changes

  • Added the missing data.validate()? call in process_set_globalconfig, ensuring GlobalConfig is validated before computing size or writing to the account.
  • imported the Validate trait into the processor so GlobalConfig::validate is available.
  • This aligns SetGlobalConfig with the validation pattern used by other state-setting processors.

Testing Verification

  • Build succeeds and SetGlobalConfig now rejects invalid GlobalConfig values via validate().
  • rust-lint also passes w/o errors

Fixes #2239

Copy link
Contributor

@karl-dz karl-dz left a comment

Choose a reason for hiding this comment

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

Can you add an SVM program test to confirm that validate catches invalid input when this instruction is called? Thank you

@ANISH-SR
Copy link
Contributor Author

Can you add an SVM program test to confirm that validate catches invalid input when this instruction is called? Thank you

Sure!

@ANISH-SR
Copy link
Contributor Author

Hi @karl-dz , just pushed some new changes w/ SVM tests. Can you please review this? Thanks

@ANISH-SR ANISH-SR requested a review from karl-dz November 26, 2025 11:48
@karl-dz
Copy link
Contributor

karl-dz commented Dec 17, 2025

For some reason there is a go-lint error. Can you rebase and push to your branch? I can run the workflows again when you do. Thank you

@ANISH-SR
Copy link
Contributor Author

ANISH-SR commented Dec 31, 2025

For some reason there is a go-lint error. Can you rebase and push to your branch? I can run the workflows again when you do. Thank you

for sure! sorry for delaying this change for this long, was busy with university examinations.

@ANISH-SR ANISH-SR force-pushed the fix/data-validate-missing branch from 752f2e7 to 5bd4efe Compare December 31, 2025 13:30
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.

In the SetGlobalConfig instruction, the data.validate() verification is missing

2 participants