forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 282
feat: add EIP-7702 #1112
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
Merged
Merged
feat: add EIP-7702 #1112
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
8c459ec
feat: add EIP-7702
85a8482
fix goimport
f3dfc7a
add unit tests
74b01b2
add api test
e8cff42
sync txpool update
0d0511b
update generated code
49ce6e2
make code readable
9dddd1d
fix goimport
197739d
fix TestAsyncChecker unit test
40ef7c7
add AuthorizationList in fuzz tests for completeness sake
1eac54c
add EuclidV2 test, EIP-7702 transaction in TestT8n
cdc301f
clean up logs
70419dd
bump version
5257971
Merge branch 'develop' into add-eip-7702
colinlyguo 9a7229d
fix TestAsyncChecker
08cc2f9
Revert "fix TestAsyncChecker"
f0e54b8
accept eip-7702 txns only after enabling eip-7702
233a56f
revert IntrinsicGas param name from setCodeAuthorizations to authList
7c2d9f4
fix a bug
9e70b14
align upstream implementation in Encoding Receipts
2dc0756
fix one test case
15e71c9
Merge branch 'develop' into add-eip-7702
colinlyguo 3611717
fix tracer
51d6ec8
return precode copy
028347e
support setcode tx in EstimateGas and add unit tests
6d29693
add TestValidateAuthorizations
2273e77
poseidon hash fix
23bd703
migrate a fix before the fix pr is merged
2dde0c7
support setcode type transactions in TransactionData
431adc1
Merge branch 'develop' into add-eip-7702
colinlyguo 65d164e
chore: auto version bump [bot]
colinlyguo 3af3735
add a nonce-gapped-auth-does-not-block-pending-tx unit test
482194f
make the auth invalid
2340de4
Apply suggestions from code review
Thegaram 6665460
change usedAndLeftSlots and knownConflicts to util functions
06e22a1
add comments about different return of applyAuthorization
1fa9c8c
remove gencodec:required in transaction signatures
8648d68
fix goimport
eeafee4
update StructLogger and AccessListTracer
4c3385d
fix a bug
1a3942d
fix flaky test
Thegaram 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
This test sets some EIP-7702 delegations and calls them. |
This file contains hidden or 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,30 @@ | ||
{ | ||
"0x8a0a19589531694250d570040a0c4b74576919b8": { | ||
"nonce": "0x00", | ||
"balance": "0x0de0b6b3a7640000", | ||
"code": "0x600060006000600060007310000000000000000000000000000000000000015af1600155600060006000600060007310000000000000000000000000000000000000025af16002553d600060003e600051600355", | ||
"storage": { | ||
"0x01": "0x0100", | ||
"0x02": "0x0100", | ||
"0x03": "0x0100" | ||
} | ||
}, | ||
"0x000000000000000000000000000000000000aaaa": { | ||
"nonce": "0x00", | ||
"balance": "0x4563918244f40000", | ||
"code": "0x58808080600173703c4b2bd70c169f5717101caee543299fc946c75af100", | ||
"storage": {} | ||
}, | ||
"0x000000000000000000000000000000000000bbbb": { | ||
"nonce": "0x00", | ||
"balance": "0x29a2241af62c0000", | ||
"code": "0x6042805500", | ||
"storage": {} | ||
}, | ||
"0x71562b71999873DB5b286dF957af199Ec94617F7": { | ||
"nonce": "0x00", | ||
"balance": "0x6124fee993bc0000", | ||
"code": "0x", | ||
"storage": {} | ||
} | ||
} |
This file contains hidden or 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,14 @@ | ||
{ | ||
"currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", | ||
"currentGasLimit": "71794957647893862", | ||
"currentNumber": "1", | ||
"currentTimestamp": "1000", | ||
"currentRandom": "0", | ||
"currentDifficulty": "0", | ||
"blockHashes": {}, | ||
"ommers": [], | ||
"currentBaseFee": "7", | ||
"parentUncleHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"withdrawals": [], | ||
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
} |
This file contains hidden or 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,57 @@ | ||
{ | ||
"alloc": { | ||
"0x000000000000000000000000000000000000aaaa": { | ||
"code": "0x58808080600173703c4b2bd70c169f5717101caee543299fc946c75af100", | ||
"balance": "0x4563918244f40000" | ||
}, | ||
"0x000000000000000000000000000000000000bbbb": { | ||
"code": "0x6042805500", | ||
"balance": "0x29a2241af62c0000" | ||
}, | ||
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { | ||
"balance": "0x2bf52" | ||
}, | ||
"0x703c4b2bd70c169f5717101caee543299fc946c7": { | ||
"code": "0xef0100000000000000000000000000000000000000bbbb", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000042": "0x0000000000000000000000000000000000000000000000000000000000000042" | ||
}, | ||
"balance": "0x1", | ||
"nonce": "0x1" | ||
}, | ||
"0x71562b71999873db5b286df957af199ec94617f7": { | ||
"code": "0xef0100000000000000000000000000000000000000aaaa", | ||
"balance": "0x6124fee993afa30e", | ||
"nonce": "0x2" | ||
}, | ||
"0x8a0a19589531694250d570040a0c4b74576919b8": { | ||
"code": "0x600060006000600060007310000000000000000000000000000000000000015af1600155600060006000600060007310000000000000000000000000000000000000025af16002553d600060003e600051600355", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000100", | ||
"0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000100", | ||
"0x0000000000000000000000000000000000000000000000000000000000000003": "0x0000000000000000000000000000000000000000000000000000000000000100" | ||
}, | ||
"balance": "0xde0b6b3a7640000" | ||
} | ||
}, | ||
"result": { | ||
"stateRoot": "0x9fdcacd4510e93c4488e537dc51578b5c6d505771db64a2610036eeb4be7b26f", | ||
"txRoot": "0x5d13a0b074e80388dc754da92b22922313a63417b3e25a10f324935e09697a53", | ||
"receiptsRoot": "0x504c5d86c34391f70d210e6c482615b391db4bdb9f43479366399d9c5599850a", | ||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","receipts": [{ | ||
"type": "0x4", | ||
"root": "0x", | ||
"status": "0x1", | ||
"cumulativeGasUsed": "0x15fa9", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","logs": null,"transactionHash": "0x0417aab7c1d8a3989190c3167c132876ce9b8afd99262c5a0f9d06802de3d7ef", | ||
"contractAddress": "0x0000000000000000000000000000000000000000", | ||
"gasUsed": "0x15fa9", | ||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"transactionIndex": "0x0" | ||
} | ||
], | ||
"currentDifficulty": "0x0", | ||
"gasUsed": "0x15fa9" | ||
} | ||
} |
This file contains hidden or 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,37 @@ | ||
[ | ||
{ | ||
"type": "0x4", | ||
"chainId": "0x1", | ||
"nonce": "0x0", | ||
"to": "0x71562b71999873db5b286df957af199ec94617f7", | ||
"gas": "0x7a120", | ||
"gasPrice": null, | ||
"maxPriorityFeePerGas": "0x2", | ||
"maxFeePerGas": "0x12a05f200", | ||
"value": "0x0", | ||
"input": "0x", | ||
"accessList": [], | ||
"authorizationList": [ | ||
{ | ||
"chainId": "0x1", | ||
"address": "0x000000000000000000000000000000000000aaaa", | ||
"nonce": "0x1", | ||
"yParity": "0x1", | ||
"r": "0xf7e3e597fc097e71ed6c26b14b25e5395bc8510d58b9136af439e12715f2d721", | ||
"s": "0x6cf7c3d7939bfdb784373effc0ebb0bd7549691a513f395e3cdabf8602724987" | ||
}, | ||
{ | ||
"chainId": "0x0", | ||
"address": "0x000000000000000000000000000000000000bbbb", | ||
"nonce": "0x0", | ||
"yParity": "0x1", | ||
"r": "0x5011890f198f0356a887b0779bde5afa1ed04e6acb1e3f37f8f18c7b6f521b98", | ||
"s": "0x56c3fa3456b103f3ef4a0acb4b647b9cab9ec4bc68fbcdf1e10b49fb2bcbcf61" | ||
} | ||
], | ||
colinlyguo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"secretKey": "0xb71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291", | ||
"v": "0x0", | ||
"r": "0x0", | ||
"s": "0x0" | ||
colinlyguo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
] |
This file contains hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.