info

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTeeID added in v0.0.18

func ParseTeeID(tir *types.TeeInfoResponse) (common.Address, error)

ParseTeeID returns the TEE identity: the address derived from the TEE public key in the response.

Types

type Service

type Service struct {
	Latest      *types.TeeInfoResponse
	LastUpdated time.Time

	sync.RWMutex
	// contains filtered or unexported fields
}

Service holds the latest TEE info and manages updating it.

When you are accessing Latest or LastUpdate mutex should be used.

func NewService

NewService creates an info Service that periodically refreshes TEE info from the tee-node and, when ac.Enabled, verifies the response's attestation. m may be nil or disabled. LastUpdated starts at construction time so info_service_delay_seconds reports real elapsed time from boot instead of a multi-decade spike before the first refresh.

func (*Service) FetchInfo

func (s *Service) FetchInfo(ctx context.Context, timeout time.Duration) (*types.TeeInfoResponse, common.Hash, error)

FetchInfo updates info and returns the update along with the challenge that was sent. Callers verify TeeInfo.Challenge against the returned challenge to confirm the response answers their request.

func (*Service) LastAppliedPolicyID added in v0.0.19

func (s *Service) LastAppliedPolicyID() uint32

LastAppliedPolicyID returns the reward epoch ID of the signing policy the tee-node most recently reported as active.

func (*Service) LastAttestationErr added in v0.0.18

func (s *Service) LastAttestationErr() error

LastAttestationErr returns the sticky attestation verification error, or nil if no failure has occurred.

func (*Service) LastGovernanceHash added in v0.0.21

func (s *Service) LastGovernanceHash() common.Hash

LastGovernanceHash returns the governance hash the tee-node most recently reported in its machine data.

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

Run starts the periodic update of TEE info.

Jump to

Keyboard shortcuts

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