Documentation ¶
Index ¶
- Variables
- func ComplexBlobTxWithOtherMsgs(t *testing.T, rand *tmrand.Rand, kr keyring.Keyring, enc sdk.TxEncoder, ...) coretypes.Tx
- func CreateRawTx(txConfig client.TxConfig, msg sdk.Msg, signer *blobtypes.KeyringSigner, ...) []byte
- func GenerateManyRandomRawSendTxsSameSigner(txConfig client.TxConfig, rand *tmrand.Rand, signer *blobtypes.KeyringSigner, ...) []coretypes.Tx
- func GenerateManyRawSendTxs(txConfig client.TxConfig, count int) []coretypes.Tx
- func GenerateRandomAmount(rand *tmrand.Rand) int64
- func GenerateRandomBlobCount(rand *tmrand.Rand) int
- func GenerateRandomBlobSize(rand *tmrand.Rand) int
- func GenerateRandomBlobSizes(count int, rand *tmrand.Rand) []int
- func GenerateRandomRawSendTx(txConfig client.TxConfig, rand *tmrand.Rand, signer *blobtypes.KeyringSigner) (rawTx []byte)
- func GenerateRawSendTx(txConfig client.TxConfig, signer *blobtypes.KeyringSigner, amount int64) (rawTx []byte)
- func IndexWrappedTxWithInvalidNamespace(t *testing.T, enc sdk.TxEncoder, rand *tmrand.Rand, ...) (coretypes.Tx, tmproto.Blob)
- func ManyBlobs(t *testing.T, rand *tmrand.Rand, namespaces []appns.Namespace, sizes []int) []*tmproto.Blob
- func ManyMultiBlobTx(t *testing.T, enc sdk.TxEncoder, kr keyring.Keyring, chainid string, ...) [][]byte
- func ManyMultiBlobTxSameSigner(t *testing.T, enc sdk.TxEncoder, rand *tmrand.Rand, ...) []coretypes.Tx
- func ManyRandBlobs(t *testing.T, rand *tmrand.Rand, sizes ...int) []*tmproto.Blob
- func ManyRandBlobsIdenticallySized(t *testing.T, rand *tmrand.Rand, count, size int) []*tmproto.Blob
- func MultiBlobTx(t *testing.T, enc sdk.TxEncoder, signer *blobtypes.KeyringSigner, ...) coretypes.Tx
- func NestedBlobs(t *testing.T, namespaces []appns.Namespace, sizes [][]int) [][]*tmproto.Blob
- func RandBlobTxs(enc sdk.TxEncoder, rand *tmrand.Rand, count, blobsPerTx, size int) coretypes.Txs
- func RandBlobTxsRandomlySized(enc sdk.TxEncoder, rand *tmrand.Rand, count, maxSize, maxBlobs int) coretypes.Txs
- func RandBlobTxsWithAccounts(enc sdk.TxEncoder, rand *tmrand.Rand, kr keyring.Keyring, ...) []coretypes.Tx
- func RandBlobTxsWithNamespaces(enc sdk.TxEncoder, namespaces []appns.Namespace, sizes []int) []coretypes.Tx
- func RandBlobTxsWithNamespacesAndSigner(enc sdk.TxEncoder, signer *blobtypes.KeyringSigner, ...) []coretypes.Tx
- func RandBlobsWithNamespace(namespaces []appns.Namespace, sizes []int) []*tmproto.Blob
- func RandMsgPayForBlobs(rand *tmrand.Rand, size int) (*blobtypes.MsgPayForBlobs, *tmproto.Blob)
- func RandMsgPayForBlobsWithNamespaceAndSigner(signer string, ns appns.Namespace, size int) (*blobtypes.MsgPayForBlobs, *tmproto.Blob)
- func RandMsgPayForBlobsWithSigner(rand *tmrand.Rand, singer string, size, blobCount int) (*blobtypes.MsgPayForBlobs, []*tmproto.Blob)
- func RandMultiBlobTxsSameSigner(t *testing.T, enc sdk.TxEncoder, rand *tmrand.Rand, ...) []coretypes.Tx
- func Repeat[T any](s T, count int) []T
- type AccountInfo
Constants ¶
This section is empty.
Variables ¶
var ( // TestMaxBlobSize is the maximum size of each blob in a blob transaction, for testing purposes TestMaxBlobSize = appconsts.ShareSize * 2 * appconsts.DefaultSquareSizeUpperBound // TestMaxBlobCount is the maximum number of blobs in a blob transaction, for testing purposes TestMaxBlobCount = 5 )
Functions ¶
func CreateRawTx ¶
func CreateRawTx(txConfig client.TxConfig, msg sdk.Msg, signer *blobtypes.KeyringSigner, opts ...blobtypes.TxBuilderOption) []byte
func GenerateManyRandomRawSendTxsSameSigner ¶
func GenerateManyRandomRawSendTxsSameSigner(txConfig client.TxConfig, rand *tmrand.Rand, signer *blobtypes.KeyringSigner, count int) []coretypes.Tx
GenerateManyRandomRawSendTxsSameSigner generates count many random raw send txs.
func GenerateManyRawSendTxs ¶
func GenerateRandomAmount ¶
GenerateRandomAmount generates a random amount for a Send transaction.
func GenerateRandomBlobCount ¶
func GenerateRandomBlobSize ¶
func GenerateRandomBlobSizes ¶
GenerateRandomBlobSizes returns a slice of random non-zero blob sizes.
func GenerateRandomRawSendTx ¶
func GenerateRandomRawSendTx(txConfig client.TxConfig, rand *tmrand.Rand, signer *blobtypes.KeyringSigner) (rawTx []byte)
GenerateRandomRawSendTx generates a random raw send tx.
func GenerateRawSendTx ¶
func GenerateRawSendTx(txConfig client.TxConfig, signer *blobtypes.KeyringSigner, amount int64) (rawTx []byte)
GenerateRawSendTx creates send transactions meant to help test encoding/prepare/process proposal, they are not meant to actually be executed by the state machine. If we want that, we have to update nonce, and send funds to someone other than the same account signing the transaction.
func IndexWrappedTxWithInvalidNamespace ¶
func IndexWrappedTxWithInvalidNamespace( t *testing.T, enc sdk.TxEncoder, rand *tmrand.Rand, signer *blobtypes.KeyringSigner, sequence uint64, accountNum uint64, index uint32, ) (coretypes.Tx, tmproto.Blob)
IndexWrappedTxWithInvalidNamespace returns an index wrapped PFB tx with an invalid namespace and a blob associated with that index wrapped PFB tx.
func ManyMultiBlobTx ¶
func ManyMultiBlobTxSameSigner ¶
func ManyMultiBlobTxSameSigner( t *testing.T, enc sdk.TxEncoder, rand *tmrand.Rand, signer *blobtypes.KeyringSigner, blobSizes [][]int, sequence, accountNum uint64, ) []coretypes.Tx
ManyMultiBlobTxSameSigner generates and returns many blob transactions with the possibility to add more than one blob. The sequence and account number are manually set, and the sequence is manually incremented when doing so.
func ManyRandBlobs ¶
func MultiBlobTx ¶
func NestedBlobs ¶
func RandBlobTxs ¶
func RandBlobTxsWithAccounts ¶
func RandBlobTxsWithAccounts( enc sdk.TxEncoder, rand *tmrand.Rand, kr keyring.Keyring, conn *grpc.ClientConn, size int, blobCount int, randSize bool, chainid string, accounts []string, ) []coretypes.Tx
RandBlobTxsWithAccounts will create random blob transactions using the provided configuration. If no grpc connection is provided, then it will not update the account info. One blob transaction is generated per account provided.
func RandBlobsWithNamespace ¶
func RandMsgPayForBlobs ¶
func RandMultiBlobTxsSameSigner ¶
func RandMultiBlobTxsSameSigner(t *testing.T, enc sdk.TxEncoder, rand *tmrand.Rand, signer *blobtypes.KeyringSigner, pfbCount int) []coretypes.Tx
RandMultiBlobTxsSameSigner returns a slice of random Blob transactions (consisting of pfbCount number of txs) each with random number of blobs and blob sizes.
Types ¶
type AccountInfo ¶
type AccountInfo struct {
AccountNum, Sequence uint64
}
func ExtractAccountInfo ¶
func ExtractAccountInfo(accs []authtypes.AccountI) []AccountInfo