server

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceHandler

func NewServiceHandler(
	store store.Store,
	headerStore goheader.Store[*types.SignedHeader],
	dataStore goheader.Store[*types.Data],
	peerManager p2p.P2PRPC,
	proposerAddress []byte,
	logger zerolog.Logger,
	config config.Config,
	bestKnown BestKnownHeightProvider,
	raftNode RaftNodeSource,
) (http.Handler, error)

NewServiceHandler creates a new HTTP handler for Store, P2P and Config services

func RegisterCustomHTTPEndpoints

func RegisterCustomHTTPEndpoints(mux *http.ServeMux, s store.Store, pm p2p.P2PRPC, cfg config.Config, bestKnownHeightProvider BestKnownHeightProvider, logger zerolog.Logger, raftNode RaftNodeSource)

RegisterCustomHTTPEndpoints registers custom HTTP handlers on the mux.

func SetDAVisualizationServer

func SetDAVisualizationServer(server *DAVisualizationServer)

SetDAVisualizationServer sets the global DA visualization server instance

func WithTracingConfigServer

func WithTracingConfigServer(inner v1connect.ConfigServiceHandler) v1connect.ConfigServiceHandler

WithTracingConfigServer decorates the provided config service handler with tracing spans.

func WithTracingP2PServer

func WithTracingP2PServer(inner v1connect.P2PServiceHandler) v1connect.P2PServiceHandler

WithTracingP2PServer decorates the provided P2P service handler with tracing spans.

func WithTracingStoreServer

func WithTracingStoreServer(inner v1connect.StoreServiceHandler) v1connect.StoreServiceHandler

WithTracingStoreServer decorates the provided store service handler with tracing spans.

Types

type BestKnownHeightProvider

type BestKnownHeightProvider func() uint64

BestKnownHeightProvider returns the best-known network height observed by the node

type ConfigServer

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

func NewConfigServer

func NewConfigServer(config config.Config, proposerAddress []byte, logger zerolog.Logger) *ConfigServer

func (*ConfigServer) GetNamespace

func (*ConfigServer) GetSignerInfo

type DASubmissionInfo

type DASubmissionInfo struct {
	ID         string    `json:"id"`
	Height     uint64    `json:"height"`
	BlobSize   uint64    `json:"blob_size"`
	Timestamp  time.Time `json:"timestamp"`
	GasPrice   float64   `json:"gas_price"`
	StatusCode string    `json:"status_code"`
	Message    string    `json:"message,omitempty"`
	NumBlobs   uint64    `json:"num_blobs"`
	BlobIDs    []string  `json:"blob_ids,omitempty"`
	Namespace  string    `json:"namespace,omitempty"`
}

DASubmissionInfo represents information about a DA submission

type DAVisualizationServer

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

DAVisualizationServer provides DA layer visualization endpoints

func GetDAVisualizationServer

func GetDAVisualizationServer() *DAVisualizationServer

GetDAVisualizationServer returns the global DA visualization server instance

func NewDAVisualizationServer

func NewDAVisualizationServer(da DAVizClient, logger zerolog.Logger, isAggregator bool) *DAVisualizationServer

NewDAVisualizationServer creates a new DA visualization server

func (*DAVisualizationServer) RecordSubmission

func (s *DAVisualizationServer) RecordSubmission(result *datypes.ResultSubmit, gasPrice float64, numBlobs uint64, namespace []byte)

RecordSubmission records a DA submission for visualization Only keeps the last 100 submissions in memory for the dashboard display

type DAVizClient

type DAVizClient interface {
	Get(ctx context.Context, ids []datypes.ID, namespace []byte) ([]datypes.Blob, error)
}

DAVizClient is the minimal DA surface needed by the visualization server.

type P2PServer

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

P2PServer implements the P2PService defined in the proto file

func NewP2PServer

func NewP2PServer(peerManager p2p.P2PRPC) *P2PServer

NewP2PServer creates a new P2PServer instance

func (*P2PServer) GetNetInfo

GetNetInfo implements the GetNetInfo RPC method

func (*P2PServer) GetPeerInfo

GetPeerInfo implements the GetPeerInfo RPC method

type RaftNodeSource

type RaftNodeSource interface {
	IsLeader() bool
	NodeID() string
}

type StoreServer

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

StoreServer implements the StoreService defined in the proto file

func NewStoreServer

func NewStoreServer(
	store store.Store,
	headerStore goheader.Store[*types.SignedHeader],
	dataStore goheader.Store[*types.Data],
	logger zerolog.Logger,
) *StoreServer

NewStoreServer creates a new StoreServer instance

func (*StoreServer) GetBlock

GetBlock implements the GetBlock RPC method

func (*StoreServer) GetGenesisDaHeight

GetGenesisDaHeight implements the GetGenesisDaHeight RPC method

func (*StoreServer) GetMetadata

GetMetadata implements the GetMetadata RPC method

func (*StoreServer) GetP2PStoreInfo

GetP2PStoreInfo implements the GetP2PStoreInfo RPC method

func (*StoreServer) GetState

GetState implements the GetState RPC method

Jump to

Keyboard shortcuts

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