Add features required to properly calculate transaction hash#608
Add features required to properly calculate transaction hash#608
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #608 +/- ##
==========================================
+ Coverage 97.11% 97.18% +0.06%
==========================================
Files 74 74
Lines 7445 7557 +112
==========================================
+ Hits 7230 7344 +114
+ Misses 215 213 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
1d2a7d0 to
eec004a
Compare
| { | ||
| state::Transaction o; | ||
| from_json_tx_common(j, o); | ||
| if (const auto chain_id_it = j.find("chainId"); chain_id_it != j.end()) |
There was a problem hiding this comment.
In generated state tests it's not present but it looks that state test loader does not use this function. I make is mandatory and run test generation and state tests once again.
There was a problem hiding this comment.
When generating state tests using retesteth txs.json does not contain chainId. Probably because it's passed via program param.
Running tests for config 'Ethereum GO on StateTool' 2
Test Case "stCallCodes": (1 of 67)
Finishing retesteth run
*** Total Tests Run: 0
Error: [json.exception.out_of_range.403] key 'chainId' not found
(GeneralStateTests/stCallCodes/callcodecallcall_100, fork: Berlin, TrInfo: d: 0, g: 0, v: 0)
Error: ERROR OCCURED FILLING TESTS: [json.exception.out_of_range.403] key 'chainId' not found
(GeneralStateTests/stCallCodes/callcodecallcall_100, fork: Berlin, TrInfo: d: 0, g: 0, v: 0)
--------
TestOutputHelper detected 2 errors during test execution!
/Users/rodia/projects/retesteth/retesteth/TestOutputHelper.cpp:226: error: in "GeneralStateTests/stCallCodes":
txs.json
[
{
"input" : "0x",
"gas" : "0x2dc6c0",
"gasPrice" : "0xa",
"nonce" : "0x0",
"to" : "0x1000000000000000000000000000000000000000",
"value" : "0x0",
"v" : "0x1b",
"r" : "0x7763c200d265ba0050627c8c7b4c19bf118b3581a3de22dbcebdfcb6e8565790",
"s" : "0x514908f638ddc4b1402230e34692f43bb92713ff2cad3627814cf6fb19ac2e43",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"hash" : "0x62b5ffbdaec4813617bf2aca28840d88d48b2d3fce4ec95d0271f3d8c547852d",
"sender" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
}
]%
There was a problem hiding this comment.
I'm fine with whatever. I was just curious.
eec004a to
28a715f
Compare
813177c to
7677b67
Compare
| { | ||
| state::Transaction o; | ||
| from_json_tx_common(j, o); | ||
| if (const auto chain_id_it = j.find("chainId"); chain_id_it != j.end()) |
There was a problem hiding this comment.
I'm fine with whatever. I was just curious.
ce22c6f to
a621468
Compare
a621468 to
19abf30
Compare
-Loading
chainIdfrom tx json representation.-Encoding
access_listto RLP-Add
access_list(eip2930) transaction type