Skip to content

Commit

Permalink
postHash -> stateRoot
Browse files Browse the repository at this point in the history
EIP-3155 and EIP-7756 call for "stateRoot" where we use "postHash".

Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Dec 13, 2024
1 parent 69846a6 commit 1470a95
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ private void traceTestSpecs(final String test, final List<GeneralStateTestCaseEi
summaryLine.put("d", spec.getDataIndex());
summaryLine.put("g", spec.getGasIndex());
summaryLine.put("v", spec.getValueIndex());
summaryLine.put("postHash", worldState.rootHash().toHexString());
summaryLine.put("stateRoot", worldState.rootHash().toHexString());
final List<Log> logs = result.getLogs();
final Hash actualLogsHash = Hash.hash(RLP.encode(out -> out.writeList(logs, Log::writeTo)));
summaryLine.put("postLogsHash", actualLogsHash.toHexString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@
{"pc":49,"op":"0x60","gas":42949649295,"gasCost":3,"memSize":32,"depth":1,"refund":0,"opName":"PUSH1"},
{"pc":51,"op":"0x55","gas":42949649292,"gasCost":5000,"memSize":32,"depth":1,"refund":0,"opName":"SSTORE"},
{"pc":52,"op":"0x00","gas":42949644292,"gasCost":0,"memSize":32,"depth":1,"refund":0,"opName":"STOP"},
{"output":"","gasUsed":28668,"test":"returndatacopy_following_call","fork":"London","d":0,"g":0,"v":0,"postHash":"0x1c6dda42e80135b6d5ff1a664e6f85e8552d5c56888bb35e2e694f3829a500c7","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
{"output":"","gasUsed":28668,"test":"returndatacopy_following_call","fork":"London","d":0,"g":0,"v":0,"stateRoot":"0x1c6dda42e80135b6d5ff1a664e6f85e8552d5c56888bb35e2e694f3829a500c7","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@
{"pc":49,"op":96,"gas":"0x9ffffa38f","gasCost":"0x3","memory":"0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","memSize":32,"stack":["0x111122223333444455556666777788889999aaaabbbbccccddddeeeeffff"],"returnData":"0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","depth":1,"refund":0,"opName":"PUSH1"},
{"pc":51,"op":85,"gas":"0x9ffffa38c","gasCost":"0x1388","memory":"0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","memSize":32,"stack":["0x111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","0x0"],"returnData":"0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","depth":1,"refund":0,"opName":"SSTORE"},
{"pc":52,"op":0,"gas":"0x9ffff9004","gasCost":"0x0","memory":"0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","memSize":32,"stack":[],"returnData":"0x0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","depth":1,"refund":0,"opName":"STOP"},
{"output":"","gasUsed":"0x6ffc","test":"returndatacopy_following_call","fork":"London","d":0,"g":0,"v":0,"postHash":"0x1c6dda42e80135b6d5ff1a664e6f85e8552d5c56888bb35e2e694f3829a500c7","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
{"output":"","gasUsed":"0x6ffc","test":"returndatacopy_following_call","fork":"London","d":0,"g":0,"v":0,"stateRoot":"0x1c6dda42e80135b6d5ff1a664e6f85e8552d5c56888bb35e2e694f3829a500c7","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@
{"pc":81,"op":"0x48","gas":7978018,"gasCost":2,"memSize":0,"stack":["0x0","0x1","0x1","0x2","0x2","0xffff","0x1f4","0x78859e5b97166c486532b1595a673e9f9073643f1b519c6f18511b9913","0x2","0x389","0x0","0x0","0x1","0x0","0x3e3d6d5ff042148d326c1898713a76759ca273","0x44852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d","0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b"],"depth":1,"refund":0,"opName":"BASEFEE"},
{"pc":82,"op":"0x08","gas":7978016,"gasCost":8,"memSize":0,"stack":["0x0","0x1","0x1","0x2","0x2","0xffff","0x1f4","0x78859e5b97166c486532b1595a673e9f9073643f1b519c6f18511b9913","0x2","0x389","0x0","0x0","0x1","0x0","0x3e3d6d5ff042148d326c1898713a76759ca273","0x44852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d","0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b","0x10"],"depth":1,"refund":0,"opName":"ADDMOD"},
{"pc":83,"op":"0x3e","gas":7978008,"gasCost":0,"memSize":0,"stack":["0x0","0x1","0x1","0x2","0x2","0xffff","0x1f4","0x78859e5b97166c486532b1595a673e9f9073643f1b519c6f18511b9913","0x2","0x389","0x0","0x0","0x1","0x0","0x3e3d6d5ff042148d326c1898713a76759ca273","0xb94f5374fce5edbc8e2a8697c15331677e6ebf1b"],"depth":1,"refund":0,"opName":"RETURNDATACOPY","error":"Out of bounds"},
{"output":"","gasUsed":8000000,"test":"00000936-mixed-1","fork":"Shanghai","d":0,"g":0,"v":0,"postHash":"0xd14c10ed22a1cfb642e374be985ac581c39f3969bd59249e0405aca3beb47a47","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":false,"error":"INVALID_RETURN_DATA_BUFFER_ACCESS"}
{"output":"","gasUsed":8000000,"test":"00000936-mixed-1","fork":"Shanghai","d":0,"g":0,"v":0,"stateRoot":"0xd14c10ed22a1cfb642e374be985ac581c39f3969bd59249e0405aca3beb47a47","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":false,"error":"INVALID_RETURN_DATA_BUFFER_ACCESS"}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
{"pc":29,"section":0,"op":"0x5f","gas":7945585,"gasCost":2,"memSize":0,"stack":[],"depth":1,"refund":0,"opName":"PUSH0"},
{"pc":30,"section":0,"op":"0x5f","gas":7945583,"gasCost":2,"memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"PUSH0"},
{"pc":31,"section":0,"op":"0xee","immediate":"0x00","gas":7945581,"gasCost":0,"memSize":0,"stack":["0x0","0x0"],"depth":1,"refund":0,"opName":"RETURNCONTRACT"},
{"output":"","gasUsed":58419,"test":"create-eof","fork":"Osaka","d":0,"g":0,"v":0,"postHash":"0x1a8642a04dae90535f00f53d3a30284c4db051d508a653db89eb100ba9aecbf3","postLogsHash":"0xf48b954a6a6f4ce6b28e4950b7027413f4bdc8f459df6003b6e8d7a1567c8940","pass":true},
{"output":"","gasUsed":58419,"test":"create-eof","fork":"Osaka","d":0,"g":0,"v":0,"stateRoot":"0x1a8642a04dae90535f00f53d3a30284c4db051d508a653db89eb100ba9aecbf3","postLogsHash":"0xf48b954a6a6f4ce6b28e4950b7027413f4bdc8f459df6003b6e8d7a1567c8940","pass":true},
{"pc":0,"op":"0xef","gas":7946344,"gasCost":0,"memSize":0,"stack":[],"depth":1,"refund":0,"opName":"INVALID","error":"Bad instruction"},
{"output":"","gasUsed":8000000,"test":"create-eof","fork":"Cancun","d":0,"g":0,"v":0,"postHash":"0xaa80d89bc89f58da8de41d3894bd1a241896ff91f7a5964edaefb39e8e3a4a98","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true,"error":"INVALID_OPERATION"}
{"output":"","gasUsed":8000000,"test":"create-eof","fork":"Cancun","d":0,"g":0,"v":0,"stateRoot":"0xaa80d89bc89f58da8de41d3894bd1a241896ff91f7a5964edaefb39e8e3a4a98","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true,"error":"INVALID_OPERATION"}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
}
},
"stdout": [
{"output":"","gasUsed":53656,"test":"create-eof","fork":"Osaka","d":0,"g":0,"v":0,"postHash":"0x2a9c58298ba5d4ec86ca682b9fcc9ff67c3fc44dbd39f85a2f9b74bfe4e5178e","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":false,"error":"Invalid EOF Layout: unexpected_header_kind expected 1 actual 17"},
{"output":"","gasUsed":53656,"test":"create-eof","fork":"Osaka","d":0,"g":0,"v":0,"stateRoot":"0x2a9c58298ba5d4ec86ca682b9fcc9ff67c3fc44dbd39f85a2f9b74bfe4e5178e","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":false,"error":"Invalid EOF Layout: unexpected_header_kind expected 1 actual 17"},
{"pc":0,"op":"0xef","gas":7946344,"gasCost":0,"memSize":0,"stack":[],"depth":1,"refund":0,"opName":"INVALID","error":"Bad instruction"},
{"output":"","gasUsed":8000000,"test":"create-eof","fork":"Cancun","d":0,"g":0,"v":0,"postHash":"0xaa80d89bc89f58da8de41d3894bd1a241896ff91f7a5964edaefb39e8e3a4a98","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true,"error":"INVALID_OPERATION"}
{"output":"","gasUsed":8000000,"test":"create-eof","fork":"Cancun","d":0,"g":0,"v":0,"stateRoot":"0xaa80d89bc89f58da8de41d3894bd1a241896ff91f7a5964edaefb39e8e3a4a98","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true,"error":"INVALID_OPERATION"}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@
{"pc":49,"op":"0x60","gas":42949649295,"gasCost":3,"memSize":32,"stack":["0x111122223333444455556666777788889999aaaabbbbccccddddeeeeffff"],"depth":1,"refund":0,"opName":"PUSH1"},
{"pc":51,"op":"0x55","gas":42949649292,"gasCost":5000,"memSize":32,"stack":["0x111122223333444455556666777788889999aaaabbbbccccddddeeeeffff","0x0"],"depth":1,"refund":0,"opName":"SSTORE"},
{"pc":52,"op":"0x00","gas":42949644292,"gasCost":0,"memSize":32,"stack":[],"depth":1,"refund":0,"opName":"STOP"},
{"output":"","gasUsed":28668,"test":"returndatacopy_following_call","fork":"London","d":0,"g":0,"v":0,"postHash":"0x1c6dda42e80135b6d5ff1a664e6f85e8552d5c56888bb35e2e694f3829a500c7","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
{"output":"","gasUsed":28668,"test":"returndatacopy_following_call","fork":"London","d":0,"g":0,"v":0,"stateRoot":"0x1c6dda42e80135b6d5ff1a664e6f85e8552d5c56888bb35e2e694f3829a500c7","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
{"pc":14,"op":"0x60","gas":7934726,"gasCost":3,"memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"PUSH1"},
{"pc":16,"op":"0x55","gas":7934723,"gasCost":2200,"memSize":0,"stack":["0x0","0x2"],"depth":1,"refund":0,"opName":"SSTORE"},
{"pc":17,"op":"0x00","gas":7932523,"gasCost":0,"memSize":0,"stack":[],"depth":1,"refund":0,"opName":"STOP"},
{"output":"","gasUsed":67477,"test":"shanghai-blockhash","fork":"Shanghai","d":0,"g":0,"v":0,"postHash":"0xb3967c897314312cf275055d754c6742d351a2a4bcf0121ed2f896971bf56563","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
{"output":"","gasUsed":67477,"test":"shanghai-blockhash","fork":"Shanghai","d":0,"g":0,"v":0,"stateRoot":"0xb3967c897314312cf275055d754c6742d351a2a4bcf0121ed2f896971bf56563","postLogsHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","pass":true}
]
}

0 comments on commit 1470a95

Please sign in to comment.