executor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdateCachedValidatorsInterval = 1 * time.Minute
	QueryHeartbeatIntervalInterval = 120 * time.Minute // blockchain challenge heartbeat interval only changed by governance

	VotePoolBroadcastMethodName   = "broadcast_vote"
	VotePoolBroadcastParameterKey = "vote"

	VotePoolQueryMethodName         = "query_vote"
	VotePoolQueryParameterEventType = "event_type"
	VotePoolQueryParameterEventHash = "event_hash"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	BlsPrivKey []byte
	BlsPubKey  []byte
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(cfg *config.Config) *Executor

func (*Executor) AttestChallenge

func (e *Executor) AttestChallenge(submitterAddress, challengerAddress, spOperatorAddress string, challengeId uint64, objectId sdkmath.Uint, voteResult challengetypes.VoteResult, voteValidatorSet []uint64, VoteAggSignature []byte, txOption sdktypes.TxOption) (bool, error)

func (*Executor) BroadcastVote

func (e *Executor) BroadcastVote(v *votepool.Vote) error

func (*Executor) CacheValidatorsLoop

func (e *Executor) CacheValidatorsLoop()

func (*Executor) GetAddr

func (e *Executor) GetAddr() string

func (*Executor) GetBlockAndBlockResultAtHeight

func (e *Executor) GetBlockAndBlockResultAtHeight(height int64) (*tmtypes.Block, *ctypes.ResultBlockResults, error)

func (*Executor) GetCachedBlockHeight

func (e *Executor) GetCachedBlockHeight() (uint64, error)

func (*Executor) GetChallengeResultFromSp

func (e *Executor) GetChallengeResultFromSp(objectId, endpoint string, segmentIndex, redundancyIndex int) (*types.ChallengeResult, error)

func (*Executor) GetHeightLoop

func (e *Executor) GetHeightLoop()

func (*Executor) GetLatestBlockHeight

func (e *Executor) GetLatestBlockHeight() (uint64, error)

func (*Executor) GetNonce

func (e *Executor) GetNonce() (uint64, error)

func (*Executor) GetObjectInfoChecksums

func (e *Executor) GetObjectInfoChecksums(objectId string) ([][]byte, error)

func (*Executor) GetStorageProviderEndpoint

func (e *Executor) GetStorageProviderEndpoint(address string) (string, error)

func (*Executor) GetValidatorsBlsPublicKey

func (e *Executor) GetValidatorsBlsPublicKey() ([]string, error)

func (*Executor) QueryCachedLatestValidators

func (e *Executor) QueryCachedLatestValidators() ([]*tmtypes.Validator, error)

func (*Executor) QueryChallengeHeartbeatInterval

func (e *Executor) QueryChallengeHeartbeatInterval() (uint64, error)

func (*Executor) QueryChallengeSlashCoolingOffPeriod added in v0.0.4

func (e *Executor) QueryChallengeSlashCoolingOffPeriod() (uint64, error)

func (*Executor) QueryInturnAttestationSubmitter

func (e *Executor) QueryInturnAttestationSubmitter() (*challengetypes.QueryInturnAttestationSubmitterResponse, error)

func (*Executor) QueryLatestAttestedChallengeIds

func (e *Executor) QueryLatestAttestedChallengeIds() ([]uint64, error)

func (*Executor) QueryVotes

func (e *Executor) QueryVotes(eventType votepool.EventType) ([]*votepool.Vote, error)

func (*Executor) UpdateHeartbeatIntervalLoop

func (e *Executor) UpdateHeartbeatIntervalLoop()

type GnfdCompositeClient

type GnfdCompositeClient struct {
	gnfdclient.IClient
	client.TendermintClient
	JsonRpcClient
	Height int64
}

type GnfdCompositeClients

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

func NewGnfdCompositClients

func NewGnfdCompositClients(rpcAddrs []string, chainId string, account *types.Account) GnfdCompositeClients

func (*GnfdCompositeClients) GetClient

func (gc *GnfdCompositeClients) GetClient() *GnfdCompositeClient

type JsonRpcClient

type JsonRpcClient = *jsonrpcclient.Client

Jump to

Keyboard shortcuts

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