This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 679
feat: add eth_createAccessList
RPC method (#3321)
#3321
Open
MicaiahReid
wants to merge
126
commits into
develop
Choose a base branch
from
feat/eth_createAccessList
base: develop
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 3 commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
1c3bb99
add helper to validate an access list
MicaiahReid 6473d2c
add a helper to create a simulated transaction
MicaiahReid ac2a502
add accessList field to simulation transaction
MicaiahReid f804773
fix off by one bug in precompiles
MicaiahReid 8852c9f
add .equals prop to light ejs address
MicaiahReid a199fc8
remove unneeded async
MicaiahReid 51597c1
return precompiles from warmPrecompiles
MicaiahReid 9071a03
git mv run-call to sim-handler
MicaiahReid 3318134
sim handler changes
MicaiahReid ec25b6a
remove run-call.ts. switch to simulation-handler
MicaiahReid 6ef8466
switch eth_call to use simulatedTransaction helper
MicaiahReid eff40bd
remove param from createVmFromStateTrie function
MicaiahReid fcf041d
use simulation-handler for eth_call
MicaiahReid c108786
add getAccessList method to api
MicaiahReid 1c26480
move SimulationTransaction type import
MicaiahReid 5dbaa77
make eth_call test more robust to contract changes
MicaiahReid a06982c
add solidity function to set storage at a slot
MicaiahReid 4ff6d53
add solidity function to get balance of addr stored in storage
MicaiahReid 08f1720
add solidity function that causes different accessLists to generate
MicaiahReid 0e7dc0c
add tests
MicaiahReid 206cba2
add jsdoc comment for api function
MicaiahReid 92ca1b4
set caller address for state trie context
MicaiahReid b12138c
add jsdoc comments
MicaiahReid 0a04c17
fix error handling a bit
MicaiahReid 24807d1
rename functions
MicaiahReid ec6f9b5
if to else if, ooooooops
MicaiahReid 634c284
undo setting and address in forking context
MicaiahReid 3026f98
add to address to addressesOnlyStorage list
MicaiahReid 4b8c269
add test contract function to send moneys
MicaiahReid bddf9e8
fix/add tests
MicaiahReid 7b3f0fc
correct jsdoc comments
MicaiahReid cc0629f
include accessList on SimulationTransaction
MicaiahReid 9f47424
fix forgotten hardcoding
MicaiahReid 4e446b6
use correct type on transaction
MicaiahReid ff3e6d4
handle 0 baseFeePerGas
MicaiahReid 5501fdf
clean up conditional
MicaiahReid 3eb5219
rename previously gloriously named `a` variable
MicaiahReid 83bc085
require eip2930 to warm access lists
MicaiahReid 0f04843
use Data.Empty
MicaiahReid aeeda71
Apply suggestions from code review
MicaiahReid 5d96b65
update accessList creation to not be recursive
MicaiahReid 0abd9a6
add method to compare access lists
MicaiahReid bf4099e
fix encodeValue implementation
MicaiahReid adc2705
touch more accounts in test
MicaiahReid d22292c
clean up tests
MicaiahReid 1d98ce3
fix preberlin case
MicaiahReid eea9153
add pre-berlin test
MicaiahReid 2284ac6
make simhandler an emitter to preserve modifiability of options
MicaiahReid b2ea4d4
add todo
MicaiahReid 667f3d4
remove commented line
MicaiahReid 8e6c290
remove unnecessary private vars in simhandler
MicaiahReid 4c0fa2a
Update src/chains/ethereum/ethereum/src/helpers/simulation-handler.ts
MicaiahReid cf598ea
update areAccessListsSame func
MicaiahReid ef995fb
fix issues from rebase
MicaiahReid 6c06986
change comment to jsdoc format
MicaiahReid 853b245
don't allow simhandler reinits
MicaiahReid 146e944
create new event context on each runcall
MicaiahReid 23d7449
make initial access list optional
MicaiahReid 10a7e26
Read private properties outside of loop
MicaiahReid 6452fd6
remove unneded null check
MicaiahReid 0d04975
remove check on extra keys to access list. require address/storageKeys
MicaiahReid c713c34
use NatSpec on sol comment
MicaiahReid 53964bb
add public/private types for CreateAccessListResult
MicaiahReid 997f384
use Quantity.toBuffer rather than Quantity.from
MicaiahReid 4c3fd71
move private var declaration outside loop
MicaiahReid a516792
add default value to initialAccessList
MicaiahReid abec37a
finish changing over types oopps
MicaiahReid 84e1d4a
finish fixing types smore
MicaiahReid 634fad1
rename simulation-handler file to simulations
MicaiahReid dd08726
fix import
MicaiahReid 9a6c5d4
add test for vm errors
MicaiahReid 6f9c1de
refactor simulations to not use a class
MicaiahReid 7e90660
fix api argLength
MicaiahReid 4c5e35c
Apply suggestions from code review
MicaiahReid a72ef15
use conditionals for cleaner codez
MicaiahReid 15da13d
strict equal comparison
MicaiahReid e12982d
clean precompiles assignment
MicaiahReid b8591ed
simplify logic/add jsdoc comment
MicaiahReid 65cb001
add jsdoc comment
MicaiahReid c5b3fbf
any to EVMResult
MicaiahReid 97b1202
import error
MicaiahReid 1990224
any to EVMResult
MicaiahReid af688ef
remove unneeded any
MicaiahReid 2dfcce1
export/import access list from ethereum-transaction
MicaiahReid b469e69
fix typo from review suggestion
MicaiahReid b308616
ues generator to access precompiles
MicaiahReid e5effc4
move revert for optimization, fix comment
MicaiahReid 19463a4
fix test types, remove unused value
MicaiahReid 25a921d
add eth_unsubscribe to test
MicaiahReid 9535a50
fix bug with access list creation
MicaiahReid 14b8886
implement tryGetValidatedAccessList
MicaiahReid d3bcbae
change test to increase code coverage
MicaiahReid 1c559b4
add tests for access list helpers
MicaiahReid 67ff6f3
fix simulation types
MicaiahReid 019d07b
remove BN.toBuffer usage for browser
MicaiahReid fe4bd90
remove unused eth_call
MicaiahReid 344c74a
unsubscribe from eth_subscribe in test
MicaiahReid 31afac2
fix typo
MicaiahReid 8752bb3
remove .only
MicaiahReid 85adefd
fix comment
MicaiahReid 3dea760
fix jsdoc variable names
MicaiahReid feec9a1
remove map.has
MicaiahReid 1d4fa55
use Address class rather than Data
MicaiahReid c9ab4bf
remove invalid comment
MicaiahReid 42a491c
manually warm/clear access list
MicaiahReid 51e68b3
return access list if max_iterations is hit
MicaiahReid a3f8e3e
Apply suggestions from code review
MicaiahReid b51a946
add jsdoc comment for createAccessList
MicaiahReid b217854
add eth_createAccessList to RPC methods list.
MicaiahReid f250218
fix transaction type in rpc-methods.md
MicaiahReid ea5444c
fix docs
MicaiahReid e7aef50
of => off in docs
MicaiahReid b52cbf9
chore: remove support for Node.js v12 (#3705)
davidmurdoch 3868ea1
chore: upgrade @ethereumjs/vm to v6.0.0 (#3656)
MicaiahReid a0c4e74
feat: add support for the `merge` hardfork (#3658)
davidmurdoch 21c250b
remove .only
MicaiahReid beaa1fe
test: correctly read stream in `eth_call` test (#3826)
MicaiahReid fdfcd02
put tags in alphabetical order
MicaiahReid 8b644c9
perf: use keccak from `@ganache/utils` where possible (#3820)
MicaiahReid c6dc462
chore: remove resolved todo (#3815)
MicaiahReid 05ce874
fix: simplify database implementation to allow removal of type assert…
MicaiahReid 2b0487c
refactor: rework `@ganache/ethereum-address` to extend `ethereumjs/ut…
MicaiahReid 6b7b45d
refactor: remove ts-ignores and fix types (#3778)
MicaiahReid 999adf7
chore: upgrade ethereumjs packages (#3821)
MicaiahReid 8016f7c
fix: implement review suggestions (#3912)
MicaiahReid fb5b796
Merge branch 'tech-debt-dudes' into feat/eth_createAccessList
MicaiahReid 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
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.
Would it be worthwhile having a test case for this?
Also, in this case, shouldn't we also return the best-so-far access-list?
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.
Good find, we definitely should return if we hit max iterations. I've written a test for this, but it takes significant time to hit that many iterations, so it's not feasible for a test :/
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 figured that might be the case 👍