Skip to content

Commit

Permalink
Four missing partiontest calls (#4394)
Browse files Browse the repository at this point in the history
* Some minor TEAL doc update
  • Loading branch information
jannotti authored Aug 11, 2022
1 parent 16e4165 commit 7c70e38
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/transactions/logic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ Account fields used in the `acct_params_get` opcode.
| `app_params_get f` | X is field F from app A. Y is 1 if A exists, else 0 |
| `acct_params_get f` | X is field F from account A. Y is 1 if A owns positive algos, else 0 |
| `log` | write A to log state of the current application |
| `block f` | field F of block A. Fail unless A falls between txn.LastValid-1002 and the current round (exclusive) |
| `block f` | field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive) |

### Inner Transactions

Expand Down
2 changes: 1 addition & 1 deletion data/transactions/logic/TEAL_opcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ The notation A,B indicates that A and B are interpreted as a uint128 value, with

- Opcode: 0xd1 {uint8 block field}
- Stack: ..., A: uint64 → ..., any
- field F of block A. Fail unless A falls between txn.LastValid-1002 and the current round (exclusive)
- field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)
- Availability: v7

`block` Fields:
Expand Down
3 changes: 3 additions & 0 deletions data/transactions/logic/assembler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ var experiments = []uint64{pairingVersion}
// intended to release the opcodes, they should have been removed from
// `experiments`.
func TestExperimental(t *testing.T) {
partitiontest.PartitionTest(t)
t.Parallel()

futureV := config.Consensus[protocol.ConsensusFuture].LogicSigVersion
for _, v := range experiments {
// Allows less, so we can push something out, even before vFuture has been updated.
Expand Down
2 changes: 1 addition & 1 deletion data/transactions/logic/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ var opDocByName = map[string]string{
"itxn_submit": "execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.",

"vrf_verify": "Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.",
"block": "field F of block A. Fail unless A falls between txn.LastValid-1002 and the current round (exclusive)",
"block": "field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)",
}

// OpDoc returns a description of the op
Expand Down
3 changes: 3 additions & 0 deletions data/transactions/logic/evalCrypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ byte 0x%s
}

func TestVrfVerify(t *testing.T) {
partitiontest.PartitionTest(t)
t.Parallel()

ep, _, _ := makeSampleEnv()
testApp(t, notrack("int 1; int 2; int 3; vrf_verify VrfAlgorand"), ep, "arg 0 wanted")
testApp(t, notrack("byte 0x1122; int 2; int 3; vrf_verify VrfAlgorand"), ep, "arg 1 wanted")
Expand Down
3 changes: 3 additions & 0 deletions data/transactions/logic/evalStateful_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2536,6 +2536,9 @@ func TestLatestTimestamp(t *testing.T) {
}

func TestBlockSeed(t *testing.T) {
partitiontest.PartitionTest(t)
t.Parallel()

ep, txn, l := makeSampleEnv()

// makeSampleEnv creates txns with fv, lv that don't actually fit the round
Expand Down
3 changes: 3 additions & 0 deletions data/transactions/logic/eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5509,6 +5509,9 @@ func TestOpJSONRef(t *testing.T) {
}

func TestTypeComplaints(t *testing.T) {
partitiontest.PartitionTest(t)
t.Parallel()

testProg(t, "err; store 0", AssemblerMaxVersion)
testProg(t, "int 1; return; store 0", AssemblerMaxVersion)
}
2 changes: 1 addition & 1 deletion data/transactions/logic/langspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,7 @@
"Args": "U",
"Returns": ".",
"Size": 2,
"Doc": "field F of block A. Fail unless A falls between txn.LastValid-1002 and the current round (exclusive)",
"Doc": "field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)",
"ImmediateNote": "{uint8 block field}",
"Groups": [
"State Access"
Expand Down

0 comments on commit 7c70e38

Please sign in to comment.