Skip to content

Commit

Permalink
Fill tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-dc authored and winsvega committed Jan 31, 2024
1 parent e0e6ec0 commit f016699
Show file tree
Hide file tree
Showing 6 changed files with 700 additions and 702 deletions.
906 changes: 453 additions & 453 deletions EIPTests/BlockchainTests/StateTests/stEOF/ori/EOF1ValidInvalid.json

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions EIPTests/StateTests/stEOF/ori/EOF1ValidInvalid.json

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions EOFTests/EIP4750/validInvalid.json

Large diffs are not rendered by default.

209 changes: 104 additions & 105 deletions EOFTests/EIP5450/validInvalid.json

Large diffs are not rendered by default.

33 changes: 16 additions & 17 deletions EOFTests/efExample/validInvalid.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"validInvalid" : {
"_info" : {
"comment" : "Test various examples to see if they are valid or invalid.\nImplements\n EOF1I0001 check that EOF1 with a bad magic number fails\n EOF1I0002 check that EOF1 with a bad version number fails\n EOF1I0003 check that EOF1 with a bad section order fails\n EOF1I0004 check that EOF1 missing a section fails\n EOF1I0005 check that EOF1 with a bad end of sections number fails\n EOF1I0006 check that EOF1 with too many or too few bytes fails\n EOF1I0007 check that EOF1 with a malformed code section fails\n EOF1I0008 check that EOF1 with an illegal opcode fails\n EOF1I0009 check that EOF1 with the wrong maxStackDepth fails\n EOF1I0010 check that return values are not allowed on section 0\n EOF1I0011 check that function calls to code sections that don't exist fail\n EOF1I0012 check that code sections that cause stack underflow fail\n EOF1I0013 check that we can't return more values than we declare\n EOF1I0014 check that code that looks deeper in the stack than the parameters fails\n EOF1I0015 check that code that uses removed opcodes fails\n EOF1I0016 check that code that uses new relative jumps to outside the section fails\n EOF1I0017 check that parameters are not allowed on section 0\n EOF1I0018 inconsistent number of code sections (between types and code)\n EOF1I0019 check that jumps into the middle on an opcode are not allowed\n EOF1I0020 check that you can't get to the same opcode with two different stack heights\n EOF1I0022 stack underflow caused by a function call\n EOF1I0023 sections with unreachable code fail\n EOF1I0024 sections that end with a non-terminator opcode fail\n EOF1I0025 data stack height of 1024 is invalid\n EOF1V0001 check that simple valid EOF1 deploys\n EOF1V0002 check that valid EOF1 with two code sections deploys\n EOF1V0003 check that valid EOF1 with four code sections deploys\n EOF1V0004 check that valid EOF1 can include 0xFE, the designated invalid opcode\n EOF1V0005 check that EOF1 with the right maxStackDepth deploys\n EOF1V0006 check that return values are allowed on code sections that aren't zero\n EOF1V0007 check that function calls to code sections that exist are allowed\n EOF1V0008 check that code that uses a new style relative jump (5C) succeeds\n EOF1V0009 check that parameters are allowed on code sections that aren't zero\n EOF1V0010 parameters are part of the max stack height\n EOF1V0011 check that code that uses a new style conditional jump (5D) succeeds\n EOF1V0012 return values on code sections affect maxStackHeight of the caller\n EOF1V0013 jump tables work\n EOF1V0014 sections that end with a legit terminating opcode are OK\n EOF1V0015 data stack height of 1023 is valid\n",
"filling-rpc-server" : "evmone-t8n 0.11.0-dev+commit.ef7e783e.dirty",
"filling-tool-version" : "retesteth-0.3.1-shanghai+commit.acfdfad0.Linux.g++",
"generatedTestHash" : "b62304272043d77b62a47c48c4d3221b7a453640eb29706e9f6f714f0d83288b",
"filling-rpc-server" : "evmone-t8n 0.11.0-dev+commit.7ad16fff.dirty",
"filling-tool-version" : "retesteth-0.3.1-cancun+commit.372a5939.Linux.g++",
"generatedTestHash" : "0d248ef8a6e4230223408eda3cf0992d733943a1692ff0cd7200f4a489c4d572",
"lllcversion" : "Version: 0.5.14-develop.2022.4.6+commit.401d5358.Linux.g++",
"solidity" : "Version: 0.8.18-develop.2023.1.16+commit.469d6d4d.Linux.g++",
"source" : "src/EOFTestsFiller/efExample/validInvalidFiller.yml",
"sourceHash" : "152ccde4c194c0f9fcb8dca025146794afd01b4349f004dd0e29ed283ca3fc78"
"sourceHash" : "b985655093f0d618989fdc7a7227887a9175bbcc237c41c4901b0f2c230e56f1"
},
"vectors" : {
"validInvalid_0" : {
Expand Down Expand Up @@ -37,7 +37,7 @@
}
},
"validInvalid_10" : {
"code" : "0xef0001010014020005000100050005000100010400040000800000008000020080000200800000000000000060006000f360006000fdfee40bad60a7",
"code" : "0xef0001010014020005001900030003000100010400040000800001008000020080000200800000000000005f35e2030000000300060009e50001e50002e50003e30004005f5ff35f5ffdfee40bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand Down Expand Up @@ -230,7 +230,7 @@
}
},
"validInvalid_24" : {
"code" : "0xef0001010008020002000300030400040000800001010100013050005030e40bad60a7",
"code" : "0xef00010100080200020006000304000400008000010101000130e3000150005030e40bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand Down Expand Up @@ -317,7 +317,7 @@
}
},
"validInvalid_30" : {
"code" : "0xef0001010010020004000300030003000304000400008000010101000100000001010100013050005030e43050e45030e40bad60a7",
"code" : "0xef0001010010020004000b000300030003040004000080000101010001000000010101000130e30001e30003e30002005030e43050e45030e40bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand All @@ -329,7 +329,7 @@
}
},
"validInvalid_31" : {
"code" : "0xef000101001002000400030005000700070400040000800001008000020080000300800001305000303050500030303050505000305030503050000bad60a7",
"code" : "0xef00010100100200040015000500070007040004000080000100800002008000030080000130505f35e202000000030006e50001e50002e50003303050500030303050505000305030503050000bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand All @@ -341,33 +341,32 @@
}
},
"validInvalid_32" : {
"code" : "0xef000101001002000400030005000700070400040000800001000000000000000300000001305000b000020030303050505000305030503050000bad60a7",
"code" : "0xef00010100100200040010000300070007040004000080000100800000008000030080000130505f35e20100000003e50001e50003e5000230303050505000305030503050000bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
"result" : false
},
"Prague" : {
"exception" : "EOF_InvalidContainerSize",
"result" : false
"result" : true
}
}
},
"validInvalid_33" : {
"code" : "0xef000101001002000400030005000700070400040000800001000000020000000300000001305000b0000f0030303050505000305030503050000bad60a7",
"code" : "0xef00010100100200040015000300070007040004000080000100800000008000030080000130505f35e202000000030006e50001e50002e50003e5000f30303050505000305030503050000bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
"result" : false
},
"Prague" : {
"exception" : "EOF_InvalidContainerSize",
"exception" : "EOF_InvalidCodeSectionIndex",
"result" : false
}
}
},
"validInvalid_34" : {
"code" : "0xef0001010008020002000300030400040000800001018000013050005050000bad60a7",
"code" : "0xef0001010008020002000600030400040000800001028000023050e50001005050000bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand All @@ -380,7 +379,7 @@
}
},
"validInvalid_35" : {
"code" : "0xef0001010008020002000300030400040000800001000100023050003030e40bad60a7",
"code" : "0xef0001010008020002000600030400040000800001000100023050e30001003030e40bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand All @@ -393,7 +392,7 @@
}
},
"validInvalid_36" : {
"code" : "0xef0001010008020002000300030400040000800001010100013050003091e40bad60a7",
"code" : "0xef0001010008020002000600030400040000800001010100023050e30001003091e40bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand All @@ -419,7 +418,7 @@
}
},
"validInvalid_38" : {
"code" : "0xef0001010008020002000300030400040000800001028000023050005050000bad60a7",
"code" : "0xef000101000802000200050003040004000080000202800002305fe500015050000bad60a7",
"results" : {
"Cancun" : {
"exception" : "EOF_InvalidCode",
Expand Down
2 changes: 1 addition & 1 deletion src/EOFTestsFiller/EIP4750/validInvalidFiller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ validInvalid:
# Data section (empty)
expectException:
"Cancun" : "EOF_InvalidCode"
">=Prague" : "EOF_NonEmptyStackOnTerminatingInstruction"
">=Prague" : "EOF_InvalidNumberOfOutputs"
# EOF1I4750_0017 (Invalid) EOF code containing function exceeding max stack items - Data index: 25
# Code[0](Types: 0:128): PUSH1(1) DUP*1022 CALLF(1) STOP
Expand Down

0 comments on commit f016699

Please sign in to comment.