-
Notifications
You must be signed in to change notification settings - Fork 91
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
Include size lookup of contract for computing LDC opcode cost #598
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
80c0e23
Include size lookup of contract for computing cost
MitchTurner ce4d94d
Merge remote-tracking branch 'origin/master' into fix-ldc-cost
MitchTurner 8023807
Remove comment, update CHANGELOG
MitchTurner 2e24f6a
Fix merge mistakes
MitchTurner 1f6e728
Fix ssp_not_sp test
MitchTurner cec3c68
Fix test, cleanup, remove unused code
MitchTurner 5796561
Appease Clippy-sama
MitchTurner 716e82c
Simplify and reorder code to fix test
MitchTurner 6a07661
Remove comment and unnecissary conversion
MitchTurner 429dbe1
Only take the bytes of the contract that ldc specifies with `$rC`
MitchTurner eaa027b
Merge branch 'master' into fix-ldc-cost
MitchTurner 8053292
Add test for copy cost
MitchTurner da033b0
Appease Clippy-sama, fix nostd code
MitchTurner d9de157
Call out adherence to spec with comment
MitchTurner 68afeae
Fix name, move comment
MitchTurner 29c5cd8
Cleanup
MitchTurner fc1ee18
Refactor tests
MitchTurner d556e7a
Cleanup
MitchTurner a0008a6
Fix some of the opcodes in tests
MitchTurner b71151d
fmt
MitchTurner 7257740
Revert behavior to cost for entire contrat, fix test, add tests, fix …
MitchTurner 3016217
Fix sub_bytes code
MitchTurner 2842fe8
Remove use of std vec
MitchTurner fc837b0
Add offset test
MitchTurner 6bba267
Fix names and reg values, fix bug in interpreter code
MitchTurner 5ade899
Add cost right after gettting contract bytes
MitchTurner 51cf8fe
Merge remote-tracking branch 'origin/master' into fix-ldc-cost
MitchTurner f605bb2
Appease Clippy-sama
MitchTurner 0b360d6
Move charging for the size of the contract at the middle of the load …
xgreenx be21ac2
Fix padding in tests
MitchTurner 109af4b
Fix param names
MitchTurner ab3d0f2
Simplify contract code
MitchTurner 36c0639
Merge branch 'master' into fix-ldc-cost
MitchTurner 000237a
Fix comments
MitchTurner dd971a3
Merge branch 'fix-ldc-cost' of github.com:FuelLabs/fuel-vm into fix-l…
MitchTurner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to charge the user here before we do the main work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into it. This would be quite the architectural change, I think, but if it's how it needs to work, then I'll make it work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K. I split the function in half to return the bytes and then copy them separately. I don't love the solution becuase the functions are doing too much, but it's probably better :)