execution

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 2 Imported by: 6

Documentation

Overview

Package execution defines the service to execute a step in a validation batch.

Documentation Last Review: 08.10.2020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// Accepted is the success state of the transaction.
	Accepted bool

	// Message gives a change to the execution to explain why a transaction has
	// failed.
	Message string
}

Result is the result of a transaction execution.

type Service

type Service interface {
	// Execute must apply the transaction to the trie and return the result of
	// it.
	Execute(snap store.Snapshot, step Step) (Result, error)
}

Service is the execution service that defines the primitives to execute a transaction.

type Step

type Step struct {
	Previous []txn.Transaction
	Current  txn.Transaction
}

Step is a context of execution. It allows for example a smart contract to execute a given transaction knowing what previous transactions have already been accepted and executed in a block.

Directories

Path Synopsis
Package native implements an execution service to run native smart contracts.
Package native implements an execution service to run native smart contracts.

Jump to

Keyboard shortcuts

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