machinepath

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package machinepath assembles SET_MACHINE_PATH_LIST direct actions for the TEE node from governance-signed machine path lists recorded on chain by the MachinePathManager facet and indexed by the C-chain indexer.

Index

Constants

This section is empty.

Variables

View Source
var (
	// MachinePathListSignedEventSel is the topic0 of the MachinePathManager
	// MachinePathListSigned event, emitted once a list reaches the on-chain
	// governance threshold.
	MachinePathListSignedEventSel common.Hash
)

Functions

func LatestSignedList

func LatestSignedList(
	ctx context.Context,
	db *gorm.DB,
	managerAddress common.Address,
	extensionID common.Hash,
	afterNonce uint64,
) (nonce uint64, toBlock uint64, found bool, err error)

LatestSignedList returns the highest nonce among MachinePathListSigned events for extensionID that is strictly greater than afterNonce, together with the block in which that list was signed. found is false when no newer signed list exists.

func SetMachinePathListAction

func SetMachinePathListAction(
	ctx context.Context,
	db *gorm.DB,
	managerAddress common.Address,
	gov types.Governance,
	extensionID common.Hash,
	chainID uint64,
	nonce uint64,
	toBlock uint64,
) (*types.Action, error)

SetMachinePathListAction builds the SET_MACHINE_PATH_LIST direct action for the governance-approved list identified by (extensionID, nonce). It reconstructs the canonical path order from MachinePathsAdded events and collects the governance authorization for it: the governance signatures from successful signMachinePathList transactions up to toBlock, and — when the node's governance is Safe-backed (gov.Safe nonzero) — one locally pre-verified approveMachinePathList Safe transaction. At least one form must be found. The TEE node re-verifies either against its own governance set and threshold; gov is that same snapshot, as reported by the node.

Types

This section is empty.

Jump to

Keyboard shortcuts

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