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

Ensure that scripts, predicates, and byte code len % 4 == 0 #740

Open
MitchTurner opened this issue May 30, 2024 · 3 comments
Open

Ensure that scripts, predicates, and byte code len % 4 == 0 #740

MitchTurner opened this issue May 30, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@MitchTurner
Copy link
Member

Replacing FuelLabs/fuel-tx#150

Currently the behavior in the code doesn't match the behavior in specs. We can also optionally rephrase the specs to be "% 4", but that isn't necessary.

@Voxelot
Copy link
Member

Voxelot commented May 30, 2024

This isn't necessarily a hard requirement, for example some sway programs have arbitrary data blobs like constants at the end of the bytecode. So we shouldn't assume all bytecode is divisible into executable instructions.

@xgreenx
Copy link
Collaborator

xgreenx commented May 31, 2024

Then we need to update specification to remove scriptLength * 4 = len(script)

@xgreenx xgreenx added the good first issue Good for newcomers label May 31, 2024
@MukulKolpe
Copy link

Hey @xgreenx can I work on this one?

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

No branches or pull requests

4 participants