node

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

View Source
const AvsName = "chainbase_avs"
View Source
const SemVer = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type CoordinatorRpcClient

type CoordinatorRpcClient struct {
	// contains filtered or unexported fields
}

func NewCoordinatorRpcClient

func NewCoordinatorRpcClient(coordinatorIpPortAddr string, logger logging.Logger, metrics metrics.Metrics) (*CoordinatorRpcClient, error)

func (*CoordinatorRpcClient) SendSignedTaskResponseToCoordinator

func (c *CoordinatorRpcClient) SendSignedTaskResponseToCoordinator(signedTaskResponse *coordinatorpb.SignedTaskResponseRequest)

SendSignedTaskResponseToCoordinator sends a signed task response to the coordinator. it is meant to be ran inside a go thread, so doesn't return anything. this is because sending the signed task response to the coordinator is time sensitive, so there is no point in retrying if it fails for a few times. Currently hardcoded to retry sending the signed task response 5 times, waiting 2 seconds in between each attempt.

type CoordinatorRpcClienter

type CoordinatorRpcClienter interface {
	SendSignedTaskResponseToCoordinator(signedTaskResponse *coordinatorpb.SignedTaskResponseRequest)
}

type ManuscriptNode

type ManuscriptNode struct {
	nodepb.UnimplementedManuscriptNodeServiceServer

	// receive task response from ProcessNewTaskCreatedLog
	TaskResponseChan chan *bindings.IChainbaseServiceManagerTaskResponse
	// contains filtered or unexported fields
}

func NewNodeFromConfig

func NewNodeFromConfig(c types.NodeConfig, cliCommand bool) (*ManuscriptNode, error)

func (*ManuscriptNode) CancelTaskJob

func (n *ManuscriptNode) CancelTaskJob(taskIndex uint32)

func (*ManuscriptNode) DeregisterOperatorWithAvs

func (n *ManuscriptNode) DeregisterOperatorWithAvs() error

DeregisterOperatorWithAvs deregister operator with avs

func (*ManuscriptNode) ExecuteTask

func (n *ManuscriptNode) ExecuteTask(taskIndex uint32, taskDetails *core.TaskDetails) error

func (*ManuscriptNode) GetOperatorInfo added in v0.2.6

func (*ManuscriptNode) PrintOperatorStatus

func (n *ManuscriptNode) PrintOperatorStatus() error

func (*ManuscriptNode) ProcessNewTaskCreatedLog

func (n *ManuscriptNode) ProcessNewTaskCreatedLog(newTaskCreatedLog *bindings.ChainbaseServiceManagerNewTaskCreated)

ProcessNewTaskCreatedLog Takes a NewTaskCreatedLog struct as input and returns a TaskResponseHeader struct to TaskResponseChan channel.

func (*ManuscriptNode) QueryTaskResponse

func (n *ManuscriptNode) QueryTaskResponse(taskIndex uint32) (string, error)

func (*ManuscriptNode) ReceiveNewTask

func (*ManuscriptNode) RegisterOperatorWithAvs

func (n *ManuscriptNode) RegisterOperatorWithAvs(
	operatorEcdsaKeyPair *ecdsa.PrivateKey,
) error

RegisterOperatorWithAvs Registration specific functions

func (*ManuscriptNode) RegisterOperatorWithEigenlayer

func (n *ManuscriptNode) RegisterOperatorWithEigenlayer() error

func (*ManuscriptNode) StakeIntoStaking added in v0.2.9

func (n *ManuscriptNode) StakeIntoStaking(amount *big.Int) error

func (*ManuscriptNode) Start

func (n *ManuscriptNode) Start(ctx context.Context) error

func (*ManuscriptNode) TestManuscriptNodeTask

func (n *ManuscriptNode) TestManuscriptNodeTask() error

TestManuscriptNodeTask run a test task on manuscript node

func (*ManuscriptNode) UnstakeFromStaking added in v0.2.9

func (n *ManuscriptNode) UnstakeFromStaking() error

func (*ManuscriptNode) UpdateOperatorSocket

func (n *ManuscriptNode) UpdateOperatorSocket() error

UpdateOperatorSocket update operator socket

func (*ManuscriptNode) WaitTaskCompletion

func (n *ManuscriptNode) WaitTaskCompletion(taskIndex uint32, taskDetails *core.TaskDetails) error

func (*ManuscriptNode) WithdrawFromStaking added in v0.2.9

func (n *ManuscriptNode) WithdrawFromStaking() error

type OperatorStatus

type OperatorStatus struct {
	EcdsaAddress string
	// pubkey compendium related
	PubkeysRegistered bool
	G1Pubkey          string
	G2Pubkey          string
	// avs related
	RegisteredWithAvs bool
	OperatorId        string
}

OperatorStatus print status of operator

type ResultContent

type ResultContent struct {
	// contains filtered or unexported fields
}

ResultContent implements the Content interface provided by merkletree and represents the content stored in the tree.

func (ResultContent) CalculateHash

func (r ResultContent) CalculateHash() ([]byte, error)

CalculateHash hashes the values of a ResultContent

func (ResultContent) Equals

func (r ResultContent) Equals(other merkletree.Content) (bool, error)

Equals tests for equality of two Contents

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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