You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
func (stStateTransition) newEVM(ctx sdk.Context, csdb*CommitStateDB, gasLimituint64, gasPrice*big.Int, configChainConfig) *vm.EVM {
// Create context for evmcontext:= vm.Context{
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
GetHash: FUNCTION_GET_HASH,
Origin: st.Sender,
Coinbase: common.Address{}, // there's no benefitiary since we're not miningBlockNumber: big.NewInt(ctx.BlockHeight()),
Time: big.NewInt(ctx.BlockHeader().Time.Unix()),
Difficulty: big.NewInt(0), // unused. Only required in PoW contextGasLimit: gasLimit,
GasPrice: gasPrice,
}
returnvm.NewEVM(context, csdb, config.EthereumConfig(st.ChainID), vm.Config{})
}
Actual behavior: [What actually happened]
function newEVM
func (stStateTransition) newEVM(ctx sdk.Context, csdb*CommitStateDB, gasLimituint64, gasPrice*big.Int, configChainConfig) *vm.EVM {
// Create context for evmcontext:= vm.Context{
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
Origin: st.Sender,
Coinbase: common.Address{}, // there's no benefitiary since we're not miningBlockNumber: big.NewInt(ctx.BlockHeight()),
Time: big.NewInt(ctx.BlockHeader().Time.Unix()),
Difficulty: big.NewInt(0), // unused. Only required in PoW contextGasLimit: gasLimit,
GasPrice: gasPrice,
}
returnvm.NewEVM(context, csdb, config.EthereumConfig(st.ChainID), vm.Config{})
}
Additional info: [Include gist of relevant config, logs, etc.]
the struct "vm.Context" have a member variable called "GetHash"
// Context provides the EVM with auxiliary information. Once provided// it shouldn't be modified.typeContextstruct {
// CanTransfer returns whether the account contains// sufficient ether to transfer the valueCanTransferCanTransferFunc// Transfer transfers ether from one account to the otherTransferTransferFunc// GetHash returns the hash corresponding to nGetHashGetHashFunc// Message informationOrigin common.Address// Provides information for ORIGINGasPrice*big.Int// Provides information for GASPRICE// Block informationCoinbase common.Address// Provides information for COINBASEGasLimituint64// Provides information for GASLIMITBlockNumber*big.Int// Provides information for NUMBERTime*big.Int// Provides information for TIMEDifficulty*big.Int// Provides information for DIFFICULTY
}
function "GetHash" from "vm.Context" is used in opCode of evm
Hi @summerpro, I have a WIP pull request here: #620. I still need to write a few more tests but it should be ready for an early review if you want to take a look. Please make comments if you think something is not clear enough
Hi @summerpro, I have a WIP pull request here: #620. I still need to write a few more tests but it should be ready for an early review if you want to take a look. Please make comments if you think something is not clear enough
System info:
Expected behavior: [What you expected to happen]
Actual behavior: [What actually happened]
Additional info: [Include gist of relevant config, logs, etc.]
The text was updated successfully, but these errors were encountered: