Skip to content

Instantly share code, notes, and snippets.

View jwasinger's full-sized avatar
💭
👍

jwasinger

💭
👍
View GitHub Profile
@jwasinger
jwasinger / file.json
Created August 15, 2017 21:23
badOpcodesFiller
{
"badOpcodes" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
{
"badOpcodes" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
{
'steps': [
{'pc': 0, 'op': 96, 'gas': '0x2d74b8', 'gasCost': '0x3', 'stack': [], 'depth': 0, 'opName': 'PUSH1'},
{ ... },
...
],
'result': {"output":"","gasUsed":"0x34775","time":1967173}
}
BlockchainTests/TransitionTests/bcEIP158ToByzantium/ByzantiumTransition.json:
instance.ByzantiumTransition.blocks[0] additionalProperty "blocknumber" exists in instance when not allowed
instance.ByzantiumTransition.blocks[1] additionalProperty "blocknumber" exists in instance when not allowed
instance.ByzantiumTransition.blocks[2] additionalProperty "blocknumber" exists in instance when not allowed
instance.ByzantiumTransition.blocks[3] additionalProperty "blocknumber" exists in instance when not allowed
{
"RPC_API_Test_Byzantium" : {
"_info" : {
"comment" : "",
"filledwith" : "cpp-1.3.0+commit.1e21ee18.Linux.g++",
"source" : "/src/BlockchainTestsFiller/bcGasPricerTest/RPC_API_TestFiller.json"
},
"blocks" : [
{
"blockHeader" : {
{
"badOpcodes" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
Running 1 test case...
Test Case "stBadOpcode":
50%...
/ethereum/cpp-ethereum/test/tools/libtesteth/ImportTest.cpp(467): error: in "StateTestsGeneral/stBadOpcode": badOpcodes Compare States: 6295ee1b4f6dd65047762f924ecd367c17eabf8f address not expected to exist!
Frontier data: 41 gas: 0 val: 0
/ethereum/cpp-ethereum/test/tools/libtesteth/ImportTest.cpp(467): error: in "StateTestsGeneral/stBadOpcode": badOpcodes Compare States: 6295ee1b4f6dd65047762f924ecd367c17eabf8f address not expected to exist!
Frontier data: 42 gas: 0 val: 0
/ethereum/cpp-ethereum/test/tools/libtesteth/ImportTest.cpp(467): error: in "StateTestsGeneral/stBadOpcode": badOpcodes Compare States: 6295ee1b4f6dd65047762f924ecd367c17eabf8f address not expected to exist!
Frontier data: 43 gas: 0 val: 0
/ethereum/cpp-ethereum/test/tools/libtesteth/ImportTest.cpp(467): error: in "StateTestsGeneral/stBadOpcode": badOpcodes Compare States: 6295ee1b4f6dd65047762f924ecd367c17eabf8f address not expected to exist!
@jwasinger
jwasinger / Opcodes_TransactionInit.json-template
Last active August 29, 2017 21:33
Scripts to generate valid opcode tests in transaction to empty. Execute `python generate_filler.py` with the template file in the same directory to produce the final filler file. `generate_filler.py` depends on LLLC being installed
{{
"Opcodes_TransactionInit" : {{
"env" : {{
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
}},
@jwasinger
jwasinger / gist:da421623bf1070070042db74be062db8
Created August 29, 2017 22:55
Simple transaction to empty with SELFDESTRUCT in contract init code
{
"Opcodes_TransactionInit" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
@jwasinger
jwasinger / badOpcodesFiller.json
Created August 30, 2017 18:52
Example of a state test filler with an incorrect field name
{
"badOpcodes" : {
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",
"currentGasLimit" : "1000000",
"currentNumber" : "1",
"currentTimestamp" : "1000",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},