keeper

package
v0.0.0-...-201aeb4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientKeeper

type ClientKeeper struct {
	connectiontypes.ClientKeeper
}

ClientKeeper override `ValidateSelfClient` in the keeper of ibc-client Original method doesn't yet support a consensus state for a general client

func (ClientKeeper) ValidateSelfClient

func (k ClientKeeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error

type Keeper

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

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, proxyStoreKey, ibcStoreKey sdk.StoreKey, clientKeeper types.ClientKeeper) Keeper

func (Keeper) AcknowledgePacket

func (k Keeper) AcknowledgePacket(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	packet exported.PacketI,
	acknowledgement []byte,
	proof []byte,
	proofHeight exported.Height,
) error

upstream: chainA, downstream: chainB

func (Keeper) ChanOpenAck

func (k Keeper) ChanOpenAck(
	ctx sdk.Context,

	upstreamClientID string,
	upstreamPrefix exported.Prefix,

	order channeltypes.Order,
	connectionHops []string,

	upstreamPortID string,
	upstreamChannelID string,
	downstreamPortID string,
	downstreamChannelID string,

	version string,
	proofTry []byte,
	proofHeight exported.Height,
) error

source: downstream, counterparty: upstream

func (Keeper) ChanOpenConfirm

func (k Keeper) ChanOpenConfirm(
	ctx sdk.Context,

	upstreamClientID string,
	upstreamPrefix exported.Prefix,

	upstreamPortID string,
	upstreamChannelID string,
	downstreamChannelID string,

	proofAck []byte,
	proofHeight exported.Height,
) error

source: downstream, counterparty: upstream

func (Keeper) ChanOpenFinalize

func (k Keeper) ChanOpenFinalize(
	ctx sdk.Context,

	upstreamClientID string,
	upstreamPrefix exported.Prefix,

	upstreamPortID string,
	upstreamChannelID string,

	proofConfirm []byte,
	proofHeight exported.Height,
) error

source: downstream, counterparty: upstream

func (Keeper) ChanOpenTry

func (k Keeper) ChanOpenTry(
	ctx sdk.Context,

	upstreamClientID string,
	upstreamPrefix exported.Prefix,

	order channeltypes.Order,
	connectionHops []string,
	upstreamPortID string,
	upstreamChannelID string,
	downstreamPortID string,
	version string,

	proofInit []byte,
	proofHeight exported.Height,
) error

upstream: chainA, downstream: chainB

func (Keeper) ClientState

func (k Keeper) ClientState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	counterpartyClientID string,
	clientState exported.ClientState,
	expectedConsensusState exported.ConsensusState,
	proofClient []byte,
	proofConsensus []byte,
	proofHeight exported.Height,
	consensusHeight exported.Height,
) error

caller: B CONTRACT: upstream is A, downstream is B, we are proxy(P)

func (Keeper) ConnOpenAck

func (k Keeper) ConnOpenAck(
	ctx sdk.Context,

	connectionID string,
	upstreamPrefix exported.Prefix,
	connectionEnd connectiontypes.ConnectionEnd,

	downstreamClientState exported.ClientState,
	downstreamConsensusState exported.ConsensusState,
	proxyClientState exported.ClientState,

	proofTry []byte,
	proofClient []byte,
	proofConsensus []byte,
	proofHeight exported.Height,
	consensusHeight exported.Height,

	proofProxyClient []byte,
	proofProxyConsensus []byte,
	proofProxyHeight exported.Height,
	proxyConsensusHeight exported.Height,
) error

upstream: chainA, downstream: chainB

func (Keeper) ConnOpenConfirm

func (k Keeper) ConnOpenConfirm(
	ctx sdk.Context,

	connectionID string,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	counterpartyConnectionID string,

	proofAck []byte,
	proofHeight exported.Height,
) error

upstream: chainA, downstream: chainB

func (Keeper) ConnOpenFinalize

func (k Keeper) ConnOpenFinalize(
	ctx sdk.Context,

	connectionID string,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,

	proofConfirm []byte,
	proofHeight exported.Height,
) error

upstream: chainA, downstream: chainB

func (Keeper) ConnOpenTry

func (k Keeper) ConnOpenTry(
	ctx sdk.Context,

	connectionID string,
	upstreamPrefix exported.Prefix,
	connection connectiontypes.ConnectionEnd,

	downstreamClientState exported.ClientState,
	downstreamConsensusState exported.ConsensusState,
	proxyClientState exported.ClientState,

	proofInit []byte,
	proofClient []byte,
	proofConsensus []byte,
	proofHeight exported.Height,
	consensusHeight exported.Height,

	proofProxyClient []byte,
	proofProxyConsensus []byte,
	proofProxyHeight exported.Height,
	proxyConsensusHeight exported.Height,
) error

upstream: chainA, downstream: chainB

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

func (Keeper) GetIBCCommitmentPrefix

func (k Keeper) GetIBCCommitmentPrefix() exported.Prefix

func (Keeper) GetProxyChannel

func (k Keeper) GetProxyChannel(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	portID,
	channelID string,
) (channeltypes.Channel, bool)

func (Keeper) GetProxyClientConsensusState

func (k Keeper) GetProxyClientConsensusState(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	counterpartyClientIdentifier string,
	upstreamClientID string,
	consensusHeight exported.Height,
) (exported.ConsensusState, bool)

func (Keeper) GetProxyClientState

func (k Keeper) GetProxyClientState(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	counterpartyClientIdentifier string,
	upstreamClientID string,
) (exported.ClientState, bool)

func (Keeper) GetProxyCommitmentPrefix

func (k Keeper) GetProxyCommitmentPrefix() exported.Prefix

GetCommitmentPrefix returns the IBC connection store prefix as a commitment Prefix

func (Keeper) GetProxyConnection

func (k Keeper) GetProxyConnection(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	connectionID string,
) (connectiontypes.ConnectionEnd, bool)

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)

func (*Keeper) ProxyAcknowledgePacket

ProxyAcknowledgePacket implements types.MsgServer

func (*Keeper) ProxyChannelOpenAck

ProxyChannelOpenAck implements types.MsgServer

func (*Keeper) ProxyChannelOpenConfirm

ProxyChannelOpenConfirm implements types.MsgServer

func (*Keeper) ProxyChannelOpenFinalize

ProxyChannelOpenFinalize implements types.MsgServer

func (*Keeper) ProxyChannelOpenTry

ProxyConnectionOpenTry implements types.MsgServer

func (*Keeper) ProxyClientState

ProxyClientState implements types.MsgServer

func (Keeper) ProxyClientStore

func (k Keeper) ProxyClientStore(ctx sdk.Context, upstreamPrefix exported.Prefix, upstreamClientID string, counterpartyClientIdentifier string) sdk.KVStore

func (*Keeper) ProxyConnectionOpenAck

ProxyConnectionOpenAck implements types.MsgServer

func (*Keeper) ProxyConnectionOpenConfirm

ProxyConnectionOpenConfirm implements types.MsgServer

func (*Keeper) ProxyConnectionOpenFinalize

ProxyConnectionOpenFinalize implements types.MsgServer

func (*Keeper) ProxyConnectionOpenTry

ProxyConnectionOpenTry implements types.MsgServer

func (*Keeper) ProxyRecvPacket

ProxyRecvPacket implements types.MsgServer

func (Keeper) ProxyStore

func (k Keeper) ProxyStore(ctx sdk.Context, upstreamPrefix exported.Prefix, upstreamClientID string) sdk.KVStore

func (Keeper) RecvPacket

func (k Keeper) RecvPacket(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	packet exported.PacketI,
	proof []byte,
	proofHeight exported.Height,
) error

upstream: chainA, downstream: chainB

func (Keeper) SetProxyChannel

func (k Keeper) SetProxyChannel(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	portID,
	channelID string,
	channelEnd exported.ChannelI,
) error

func (Keeper) SetProxyClientConsensusState

func (k Keeper) SetProxyClientConsensusState(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	counterpartyClientIdentifier string,
	upstreamClientID string,
	consensusHeight exported.Height,
	consensusState exported.ConsensusState,
) error

func (Keeper) SetProxyClientState

func (k Keeper) SetProxyClientState(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	counterpartyClientIdentifier string,
	upstreamClientID string,
	clientState exported.ClientState,
) error

func (Keeper) SetProxyConnection

func (k Keeper) SetProxyConnection(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	connectionID string,
	connectionEnd connectiontypes.ConnectionEnd,
) error

func (Keeper) SetProxyNextSequenceRecv

func (k Keeper) SetProxyNextSequenceRecv(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	portID,
	channelID string,
	nextSequenceRecv uint64,
) error

func (Keeper) SetProxyPacketAcknowledgement

func (k Keeper) SetProxyPacketAcknowledgement(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	portID,
	channelID string,
	sequence uint64,
	acknowledgement []byte,
) error

func (Keeper) SetProxyPacketCommitment

func (k Keeper) SetProxyPacketCommitment(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	portID,
	channelID string,
	sequence uint64,
	commitmentBytes []byte,
) error

func (Keeper) SetProxyPacketReceiptAbsence

func (k Keeper) SetProxyPacketReceiptAbsence(
	ctx sdk.Context,
	upstreamPrefix exported.Prefix,
	upstreamClientID string,
	portID,
	channelID string,
	sequence uint64,
) error

func (Keeper) VerifyAndProxyChannelState

func (k Keeper) VerifyAndProxyChannelState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	channel exported.ChannelI,
) error

func (Keeper) VerifyAndProxyClientConsensusState

func (k Keeper) VerifyAndProxyClientConsensusState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	counterpartyClientID string,
	height exported.Height,
	consensusHeight exported.Height,
	proof []byte,
	consensusState exported.ConsensusState,
) error

func (Keeper) VerifyAndProxyClientState

func (k Keeper) VerifyAndProxyClientState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	counterpartyClientID string,
	height exported.Height,
	proof []byte,
	clientState exported.ClientState,
) error

func (Keeper) VerifyAndProxyConnectionState

func (k Keeper) VerifyAndProxyConnectionState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection connectiontypes.ConnectionEnd,
	height exported.Height,
	proof []byte,
	connectionID string,
) error

func (Keeper) VerifyAndProxyNextSequenceRecv

func (k Keeper) VerifyAndProxyNextSequenceRecv(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	nextSequenceRecv uint64,
) error

func (Keeper) VerifyAndProxyPacketAcknowledgement

func (k Keeper) VerifyAndProxyPacketAcknowledgement(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
	acknowledgement []byte,
) error

func (Keeper) VerifyAndProxyPacketCommitment

func (k Keeper) VerifyAndProxyPacketCommitment(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
	commitmentBytes []byte,
) error

func (Keeper) VerifyAndProxyPacketReceiptAbsence

func (k Keeper) VerifyAndProxyPacketReceiptAbsence(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
) error

func (Keeper) VerifyChannelState

func (k Keeper) VerifyChannelState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	channel exported.ChannelI,
) error

func (Keeper) VerifyClientConsensusState

func (k Keeper) VerifyClientConsensusState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	counterpartyClientID string,
	height exported.Height,
	consensusHeight exported.Height,
	proof []byte,
	consensusState exported.ConsensusState,
) error

func (Keeper) VerifyClientState

func (k Keeper) VerifyClientState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	counterpartyClientID string,
	height exported.Height,
	proof []byte,
	clientState exported.ClientState,
) error

func (Keeper) VerifyConnectionState

func (k Keeper) VerifyConnectionState(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection connectiontypes.ConnectionEnd,
	height exported.Height,
	proof []byte,
	connectionID string,
) error

func (Keeper) VerifyNextSequenceRecv

func (k Keeper) VerifyNextSequenceRecv(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	nextSequenceRecv uint64,
) error

VerifyNextSequenceRecv verifies a proof of the next sequence number to be received of the specified channel at the specified port.

func (Keeper) VerifyPacketAcknowledgement

func (k Keeper) VerifyPacketAcknowledgement(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
	acknowledgement []byte,
) error

VerifyPacketAcknowledgement verifies a proof of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.

func (Keeper) VerifyPacketCommitment

func (k Keeper) VerifyPacketCommitment(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
	commitmentBytes []byte,
) error

VerifyPacketCommitment verifies a proof of an outgoing packet commitment at the specified port, specified channel, and specified sequence.

func (Keeper) VerifyPacketReceiptAbsence

func (k Keeper) VerifyPacketReceiptAbsence(
	ctx sdk.Context,
	upstreamClientID string,
	upstreamPrefix exported.Prefix,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
) error

VerifyPacketReceiptAbsence verifies a proof of the absence of an incoming packet receipt at the specified port, specified channel, and specified sequence.

Jump to

Keyboard shortcuts

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