evm

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

README

Obscuro executes EVM compatible transactions on top of a database that implements the Go-Ethereum interfaces.

The entry point is the evm_facade.

The approach we took was to depend on Go-Ethereum, mock out all consensus related dependencies, and just use the transaction execution functionality.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PoolAddress = common.HexToAddress("0x0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A")

PoolAddress - address of the pool where the gas will go todo (#627) - this has to be reworked when the gas/fee work starts

Functions

func ExecuteObsCall added in v0.12.0

func ExecuteObsCall(
	msg *types.Message,
	s *state.StateDB,
	header *common.BatchHeader,
	storage storage.Storage,
	chainConfig *params.ChainConfig,
	logger gethlog.Logger,
) (*gethcore.ExecutionResult, error)

ExecuteObsCall - executes the eth_call call

func ExecuteTransactions

func ExecuteTransactions(
	txs []*common.L2Tx,
	s *state.StateDB,
	header *common.BatchHeader,
	storage storage.Storage,
	chainConfig *params.ChainConfig,
	fromTxIndex int,
	logger gethlog.Logger,
) map[common.TxHash]interface{}

ExecuteTransactions header - the header of the rollup where this transaction will be included fromTxIndex - for the receipts and events, the evm needs to know for each transaction the order in which it was executed in the block.

Types

type ObscuroChainContext

type ObscuroChainContext struct {
	// contains filtered or unexported fields
}

ObscuroChainContext - basic implementation of the ChainContext needed for the EVM integration

func NewObscuroChainContext added in v0.12.0

func NewObscuroChainContext(storage storage.Storage, logger gethlog.Logger) *ObscuroChainContext

NewObscuroChainContext returns a new instance of the ObscuroChainContext given a storage ( and logger )

func (*ObscuroChainContext) Engine

func (occ *ObscuroChainContext) Engine() consensus.Engine

func (*ObscuroChainContext) GetHeader

func (occ *ObscuroChainContext) GetHeader(hash common.Hash, _ uint64) *types.Header

type ObscuroNoOpConsensusEngine

type ObscuroNoOpConsensusEngine struct {
	// contains filtered or unexported fields
}

ObscuroNoOpConsensusEngine - implements the geth consensus.Engine, but doesn't do anything This is needed for running evm transactions

func (*ObscuroNoOpConsensusEngine) APIs

func (*ObscuroNoOpConsensusEngine) Author

Author is used to determine where to send the gas collected from the fees.

func (*ObscuroNoOpConsensusEngine) CalcDifficulty

func (*ObscuroNoOpConsensusEngine) Close

func (e *ObscuroNoOpConsensusEngine) Close() error

func (*ObscuroNoOpConsensusEngine) Finalize

func (*ObscuroNoOpConsensusEngine) FinalizeAndAssemble

func (*ObscuroNoOpConsensusEngine) Prepare

func (*ObscuroNoOpConsensusEngine) Seal

func (e *ObscuroNoOpConsensusEngine) Seal(_ consensus.ChainHeaderReader, _ *types.Block, _ chan<- *types.Block, _ <-chan struct{}) error

func (*ObscuroNoOpConsensusEngine) SealHash

func (*ObscuroNoOpConsensusEngine) VerifyHeader

func (*ObscuroNoOpConsensusEngine) VerifyHeaders

func (e *ObscuroNoOpConsensusEngine) VerifyHeaders(_ consensus.ChainHeaderReader, _ []*types.Header, _ []bool) (chan<- struct{}, <-chan error)

func (*ObscuroNoOpConsensusEngine) VerifyUncles

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL