mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
rm ecrecover override field
This commit is contained in:
parent
5d351c9f33
commit
63f4f6e5a8
2 changed files with 3 additions and 12 deletions
|
|
@ -26,7 +26,6 @@ import (
|
||||||
// Config are the configuration options for the Interpreter
|
// Config are the configuration options for the Interpreter
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Tracer EVMLogger // Opcode logger
|
Tracer EVMLogger // Opcode logger
|
||||||
DisableECRecover bool // Debug flag to remove ecrecover from precompiles. Used for call simulations.
|
|
||||||
NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls)
|
NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls)
|
||||||
EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages
|
EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages
|
||||||
ExtraEips []int // Additional EIPS that are to be enabled
|
ExtraEips []int // Additional EIPS that are to be enabled
|
||||||
|
|
|
||||||
|
|
@ -1182,7 +1182,6 @@ func (s *BlockChainAPI) Call(ctx context.Context, args TransactionArgs, blockNrO
|
||||||
type CallBatch struct {
|
type CallBatch struct {
|
||||||
BlockOverrides *BlockOverrides
|
BlockOverrides *BlockOverrides
|
||||||
StateOverrides *StateOverride
|
StateOverrides *StateOverride
|
||||||
ECRecoverOverride *hexutil.Bytes // Override bytecode for ecrecover precompile.
|
|
||||||
Calls []TransactionArgs
|
Calls []TransactionArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1271,10 +1270,6 @@ func (s *BlockChainAPI) MulticallV1(ctx context.Context, opts multicallOpts, blo
|
||||||
if err := block.StateOverrides.ApplyMulticall(state, precompiles); err != nil {
|
if err := block.StateOverrides.ApplyMulticall(state, precompiles); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// ECRecover replacement code will be fetched from statedb and executed as a normal EVM bytecode.
|
|
||||||
if block.ECRecoverOverride != nil {
|
|
||||||
state.SetCode(common.BytesToAddress([]byte{1}), *block.ECRecoverOverride)
|
|
||||||
}
|
|
||||||
hash := crypto.Keccak256Hash(blockContext.BlockNumber.Bytes())
|
hash := crypto.Keccak256Hash(blockContext.BlockNumber.Bytes())
|
||||||
results[bi] = blockResult{
|
results[bi] = blockResult{
|
||||||
Number: hexutil.Uint64(blockContext.BlockNumber.Uint64()),
|
Number: hexutil.Uint64(blockContext.BlockNumber.Uint64()),
|
||||||
|
|
@ -1291,9 +1286,6 @@ func (s *BlockChainAPI) MulticallV1(ctx context.Context, opts multicallOpts, blo
|
||||||
txhash := common.BigToHash(big.NewInt(int64(i)))
|
txhash := common.BigToHash(big.NewInt(int64(i)))
|
||||||
state.SetTxContext(txhash, i)
|
state.SetTxContext(txhash, i)
|
||||||
vmConfig := &vm.Config{NoBaseFee: true}
|
vmConfig := &vm.Config{NoBaseFee: true}
|
||||||
if block.ECRecoverOverride != nil {
|
|
||||||
vmConfig.DisableECRecover = true
|
|
||||||
}
|
|
||||||
if opts.TraceTransfers {
|
if opts.TraceTransfers {
|
||||||
vmConfig.Tracer = newTracer()
|
vmConfig.Tracer = newTracer()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue