Skip to content

Commit

Permalink
Remove maturity field from InputCoin
Browse files Browse the repository at this point in the history
  • Loading branch information
Dentosal committed Feb 21, 2024
1 parent 1eafbe2 commit 5c2a089
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
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

0 comments on commit 5c2a089

Please sign in to comment.