abci

package
v0.0.0-...-8edd000 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OracleVoteExtension

type OracleVoteExtension struct {
	Height int64
	Prices map[string]math.LegacyDec
}

OracleVoteExtension defines the canonical vote extension structure.

type ProposalHandler

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

func NewProposalHandler

func NewProposalHandler(logger log.Logger, keeper keeper.Keeper, valStore baseapp.ValidatorStore) *ProposalHandler

func (*ProposalHandler) PreBlocker

func (*ProposalHandler) PrepareProposal

func (h *ProposalHandler) PrepareProposal() sdk.PrepareProposalHandler

func (*ProposalHandler) ProcessProposal

func (h *ProposalHandler) ProcessProposal() sdk.ProcessProposalHandler

type Provider

type Provider interface {
	GetTickerPrices(...keeper.CurrencyPair) (map[string]keeper.TickerPrice, error)
}

Provider defines an interface for fetching prices and candles for a given set of currency pairs. The provider is presumed to be a trusted source of prices.

type ProviderAggregator

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

ProviderAggregator is a simple aggregator for provider prices and candles. It is thread-safe since it is assumed to be called concurrently in price fetching goroutines, i.e. ExtendVote.

func NewProviderAggregator

func NewProviderAggregator() *ProviderAggregator

func (*ProviderAggregator) SetProviderTickerPricesAndCandles

func (p *ProviderAggregator) SetProviderTickerPricesAndCandles(
	providerName string,
	prices map[string]keeper.TickerPrice,
	pair keeper.CurrencyPair,
) bool

type StakeWeightedPrices

type StakeWeightedPrices struct {
	StakeWeightedPrices map[string]math.LegacyDec
	ExtendedCommitInfo  abci.ExtendedCommitInfo
}

StakeWeightedPrices defines the structure a proposer should use to calculate and submit the stake-weighted prices for a given set of supported currency pairs, in addition to the vote extensions used to calculate them. This is so validators can verify the proposer's calculations.

type VoteExtHandler

type VoteExtHandler struct {
	Keeper keeper.Keeper
	// contains filtered or unexported fields
}

func NewVoteExtHandler

func NewVoteExtHandler(
	logger log.Logger,
	providerTimeout time.Duration,
	providers map[string]Provider,
	providerPairs map[string][]keeper.CurrencyPair,
	keeper keeper.Keeper,
) *VoteExtHandler

func (*VoteExtHandler) ExtendVoteHandler

func (h *VoteExtHandler) ExtendVoteHandler() sdk.ExtendVoteHandler

func (*VoteExtHandler) VerifyVoteExtensionHandler

func (h *VoteExtHandler) VerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler

Jump to

Keyboard shortcuts

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