-
Notifications
You must be signed in to change notification settings - Fork 438
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
Implement EIP-7623: Increase calldata cost #7539
Open
tanishqjasoria
wants to merge
571
commits into
master
Choose a base branch
from
pectra_7623
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
571 commits
Select commit
Hold shift + click to select a range
60cc1b7
fix DepositProcessorTests
MarekM25 283f63b
fix AUTH call gas costs
MarekM25 67ab80f
RLP encoding
ak88 2843085
start test
ak88 bc8c3e9
refactor
ak88 3ed58a3
Pectra: fix merge conflicts (#7170)
rjnrohit 147d69d
Merge branch 'master' into pectra
rjnrohit 79ffe9d
remove duplicate import
rjnrohit 1bb851d
Merge branch 'master' into pectra
rjnrohit e1d3265
Rename: `ValidatorPublicKey` -> `ValidatorPubKey` (#7172)
rjnrohit 5262378
Remove support of eip3074 from pectra (#7189)
rjnrohit 33652fc
insert code in EOA
ak88 303a0f6
removed wrong test
ak88 de4d4d7
cleanup
ak88 4c591cc
more tests added
ak88 40903d1
Merge branch 'master' into feature/eip-7702
ak88 f3c8a7d
more tests
ak88 c18c3d5
refactor with CodeInfoRepo
ak88 8a9cd0d
format whitespace
ak88 bb6f5cf
small refactor
ak88 bccfd21
refactor and unittest
ak88 a50c96c
Recover authority together with sender
ak88 6e91510
added 7702 to metrics
ak88 23a2936
dont recover if already recovered
ak88 d1ef9dd
Small changes
ak88 c1fd043
format whitespace
ak88 dd08281
fix recover
ak88 0dcfb3d
Merge branch 'master' into feature/eip-7702
ak88 0a8346b
removed test
ak88 e25a17c
Merge branch 'feature/eip-7702' of https://github.com/NethermindEth/n…
ak88 a869907
update rlp decoding
e2fb74d
authorizationtuple being nullable
c062402
unittest fix
ak88 d40c3c0
Merge branch 'master' into feature/eip-7702
ak88 949f5a8
Rlp decoder changes
ak88 12297d4
refactor
ak88 21c06a7
txpool test fix
ak88 1926da9
missing
ak88 18a8951
Rlp unitest
ak88 7702fa4
some basic refactorings
LukaszRozmej ef3370d
simplified refactor and RLP fix
ak88 05ea012
format whitespace
ak88 06e48c9
cleanup
ak88 bbd956a
cleanup and review comments
ak88 0b182c8
fix for old tx tests
ak88 ca22d59
removed unused field
ak88 6218545
CodeInfoRepository passing refactor
LukaszRozmej 35276b6
simplify code
LukaszRozmej ff5a88d
refactor and recover authority in tx pool
ak88 7efa123
unit test fix
ak88 3daf9fb
bad sig will skip and not throw
ak88 eb84a1d
eip 7702 timestamp
ak88 182b67b
set the actual value of IsEip7702Enabled
smartprogrammer93 3ff6605
add test tp chainspec tests to make sure it is loaded
smartprogrammer93 050fe47
Validate nonce then increment after 7702
ak88 78a82b5
decode rlp auth list fix
ak88 9b189d4
Resolved all conflicts
MarekM25 ff9e4cd
fix whitespaces
MarekM25 8557a10
fix benchmarks.sln build
MarekM25 03e4997
fix tests
MarekM25 be5acf1
fix tests
MarekM25 b7546f3
fix tests
MarekM25 45e44cf
Prague: Add support for getPayloadBodiesBy Hash + Range (#7133)
rjnrohit f4db109
Resolved payload bodies
MarekM25 5f2434c
Removed log message
MarekM25 d7d0c04
Cleanup the branch
MarekM25 51c1701
Cleanup
MarekM25 eebac4f
minor refactor
smartprogrammer93 c8434ab
Reduce allocation + minors + optimize `ToULongFromBigEndianByteArrayW…
smartprogrammer93 b653664
fix
smartprogrammer93 0abb556
Update src/Nethermind/Nethermind.State/Proofs/RequestsTrie.cs
smartprogrammer93 01deb2a
Update src/Nethermind/Nethermind.Specs/ReleaseSpec.cs
smartprogrammer93 7d106ea
Merge branch 'master' into pectra_eips
smartprogrammer93 3d5bde2
fix whitespace and build issue
smartprogrammer93 2a60176
fix test
smartprogrammer93 aa0196b
Resolved conflicts
MarekM25 3e156c9
spec changes start
ak88 ceeee20
revert nonce increments
ak88 d4e3298
intrinsic gas
ak88 58da91d
cherry-picking
MarekM25 129f134
build fix
ak88 0237c49
fx unittest
ak88 2e8eddb
spec changes
ak88 da3e3bd
unit tests
ak88 7f7e2ee
Merge branch 'pectra' into feature/eip-7702
ak88 8badf7d
Build fix
ak88 3be0b1c
change nonce to ulong
ak88 ac4fd87
refactor ChargeAccountAccessGas
ak88 bdf56f9
gas fixes and bug
ak88 61d59f7
merge fix
ak88 b5cea7a
build fix
ak88 403207a
refactor txprocessor to using accessed addresses
ak88 bdc4dc0
fix
ak88 93159d2
encoder fix
ak88 bbc81a4
test strg
ak88 cb6ac2d
fix extcodehash
ak88 5301b89
7702 refunds
ak88 29257b2
Use uint256 for sig values
ak88 aef10ce
state test fix for auth list
ak88 9b9eb2e
validate auth sig in txvalidator
ak88 1053f7a
Revert "Use uint256 for sig values"
ak88 51856ad
unittest fixes
ak88 8335b61
unique check auth sig validity
ak88 d5b8037
test cleanup
ak88 e996c17
unittest fix
ak88 2ce9f73
do not allow empty auth list
ak88 2da8111
tx pool check if sender is delegation
ak88 22152a8
unittest for TxPool
ak88 904bdb6
modified hive.json for debugging
MarekM25 b6f2563
hive test cfg
ak88 6a77929
cleanup
ak88 2f1e85c
Auth list in RPC
ak88 d59d3fa
fix, disallow create tx in SetCode tx type
smartprogrammer93 189e566
fix chainid
ak88 0f388d1
revert temp path too long fix
ak88 c938923
small refactors
LukaszRozmej 291ba9b
more basic refactors and cleanups
LukaszRozmej 046fb36
Resolved conflicts
MarekM25 a0dbd21
Solving errors
MarekM25 7ec64d2
Builds error solved
MarekM25 7baea0b
Resolved conflicts
MarekM25 3e8726e
fix build errors
MarekM25 0db830c
cherry pick missing from 7702
ak88 b90b883
fix whitespaces
MarekM25 4532047
fix merge tests
MarekM25 93a7c75
cosmetic
MarekM25 a739b22
Null handling for requests
MarekM25 fa10981
tx decoder for setcode
ak88 7aa7aa8
RPC module tests for 7702
ak88 c9c1afc
cleanup after missing commit
ak88 5ac555e
tx validator for setcode refactor
ak88 7b5f627
fix tests
MarekM25 2953bca
cosmetic
MarekM25 f3c2c52
fix whitespace?
MarekM25 76b8b6f
whitespace?
MarekM25 540b86c
fix test
MarekM25 ce64d97
cosmetic
MarekM25 66bd24e
fix test
MarekM25 6465805
fix tx pool tests
ak88 958df8a
use BlockchainId instead
ak88 3f5e57b
unnecessary using
ak88 4c564b3
use BlockchainId instead
ak88 98d5277
Resolved conflicts with payload bodies
MarekM25 e39c754
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 ff823b0
revert proof module
MarekM25 2653613
fix one more test
MarekM25 1857a61
fix whitespace
MarekM25 95fb7fa
whitespaces?
MarekM25 5c41d0a
fix whitespace
MarekM25 e8c1782
?fix
MarekM25 e8011ff
fix
MarekM25 28839a9
fix Evm.Test
MarekM25 63e262c
fix
MarekM25 2fac622
use SpecProvider.ChainId in test
ak88 6018e7d
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/Neth…
ak88 d4b36c5
small refactor TransactionProcessorEip7702Tests
ak88 f3301ad
ignore authorization list if null TransactionForRpc
ak88 e7a91a2
fix SimulateReadOnlyBlocksProcessingEnv
ak88 51a63dd
fix EthModuleBenchmarks
ak88 ed6b5bf
remove unnecessary ?
LukaszRozmej a249a58
Move engine_getPayloadBodiesByHash to IHandler, no Async needed
LukaszRozmej b298026
syntatic suggar
LukaszRozmej 638fd41
Merge branch 'master' into pectra_eips
MarekM25 a911023
Merge branch 'pectra_eips' into pectra_payload_bodies
MarekM25 bc5130b
Consensus requests change class structure
MarekM25 d29ca4d
one more field
MarekM25 1518f27
class to abstract
MarekM25 3acb335
Review fixes
MarekM25 650630e
Resolved conflicts
MarekM25 53043ad
extra test for refunds
ak88 d3197ec
some cosmetic changes
MarekM25 15040c9
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 4e71d9a
Test null address
ak88 3361a63
remove unused
ak88 45bf7bd
enginemoduletest
ak88 28a0f7c
improve recoversignatures
ak88 026de88
Merge branch 'new_test' into pectra_fix_7702_after_merge
ak88 aec7e85
fix test
ak88 5e59935
if sender recovered from pool also set authority
ak88 54a59ba
Apply suggestions from code review
ak88 9c3ec4d
cosmetic
ak88 6d90306
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/Neth…
ak88 7f48fd6
a few optimizations
MarekM25 552b704
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 7da0be0
fix
MarekM25 18a3e0e
cosmetic
MarekM25 58ae212
cosmetic
MarekM25 c35e4ea
Resolved conflicts
MarekM25 581321d
cosmetic cleanup
ak88 43a99b2
cosmetic
ak88 757d06f
removed metric
ak88 1aa8096
cosmetic
MarekM25 65f06e2
Merge branch 'pectra_fix_7702_after_merge' of https://github.com/neth…
MarekM25 d124cf7
small optimization
ak88 f3bce87
small changes from review
ak88 0e23a9e
changes around CodeInfoRepository
LukaszRozmej e66c64c
Update src/Nethermind/Nethermind.Evm/CodeInfoRepository.cs
LukaszRozmej 667e168
Update src/Nethermind/Nethermind.Evm/CodeInfoRepository.cs
LukaszRozmej 42ab153
Update src/Nethermind/Nethermind.Consensus/Validators/TxValidator.cs
LukaszRozmej 085fa42
Update src/Nethermind/Nethermind.Consensus/Validators/TxValidator.cs
LukaszRozmej a7dd3d9
Update src/Nethermind/Nethermind.Evm/VirtualMachine.cs
LukaszRozmej 0b8062f
Update src/Nethermind/Nethermind.Facade/Eth/TransactionForRpc.cs
LukaszRozmej 49105d2
Update src/Nethermind/Nethermind.State/IReadOnlyStateProviderExtensio…
LukaszRozmej 110a5b8
fixes
LukaszRozmej c4b083d
avoid newing HashSet
ak88 1c69596
add NoContractCreationTxValidator, change SetCodeTxValidator to Autho…
LukaszRozmej 8729021
Move code to value hashes
LukaszRozmej 407effa
ReadConsolidationRequests reorder params to have consistency
LukaszRozmej a7035ce
simplify IntrinsicGasCalculator
LukaszRozmej d0dd643
simplify AccessListCost
LukaszRozmej 295854f
grab TxExecutionContext by reference
LukaszRozmej c323bae
Invert VM condition for readability
LukaszRozmej 900ac8b
Simplify RecoverAuthorityFilter
LukaszRozmej 141c565
fix AuthorizationTupleDecoder
LukaszRozmej 8607c8e
remove IRlpObjectDecoder<ConsolidationRequest>
LukaszRozmej b998979
bring back exceptions in IntrinsicGasCalculator
LukaszRozmej 6a6db8b
fix
LukaszRozmej 794f6da
fix
LukaszRozmej 5f714d1
More CodeInfoRepository changes
LukaszRozmej fbc6822
More renames
LukaszRozmej cbde5c8
More refactors
LukaszRozmej 2a9da1c
fixes
LukaszRozmej 254ff42
changes from review
ak88 76129ad
decoder netty fix
ak88 70a3390
also check auth sig in recovery
ak88 ab855fb
move sign func to extension
ak88 e28f666
changes from review
ak88 2963ac2
fix tests
ak88 1be004e
refactor codeinforepo test
ak88 eeb4ff9
base class for processors
ak88 096fb43
Merge branch 'master' into pectra_fix_7702_after_merge
ak88 facba02
merge fix
ak88 60348e2
comment correction
ak88 e4c49d3
Merge branch 'master' into pectra_fix_7702_after_merge
ak88 86c9df2
format whitespace
ak88 cd151cc
benchmark fix
ak88 347a63a
small test change
ak88 482ebce
add floor gas cost
tanishqjasoria 622a48e
transaction validator and gas estimator
tanishqjasoria 0087008
Merge branch 'master' into pectra_fix_7702_after_merge
MarekM25 b37e703
update
tanishqjasoria 5bb4b4a
update and add tests
tanishqjasoria 73fa69a
add evm tests
tanishqjasoria 53bd962
Merge branch 'pectra_fix_7702_after_merge' into pectra_7623
tanishqjasoria 16c773c
rename
tanishqjasoria c82b3ce
add token calculations
tanishqjasoria 717641d
Merge branch 'master' into pectra_7623
tanishqjasoria 86500d0
fix merger issues
tanishqjasoria 0b365e5
small fixes
tanishqjasoria e737316
whitespace and small fix
tanishqjasoria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
using FluentAssertions; | ||
using Nethermind.Core; | ||
using Nethermind.Specs; | ||
using NUnit.Framework; | ||
|
||
namespace Nethermind.Evm.Test; | ||
|
||
[TestFixture] | ||
public class Eip7623Tests : VirtualMachineTestsBase | ||
{ | ||
protected override long BlockNumber => MainnetSpecProvider.ParisBlockNumber; | ||
protected override ulong Timestamp => MainnetSpecProvider.PragueBlockTimestamp; | ||
|
||
[Test] | ||
public void non_zero_data_transaction_floor_cost_should_be_40() | ||
{ | ||
var transaction = new Transaction { Data = new byte[] { 1 }, To = Address.Zero }; | ||
long cost = IntrinsicGasCalculator.Calculate(transaction, Spec, out var floorGas); | ||
floorGas.Should().Be(GasCostOf.Transaction + GasCostOf.TotalCostFloorPerTokenEip7623 * 4); | ||
cost.Should().Be(GasCostOf.Transaction + GasCostOf.TxDataNonZeroEip2028); | ||
} | ||
|
||
[Test] | ||
public void zero_data_transaction_floor_cost_should_be_10() | ||
{ | ||
var transaction = new Transaction { Data = new byte[] { 0 }, To = Address.Zero }; | ||
long cost = IntrinsicGasCalculator.Calculate(transaction, Spec, out var floorGas); | ||
cost.Should().Be(GasCostOf.Transaction + GasCostOf.TxDataZero); | ||
floorGas.Should().Be(GasCostOf.Transaction + GasCostOf.TotalCostFloorPerTokenEip7623); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there's a more elegant way to handle this than using an out parameter. For example, the IntrinsicGasCalculator could encapsulate the transaction validation logic within the class itself.