aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEverett Hildenbrandt <hildenb2@illinois.edu>2018-05-29 21:39:39 +0800
committerEverett Hildenbrandt <hildenb2@illinois.edu>2018-05-31 22:37:30 +0800
commit61d5603b69909282188f6e11616ea7d82f6569e0 (patch)
tree11fdf8bb81cbf87c8b5ae5ac41b993d055a03cf1
parent6ea80ef71b8d2975cdc840c3fe2c10979de8e4d4 (diff)
downloaddexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar.gz
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar.zst
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.zip
JSONSchema/*.json: sort/organize and standardize spacing
-rw-r--r--JSONSchema/bc-schema.json586
-rw-r--r--JSONSchema/definitions.json160
-rw-r--r--JSONSchema/st-filler-schema.json326
-rw-r--r--JSONSchema/st-schema.json215
4 files changed, 727 insertions, 560 deletions
diff --git a/JSONSchema/bc-schema.json b/JSONSchema/bc-schema.json
index b40f14219..3df6ffdf2 100644
--- a/JSONSchema/bc-schema.json
+++ b/JSONSchema/bc-schema.json
@@ -1,301 +1,301 @@
{
- "definitions": {
- "Block": {
- "type": "object",
- "properties": {
- "blockHeader": {
- "$ref": "#/definitions/BlockHeader"
- },
- "rlp": {
- "$ref": "#/definitions/HexData"
- },
- "transactions": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Transaction"
- }
- },
- "uncleHeaders": {
- "type": "array"
- },
- "expectExceptionHomestead": {
- "type": "string"
- },
- "expectExceptionFrontier": {
- "type": "string"
- },
- "expectExceptionEIP158": {
- "type": "string"
- },
- "expectExceptionEIP150": {
- "type": "string"
- },
- "expectExceptionALL": {
- "type": "string"
- },
- "expectExceptionByzantium": {
- "type": "string"
- },
- "expectExceptionConstantinople": {
- "type": "string"
- },
- "blocknumber": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
- },
- "chainname": {
- "type": "string"
- },
- "chainnetwork": {
- "type": "string"
- },
- "comment": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "BlockHeader": {
- "properties": {
- "bloom": {
- "$ref": "#/definitions/HexData"
- },
- "coinbase": {
- "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
- },
- "difficulty": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "extraData": {
- "$ref": "#/definitions/HexMaybePrefixOrEmpty"
- },
- "gasLimit": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "gasUsed": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "hash": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "mixHash": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "nonce": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "number": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "parentHash": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "receiptTrie": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "stateRoot": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "timestamp": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "transactionsTrie": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "uncleHash": {
- "$ref": "#/definitions/ConfusedHexType"
- }
- }
- },
- "PreStateAccount": {
- "type": "object",
- "additionalproperties": true,
- "properties": {
- "balance": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "code": {
- "$ref": "#/definitions/HexMaybePrefixOrEmpty"
- },
- "nonce": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "storage": {
- "type": "object",
- "additionalProperties": false,
- "patternProperties": {
- "^0x[0-9a-f]+": {
- "description": "storage key with 0x. data is HexData",
- "$ref": "#/definitions/HexData"
+ "definitions": {
+ "Block": {
+ "additionalProperties": false,
+ "properties": {
+ "blockHeader": {
+ "$ref": "#/definitions/BlockHeader"
+ },
+ "blocknumber": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "chainname": {
+ "type": "string"
+ },
+ "chainnetwork": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ },
+ "expectExceptionALL": {
+ "type": "string"
+ },
+ "expectExceptionByzantium": {
+ "type": "string"
+ },
+ "expectExceptionConstantinople": {
+ "type": "string"
+ },
+ "expectExceptionEIP150": {
+ "type": "string"
+ },
+ "expectExceptionEIP158": {
+ "type": "string"
+ },
+ "expectExceptionFrontier": {
+ "type": "string"
+ },
+ "expectExceptionHomestead": {
+ "type": "string"
+ },
+ "rlp": {
+ "$ref": "#/definitions/HexData"
+ },
+ "transactions": {
+ "items": {
+ "$ref": "#/definitions/Transaction"
+ },
+ "type": "array"
+ },
+ "uncleHeaders": {
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "BlockHeader": {
+ "properties": {
+ "bloom": {
+ "$ref": "#/definitions/HexData"
+ },
+ "coinbase": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "difficulty": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "extraData": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
+ "gasLimit": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "gasUsed": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "hash": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "mixHash": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "nonce": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "number": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "parentHash": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "receiptTrie": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "stateRoot": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "timestamp": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "transactionsTrie": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "uncleHash": {
+ "$ref": "#/definitions/ConfusedHexType"
+ }
}
- }
- }
- },
- "required": [
- "balance",
- "code",
- "nonce"
- ]
- },
- "TxSigR": {
- "oneOf": [
- {
- "enum": [
- "0x00"
- ]
- }
- ]
- },
- "TxSigS": {
- "oneOf": [
- {
- "enum": [
- "0x00"
- ]
- }
- ]
- },
- "TxSigV": {
- "description": "a value of 0 is an invalid chainId, but used in a test case",
- "oneOf": [
- {
- "enum": [
- "0x00",
- "0x01"
- ]
- }
- ]
- },
- "Transaction": {
- "type": "object",
- "additionalProperties": true,
- "not": {
- "required": [
- "r, s, v"
- ]
- },
- "properties": {
- "data": {
- "$ref": "#/definitions/HexDataOrEmpty"
- },
- "gasLimit": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
- },
- "gasPrice": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
- },
- "nonce": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
},
- "secretKey": {
- "$ref": "#/definitions/HexMaybePrefix"
- },
- "to": {
- "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
- },
- "value": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ "NullSenderTransaction": {
+ "additionalProperties": true,
+ "not": {
+ "required": [
+ "secretKey"
+ ]
+ },
+ "properties": {
+ "data": {
+ "items": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
+ "type": "array"
+ },
+ "gasLimit": {
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "type": "array"
+ },
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "r": {
+ "$ref": "#/definitions/TxSigR"
+ },
+ "s": {
+ "$ref": "#/definitions/TxSigS"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "v": {
+ "$ref": "#/definitions/TxSigV"
+ },
+ "value": {
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "data",
+ "gasLimit",
+ "gasPrice",
+ "nonce",
+ "r",
+ "s",
+ "v",
+ "to",
+ "value"
+ ],
+ "type": "object"
+ },
+ "PreStateAccount": {
+ "additionalproperties": true,
+ "properties": {
+ "balance": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "code": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
+ "nonce": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "storage": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-f]+": {
+ "$ref": "#/definitions/HexData",
+ "description": "storage key with 0x. data is HexData"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": [
+ "balance",
+ "code",
+ "nonce"
+ ],
+ "type": "object"
+ },
+ "Transaction": {
+ "additionalProperties": true,
+ "not": {
+ "required": [
+ "r, s, v"
+ ]
+ },
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/HexDataOrEmpty"
+ },
+ "gasLimit": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "secretKey": {
+ "$ref": "#/definitions/HexMaybePrefix"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "value": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ }
+ },
+ "required": [
+ "data",
+ "gasLimit",
+ "gasPrice",
+ "nonce",
+ "to",
+ "value"
+ ],
+ "type": "object"
+ },
+ "TxSigR": {
+ "oneOf": [
+ {
+ "enum": [
+ "0x00"
+ ]
+ }
+ ]
+ },
+ "TxSigS": {
+ "oneOf": [
+ {
+ "enum": [
+ "0x00"
+ ]
+ }
+ ]
+ },
+ "TxSigV": {
+ "description": "a value of 0 is an invalid chainId, but used in a test case",
+ "oneOf": [
+ {
+ "enum": [
+ "0x00",
+ "0x01"
+ ]
+ }
+ ]
}
- },
- "required": [
- "data",
- "gasLimit",
- "gasPrice",
- "nonce",
- "to",
- "value"
- ]
},
- "NullSenderTransaction": {
- "type": "object",
- "additionalProperties": true,
- "not": {
+ "patternProperties": {
+ "^.*$": {
+ "postState": {
+ "$ref": "#/definitions/TransactionResults"
+ },
+ "pre": {
+ "$ref": "#/definitions/TransactionResults"
+ },
+ "properties": {
+ "blocks": {
+ "items": {
+ "$ref": "#/definitions/Block"
+ },
+ "type": "array"
+ },
+ "genesisBlockHeader": {
+ "$ref": "#/definitions/BlockHeader"
+ },
+ "genesisRLP": {
+ "$ref": "#/definitions/ConfusedHexType"
+ }
+ },
+ "type": "object"
+ },
"required": [
- "secretKey"
+ "postState",
+ "pre",
+ "network",
+ "lastblockhash",
+ "blocks",
+ "genesisRLP",
+ "genesisBlockHeader"
]
- },
- "properties": {
- "data": {
- "items": {
- "$ref": "#/definitions/HexMaybePrefixOrEmpty"
- },
- "type": "array"
- },
- "gasLimit": {
- "items": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
- },
- "type": "array"
- },
- "gasPrice": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
- },
- "nonce": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
- },
- "r": {
- "$ref": "#/definitions/TxSigR"
- },
- "s": {
- "$ref": "#/definitions/TxSigS"
- },
- "to": {
- "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
- },
- "v": {
- "$ref": "#/definitions/TxSigV"
- },
- "value": {
- "items": {
- "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
- },
- "type": "array"
- }
- },
- "required": [
- "data",
- "gasLimit",
- "gasPrice",
- "nonce",
- "r",
- "s",
- "v",
- "to",
- "value"
- ]
}
- },
- "patternProperties": {
- "^.*$": {
- "type": "object",
- "properties": {
- "genesisBlockHeader": {
- "$ref": "#/definitions/BlockHeader"
- },
- "genesisRLP": {
- "$ref": "#/definitions/ConfusedHexType"
- },
- "blocks": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Block"
- }
- }
- },
- "postState": {
- "$ref": "#/definitions/TransactionResults"
- },
- "pre": {
- "$ref": "#/definitions/TransactionResults"
- }
- },
- "required": [
- "postState",
- "pre",
- "network",
- "lastblockhash",
- "blocks",
- "genesisRLP",
- "genesisBlockHeader"
- ]
- }
-}
+} \ No newline at end of file
diff --git a/JSONSchema/definitions.json b/JSONSchema/definitions.json
index 9c9ca3d44..98bbffa21 100644
--- a/JSONSchema/definitions.json
+++ b/JSONSchema/definitions.json
@@ -27,6 +27,38 @@
"pattern": "^$",
"type": "string"
},
+ "ExpectCondition": {
+ "additionalProperties": false,
+ "properties": {
+ "//comment": {
+ "type": "string"
+ },
+ "indexes": {
+ "additionalProperties": false,
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/Indices"
+ },
+ "gas": {
+ "$ref": "#/definitions/Indices"
+ },
+ "value": {
+ "$ref": "#/definitions/Indices"
+ }
+ },
+ "result": {
+ "$ref": "#/definitions/PostStateAccounts"
+ }
+ },
+ "network": {
+ "$ref": "#/definitions/Networks"
+ },
+ "result": {
+ "$ref": "#/definitions/AccountMap"
+ }
+ },
+ "type": "object"
+ },
"HexData": {
"description": "Hex data. see https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding",
"pattern": "^0x([0-9a-fA-F][0-9a-fA-F])*$",
@@ -79,6 +111,19 @@
"pattern": "(^0x0$)|(^0x[1-9a-fA-F][0-9a-fA-F]*$)",
"type": "string"
},
+ "Indices": {
+ "anyOf": [
+ {
+ "type": "array"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ]
+ },
"IntegerOrConfusedHex": {
"anyOf": [
{
@@ -129,6 +174,87 @@
}
]
},
+ "IntegerOrNumber": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/IntegerString"
+ },
+ {
+ "type": "number"
+ }
+ ]
+ },
+ "IntegerOrNumberOrConfusedHex": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/IntegerOrNumber"
+ },
+ {
+ "$ref": "#/definitions/ConfusedHexType"
+ }
+ ]
+ },
+ "IntegerString": {
+ "pattern": "^[0-9]+$",
+ "type": "string"
+ },
+ "LLLCode": {
+ "pattern": "^.*$",
+ "type": "string"
+ },
+ "Networks": {
+ "type": "array"
+ },
+ "NonExistentPostStateAccount": {
+ "additionalproperties": true,
+ "properties": {
+ "shouldnotexist": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "shouldnotexist"
+ ],
+ "type": "object"
+ },
+ "PostStateAccounts": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-fA-F]{40}": {
+ "description": "filler prestate addresses with 0x prefix",
+ "oneOf": [
+ {
+ "$ref": "#/definitions/PreStateAccount"
+ },
+ {
+ "$ref": "#/definitions/NonExistentPostStateAccount"
+ }
+ ]
+ },
+ "^[0-9a-fA-F]{40}": {
+ "description": "filler prestate addresses without 0x prefix",
+ "oneOf": [
+ {
+ "$ref": "#/definitions/PreStateAccount"
+ },
+ {
+ "$ref": "#/definitions/NonExistentPostStateAccount"
+ }
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "PrefixedHexOrInteger": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/IntegerString"
+ },
+ {
+ "$ref": "#/definitions/HexData"
+ }
+ ]
+ },
"TransactionResults": {
"items": {
"additionalProperties": false,
@@ -136,7 +262,6 @@
"hash": {
"$ref": "#/definitions/HexData"
},
- "logs": {},
"indexes": {
"additionalProperties": false,
"properties": {
@@ -156,7 +281,8 @@
"value"
],
"type": "object"
- }
+ },
+ "logs": {}
},
"required": [
"hash",
@@ -165,36 +291,6 @@
"type": "object"
},
"type": "array"
- },
- "PrefixedHexOrInteger": {
- "anyOf": [
- { "$ref": "#/definitions/IntegerString" },
- { "$ref": "#/definitions/HexData" }
- ]
- },
- "IntegerOrNumber": {
- "oneOf": [
- {
- "$ref": "#/definitions/IntegerString"
- },
- {
- "type": "number"
- }
- ]
- },
- "IntegerOrNumberOrConfusedHex": {
- "oneOf": [
- {
- "$ref": "#/definitions/IntegerOrNumber"
- },
- {
- "$ref": "#/definitions/ConfusedHexType"
- }
- ]
- },
- "IntegerString": {
- "pattern": "^[0-9]+$",
- "type": "string"
}
}
}
diff --git a/JSONSchema/st-filler-schema.json b/JSONSchema/st-filler-schema.json
index aeb828912..0e9686aa5 100644
--- a/JSONSchema/st-filler-schema.json
+++ b/JSONSchema/st-filler-schema.json
@@ -1,85 +1,61 @@
{
"definitions": {
- "TxData": {
- "oneOf": [
- { "$ref": "#/definitions/HexData" },
- { "$ref": "#/definitions/EmptyString" },
- { "$ref": "#/definitions/LLLCode" }
- ]
- },
- "LLLCode" : {
- "type" : "string",
- "pattern" : "^{.*}$"
- },
- "PreStateAccount": {
- "type": "object",
- "additionalproperties": true,
- "properties": {
- "balance": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "code": { "type": "string" },
- "nonce": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "storage": {
- "type": "object",
- "additionalProperties": false,
- "patternProperties": {
- "^0x[0-9a-f]+": {
- "description": "storage key with 0x prefix, just the prefix `0x` is null and thus not permitted, a hex quantity is permitted. for the storage value, only hex data is permitted in filled test. Both decimal and hex allowed for the fillers.",
- "$ref": "#/definitions/PrefixedHexOrInteger"
- }
- }
- }
- }
- },
- "NonExistentPostStateAccount": {
- "type": "object",
- "additionalproperties": true,
- "properties": {
- "shouldnotexist": {
- "type": "boolean"
+ "AccountMap": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-fA-F]{40}": {
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "filler prestate addresses with 0x prefix"
+ },
+ "^[0-9a-fA-F]{40}": {
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "filler prestate addresses without 0x prefix"
}
},
- "required": [
- "shouldnotexist"
- ]
-
- },
- "TxSigR": {
- "oneOf": [
- { "enum" : [ "0" ] }
- ]
- },
- "TxSigS": {
- "oneOf": [
- { "enum" : [ "0" ] }
- ]
- },
- "TxSigV": {
- "description": "a value of 0 is an invalid chainId, but used in a test case",
- "oneOf": [
- { "enum" : [ "0", "1" ] }
- ]
+ "type": "object"
},
- "Transaction": {
- "type": "object",
+ "NullSenderTransaction": {
"additionalProperties": true,
"not": {
- "required": ["r, s, v"]
+ "required": [
+ "secretKey"
+ ]
},
"properties": {
"data": {
- "items": { "$ref": "#/definitions/TxData" },
+ "items": {
+ "$ref": "#/definitions/TxData"
+ },
"type": "array"
},
"gasLimit": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
},
- "gasPrice": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "nonce": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "secretKey": { "$ref": "#/definitions/HexMaybePrefix" },
- "to": { "$ref": "#/definitions/AddressMaybePrefixOrEmpty"},
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "r": {
+ "$ref": "#/definitions/TxSigR"
+ },
+ "s": {
+ "$ref": "#/definitions/TxSigS"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "v": {
+ "$ref": "#/definitions/TxSigV"
+ },
"value": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
}
},
@@ -88,34 +64,75 @@
"gasLimit",
"gasPrice",
"nonce",
- "secretKey",
+ "r",
+ "s",
+ "v",
"to",
"value"
- ]
+ ],
+ "type": "object"
},
- "NullSenderTransaction": {
- "type": "object",
+ "PreStateAccount": {
+ "additionalproperties": true,
+ "properties": {
+ "balance": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "code": {
+ "type": "string"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "storage": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-f]+": {
+ "$ref": "#/definitions/PrefixedHexOrInteger",
+ "description": "storage key with 0x prefix, just the prefix `0x` is null and thus not permitted, a hex quantity is permitted. for the storage value, only hex data is permitted in filled test. Both decimal and hex allowed for the fillers."
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "Transaction": {
"additionalProperties": true,
"not": {
- "required": ["secretKey"]
+ "required": [
+ "r, s, v"
+ ]
},
"properties": {
"data": {
- "items": { "$ref": "#/definitions/TxData" },
+ "items": {
+ "$ref": "#/definitions/TxData"
+ },
"type": "array"
},
"gasLimit": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
},
- "gasPrice": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "nonce": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "r": { "$ref": "#/definitions/TxSigR" },
- "s": { "$ref": "#/definitions/TxSigS" },
- "to": { "$ref": "#/definitions/AddressMaybePrefixOrEmpty"},
- "v": { "$ref": "#/definitions/TxSigV" },
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "secretKey": {
+ "$ref": "#/definitions/HexMaybePrefix"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
"value": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
}
},
@@ -124,75 +141,52 @@
"gasLimit",
"gasPrice",
"nonce",
- "r",
- "s",
- "v",
+ "secretKey",
"to",
"value"
- ]
+ ],
+ "type": "object"
},
- "PostStateAccounts": {
- "additionalProperties": false,
- "patternProperties": {
- "^[0-9a-fA-F]{40}": {
- "description": "filler prestate addresses without 0x prefix",
- "oneOf": [
- {"$ref": "#/definitions/PreStateAccount"},
- {"$ref": "#/NonExistentPostStateAccount"}
- ]
+ "TxData": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/HexData"
},
- "^0x[0-9a-fA-F]{40}": {
- "description": "filler prestate addresses with 0x prefix",
- "oneOf": [
- {"$ref": "#/definitions/PreStateAccount"},
- {"$ref": "#/NonExistentPostStateAccount"}
- ]
+ {
+ "$ref": "#/definitions/EmptyString"
+ },
+ {
+ "$ref": "#/definitions/LLLCode"
}
- },
- "type": "object"
- },
- "ExpectCondition": {
- "type": "object",
- "properties": {
- "result": { "$ref": "#/definitions/AccountMap" },
- "network": { "$ref": "#/definitions/Networks" },
- "indexes": {
- "properties": {
- "data": { "$ref": "#/definitions/Indices" },
- "gas": { "$ref": "#/definitions/Indices" },
- "value": { "$ref": "#/definitions/Indices" }
- },
- "result": {
- "$ref": "#/definitions/PostStateAccounts"
- },
- "additionalProperties": false
- },
- "//comment": { "type": "string" }
- },
- "additionalProperties": false
+ ]
},
- "AccountMap": {
- "additionalProperties": false,
- "patternProperties": {
- "^[0-9a-fA-F]{40}": {
- "description": "filler prestate addresses without 0x prefix",
- "$ref": "#/definitions/PreStateAccount"
- },
- "^0x[0-9a-fA-F]{40}": {
- "description": "filler prestate addresses with 0x prefix",
- "$ref": "#/definitions/PreStateAccount"
- }
- },
- "type": "object"
+ "TxSigR": {
+ "oneOf": [
+ {
+ "enum": [
+ "0"
+ ]
+ }
+ ]
},
- "Networks": {
- "type": "array"
+ "TxSigS": {
+ "oneOf": [
+ {
+ "enum": [
+ "0"
+ ]
+ }
+ ]
},
- "Indices": {
- "anyOf": [
- { "type": "array" },
- { "type": "string" },
- { "type": "number" }
+ "TxSigV": {
+ "description": "a value of 0 is an invalid chainId, but used in a test case",
+ "oneOf": [
+ {
+ "enum": [
+ "0",
+ "1"
+ ]
+ }
]
}
},
@@ -202,12 +196,24 @@
"env": {
"additionalproperties": false,
"properties": {
- "currentCoinbase": { "$ref": "#/definitions/HexMaybePrefix" },
- "currentDifficulty": { "$ref": "#/definitions/IntegerOrConfusedHex" },
- "currentGasLimit": { "$ref": "#/definitions/IntegerOrConfusedHex" },
- "currentNumber": { "$ref": "#/definitions/IntegerOrConfusedHex" },
- "currentTimestamp": { "$ref": "#/definitions/IntegerOrNumberOrConfusedHex" },
- "previousHash": { "$ref": "#/definitions/HexMaybePrefix" }
+ "currentCoinbase": {
+ "$ref": "#/definitions/HexMaybePrefix"
+ },
+ "currentDifficulty": {
+ "$ref": "#/definitions/IntegerOrConfusedHex"
+ },
+ "currentGasLimit": {
+ "$ref": "#/definitions/IntegerOrConfusedHex"
+ },
+ "currentNumber": {
+ "$ref": "#/definitions/IntegerOrConfusedHex"
+ },
+ "currentTimestamp": {
+ "$ref": "#/definitions/IntegerOrNumberOrConfusedHex"
+ },
+ "previousHash": {
+ "$ref": "#/definitions/HexMaybePrefix"
+ }
},
"required": [
"currentCoinbase",
@@ -220,27 +226,33 @@
"type": "object"
},
"expect": {
- "type": "array",
- "items": { "$ref": "#/definitions/ExpectCondition" }
+ "items": {
+ "$ref": "#/definitions/ExpectCondition"
+ },
+ "type": "array"
},
"pre": {
"additionalProperties": false,
"patternProperties": {
- "^[0-9a-fA-F]{40}": {
- "description": "filler prestate addresses without 0x prefix",
- "$ref": "#/definitions/PreStateAccount"
- },
"^0x[0-9a-fA-F]{40}": {
- "description": "filler prestate addresses with 0x prefix",
- "$ref": "#/definitions/PreStateAccount"
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "filler prestate addresses with 0x prefix"
+ },
+ "^[0-9a-fA-F]{40}": {
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "filler prestate addresses without 0x prefix"
}
},
"type": "object"
},
"transaction": {
"oneOf": [
- { "$ref": "#/definitions/Transaction" },
- { "$ref": "#/definitions/NullSenderTransaction" }
+ {
+ "$ref": "#/definitions/Transaction"
+ },
+ {
+ "$ref": "#/definitions/NullSenderTransaction"
+ }
]
}
},
diff --git a/JSONSchema/st-schema.json b/JSONSchema/st-schema.json
index 44411ae71..0aae8fcf2 100644
--- a/JSONSchema/st-schema.json
+++ b/JSONSchema/st-schema.json
@@ -1,66 +1,47 @@
{
"definitions": {
- "PreStateAccount": {
- "type": "object",
- "additionalproperties": true,
- "properties": {
- "balance": { "$ref": "#/definitions/ConfusedHexType" },
- "code": { "$ref": "#/definitions/HexMaybePrefixOrEmpty" },
- "nonce": { "$ref": "#/definitions/ConfusedHexType" },
- "storage": {
- "type": "object",
- "additionalProperties": false,
- "patternProperties": {
- "^0x[0-9a-f]+": {
- "description": "storage key with 0x. data is HexData",
- "$ref": "#/definitions/HexData"
- }
- }
- }
- },
- "required": [
- "balance",
- "code",
- "nonce"
- ]
- },
- "TxSigR": {
- "oneOf": [
- { "enum" : [ "0x00" ] }
- ]
- },
- "TxSigS": {
- "oneOf": [
- { "enum" : [ "0x00" ] }
- ]
- },
- "TxSigV": {
- "description": "a value of 0 is an invalid chainId, but used in a test case",
- "oneOf": [
- { "enum" : [ "0x00", "0x01" ] }
- ]
- },
- "Transaction": {
- "type": "object",
+ "NullSenderTransaction": {
"additionalProperties": true,
"not": {
- "required": ["r, s, v"]
+ "required": [
+ "secretKey"
+ ]
},
"properties": {
"data": {
- "items": { "$ref": "#/definitions/HexDataOrEmpty" },
+ "items": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
"type": "array"
},
"gasLimit": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
},
- "gasPrice": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "nonce": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "secretKey": { "$ref": "#/definitions/HexMaybePrefix" },
- "to": { "$ref": "#/definitions/AddressMaybePrefixOrEmpty"},
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "r": {
+ "$ref": "#/definitions/TxSigR"
+ },
+ "s": {
+ "$ref": "#/definitions/TxSigS"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "v": {
+ "$ref": "#/definitions/TxSigV"
+ },
"value": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
}
},
@@ -69,34 +50,80 @@
"gasLimit",
"gasPrice",
"nonce",
- "secretKey",
+ "r",
+ "s",
+ "v",
"to",
"value"
- ]
+ ],
+ "type": "object"
},
- "NullSenderTransaction": {
- "type": "object",
+ "PreStateAccount": {
+ "additionalproperties": true,
+ "properties": {
+ "balance": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "code": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
+ "nonce": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "storage": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-f]+": {
+ "$ref": "#/definitions/HexData",
+ "description": "storage key with 0x. data is HexData"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": [
+ "balance",
+ "code",
+ "nonce"
+ ],
+ "type": "object"
+ },
+ "Transaction": {
"additionalProperties": true,
"not": {
- "required": ["secretKey"]
+ "required": [
+ "r, s, v"
+ ]
},
"properties": {
"data": {
- "items": { "$ref": "#/definitions/HexMaybePrefixOrEmpty" },
+ "items": {
+ "$ref": "#/definitions/HexDataOrEmpty"
+ },
"type": "array"
},
"gasLimit": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
},
- "gasPrice": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "nonce": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "r": { "$ref": "#/definitions/TxSigR" },
- "s": { "$ref": "#/definitions/TxSigS" },
- "to": { "$ref": "#/definitions/AddressMaybePrefixOrEmpty"},
- "v": { "$ref": "#/definitions/TxSigV" },
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "secretKey": {
+ "$ref": "#/definitions/HexMaybePrefix"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
"value": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
}
},
@@ -105,11 +132,39 @@
"gasLimit",
"gasPrice",
"nonce",
- "r",
- "s",
- "v",
+ "secretKey",
"to",
"value"
+ ],
+ "type": "object"
+ },
+ "TxSigR": {
+ "oneOf": [
+ {
+ "enum": [
+ "0x00"
+ ]
+ }
+ ]
+ },
+ "TxSigS": {
+ "oneOf": [
+ {
+ "enum": [
+ "0x00"
+ ]
+ }
+ ]
+ },
+ "TxSigV": {
+ "description": "a value of 0 is an invalid chainId, but used in a test case",
+ "oneOf": [
+ {
+ "enum": [
+ "0x00",
+ "0x01"
+ ]
+ }
]
}
},
@@ -154,22 +209,22 @@
"post": {
"additionalProperties": false,
"properties": {
- "EIP150": {
+ "Byzantium": {
"$ref": "#/definitions/TransactionResults"
},
- "EIP158": {
+ "Constantinople": {
"$ref": "#/definitions/TransactionResults"
},
- "Frontier": {
+ "EIP150": {
"$ref": "#/definitions/TransactionResults"
},
- "Homestead": {
+ "EIP158": {
"$ref": "#/definitions/TransactionResults"
},
- "Byzantium": {
+ "Frontier": {
"$ref": "#/definitions/TransactionResults"
},
- "Constantinople": {
+ "Homestead": {
"$ref": "#/definitions/TransactionResults"
}
},
@@ -179,16 +234,20 @@
"additionalProperties": false,
"patternProperties": {
"^0x[0-9a-f]*": {
- "description": "prestate account address with 0x prefix",
- "$ref": "#/definitions/PreStateAccount"
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "prestate account address with 0x prefix"
}
},
"type": "object"
},
"transaction": {
"oneOf": [
- { "$ref": "#/definitions/Transaction" },
- { "$ref": "#/definitions/NullSenderTransaction" }
+ {
+ "$ref": "#/definitions/Transaction"
+ },
+ {
+ "$ref": "#/definitions/NullSenderTransaction"
+ }
]
}
},
@@ -196,4 +255,4 @@
}
},
"type": "object"
-}
+} \ No newline at end of file