security

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DVSReactor

type DVSReactor struct {
	ProxyApp proxy.AppConns
	// contains filtered or unexported fields
}

func CreateDVSReactor

func CreateDVSReactor(
	config config.PellConfig,
	proxyApp proxy.AppConns,
	aggregator aggtypes.Aggregator,
	storeDir string,
	dvsRequestIndexer requestindex.DvsRequestIndexer,
	db dbm.DB,
	logger log.Logger,
) (DVSReactor, error)

func (*DVSReactor) OnQuery

func (dvs *DVSReactor) OnQuery(key []byte) ([]byte, []byte, error)

func (*DVSReactor) OnRequest

func (dvs *DVSReactor) OnRequest(request avsitypes.DVSRequest) (*avsitypes.DVSRequestResult, error)

func (*DVSReactor) SaveDVSRequestResult

func (dvs *DVSReactor) SaveDVSRequestResult(res *avsitypes.DVSRequestResult, first bool) error

func (*DVSReactor) SignMessage

func (dvs *DVSReactor) SignMessage(message []byte) (*bls.Signature, error)

type DVSReqResponse

type DVSReqResponse struct {
	Request  avsitypes.DVSRequest
	Response *aggregator.ValidatedResponse
	Receipt  *ResponsePostRequest
}

type DVSReqStore

type DVSReqStore interface {
	SaveReq(req *DVSReqResponse) error
	GetReq(id string) (*RequestProcessRequest, error)
}

type DVSState

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

func NewDVSState

func NewDVSState(cfg *config.PellConfig, dvsReqStore DVSReqStore, storeDir string) (*DVSState, error)

NewDVSState creates a new DVSState instance

func (*DVSState) SaveReq

func (dvsState *DVSState) SaveReq(req *DVSReqResponse) error

type PrivValidator

type PrivValidator interface {
	GetKeyPair() *bls.KeyPair
	SignMessage(message []byte) (*bls.Signature, error)
}

type RequestPostRequest

type RequestPostRequest struct {
	Response aggregator.ValidatedResponse
}

type RequestProcessRequest

type RequestProcessRequest struct {
	Request avsitypes.DVSRequest
}

type ResponsePostRequest

type ResponsePostRequest struct {
}

type ResponseProcessRequest

type ResponseProcessRequest struct {
	Response       []byte
	ResponseDigest []byte
}

type Store

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

Store represents the persistent storage for DVS requests

func NewStore

func NewStore(dir string) (*Store, error)

NewStore creates a new Store instance

func (*Store) GetReq

func (s *Store) GetReq(id string) (*RequestProcessRequest, error)

func (*Store) SaveReq

func (s *Store) SaveReq(req *DVSReqResponse) error

Jump to

Keyboard shortcuts

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