Skip to content

Commit

Permalink
Remove non-immediate jump references from predicate restrictions. (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
adlerjohn authored Feb 10, 2021
1 parent cee8651 commit 375aa78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specs/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Any input of type [`InputType.Coin`](./tx_format.md), a non-zero `dataLength` (a

For each such input in the transaction, the VM is [initialized](#vm-initialization), then `$pc` is set to the start of the input's `data` field. During predicate mode, hitting any of the following opcodes causes predicate verification to halt, returning Boolean `false`:
1. Any [contract opcode](./opcodes.md#contract-opcodes).
1. [J](./opcodes.md#j-jump), [JNZ](./opcodes.md#jnz-jump-if-not-zero), [JI](./opcodes.md#ji-jump-immediate), and [JNZI](./opcodes.md#jnzi-jump-if-not-zero-immediate) with jump-to value less than or equal to `$pc` (these would allow loops). In other words, `$pc` must be strictly increasing.
1. [JI](./opcodes.md#ji-jump-immediate) or [JNZI](./opcodes.md#jnzi-jump-if-not-zero-immediate) with jump-to value less than or equal to `$pc` (these would allow loops). In other words, `$pc` must be strictly increasing.

In addition, during predicate mode if `$pc` is set to a value greater than the end of predicate bytecode (this would allow bytecode outside the actual predicate), predicate verification halts returning Boolean `false`.

Expand Down

0 comments on commit 375aa78

Please # to comment.