Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-7702 and EIP-7251 #7459

Merged
merged 567 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
567 commits
Select commit Hold shift + click to select a range
fdd02ae
resolved conflicts
MarekM25 May 8, 2024
da6c886
cosmetic
MarekM25 May 13, 2024
2597b67
fix validatorPubKey ->validatorPublicKey
MarekM25 May 14, 2024
59a05ee
fix pubkey
MarekM25 May 14, 2024
60cc1b7
fix DepositProcessorTests
MarekM25 May 15, 2024
283f63b
fix AUTH call gas costs
MarekM25 May 16, 2024
67ab80f
RLP encoding
ak88 Jun 5, 2024
2843085
start test
ak88 Jun 5, 2024
bc8c3e9
refactor
ak88 Jun 7, 2024
3ed58a3
Pectra: fix merge conflicts (#7170)
rjnrohit Jun 12, 2024
147d69d
Merge branch 'master' into pectra
rjnrohit Jun 12, 2024
79ffe9d
remove duplicate import
rjnrohit Jun 12, 2024
1bb851d
Merge branch 'master' into pectra
rjnrohit Jun 16, 2024
e1d3265
Rename: `ValidatorPublicKey` -> `ValidatorPubKey` (#7172)
rjnrohit Jun 16, 2024
5262378
Remove support of eip3074 from pectra (#7189)
rjnrohit Jun 17, 2024
33652fc
insert code in EOA
ak88 Jun 17, 2024
303a0f6
removed wrong test
ak88 Jun 20, 2024
de4d4d7
cleanup
ak88 Jun 20, 2024
4c591cc
more tests added
ak88 Jun 20, 2024
40903d1
Merge branch 'master' into feature/eip-7702
ak88 Jun 20, 2024
f3c8a7d
more tests
ak88 Jun 20, 2024
c18c3d5
refactor with CodeInfoRepo
ak88 Jun 20, 2024
8a9cd0d
format whitespace
ak88 Jun 20, 2024
bb6f5cf
small refactor
ak88 Jun 23, 2024
bccfd21
refactor and unittest
ak88 Jun 24, 2024
a50c96c
Recover authority together with sender
ak88 Jun 24, 2024
6e91510
added 7702 to metrics
ak88 Jun 24, 2024
23a2936
dont recover if already recovered
ak88 Jun 24, 2024
d1ef9dd
Small changes
ak88 Jun 24, 2024
c1fd043
format whitespace
ak88 Jun 24, 2024
dd08281
fix recover
ak88 Jun 24, 2024
0dcfb3d
Merge branch 'master' into feature/eip-7702
ak88 Jun 24, 2024
0a8346b
removed test
ak88 Jun 24, 2024
e25a17c
Merge branch 'feature/eip-7702' of https://github.com/NethermindEth/n…
ak88 Jun 24, 2024
a869907
update rlp decoding
Jun 25, 2024
e2fb74d
authorizationtuple being nullable
Jun 25, 2024
c062402
unittest fix
ak88 Jun 25, 2024
d40c3c0
Merge branch 'master' into feature/eip-7702
ak88 Jun 25, 2024
949f5a8
Rlp decoder changes
ak88 Jun 25, 2024
12297d4
refactor
ak88 Jun 26, 2024
21c06a7
txpool test fix
ak88 Jun 26, 2024
1926da9
missing
ak88 Jun 26, 2024
18a8951
Rlp unitest
ak88 Jun 26, 2024
7702fa4
some basic refactorings
LukaszRozmej Jun 27, 2024
ef3370d
simplified refactor and RLP fix
ak88 Jun 27, 2024
05ea012
format whitespace
ak88 Jun 27, 2024
06e48c9
cleanup
ak88 Jun 27, 2024
bbd956a
cleanup and review comments
ak88 Jun 27, 2024
0b182c8
fix for old tx tests
ak88 Jun 27, 2024
ca22d59
removed unused field
ak88 Jun 28, 2024
6218545
CodeInfoRepository passing refactor
LukaszRozmej Jun 28, 2024
35276b6
simplify code
LukaszRozmej Jun 28, 2024
ff5a88d
refactor and recover authority in tx pool
ak88 Jun 28, 2024
7efa123
unit test fix
ak88 Jun 29, 2024
3daf9fb
bad sig will skip and not throw
ak88 Jul 3, 2024
eb84a1d
eip 7702 timestamp
ak88 Jul 24, 2024
182b67b
set the actual value of IsEip7702Enabled
smartprogrammer93 Jul 24, 2024
3ff6605
add test tp chainspec tests to make sure it is loaded
smartprogrammer93 Jul 24, 2024
050fe47
Validate nonce then increment after 7702
ak88 Jul 27, 2024
78a82b5
decode rlp auth list fix
ak88 Jul 31, 2024
9b189d4
Resolved all conflicts
MarekM25 Sep 12, 2024
ff9e4cd
fix whitespaces
MarekM25 Sep 12, 2024
8557a10
fix benchmarks.sln build
MarekM25 Sep 12, 2024
03e4997
fix tests
MarekM25 Sep 12, 2024
be5acf1
fix tests
MarekM25 Sep 12, 2024
b7546f3
fix tests
MarekM25 Sep 13, 2024
45e44cf
Prague: Add support for getPayloadBodiesBy Hash + Range (#7133)
rjnrohit Jun 25, 2024
f4db109
Resolved payload bodies
MarekM25 Sep 13, 2024
5f2434c
Removed log message
MarekM25 Sep 13, 2024
d7d0c04
Cleanup the branch
MarekM25 Sep 13, 2024
51c1701
Cleanup
MarekM25 Sep 13, 2024
eebac4f
minor refactor
smartprogrammer93 Sep 14, 2024
c8434ab
Reduce allocation + minors + optimize `ToULongFromBigEndianByteArrayW…
smartprogrammer93 Sep 14, 2024
b653664
fix
smartprogrammer93 Sep 14, 2024
0abb556
Update src/Nethermind/Nethermind.State/Proofs/RequestsTrie.cs
smartprogrammer93 Sep 14, 2024
01deb2a
Update src/Nethermind/Nethermind.Specs/ReleaseSpec.cs
smartprogrammer93 Sep 14, 2024
7d106ea
Merge branch 'master' into pectra_eips
smartprogrammer93 Sep 14, 2024
3d5bde2
fix whitespace and build issue
smartprogrammer93 Sep 14, 2024
2a60176
fix test
smartprogrammer93 Sep 14, 2024
aa0196b
Resolved conflicts
MarekM25 Sep 16, 2024
3e156c9
spec changes start
ak88 Aug 16, 2024
ceeee20
revert nonce increments
ak88 Aug 16, 2024
d4e3298
intrinsic gas
ak88 Aug 16, 2024
58da91d
cherry-picking
MarekM25 Sep 16, 2024
129f134
build fix
ak88 Aug 19, 2024
0237c49
fx unittest
ak88 Aug 20, 2024
2e8eddb
spec changes
ak88 Aug 22, 2024
da3e3bd
unit tests
ak88 Aug 22, 2024
7f7e2ee
Merge branch 'pectra' into feature/eip-7702
ak88 Aug 22, 2024
8badf7d
Build fix
ak88 Aug 22, 2024
3be0b1c
change nonce to ulong
ak88 Aug 22, 2024
ac4fd87
refactor ChargeAccountAccessGas
ak88 Aug 24, 2024
bdf56f9
gas fixes and bug
ak88 Aug 26, 2024
61d59f7
merge fix
ak88 Aug 27, 2024
b5cea7a
build fix
ak88 Aug 28, 2024
403207a
refactor txprocessor to using accessed addresses
ak88 Aug 29, 2024
bdc4dc0
fix
ak88 Sep 1, 2024
93159d2
encoder fix
ak88 Sep 2, 2024
bbc81a4
test strg
ak88 Sep 2, 2024
cb6ac2d
fix extcodehash
ak88 Sep 2, 2024
5301b89
7702 refunds
ak88 Sep 3, 2024
29257b2
Use uint256 for sig values
ak88 Sep 4, 2024
aef10ce
state test fix for auth list
ak88 Sep 4, 2024
9b9eb2e
validate auth sig in txvalidator
ak88 Sep 4, 2024
1053f7a
Revert "Use uint256 for sig values"
ak88 Sep 4, 2024
51856ad
unittest fixes
ak88 Sep 4, 2024
8335b61
unique check auth sig validity
ak88 Sep 4, 2024
d5b8037
test cleanup
ak88 Sep 4, 2024
e996c17
unittest fix
ak88 Sep 4, 2024
2ce9f73
do not allow empty auth list
ak88 Sep 5, 2024
2da8111
tx pool check if sender is delegation
ak88 Sep 5, 2024
22152a8
unittest for TxPool
ak88 Sep 6, 2024
904bdb6
modified hive.json for debugging
MarekM25 Sep 9, 2024
b6f2563
hive test cfg
ak88 Sep 9, 2024
6a77929
cleanup
ak88 Sep 9, 2024
2f1e85c
Auth list in RPC
ak88 Sep 9, 2024
d59d3fa
fix, disallow create tx in SetCode tx type
smartprogrammer93 Sep 10, 2024
189e566
fix chainid
ak88 Sep 12, 2024
0f388d1
revert temp path too long fix
ak88 Sep 12, 2024
c938923
small refactors
LukaszRozmej Sep 16, 2024
291ba9b
more basic refactors and cleanups
LukaszRozmej Sep 16, 2024
046fb36
Resolved conflicts
MarekM25 Sep 17, 2024
a0dbd21
Solving errors
MarekM25 Sep 17, 2024
7ec64d2
Builds error solved
MarekM25 Sep 17, 2024
7baea0b
Resolved conflicts
MarekM25 Sep 17, 2024
3e8726e
fix build errors
MarekM25 Sep 17, 2024
0db830c
cherry pick missing from 7702
ak88 Sep 17, 2024
b90b883
fix whitespaces
MarekM25 Sep 17, 2024
4532047
fix merge tests
MarekM25 Sep 17, 2024
93a7c75
cosmetic
MarekM25 Sep 17, 2024
a739b22
Null handling for requests
MarekM25 Sep 17, 2024
fa10981
tx decoder for setcode
ak88 Sep 17, 2024
7aa7aa8
RPC module tests for 7702
ak88 Sep 11, 2024
c9c1afc
cleanup after missing commit
ak88 Sep 17, 2024
5ac555e
tx validator for setcode refactor
ak88 Sep 18, 2024
7b5f627
fix tests
MarekM25 Sep 18, 2024
2953bca
cosmetic
MarekM25 Sep 18, 2024
f3c2c52
fix whitespace?
MarekM25 Sep 18, 2024
76b8b6f
whitespace?
MarekM25 Sep 18, 2024
540b86c
fix test
MarekM25 Sep 18, 2024
ce64d97
cosmetic
MarekM25 Sep 18, 2024
66bd24e
fix test
MarekM25 Sep 18, 2024
6465805
fix tx pool tests
ak88 Sep 18, 2024
958df8a
use BlockchainId instead
ak88 Sep 18, 2024
3f5e57b
unnecessary using
ak88 Sep 18, 2024
4c564b3
use BlockchainId instead
ak88 Sep 18, 2024
98d5277
Resolved conflicts with payload bodies
MarekM25 Sep 18, 2024
e39c754
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 Sep 18, 2024
ff823b0
revert proof module
MarekM25 Sep 18, 2024
2653613
fix one more test
MarekM25 Sep 18, 2024
1857a61
fix whitespace
MarekM25 Sep 18, 2024
95fb7fa
whitespaces?
MarekM25 Sep 18, 2024
5c41d0a
fix whitespace
MarekM25 Sep 18, 2024
e8c1782
?fix
MarekM25 Sep 18, 2024
e8011ff
fix
MarekM25 Sep 18, 2024
28839a9
fix Evm.Test
MarekM25 Sep 18, 2024
63e262c
fix
MarekM25 Sep 18, 2024
2fac622
use SpecProvider.ChainId in test
ak88 Sep 18, 2024
6018e7d
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/Neth…
ak88 Sep 18, 2024
d4b36c5
small refactor TransactionProcessorEip7702Tests
ak88 Sep 18, 2024
f3301ad
ignore authorization list if null TransactionForRpc
ak88 Sep 18, 2024
e7a91a2
fix SimulateReadOnlyBlocksProcessingEnv
ak88 Sep 18, 2024
51a63dd
fix EthModuleBenchmarks
ak88 Sep 18, 2024
ed6b5bf
remove unnecessary ?
LukaszRozmej Sep 19, 2024
a249a58
Move engine_getPayloadBodiesByHash to IHandler, no Async needed
LukaszRozmej Sep 19, 2024
b298026
syntatic suggar
LukaszRozmej Sep 19, 2024
638fd41
Merge branch 'master' into pectra_eips
MarekM25 Sep 19, 2024
a911023
Merge branch 'pectra_eips' into pectra_payload_bodies
MarekM25 Sep 19, 2024
bc5130b
Consensus requests change class structure
MarekM25 Sep 19, 2024
d29ca4d
one more field
MarekM25 Sep 19, 2024
1518f27
class to abstract
MarekM25 Sep 19, 2024
3acb335
Review fixes
MarekM25 Sep 19, 2024
650630e
Resolved conflicts
MarekM25 Sep 19, 2024
53043ad
extra test for refunds
ak88 Sep 19, 2024
d3197ec
some cosmetic changes
MarekM25 Sep 19, 2024
15040c9
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 Sep 19, 2024
4e71d9a
Test null address
ak88 Sep 19, 2024
3361a63
remove unused
ak88 Sep 20, 2024
45bf7bd
enginemoduletest
ak88 Sep 20, 2024
28a0f7c
improve recoversignatures
ak88 Sep 20, 2024
026de88
Merge branch 'new_test' into pectra_fix_7702_after_merge
ak88 Sep 20, 2024
aec7e85
fix test
ak88 Sep 20, 2024
5e59935
if sender recovered from pool also set authority
ak88 Sep 20, 2024
54a59ba
Apply suggestions from code review
ak88 Sep 20, 2024
9c3ec4d
cosmetic
ak88 Sep 20, 2024
6d90306
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/Neth…
ak88 Sep 20, 2024
7f48fd6
a few optimizations
MarekM25 Sep 20, 2024
552b704
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 Sep 20, 2024
7da0be0
fix
MarekM25 Sep 20, 2024
18a3e0e
cosmetic
MarekM25 Sep 20, 2024
58ae212
cosmetic
MarekM25 Sep 23, 2024
c35e4ea
Resolved conflicts
MarekM25 Sep 23, 2024
581321d
cosmetic cleanup
ak88 Sep 23, 2024
43a99b2
cosmetic
ak88 Sep 24, 2024
757d06f
removed metric
ak88 Sep 24, 2024
1aa8096
cosmetic
MarekM25 Sep 25, 2024
65f06e2
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 Sep 25, 2024
d124cf7
small optimization
ak88 Sep 25, 2024
f3bce87
small changes from review
ak88 Sep 25, 2024
0e23a9e
changes around CodeInfoRepository
LukaszRozmej Sep 26, 2024
e66c64c
Update src/Nethermind/Nethermind.Evm/CodeInfoRepository.cs
LukaszRozmej Sep 26, 2024
667e168
Update src/Nethermind/Nethermind.Evm/CodeInfoRepository.cs
LukaszRozmej Sep 26, 2024
42ab153
Update src/Nethermind/Nethermind.Consensus/Validators/TxValidator.cs
LukaszRozmej Sep 26, 2024
085fa42
Update src/Nethermind/Nethermind.Consensus/Validators/TxValidator.cs
LukaszRozmej Sep 26, 2024
a7dd3d9
Update src/Nethermind/Nethermind.Evm/VirtualMachine.cs
LukaszRozmej Sep 26, 2024
0b8062f
Update src/Nethermind/Nethermind.Facade/Eth/TransactionForRpc.cs
LukaszRozmej Sep 26, 2024
49105d2
Update src/Nethermind/Nethermind.State/IReadOnlyStateProviderExtensio…
LukaszRozmej Sep 26, 2024
110a5b8
fixes
LukaszRozmej Sep 26, 2024
c4b083d
avoid newing HashSet
ak88 Sep 26, 2024
1c69596
add NoContractCreationTxValidator, change SetCodeTxValidator to Autho…
LukaszRozmej Sep 26, 2024
8729021
Move code to value hashes
LukaszRozmej Sep 26, 2024
407effa
ReadConsolidationRequests reorder params to have consistency
LukaszRozmej Sep 26, 2024
a7035ce
simplify IntrinsicGasCalculator
LukaszRozmej Sep 26, 2024
d0dd643
simplify AccessListCost
LukaszRozmej Sep 26, 2024
295854f
grab TxExecutionContext by reference
LukaszRozmej Sep 26, 2024
c323bae
Invert VM condition for readability
LukaszRozmej Sep 26, 2024
900ac8b
Simplify RecoverAuthorityFilter
LukaszRozmej Sep 26, 2024
141c565
fix AuthorizationTupleDecoder
LukaszRozmej Sep 26, 2024
8607c8e
remove IRlpObjectDecoder<ConsolidationRequest>
LukaszRozmej Sep 26, 2024
b998979
bring back exceptions in IntrinsicGasCalculator
LukaszRozmej Sep 26, 2024
6a6db8b
fix
LukaszRozmej Sep 26, 2024
794f6da
fix
LukaszRozmej Sep 26, 2024
5f714d1
More CodeInfoRepository changes
LukaszRozmej Sep 26, 2024
fbc6822
More renames
LukaszRozmej Sep 26, 2024
cbde5c8
More refactors
LukaszRozmej Sep 26, 2024
2a9da1c
fixes
LukaszRozmej Sep 26, 2024
254ff42
changes from review
ak88 Sep 27, 2024
76129ad
decoder netty fix
ak88 Sep 27, 2024
70a3390
also check auth sig in recovery
ak88 Sep 27, 2024
ab855fb
move sign func to extension
ak88 Sep 28, 2024
e28f666
changes from review
ak88 Sep 30, 2024
2963ac2
fix tests
ak88 Oct 1, 2024
1be004e
refactor codeinforepo test
ak88 Oct 2, 2024
eeb4ff9
base class for processors
ak88 Sep 30, 2024
096fb43
Merge branch 'master' into pectra_fix_7702_after_merge
ak88 Oct 2, 2024
facba02
merge fix
ak88 Oct 2, 2024
60348e2
comment correction
ak88 Oct 2, 2024
e4c49d3
Merge branch 'master' into pectra_fix_7702_after_merge
ak88 Oct 2, 2024
86c9df2
format whitespace
ak88 Oct 2, 2024
cd151cc
benchmark fix
ak88 Oct 2, 2024
347a63a
small test change
ak88 Oct 2, 2024
0087008
Merge branch 'master' into pectra_fix_7702_after_merge
MarekM25 Oct 3, 2024
464deeb
Update src/Nethermind/Nethermind.Consensus/Processing/RecoverSignatur…
ak88 Oct 4, 2024
59a1ae2
Update src/Nethermind/Nethermind.Consensus/Processing/RecoverSignatur…
ak88 Oct 4, 2024
4b51139
Update src/Nethermind/Nethermind.Consensus/Processing/RecoverSignatur…
ak88 Oct 4, 2024
9f01cf2
review changes
ak88 Oct 4, 2024
0800ee3
use existing nulltxpool
ak88 Oct 4, 2024
7b51ea1
format
ak88 Oct 4, 2024
03db79c
cosmetic
ak88 Oct 4, 2024
b60bc32
Merge branch 'master' into pectra_fix_7702_after_merge
ak88 Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 32 additions & 44 deletions src/Nethermind/Chains/hive.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"eip155Transition": "0x0",
"maxCodeSizeTransition": "0x0",
"maxCodeSize": 24576,
"maximumExtraDataSize": 102400,
"maximumExtraDataSize": "0x400",
"eip140Transition": "0x0",
"eip211Transition": "0x0",
"eip214Transition": "0x0",
Expand All @@ -51,57 +51,45 @@
"eip3529Transition": "0x0",
"eip3541Transition": "0x0",
"eip3198Transition": "0x0",
"MergeForkIdTransition": "0x64",
"networkID": "0x7",
"chainID": "0x7"
"eip3651TransitionTimestamp": "0x0",
"eip3855TransitionTimestamp": "0x0",
"eip3860TransitionTimestamp": "0x0",
"eip4895TransitionTimestamp": "0x0",
"eip4844TransitionTimestamp": "0x0",
"eip4788TransitionTimestamp": "0x0",
"eip1153TransitionTimestamp": "0x0",
"eip5656TransitionTimestamp": "0x0",
"eip6780TransitionTimestamp": "0x0",
"eip7702TransitionTimestamp": "0x0",
"chainID": "0x1"
},
"genesis": {
"seal": {
"ethereum": {
"nonce": "0x0000000000000000"
"nonce": "0x0000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x30000",
"difficulty": "0x00",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x1234",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000658bdf435d810c91414ec09147daa6db624063790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x2fefd8"
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x00",
"gasLimit": "0x016345785d8a0000",
"baseFeePerGas": "0x07"
},
"accounts": {
"0xcf49fda3be353c69b41ed96333cd24302da4556f": {
"balance": "0x123450000000000000000"
},
"0x0161e041aad467a890839d5b08b138c1e6373072": {
"balance": "0x123450000000000000000"
},
"0x87da6a8c6e9eff15d703fc2773e32f6af8dbe301": {
"balance": "0x123450000000000000000"
},
"0xb97de4b8c857e4f6bc354f226dc3249aaee49209": {
"balance": "0x123450000000000000000"
},
"0xc5065c9eeebe6df2c2284d046bfc906501846c51": {
"balance": "0x123450000000000000000"
},
"0x0000000000000000000000000000000000000314": {
"balance": "0x0",
"code": "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a223e05d1461006a578063abd1a0cf1461008d578063abfced1d146100d4578063e05c914a14610110578063e6768b451461014c575b610000565b346100005761007761019d565b6040518082815260200191505060405180910390f35b34610000576100be600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506101a3565b6040518082815260200191505060405180910390f35b346100005761010e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506101ed565b005b346100005761014a600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610236565b005b346100005761017960048080359060200190919080359060200190919080359060200190919050506103c4565b60405180848152602001838152602001828152602001935050505060405180910390f35b60005481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5050565b7f6031a8d62d7c95988fa262657cd92107d90ed96e08d8f867d32f26edfe85502260405180905060405180910390a17f47e2689743f14e97f7dcfa5eec10ba1dff02f83b3d1d4b9c07b206cbbda66450826040518082815260200191505060405180910390a1817fa48a6b249a5084126c3da369fbc9b16827ead8cb5cdc094b717d3f1dcd995e2960405180905060405180910390a27f7890603b316f3509577afd111710f9ebeefa15e12f72347d9dffd0d65ae3bade81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a18073ffffffffffffffffffffffffffffffffffffffff167f7efef9ea3f60ddc038e50cccec621f86a0195894dc0520482abf8b5c6b659e4160405180905060405180910390a28181604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a05b5050565b6000600060008585859250925092505b935093509390505600a165627a7a72305820aaf842d0d0c35c45622c5263cbb54813d2974d3999c8c38551d7c613ea2bc1170029",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x1234",
"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9": "0x01"
}
},
"0x0000000000000000000000000000000000000315": {
"balance": "0x9999999999999999999999999999999",
"code": "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ef2769ca1461003e575b610000565b3461000057610078600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061007a565b005b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051809050600060405180830381858888f1935050505015610106578173ffffffffffffffffffffffffffffffffffffffff167f30a3c50752f2552dcc2b93f5b96866280816a986c0c0408cb6778b9fa198288f826040518082815260200191505060405180910390a25b5b50505600a165627a7a72305820637991fabcc8abad4294bf2bb615db78fbec4edff1635a2647d3894e2daf6a610029"
},
"0x0000000000000000000000000000000000000316": {
"balance": "0x0",
"code": "0x444355"
},
"0x0000000000000000000000000000000000000317": {
"balance": "0x0",
"code": "0x600160003555"
"0x000f3df6d732807ef1319fb7b8bb8522d0beac02": {
"nonce": "0x01",
"balance": "0x00",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500",
"storage": {}
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"nonce": "0x00",
"balance": "0x1d6329f1c35ca4bfabb9f5610000000000",
"code": "0x",
"storage": {}
},
"0x0000000000000000000000000000000000000001": {
"builtin": {
Expand Down Expand Up @@ -206,4 +194,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Ethereum.Test.Base;
using NUnit.Framework;

namespace Ethereum.Blockchain.Pyspec.Test;

[TestFixture]
[Parallelizable(ParallelScope.All)]
[Explicit("These tests are not ready yet")]
public class PragueBlockChainTests : BlockchainTestBase
{
[TestCaseSource(nameof(LoadTests))]
public async Task Test(BlockchainTest test) => await RunTest(test);

private static IEnumerable<BlockchainTest> LoadTests()
{
TestsSourceLoader loader = new(new LoadPyspecTestsStrategy(), $"fixtures/blockchain_tests/prague");
return loader.LoadTests().OfType<BlockchainTest>();
}
}
22 changes: 22 additions & 0 deletions src/Nethermind/Ethereum.Blockchain.Pyspec.Test/PragueStateTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using System.Linq;
using Ethereum.Test.Base;
using FluentAssertions;
using NUnit.Framework;

namespace Ethereum.Blockchain.Pyspec.Test;

[TestFixture]
[Parallelizable(ParallelScope.All)]
[Explicit("These tests are not ready yet")]
public class PragueStateTests : GeneralStateTestBase
{
[TestCaseSource(nameof(LoadTests))]
public void Test(GeneralStateTest test) => RunTest(test).Pass.Should().BeTrue();

private static IEnumerable<GeneralStateTest> LoadTests()
{
TestsSourceLoader loader = new(new LoadPyspecTestsStrategy(), $"fixtures/state_tests/prague");
return loader.LoadTests().Cast<GeneralStateTest>();
}
}
16 changes: 16 additions & 0 deletions src/Nethermind/Ethereum.Test.Base/AuthorizationListJson.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core;

namespace Ethereum.Test.Base;
public class AuthorizationListJson
{
public ulong ChainId { get; set; }
public Address Address { get; set; }
public ulong Nonce { get; set; }
public ulong V { get; set; }
public byte[] R { get; set; }
public byte[] S { get; set; }
public Address Signer { get; set; }
}
8 changes: 6 additions & 2 deletions src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,16 @@ protected EthereumTestResult RunTest(GeneralStateTest test, ITxTracer txTracer)

Block block = Build.A.Block.WithTransactions(test.Transaction).WithHeader(header).TestObject;

bool isValid = _txValidator.IsWellFormed(test.Transaction, spec) && IsValidBlock(block, specProvider);
ValidationResult txIsValid = _txValidator.IsWellFormed(test.Transaction, spec);
ak88 marked this conversation as resolved.
Show resolved Hide resolved

if (isValid)
if (txIsValid)
{
transactionProcessor.Execute(test.Transaction, new BlockExecutionContext(header), txTracer);
}
else
{
_logger.Info($"Skipping invalid tx with error: {txIsValid.Error}");
}

stopwatch.Stop();

Expand Down
19 changes: 19 additions & 0 deletions src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public static Transaction Convert(PostStateJson postStateJson, TransactionJson t
{
Transaction transaction = new();

transaction.Type = transactionJson.Type;
transaction.Value = transactionJson.Value[postStateJson.Indexes.Value];
transaction.GasLimit = transactionJson.GasLimit[postStateJson.Indexes.Gas];
transaction.GasPrice = transactionJson.GasPrice ?? transactionJson.MaxPriorityFeePerGas ?? 0;
Expand Down Expand Up @@ -157,6 +158,23 @@ public static Transaction Convert(PostStateJson postStateJson, TransactionJson t
if (transaction.BlobVersionedHashes?.Length > 0)
transaction.Type = TxType.Blob;

if (transactionJson.AuthorizationList is not null)
{
transaction.AuthorizationList =
transactionJson.AuthorizationList
.Select(i => new AuthorizationTuple(
i.ChainId,
i.Address,
i.Nonce,
i.V,
i.R,
i.S)).ToArray();
if (transaction.AuthorizationList.Any())
{
transaction.Type = TxType.SetCode;
}
}

return transaction;
}

Expand Down Expand Up @@ -291,6 +309,7 @@ public static IEnumerable<GeneralStateTest> Convert(string json)
List<GeneralStateTest> tests = new();
foreach (KeyValuePair<string, GeneralStateTestJson> namedTest in testsInFile)
{
Console.WriteLine($"Loading {namedTest.Key}\n {namedTest.Value.Post}");
tests.AddRange(Convert(namedTest.Key, namedTest.Value));
}

Expand Down
1 change: 1 addition & 0 deletions src/Nethermind/Ethereum.Test.Base/LegacyTransactionJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class LegacyTransactionJson
public UInt256 Nonce { get; set; }
public Address To { get; set; }
public UInt256 Value { get; set; }
public string Sender { get; set; }
ak88 marked this conversation as resolved.
Show resolved Hide resolved
public byte[] R { get; set; }
public byte[] S { get; set; }
public ulong V { get; set; }
Expand Down
3 changes: 3 additions & 0 deletions src/Nethermind/Ethereum.Test.Base/TransactionJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace Ethereum.Test.Base
{
public class TransactionJson
{
public TxType Type { get; set; }
public Address Sender { get; set; }
public byte[][]? Data { get; set; }
public long[]? GasLimit { get; set; }
public UInt256? GasPrice { get; set; }
Expand All @@ -19,6 +21,7 @@ public class TransactionJson
public byte[]? SecretKey { get; set; }
public AccessListItemJson[]?[]? AccessLists { get; set; }
public AccessListItemJson[]? AccessList { get; set; }
public AuthorizationListJson[]? AuthorizationList { get; set; }
public byte[]?[]? BlobVersionedHashes { get; set; }
public UInt256? MaxFeePerBlobGas { get; set; }
}
Expand Down
Loading