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

Add LDC mode 2, which allows code from memory #611

Merged
merged 5 commits into from
Oct 15, 2024
Merged

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Oct 6, 2024

VM PR FuelLabs/fuel-vm#849

Before requesting review

  • I have reviewed the code myself

@Dentosal Dentosal self-assigned this Oct 6, 2024
@Dentosal Dentosal requested a review from a team October 6, 2024 08:11
@Dentosal Dentosal mentioned this pull request Oct 6, 2024
1 task
| other | _reserved_ |

Panic if:

- `$ssp + $rC` overflows or `> VM_MAX_RAM`
- `$rA + 32` overflows or `> VM_MAX_RAM`
- `imm <= 1` and `$rA + 32` overflows or `> VM_MAX_RAM`
- `$ssp + $rC >= $hp`
- `imm == 0` and `$rC > CONTRACT_MAX_SIZE`
- `imm == 0` and contract with ID `MEM[$rA, 32]` is not in `tx.inputs`
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to hi light that we return an error if it is called in the context of predicates?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's already called out in the predicate section of #612, but we could do that.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Dentosal Dentosal requested review from xgreenx, Voxelot, acerone85 and a team October 8, 2024 10:47
@Dentosal Dentosal merged commit f0b29bc into master Oct 15, 2024
6 checks passed
@Dentosal Dentosal deleted the dento/ldc-mode-2 branch October 15, 2024 13:37
Dentosal added a commit that referenced this pull request Oct 23, 2024
Closes #456

Requires #611
VM PR FuelLabs/fuel-vm#848

### Before requesting review
- [x] I have reviewed the code myself

---------

Co-authored-by: Brandon Kite <[email protected]>
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.

4 participants