Documentation ¶
Overview ¶
Package tmsqlite contains an SQLite implementation of the github.com/gordian-engine/gordian/tm/tmstore interfaces.
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) LoadActions(ctx context.Context, height uint64, round uint32) (tmstore.RoundActions, error)
- func (s *Store) LoadCommittedHeader(ctx context.Context, height uint64) (tmconsensus.CommittedHeader, error)
- func (s *Store) LoadFinalizationByHeight(ctx context.Context, height uint64) (round uint32, blockHash string, valSet tmconsensus.ValidatorSet, ...)
- func (s *Store) LoadPubKeys(ctx context.Context, hash string) ([]gcrypto.PubKey, error)
- func (s *Store) LoadRoundState(ctx context.Context, height uint64, round uint32) (phs []tmconsensus.ProposedHeader, ...)
- func (s *Store) LoadValidators(ctx context.Context, keyHash, powHash string) ([]tmconsensus.Validator, error)
- func (s *Store) LoadVotePowers(ctx context.Context, hash string) ([]uint64, error)
- func (s *Store) NetworkHeightRound(ctx context.Context) (votingHeight uint64, votingRound uint32, committingHeight uint64, ...)
- func (s *Store) OverwriteRoundPrecommitProofs(ctx context.Context, height uint64, round uint32, ...) error
- func (s *Store) OverwriteRoundPrevoteProofs(ctx context.Context, height uint64, round uint32, ...) error
- func (s *Store) SaveCommittedHeader(ctx context.Context, ch tmconsensus.CommittedHeader) error
- func (s *Store) SaveFinalization(ctx context.Context, height uint64, round uint32, blockHash string, ...) error
- func (s *Store) SavePrecommitAction(ctx context.Context, pubKey gcrypto.PubKey, vt tmconsensus.VoteTarget, ...) error
- func (s *Store) SavePrevoteAction(ctx context.Context, pubKey gcrypto.PubKey, vt tmconsensus.VoteTarget, ...) error
- func (s *Store) SaveProposedHeaderAction(ctx context.Context, ph tmconsensus.ProposedHeader) error
- func (s *Store) SavePubKeys(ctx context.Context, keys []gcrypto.PubKey) (string, error)
- func (s *Store) SaveRoundProposedHeader(ctx context.Context, ph tmconsensus.ProposedHeader) error
- func (s *Store) SaveRoundReplayedHeader(ctx context.Context, h tmconsensus.Header) error
- func (s *Store) SaveVotePowers(ctx context.Context, powers []uint64) (string, error)
- func (s *Store) SetNetworkHeightRound(ctx context.Context, votingHeight uint64, votingRound uint32, ...) error
- func (s *Store) SetStateMachineHeightRound(ctx context.Context, height uint64, round uint32) error
- func (s *Store) StateMachineHeightRound(ctx context.Context) (height uint64, round uint32, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { // The string "purego" or "cgo" depending on build tags. BuildType string // contains filtered or unexported fields }
Store is a single type satisfying all the tmstore interfaces.
func NewInMemStore ¶
func NewInMemStore( ctx context.Context, hashScheme tmconsensus.HashScheme, reg *gcrypto.Registry, ) (*Store, error)
func NewOnDiskStore ¶
func NewOnDiskStore( ctx context.Context, dbPath string, hashScheme tmconsensus.HashScheme, reg *gcrypto.Registry, ) (*Store, error)
func (*Store) LoadActions ¶
func (*Store) LoadCommittedHeader ¶
func (s *Store) LoadCommittedHeader(ctx context.Context, height uint64) (tmconsensus.CommittedHeader, error)
func (*Store) LoadFinalizationByHeight ¶
func (s *Store) LoadFinalizationByHeight(ctx context.Context, height uint64) ( round uint32, blockHash string, valSet tmconsensus.ValidatorSet, appStateHash string, err error, )
func (*Store) LoadPubKeys ¶
func (*Store) LoadRoundState ¶
func (s *Store) LoadRoundState(ctx context.Context, height uint64, round uint32) ( phs []tmconsensus.ProposedHeader, prevotes, precommits tmconsensus.SparseSignatureCollection, err error, )
func (*Store) LoadValidators ¶
func (*Store) LoadVotePowers ¶
func (*Store) NetworkHeightRound ¶
func (*Store) OverwriteRoundPrecommitProofs ¶
func (s *Store) OverwriteRoundPrecommitProofs( ctx context.Context, height uint64, round uint32, proofs tmconsensus.SparseSignatureCollection, ) error
func (*Store) OverwriteRoundPrevoteProofs ¶
func (s *Store) OverwriteRoundPrevoteProofs( ctx context.Context, height uint64, round uint32, proofs tmconsensus.SparseSignatureCollection, ) error
func (*Store) SaveCommittedHeader ¶
func (s *Store) SaveCommittedHeader(ctx context.Context, ch tmconsensus.CommittedHeader) error
func (*Store) SaveFinalization ¶
func (s *Store) SaveFinalization( ctx context.Context, height uint64, round uint32, blockHash string, valSet tmconsensus.ValidatorSet, appStateHash string, ) error
func (*Store) SavePrecommitAction ¶
func (s *Store) SavePrecommitAction( ctx context.Context, pubKey gcrypto.PubKey, vt tmconsensus.VoteTarget, sig []byte, ) error
func (*Store) SavePrevoteAction ¶
func (s *Store) SavePrevoteAction( ctx context.Context, pubKey gcrypto.PubKey, vt tmconsensus.VoteTarget, sig []byte, ) error
func (*Store) SaveProposedHeaderAction ¶
func (s *Store) SaveProposedHeaderAction(ctx context.Context, ph tmconsensus.ProposedHeader) error
func (*Store) SavePubKeys ¶
func (*Store) SaveRoundProposedHeader ¶
func (s *Store) SaveRoundProposedHeader(ctx context.Context, ph tmconsensus.ProposedHeader) error
func (*Store) SaveRoundReplayedHeader ¶
func (*Store) SaveVotePowers ¶
func (*Store) SetNetworkHeightRound ¶
func (*Store) SetStateMachineHeightRound ¶
Click to show internal directories.
Click to hide internal directories.