blockbuilder

package
v0.0.1-rc-1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyExtrinsic

func ApplyExtrinsic(dataPtr int32, dataLen int32) int64

ApplyExtrinsic applies an extrinsic to a particular block. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded unchecked extrinsic. Returns a pointer-size of the SCALE-encoded result, which specifies if this extrinsic is included in this block or not. [Specification](https://spec.polkadot.network/chap-runtime-api#sect-rte-apply-extrinsic)

func CheckInherents

func CheckInherents(dataPtr int32, dataLen int32) int64

CheckInherents checks the inherents are valid. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded inherent data. Returns a pointer-size of the SCALE-encoded result, specifying if all inherents are valid. [Specification](https://spec.polkadot.network/#id-blockbuilder_check_inherents)

func FinalizeBlock

func FinalizeBlock() int64

FinalizeBlock finalizes the state changes for the current block. Returns a pointer-size of the SCALE-encoded header for this block. [Specification](https://spec.polkadot.network/#defn-rt-blockbuilder-finalize-block)

func InherentExtrinsics

func InherentExtrinsics(dataPtr int32, dataLen int32) int64

InherentExtrinsics generates inherent extrinsics. Inherent data varies depending on chain configuration. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded inherent data. Returns a pointer-size of the SCALE-encoded timestamp extrinsic. [Specification](https://spec.polkadot.network/#defn-rt-builder-inherent-extrinsics)

Types

type BlockBuilder

type BlockBuilder interface {
	ApplyExtrinsic(dataPtr int32, dataLen int32) int64
	FinalizeBlock(dataPtr int32, dataLen int32) int64
	InherentExtrinisics(dataPtr int32, dataLen int32) int64
	CheckInherents(dataPtr int32, dataLen int32) int64
	RandomSeed(dataPtr int32, dataLen int32) int64
}

Jump to

Keyboard shortcuts

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