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 maturity field from InputCoin #548

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/fuel-vm/instruction-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,6 @@ Get [fields from the transaction](../tx-format/transaction.md).
| `GTF_INPUT_COIN_ASSET_ID` | `0x205` | Memory address of `tx.inputs[$rB].asset_id` |
| `GTF_INPUT_COIN_TX_POINTER` | `0x206` | Memory address of `tx.inputs[$rB].txPointer` |
| `GTF_INPUT_COIN_WITNESS_INDEX` | `0x207` | `tx.inputs[$rB].witnessIndex` |
| `GTF_INPUT_COIN_MATURITY` | `0x208` | `tx.inputs[$rB].maturity` |
| `GTF_INPUT_COIN_PREDICATE_LENGTH` | `0x209` | `tx.inputs[$rB].predicateLength` |
| `GTF_INPUT_COIN_PREDICATE_DATA_LENGTH` | `0x20A` | `tx.inputs[$rB].predicateDataLength` |
| `GTF_INPUT_COIN_PREDICATE` | `0x20B` | Memory address of `tx.inputs[$rB].predicate` |
Expand Down
3 changes: 0 additions & 3 deletions src/tx-format/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Transaction is invalid if:
| `asset_id` | `byte[32]` | Asset ID of the coins. |
| `txPointer` | [`TXPointer`](./tx-pointer.md) | Points to the TX whose output is being spent. |
| `witnessIndex` | `uint8` | Index of witness that authorizes spending the coin. |
| `maturity` | `uint32` | UTXO being spent must have been created at least this many blocks ago. |
| `predicateGasUsed` | `uint64` | Gas used by predicate. |
| `predicateLength` | `uint16` | Length of predicate, in instructions. |
| `predicateDataLength` | `uint16` | Length of predicate input data, in bytes. |
Expand All @@ -47,8 +46,6 @@ Transaction is invalid if:
- `predicateDataLength != len(predicateData)`
- `predicateGasUsed > MAX_GAS_PER_PREDICATE`

If `h` is the block height the UTXO being spent was created, transaction is invalid if `blockheight() < h + maturity`.

> **Note:** when signing a transaction, `txPointer` and `predicateGasUsed` is set to zero.
>
> **Note:** when verifying and estimating a predicate, `txPointer` and `predicateGasUsed` is initialized to zero.
Expand Down
Loading