-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
internal/ethapi: eth_simulateV1 #27720
Merged
Merged
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
62d33d5
internal/ethapi: add multicall method
s1na 80df50d
add test case for logs
s1na c3f1494
add ecrecover override
s1na a219206
forgot to commit other files
s1na 0285f81
dont abort on call validation error
s1na c301ce4
add state buildup test
s1na 922f72c
test block override defaults to base
s1na 80bcb16
check block nums are in order
s1na 4478f20
add method to web3ext
s1na 2ae2fe5
add transfers
s1na 0aaaf34
forgot the tracer
s1na 2db37b9
minor
s1na 04965a3
fix marshaling of empty values
s1na c78330d
rename to multicallV1
s1na 8fff7fd
return block info except blockhash
s1na 637acc5
Finalise state after call, add selfdestruct test
s1na d23eb89
Add status field to call result
s1na a7af5a9
wrap params into an object
s1na 98882fc
blockhash = keccak(blockNum)
s1na b865824
name tests
s1na da3102e
persist precompiles in evm
s1na 6a2c96c
add storage clearing test case for eth_call
s1na b3efbad
implement precompile override and moveTo feature
s1na 9aed710
copy storage over in MoveTo
s1na 2c25ab6
add todo comments
s1na 5d351c9
add testcase moveto precompile
s1na 63f4f6e
rm ecrecover override field
s1na 80506ea
rename blocks to blockStateCalls
s1na fd786c0
rename to moveToAddress
s1na 6845b5e
add optional validation of txes
s1na c5e33fa
test coinbase
s1na d4e332e
fix storage clearing
s1na b0e7869
Rename block override field names
s1na 56b4402
auto-set and validate block number and timestamp
s1na 7e17e4c
implement transfers as logs
s1na fe3bb83
add prevrandao to result
s1na 906d93a
clear logs on call fail
s1na 8e02675
add txhash to logs
s1na a0d2706
moveTo only for precompiles
s1na ed4cbaf
resolve merge conflicts
s1na 3231291
optional block param
s1na 3df0fec
rename return to returnData
s1na 760f5e5
fix tx gaslimit and type default
s1na b3996e4
dont set defaults for calls
s1na 100c593
fix crasher
s1na 523e3d2
cover it in test case
s1na d5c0ff4
add error codes to calls
s1na 45ba37e
compute block hash based on header
s1na 973116c
repair logs
s1na a5ffd9a
serve blockhash requests
s1na cc1158a
possibly fix crasher
s1na 2690445
fix block hash cache
s1na d1ce690
move multicall logic to struct
s1na e230258
move precompile list to own func
s1na c02d29d
limit number of blocks
s1na e4eb56a
add error code for blocks length check
s1na ed37821
rename types
s1na f5ac039
fix error codes
s1na 23ef9c6
minor fix
s1na 6da9202
Fix extra delegatecall value log
s1na 12d59b5
update transfer log address
s1na 1616559
resolve merge conflicts
s1na 7fff1c4
Add cancun to precompiled contracts
s1na bf78094
safer api for getting active precompiles
s1na c594f74
fix godoc comment
s1na 11133e0
fix precompileMove in eth_call
s1na ad24d2e
rename block overrides receiver name
s1na c77da8c
rename validate param
s1na 3d29c1f
copy header prior to applying overrides
s1na 31e2cc9
legacy tx if gasPrice provided
s1na 5ed9958
resolve merge conflict
s1na 2b1cf22
fix graphql test
s1na fd0f626
fix rpcgascap for ethclient tests
s1na 1e7b497
fix block overrides in gethclient
s1na 589107b
rename to blobGasPrice
s1na 89df0e3
rename method to eth_simulateV1
s1na 1a28a17
move call sanitization to own method
s1na 115117c
move tx type detection check
s1na df14718
compute receipts
s1na ae33566
finish renaming to simulate
s1na 12d7dd0
fix empty tx, receipts hash
s1na 214e209
minor rename:
s1na af155c1
move block processing logic to func
s1na c73c10a
merge master
s1na 489ef43
fix lint errs
s1na 0c0b13d
rename to blobBaseFee
s1na 86ce924
revert setDefaults changes, skip extra validations:
s1na 4a017ff
rm obsolete test
s1na 49bf257
resolve merge conflict
s1na 9fa1556
fix makeHeaders using unpopulated parent
s1na 7177f22
check gas fee in validation mode
s1na 3daabda
add empty withdrawals obj
s1na c08ba25
resolve merge conflict
s1na 81e7fe1
fix baseFee, add blobGasUsed and excessBlobGas to result
s1na 8698221
default timestamp bump to 12
s1na 48ca188
generate empty blocks for gaps
s1na 81e065c
fix block hashes
s1na 263cfd7
compute basefee prior to execution
s1na e382782
return full header
s1na 9139685
add fullTx option
s1na 569a2d7
move out base fee lowering to api code
s1na d7cd3a0
missed one file
s1na 399812a
set base fee to 0 in non-validating mode
s1na 1c154e9
check base fee in test block results
s1na 638d82b
resolve merge conflict
s1na ac690f0
fix chainId default
s1na a9842e5
add td
s1na a6f80c7
add data on reverts
s1na 5db0106
fix
s1na 4c325ba
skip EoA check in validation mode
s1na 102aa80
resolve merge conflict
s1na 172ed02
refactors
s1na ddba7dd
rm stale todos
s1na c0d5dfb
resolve merge conflict
s1na e3cd999
default timestamp bump 1 sec
s1na 33400fb
review comments, pt. 1
s1na 5f0fafd
fix precompile moveTo
s1na 73ff7e5
move timestamp sanitization
s1na 5d8c058
Clean up sanitizeCall
s1na edf9e37
Fix lint errors
s1na e7bac20
add test comments
s1na 9a963dc
add license to simulate_test
s1na 7198fc1
update test to use fixed address
s1na 6ec5083
Merge branch 'master' into multicall
s1na 791719a
core/vm: use maps.Clone
holiman c216ef5
internal: refactored ToTransaction of transaction args
holiman 2415110
Merge branch 'master' into multicall
s1na 6205806
internal/ethapi: simplify
holiman 098a448
internal/ethapi: abort when context is cancelled
holiman 9da10f9
Merge branch 'master' into multicall
holiman f25fcd3
internal/ethapi: fix merge-conflicts
holiman 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
rename to blobGasPrice
- Loading branch information
commit 589107b6f5172b3e380670223bc18af94093e538
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1012,9 +1012,7 @@ type BlockOverrides struct { | |
FeeRecipient *common.Address | ||
PrevRandao *common.Hash | ||
BaseFeePerGas *hexutil.Big | ||
// TODO: is this right? should we override this since it doesn't exist | ||
// in header or excessBlobGas which is used to calculate the base fee? | ||
BlobBaseFee *hexutil.Big | ||
BlobGasPrice *hexutil.Big | ||
} | ||
|
||
// Apply overrides the given header fields into the given block context. | ||
|
@@ -1043,13 +1041,15 @@ func (o *BlockOverrides) Apply(blockCtx *vm.BlockContext) { | |
if o.BaseFeePerGas != nil { | ||
blockCtx.BaseFee = o.BaseFeePerGas.ToInt() | ||
} | ||
if o.BlobBaseFee != nil { | ||
blockCtx.BlobBaseFee = o.BlobBaseFee.ToInt() | ||
if o.BlobGasPrice != nil { | ||
blockCtx.BlobBaseFee = o.BlobGasPrice.ToInt() | ||
} | ||
} | ||
|
||
// MakeHeader returns a new header object with the overridden | ||
// fields. | ||
// Note: MakeHeader ignores blobGasPrice if set. That's because | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BlobBaseFee? |
||
// header has no such field. | ||
func (o *BlockOverrides) MakeHeader(header *types.Header) *types.Header { | ||
if o == nil { | ||
return header | ||
|
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.
There is another field
ExcessBlobGas
, perhaps we also want to override it?