connectors

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproximateGasLimit

func ApproximateGasLimit(gasUsed uint64) uint64

func GetFeeAmount

func GetFeeAmount(gasLimit uint64) uint64

Types

type BroadcastConnector

type BroadcastConnector struct {
	*SubmitConnector
	// contains filtered or unexported fields
}

BroadcastConnector uses SubmitConnector to broadcast request to all parties, except of self. Is request submission fails, there will be ONE retry after last party submission.

func NewBroadcastConnector

func NewBroadcastConnector(sessionType types.SessionType, parties []*rarimo.Party, sc *secret.TssSecret, log *logan.Entry) *BroadcastConnector

func (*BroadcastConnector) SubmitAll deprecated

func (b *BroadcastConnector) SubmitAll(ctx context.Context, request *types.MsgSubmitRequest)

Deprecated: SubmitAll is deprecated. Use SubmitAllWithReport instead

func (*BroadcastConnector) SubmitAllWithReport

func (b *BroadcastConnector) SubmitAllWithReport(ctx context.Context, coreCon *CoreConnector, request *types.MsgSubmitRequest)

func (*BroadcastConnector) SubmitTo deprecated

func (b *BroadcastConnector) SubmitTo(ctx context.Context, request *types.MsgSubmitRequest, parties ...*rarimo.Party) []*rarimo.Party

Deprecated: SubmitTo is deprecated. Use SubmitToWithReport instead

func (*BroadcastConnector) SubmitToWithReport

func (b *BroadcastConnector) SubmitToWithReport(ctx context.Context, coreCon *CoreConnector, request *types.MsgSubmitRequest, parties ...*rarimo.Party) []*rarimo.Party

type CoreConnector

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

CoreConnector submits signed confirmations to the rarimo core

func NewCoreConnector

func NewCoreConnector(cli *grpc.ClientConn, secret *secret.TssSecret, log *logan.Entry, params *config.ChainParams) *CoreConnector

func (*CoreConnector) Submit

func (c *CoreConnector) Submit(msgs ...sdk.Msg) error

func (*CoreConnector) SubmitChangeSet

func (c *CoreConnector) SubmitChangeSet(set []*rarimo.Party, sig string) error

func (*CoreConnector) SubmitConfirmation

func (c *CoreConnector) SubmitConfirmation(indexes []string, root string, signature string) error

func (*CoreConnector) SubmitReport

func (c *CoreConnector) SubmitReport(sessionId uint64, typ rarimo.ViolationType, offender string, message string) error

type SubmitConnector

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

SubmitConnector submits signed requests to the party. Also holds buffer of connections to reduce submitting time.

func NewSubmitConnector

func NewSubmitConnector(secret *secret.TssSecret) *SubmitConnector

func (*SubmitConnector) Submit

Jump to

Keyboard shortcuts

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