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 ¶
var ErrNoAuthorization = errors.New("no governance signatures or safe approvals found for list")
ErrNoAuthorization marks an activated list with no forwardable authorization evidence: neither direct governance signatures nor a verifiable Safe approval. A governance-configuration condition, not an infra fault — callers classify it apart from other build failures.
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; otherwise ErrNoAuthorization is returned. 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.