Skip to content

Conversation

@rodiazet
Copy link
Member

@rodiazet rodiazet commented Apr 4, 2023

-Loading chainId from tx json representation.
-Encoding access_list to RLP
-Add access_list (eip2930) transaction type

@rodiazet rodiazet requested a review from chfast April 4, 2023 09:13
@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

Merging #608 (a621468) into master (7e4c268) will increase coverage by 0.06%.
The diff coverage is 100.00%.

❗ Current head a621468 differs from pull request most recent head 19abf30. Consider uploading reports for the commit 19abf30 to get more accurate results

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     
Flag Coverage Δ
blockchaintests 63.61% <ø> (ø)
statetests 62.61% <0.00%> (-0.48%) ⬇️
unittests 94.07% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
test/state/state.hpp 96.42% <ø> (ø)
test/state/rlp.hpp 100.00% <100.00%> (ø)
test/state/state.cpp 96.72% <100.00%> (+0.23%) ⬆️
test/statetest/statetest_loader.cpp 88.83% <100.00%> (+0.37%) ⬆️
test/unittests/state_rlp_test.cpp 100.00% <100.00%> (ø)
test/unittests/statetest_loader_tx_test.cpp 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@rodiazet rodiazet force-pushed the access-list-loading branch 5 times, most recently from 1d2a7d0 to eec004a Compare April 5, 2023 10:39
@rodiazet rodiazet requested a review from chfast April 5, 2023 10:41
{
state::Transaction o;
from_json_tx_common(j, o);
if (const auto chain_id_it = j.find("chainId"); chain_id_it != j.end())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this optional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

@rodiazet rodiazet Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
    }
]% 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with whatever. I was just curious.

@chfast chfast changed the title Add features required to properly calculate transaction hash. Add features required to properly calculate transaction hash Apr 5, 2023
@rodiazet rodiazet force-pushed the access-list-loading branch from eec004a to 28a715f Compare April 5, 2023 12:41
@rodiazet rodiazet force-pushed the access-list-loading branch 2 times, most recently from 813177c to 7677b67 Compare April 5, 2023 13:29
@rodiazet rodiazet requested a review from chfast April 5, 2023 13:56
{
state::Transaction o;
from_json_tx_common(j, o);
if (const auto chain_id_it = j.find("chainId"); chain_id_it != j.end())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with whatever. I was just curious.

@rodiazet rodiazet force-pushed the access-list-loading branch 2 times, most recently from ce22c6f to a621468 Compare April 6, 2023 09:32
@chfast chfast force-pushed the access-list-loading branch from a621468 to 19abf30 Compare April 6, 2023 19:58
@chfast chfast merged commit 39357ec into master Apr 6, 2023
@chfast chfast deleted the access-list-loading branch April 6, 2023 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants