-
Notifications
You must be signed in to change notification settings - Fork 719
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 GTF getters for tx bytes size and address #556
Conversation
src/fuel-vm/instruction-set.md
Outdated
@@ -2473,6 +2473,8 @@ Get [fields from the transaction](../tx-format/transaction.md). | |||
| `GTF_SCRIPT_INPUT_AT_INDEX` | `0x00B` | Memory address of `tx.inputs[$rB]` | | |||
| `GTF_SCRIPT_OUTPUT_AT_INDEX` | `0x00C` | Memory address of `t.outputs[$rB]` | | |||
| `GTF_SCRIPT_WITNESS_AT_INDEX` | `0x00D` | Memory address of `tx.witnesses[$rB]` | | |||
| `GTF_TX_START_ADDRESS` | `0x0A0` | Memory address of the raw transaction bytes | |
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.
Should we remove the address at the end, to follow other gtfs?
src/fuel-vm/instruction-set.md
Outdated
@@ -2473,6 +2473,8 @@ Get [fields from the transaction](../tx-format/transaction.md). | |||
| `GTF_SCRIPT_INPUT_AT_INDEX` | `0x00B` | Memory address of `tx.inputs[$rB]` | | |||
| `GTF_SCRIPT_OUTPUT_AT_INDEX` | `0x00C` | Memory address of `t.outputs[$rB]` | | |||
| `GTF_SCRIPT_WITNESS_AT_INDEX` | `0x00D` | Memory address of `tx.witnesses[$rB]` | | |||
| `GTF_TX_START_ADDRESS` | `0x0A0` | Memory address of the raw transaction bytes | |
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.
Maybe we should consider using GM for it. Since it is not TX fields=D Just a thought
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.
Sure
src/fuel-vm/instruction-set.md
Outdated
@@ -2473,6 +2473,8 @@ Get [fields from the transaction](../tx-format/transaction.md). | |||
| `GTF_SCRIPT_INPUT_AT_INDEX` | `0x00B` | Memory address of `tx.inputs[$rB]` | | |||
| `GTF_SCRIPT_OUTPUT_AT_INDEX` | `0x00C` | Memory address of `t.outputs[$rB]` | | |||
| `GTF_SCRIPT_WITNESS_AT_INDEX` | `0x00D` | Memory address of `tx.witnesses[$rB]` | | |||
| `GTF_TX_START_ADDRESS` | `0x0A0` | Memory address of the raw transaction bytes | | |||
| `GTF_TX_LENGTH` | `0x0A1` | Length of raw transaction types in memory | |
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.
Why do we want to put size and offset under 0x0A1
and 0x0A0
? Maybe it is better to put them at the end
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.
No real reason. The location just seemed appropriate. I'll move them.
Closes #554
VM PR: FuelLabs/fuel-vm#692