utils

package
v0.0.0-...-293eaa1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDelimiter = "_"

DefaultDelimiter represents the default delimiter used for the KV store keys

Variables

View Source
var (
	ErrInvalidLengthBitmap        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBitmap          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBitmap = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// MaxInt specifies the max sdk.Int value
	MaxInt = sdk.NewIntFromBigInt(math.MaxBig256)

	// MaxUint specifies the max sdk.Uint value
	MaxUint = sdk.NewUintFromBigInt(math.MaxBig256)
)
View Source
var (
	ErrInvalidLengthQueuer        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQueuer          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQueuer = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthThreshold        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowThreshold          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupThreshold = fmt.Errorf("proto: unexpected end of group")
)

Functions

func CloseLogError

func CloseLogError(iter sdk.Iterator, logger log.Logger)

CloseLogError closes the given iterator and logs if an error is returned

func HexDecode

func HexDecode(input string) ([]byte, error)

Decode a hex string. Hex string can be optionally prefixed with 0x.

func HexEncode

func HexEncode(input []byte) string

Encode a bytearray as hex string with 0x prefix.

func IndexOf

func IndexOf(strs []string, str string) int

IndexOf returns the index of str in the slice; -1 if not found

func NormalizeString

func NormalizeString(str string) string

NormalizeString normalizes a string as NFKC

func RemoveDuplicatesFromUint64Slice

func RemoveDuplicatesFromUint64Slice(sliceList []uint64) []uint64

func RunCached

func RunCached[T any](c sdk.Context, l Logger, f func(sdk.Context) (T, error)) T

RunCached wraps the given function, handles error/panic and rolls back the state if necessary

func StrNotSet

func StrNotSet(value string) bool

StrNotSet will return true if the string value provided is empty

func ToNumeric

func ToNumeric(i *big.Int) decimal.Decimal

func ValidateString

func ValidateString(str string, forbidden ...string) error

ValidateString checks if the given string is:

1. non-empty 2. entirely composed of utf8 runes 3. normalized as NFKC 4. does not contain any forbidden Unicode code points

func ValidateStringAllowEmpty

func ValidateStringAllowEmpty(str string, forbidden string) error

ValidateStringAllowEmpty checks if the given string is:

1. entirely composed of utf8 runes 2. normalized as NFKC 3. does not contain any forbidden Unicode code points

Types

type Bitmap

type Bitmap struct {
	TrueCountCache *CircularBuffer `protobuf:"bytes,2,opt,name=true_count_cache,json=trueCountCache,proto3" json:"true_count_cache,omitempty"`
}

func NewBitmap

func NewBitmap(maxSize int) Bitmap

NewBitmap is the constructor for Bitmap

func (*Bitmap) Add

func (m *Bitmap) Add(bit bool) *Bitmap

Add adds a new bit to the Bitmap

func (Bitmap) CountFalse

func (m Bitmap) CountFalse(bitCount int) uint64

CountFalse returns the number of 0's in the given range

func (Bitmap) CountTrue

func (m Bitmap) CountTrue(bitCount int) uint64

CountTrue returns the number of 1's in the given range

func (*Bitmap) Descriptor

func (*Bitmap) Descriptor() ([]byte, []int)

func (*Bitmap) Marshal

func (m *Bitmap) Marshal() (dAtA []byte, err error)

func (*Bitmap) MarshalTo

func (m *Bitmap) MarshalTo(dAtA []byte) (int, error)

func (*Bitmap) MarshalToSizedBuffer

func (m *Bitmap) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Bitmap) ProtoMessage

func (*Bitmap) ProtoMessage()

func (*Bitmap) Reset

func (m *Bitmap) Reset()

func (*Bitmap) Size

func (m *Bitmap) Size() (n int)

func (*Bitmap) String

func (m *Bitmap) String() string

func (*Bitmap) Unmarshal

func (m *Bitmap) Unmarshal(dAtA []byte) error

func (*Bitmap) XXX_DiscardUnknown

func (m *Bitmap) XXX_DiscardUnknown()

func (*Bitmap) XXX_Marshal

func (m *Bitmap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bitmap) XXX_Merge

func (m *Bitmap) XXX_Merge(src proto.Message)

func (*Bitmap) XXX_Size

func (m *Bitmap) XXX_Size() int

func (*Bitmap) XXX_Unmarshal

func (m *Bitmap) XXX_Unmarshal(b []byte) error

type BlockHeightKVQueue

type BlockHeightKVQueue struct {
	GeneralKVQueue
}

BlockHeightKVQueue is a queue that orders items with the block height at which the items are enqueued; the order of items that are enqueued at the same block height is deterministically based on their actual key in the KVStore

func NewBlockHeightKVQueue

func NewBlockHeightKVQueue(name string, store KVStore, blockHeight int64, logger log.Logger) BlockHeightKVQueue

NewBlockHeightKVQueue is the constructor of BlockHeightKVQueue

type CircularBuffer

type CircularBuffer struct {
	CumulativeValue []uint64 `protobuf:"varint,1,rep,packed,name=cumulative_value,json=cumulativeValue,proto3" json:"cumulative_value,omitempty"`
	Index           int32    `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	MaxSize         int32    `protobuf:"varint,3,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
}

func NewCircularBuffer

func NewCircularBuffer(maxSize int) *CircularBuffer

NewCircularBuffer is the constructor of CircularBuffer

func (*CircularBuffer) Add

func (m *CircularBuffer) Add(value uint32)

Add appends a new value into the CircularBuffer

func (CircularBuffer) Count

func (m CircularBuffer) Count(windowRange int) uint64

Count returns the cumulative value for the most recent given window

func (*CircularBuffer) Descriptor

func (*CircularBuffer) Descriptor() ([]byte, []int)

func (*CircularBuffer) Marshal

func (m *CircularBuffer) Marshal() (dAtA []byte, err error)

func (*CircularBuffer) MarshalTo

func (m *CircularBuffer) MarshalTo(dAtA []byte) (int, error)

func (*CircularBuffer) MarshalToSizedBuffer

func (m *CircularBuffer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CircularBuffer) ProtoMessage

func (*CircularBuffer) ProtoMessage()

func (*CircularBuffer) Reset

func (m *CircularBuffer) Reset()

func (*CircularBuffer) SetMaxSize

func (m *CircularBuffer) SetMaxSize(size int)

SetMaxSize sets the max size of the buffer to the given value. The buffer size gets updated accordingly the next time a value is added.

func (*CircularBuffer) Size

func (m *CircularBuffer) Size() (n int)

func (*CircularBuffer) String

func (m *CircularBuffer) String() string

func (*CircularBuffer) Unmarshal

func (m *CircularBuffer) Unmarshal(dAtA []byte) error

func (*CircularBuffer) XXX_DiscardUnknown

func (m *CircularBuffer) XXX_DiscardUnknown()

func (*CircularBuffer) XXX_Marshal

func (m *CircularBuffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CircularBuffer) XXX_Merge

func (m *CircularBuffer) XXX_Merge(src proto.Message)

func (*CircularBuffer) XXX_Size

func (m *CircularBuffer) XXX_Size() int

func (*CircularBuffer) XXX_Unmarshal

func (m *CircularBuffer) XXX_Unmarshal(b []byte) error

type Counter

type Counter[T constraints.Unsigned] struct {
	// contains filtered or unexported fields
}

Counter is a stateful counter that works with the kv store and starts from zero

func NewCounter

func NewCounter[T constraints.Unsigned](key key.Key, store KVStore) Counter[T]

NewCounter is the constructor for counter

func (Counter[T]) Curr

func (c Counter[T]) Curr(ctx sdk.Context) T

Curr returns the current value of the counter

func (Counter[T]) Incr

func (c Counter[T]) Incr(ctx sdk.Context) T

Incr increments the counter and returns the value before the increment

func (Counter[T]) Set

func (c Counter[T]) Set(ctx sdk.Context, v T)

Set sets the counter to an arbitrary value. Should only be used when importing a genesis state

type GeneralKVQueue

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

GeneralKVQueue is a queue that orders items based on the given prioritizer function

func NewGeneralKVQueue

func NewGeneralKVQueue(name string, store KVStore, logger log.Logger, prioritizer func(value codec.ProtoMarshaler) Key) GeneralKVQueue

NewGeneralKVQueue is the contructor for GeneralKVQueue

func (GeneralKVQueue) Dequeue

func (q GeneralKVQueue) Dequeue(value codec.ProtoMarshaler) bool

Dequeue pops the first item in queue and stores it in the given value

func (GeneralKVQueue) DequeueIf

func (q GeneralKVQueue) DequeueIf(value codec.ProtoMarshaler, filter func(value codec.ProtoMarshaler) bool) bool

DequeueIf pops the first item in queue iff it matches the given filter and stores it in the given value

func (GeneralKVQueue) DequeueUntil

func (q GeneralKVQueue) DequeueUntil(value codec.ProtoMarshaler, filter func(value codec.ProtoMarshaler) bool) bool

DequeueUntil pops the first item in queue that matches the given filter and stores it in the given value

func (GeneralKVQueue) Enqueue

func (q GeneralKVQueue) Enqueue(key Key, value codec.ProtoMarshaler)

Enqueue pushes the given value onto the top of the queue and stores the value at given key

func (GeneralKVQueue) ExportState

func (q GeneralKVQueue) ExportState() (state QueueState)

ExportState exports the given queue's state from the kv store

func (GeneralKVQueue) ImportState

func (q GeneralKVQueue) ImportState(state QueueState)

ImportState imports the given queue state into the kv store

func (GeneralKVQueue) IsEmpty

func (q GeneralKVQueue) IsEmpty() bool

IsEmpty returns true if the queue is empty; otherwise, false

func (GeneralKVQueue) Keys

func (q GeneralKVQueue) Keys() []Key

Keys returns a list with the keys for the values still enqueued

type Iterator

type Iterator interface {
	sdk.Iterator
	UnmarshalValue(marshaler codec.ProtoMarshaler)
	GetKey() Key
}

Iterator is an easier and safer to use sdk.Iterator extension

type KVQueue

type KVQueue interface {
	// Enqueue pushes the given value into the queue with the given key
	Enqueue(key Key, value codec.ProtoMarshaler)
	// Dequeue pops the first item in queue and stores it in the given value
	Dequeue(value codec.ProtoMarshaler) bool
	// DequeueIf pops the first item in queue iff it matches the given filter and stores it in the given value
	DequeueIf(value codec.ProtoMarshaler, filter func(value codec.ProtoMarshaler) bool) bool
	// DequeueUntil pops the first item in queue that matches the given filter and stores it in the given value
	DequeueUntil(value codec.ProtoMarshaler, filter func(value codec.ProtoMarshaler) bool) bool
	// IsEmpty returns true if the queue is empty; false otherwise
	IsEmpty() bool

	//TODO: convert to iterator
	Keys() []Key
}

KVQueue represents a queue built with the KVStore

type KVStore

type KVStore struct {
	sdk.KVStore
	// contains filtered or unexported fields
}

KVStore is a wrapper around the cosmos-sdk KVStore to provide more safety regarding key management and better ease-of-use

func NewNormalizedStore

func NewNormalizedStore(store sdk.KVStore, cdc codec.BinaryCodec) KVStore

NewNormalizedStore returns a new KVStore

func (KVStore) Delete

func (store KVStore) Delete(key Key)

Delete deletes the value stored under the given key, if it exists Deprecated: use DeleteNew instead

func (KVStore) DeleteNew

func (store KVStore) DeleteNew(k key.Key)

DeleteNew deletes the value stored under the given key, if it exists

func (KVStore) DeleteRaw

func (store KVStore) DeleteRaw(key []byte)

DeleteRaw deletes the value stored under the given raw key, if it exists

func (KVStore) Get

func (store KVStore) Get(key Key, value codec.ProtoMarshaler) bool

Get unmarshals the raw bytes stored under the given key into the value object. Returns true if the key exists. Deprecated: use GetNew instead

func (KVStore) GetNew

func (store KVStore) GetNew(key key.Key, value codec.ProtoMarshaler) bool

GetNew unmarshals the raw bytes stored under the given key into the value object. Returns true if the key exists.

func (KVStore) GetRaw

func (store KVStore) GetRaw(key Key) []byte

GetRaw returns the raw bytes stored under the given key. Returns nil with key does not exist. Deprecated: use GetRawNew instead

func (KVStore) GetRawNew

func (store KVStore) GetRawNew(key key.Key) []byte

GetRawNew returns the raw bytes stored under the given key. Returns nil with key does not exist.

func (KVStore) Has

func (store KVStore) Has(key Key) bool

Has returns true if the key exists Deprecated: use HasNew instead

func (KVStore) HasNew

func (store KVStore) HasNew(k key.Key) bool

HasNew deletes the value stored under the given key, if it exists

func (KVStore) Iterator

func (store KVStore) Iterator(prefix Key) Iterator

Iterator returns an Iterator that can handle a structured Key

func (KVStore) IteratorNew

func (store KVStore) IteratorNew(prefix key.Key) Iterator

IteratorNew returns an Iterator that can handle a structured Key

func (KVStore) ReverseIterator

func (store KVStore) ReverseIterator(prefix Key) Iterator

ReverseIterator returns an Iterator that can handle a structured Key and interate reversely

func (KVStore) Set

func (store KVStore) Set(key Key, value codec.ProtoMarshaler)

Set marshals the value and stores it under the given key Deprecated: use SetNewValidated instead

func (KVStore) SetNewValidated

func (store KVStore) SetNewValidated(k key.Key, value ValidatedProtoMarshaler) error

SetNewValidated marshals the value and stores it under the given key if it is valid

func (KVStore) SetRaw

func (store KVStore) SetRaw(key Key, value []byte)

SetRaw stores the value under the given key Deprecated: use SetRawNew instead

func (KVStore) SetRawNew

func (store KVStore) SetRawNew(k key.Key, value []byte)

SetRawNew stores the value under the given key

type Key

type Key interface {
	// AsKey returns the byte representation of the key. If given, uses a delimiter string to separate prefixes
	AsKey(delimiter ...string) []byte
	Prepend(prefix Key) Key
	Append(key Key) Key
}

Key represents a store key to interact with the KVStore Deprecated: use key.Key instead

type Logger

type Logger interface {
	Logger(ctx sdk.Context) log.Logger
}

Logger wraps keepers which expose a Logger method

type Nonce

type Nonce [sha256.Size]byte

Nonce defines a 32 byte array representing a deterministically-generated nonce

func GetNonce

func GetNonce(hash tmbytes.HexBytes, gasMeter sdk.GasMeter) Nonce

GetNonce deterministically calculates a nonce using a hash and gas meter

type QueueState

type QueueState struct {
	Items map[string]QueueState_Item `` /* 141-byte string literal not displayed */
}

func (*QueueState) Descriptor

func (*QueueState) Descriptor() ([]byte, []int)

func (*QueueState) Marshal

func (m *QueueState) Marshal() (dAtA []byte, err error)

func (*QueueState) MarshalTo

func (m *QueueState) MarshalTo(dAtA []byte) (int, error)

func (*QueueState) MarshalToSizedBuffer

func (m *QueueState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueueState) ProtoMessage

func (*QueueState) ProtoMessage()

func (*QueueState) Reset

func (m *QueueState) Reset()

func (*QueueState) Size

func (m *QueueState) Size() (n int)

func (*QueueState) String

func (m *QueueState) String() string

func (*QueueState) Unmarshal

func (m *QueueState) Unmarshal(dAtA []byte) error

func (QueueState) ValidateBasic

func (m QueueState) ValidateBasic(queueName ...string) error

ValidateBasic returns an error if the given queue state is invalid

func (*QueueState) XXX_DiscardUnknown

func (m *QueueState) XXX_DiscardUnknown()

func (*QueueState) XXX_Marshal

func (m *QueueState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueueState) XXX_Merge

func (m *QueueState) XXX_Merge(src proto.Message)

func (*QueueState) XXX_Size

func (m *QueueState) XXX_Size() int

func (*QueueState) XXX_Unmarshal

func (m *QueueState) XXX_Unmarshal(b []byte) error

type QueueState_Item

type QueueState_Item struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*QueueState_Item) Descriptor

func (*QueueState_Item) Descriptor() ([]byte, []int)

func (*QueueState_Item) Marshal

func (m *QueueState_Item) Marshal() (dAtA []byte, err error)

func (*QueueState_Item) MarshalTo

func (m *QueueState_Item) MarshalTo(dAtA []byte) (int, error)

func (*QueueState_Item) MarshalToSizedBuffer

func (m *QueueState_Item) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueueState_Item) ProtoMessage

func (*QueueState_Item) ProtoMessage()

func (*QueueState_Item) Reset

func (m *QueueState_Item) Reset()

func (*QueueState_Item) Size

func (m *QueueState_Item) Size() (n int)

func (*QueueState_Item) String

func (m *QueueState_Item) String() string

func (*QueueState_Item) Unmarshal

func (m *QueueState_Item) Unmarshal(dAtA []byte) error

func (*QueueState_Item) XXX_DiscardUnknown

func (m *QueueState_Item) XXX_DiscardUnknown()

func (*QueueState_Item) XXX_Marshal

func (m *QueueState_Item) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueueState_Item) XXX_Merge

func (m *QueueState_Item) XXX_Merge(src proto.Message)

func (*QueueState_Item) XXX_Size

func (m *QueueState_Item) XXX_Size() int

func (*QueueState_Item) XXX_Unmarshal

func (m *QueueState_Item) XXX_Unmarshal(b []byte) error

type SequenceKVQueue

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

SequenceKVQueue is a queue that orders items with the sequence number at which the items are enqueued;

func NewSequenceKVQueue

func NewSequenceKVQueue(prefixStore KVStore, maxSize uint64, logger log.Logger) SequenceKVQueue

NewSequenceKVQueue is the constructor of SequenceKVQueue. The prefixStore should isolate the namespace of the queue

func (*SequenceKVQueue) Dequeue

func (q *SequenceKVQueue) Dequeue(n uint64, value codec.ProtoMarshaler) bool

Dequeue pops the nth value off and unmarshals it into the given object, returns false if n is out of range n is 0-based

func (*SequenceKVQueue) Enqueue

func (q *SequenceKVQueue) Enqueue(value codec.ProtoMarshaler) error

Enqueue pushes the given value onto the top of the queue and stores the value at given key. Returns queue position and status

func (SequenceKVQueue) Peek

func (q SequenceKVQueue) Peek(n uint64, value codec.ProtoMarshaler) bool

Peek unmarshals the value into the given object at the given index and returns its sequence number, returns false if n is out of range n is 0-based

func (SequenceKVQueue) Size

func (q SequenceKVQueue) Size() uint64

Size returns the given current size of the queue

type StringKey

type StringKey interface {
	Key
	AppendStr(key string, stringTransformations ...func(string) string) StringKey
	PrependStr(key string, stringTransformations ...func(string) string) StringKey
}

StringKey extends the Key interface for simplified appending and prepending Deprecated: use key.Key instead

func KeyFromBz

func KeyFromBz(k []byte) StringKey

KeyFromBz returns a structured key

func KeyFromInt

func KeyFromInt[T constraints.Integer](k T) StringKey

KeyFromInt returns a structured key

func KeyFromStr

func KeyFromStr(k string, stringTransformations ...func(string) string) StringKey

KeyFromStr applies the optional string transformations to the given key in sequence and returns a structured key

func LowerCaseKey

func LowerCaseKey(k string) StringKey

LowerCaseKey returns a key with the input converted to lower case

type Threshold

type Threshold struct {
	// split threshold into Numerator and denominator to avoid floating point
	// errors down the line
	Numerator   int64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"`
	Denominator int64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"`
}
var OneThreshold Threshold = NewThreshold(1, 1)

OneThreshold is a threshold that equals to 1

var ZeroThreshold Threshold = NewThreshold(0, 1)

ZeroThreshold is a threshold that equals to 0

func NewThreshold

func NewThreshold(numerator, denominator int64) Threshold

NewThreshold is the constructor for Threshold

func (*Threshold) Descriptor

func (*Threshold) Descriptor() ([]byte, []int)

func (Threshold) GT

func (m Threshold) GT(t Threshold) bool

GT returns true if and only if threshold is greater than the given one

func (Threshold) GTE

func (m Threshold) GTE(t Threshold) bool

GTE returns true if and only if threshold is greater than or equal to the given one

func (Threshold) IsMet

func (m Threshold) IsMet(share sdk.Int, total sdk.Int) bool

IsMet returns true if share >= threshold * total

func (Threshold) LT

func (m Threshold) LT(t Threshold) bool

LT returns true if and only if threshold is less than the given one

func (Threshold) LTE

func (m Threshold) LTE(t Threshold) bool

LTE returns true if and only if threshold is less than or equal to the given one

func (*Threshold) Marshal

func (m *Threshold) Marshal() (dAtA []byte, err error)

func (*Threshold) MarshalTo

func (m *Threshold) MarshalTo(dAtA []byte) (int, error)

func (*Threshold) MarshalToSizedBuffer

func (m *Threshold) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Threshold) ProtoMessage

func (*Threshold) ProtoMessage()

func (*Threshold) Reset

func (m *Threshold) Reset()

func (*Threshold) Size

func (m *Threshold) Size() (n int)

func (Threshold) String

func (m Threshold) String() string

String returns a string representation of the threshold

func (*Threshold) Unmarshal

func (m *Threshold) Unmarshal(dAtA []byte) error

func (Threshold) Validate

func (m Threshold) Validate() error

Validate returns an error if threshold is invalid

func (*Threshold) XXX_DiscardUnknown

func (m *Threshold) XXX_DiscardUnknown()

func (*Threshold) XXX_Marshal

func (m *Threshold) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Threshold) XXX_Merge

func (m *Threshold) XXX_Merge(src proto.Message)

func (*Threshold) XXX_Size

func (m *Threshold) XXX_Size() int

func (*Threshold) XXX_Unmarshal

func (m *Threshold) XXX_Unmarshal(b []byte) error

type ValidatedProtoMarshaler

type ValidatedProtoMarshaler interface {
	codec.ProtoMarshaler
	ValidateBasic() error
}

ValidatedProtoMarshaler is a ProtoMarshaler that can also be validated

func NoValidation

func NoValidation(value codec.ProtoMarshaler) ValidatedProtoMarshaler

NoValidation wraps a ProtoMarshaler so it can be used by the store without actually adding any validation

func WithValidation

func WithValidation(value codec.ProtoMarshaler, validate func() error) ValidatedProtoMarshaler

WithValidation adds a ValidateBasic function to an existing ProtoMarshaler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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