Skip to content

fix: add data validate missing verification#2288

Closed
sranish wants to merge 4 commits into
malbeclabs:mainfrom
sranish:fix/data-validate-missing
Closed

fix: add data validate missing verification#2288
sranish wants to merge 4 commits into
malbeclabs:mainfrom
sranish:fix/data-validate-missing

Conversation

@sranish

@sranish sranish commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

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

@karl-dz karl-dz left a comment

Copy link
Copy Markdown
Contributor

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

@sranish

sranish commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

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

Sure!

@sranish

sranish commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

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

@sranish
sranish requested a review from karl-dz November 26, 2025 11:48
@karl-dz

karl-dz commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

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

@sranish

sranish commented Dec 31, 2025

Copy link
Copy Markdown
Contributor Author

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.

@sranish
sranish force-pushed the fix/data-validate-missing branch from 752f2e7 to 5bd4efe Compare December 31, 2025 13:30
sranish and others added 2 commits January 8, 2026 16:07
Signed-off-by: ANISH-SR <rawatanish08@gmail.com>
@juan-malbeclabs

Copy link
Copy Markdown
Contributor

This change has already been addressed in other PRs. Thank you for your continued and consistent contributions to DoubleZero.

@sranish

sranish commented Jan 9, 2026

Copy link
Copy Markdown
Contributor Author

This change has already been addressed in other PRs. Thank you for your continued and consistent contributions to DoubleZero.

awesome! thankyou too!

@sranish
sranish deleted the fix/data-validate-missing branch January 9, 2026 14:56
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

3 participants