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

Remove bytecode from Runtime method signatures; consolidate bytecode sanitization in methods #44

Open
jakehemmerle opened this issue Dec 8, 2023 · 1 comment
Labels
code quality refactor; makes things simpler good first issue Good for newcomers

Comments

@jakehemmerle
Copy link
Contributor

jakehemmerle commented Dec 8, 2023

Currently, the evaluate and custom_hash functions on Runtime take bytecode and santize and instantiate it each time the function is called. Among things, there are several lines of duplicated code.

We should change the new function to accept bytecode, or add an additional function, that does component validation and other checks once, and then lets us call either evaluate or custom_hash without having to include bytecode in the parameters.

@jakehemmerle jakehemmerle added the code quality refactor; makes things simpler label Dec 8, 2023
@jakehemmerle jakehemmerle changed the title Refactor Runtime state to include Wasm bytecode Remove bytecode fromRuntime methods; consolidate bytecode checks Dec 8, 2023
@jakehemmerle jakehemmerle changed the title Remove bytecode fromRuntime methods; consolidate bytecode checks Remove bytecode fromRuntime methods; consolidate bytecode sanitization Dec 8, 2023
@jakehemmerle jakehemmerle added the good first issue Good for newcomers label Dec 8, 2023
@jakehemmerle
Copy link
Contributor Author

This should be acompanied by a core PR that, among things, significantly simplifies the signature of the hash_from_signature_request function.

@jakehemmerle jakehemmerle changed the title Remove bytecode fromRuntime methods; consolidate bytecode sanitization Remove bytecode from Runtime method signatures; consolidate bytecode sanitization Dec 8, 2023
@jakehemmerle jakehemmerle changed the title Remove bytecode from Runtime method signatures; consolidate bytecode sanitization Remove bytecode from Runtime method signatures; consolidate bytecode sanitization in methods Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality refactor; makes things simpler good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant