server

package
v1.0.0-beta.10 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 27 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,
) (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)

RegisterCustomHTTPEndpoints registers custom HTTP handlers on the mux.

func SetDAVisualizationServer

func SetDAVisualizationServer(server *DAVisualizationServer)

SetDAVisualizationServer sets the global DA visualization server instance

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"`
}

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 coreda.DA, logger zerolog.Logger, isAggregator bool) *DAVisualizationServer

NewDAVisualizationServer creates a new DA visualization server

func (*DAVisualizationServer) RecordSubmission

func (s *DAVisualizationServer) RecordSubmission(result *coreda.ResultSubmit, gasPrice float64, numBlobs uint64)

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

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 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