messages

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_node_protocols_messages_messages_proto protoreflect.FileDescriptor

Functions

func GetDownloadContractHash

func GetDownloadContractHash(contract *DownloadContractProto) []byte

GetDownloadContractHash returns the contract hash.

func SignDataQueryResponse

func SignDataQueryResponse(privateKey crypto.PrivKey, response DataQueryResponse) ([]byte, error)

SignDataQueryResponse signs a data query response given the node's private key.

func SignDownloadContractProto

func SignDownloadContractProto(privateKey crypto.PrivKey, contract *DownloadContractProto) ([]byte, error)

SignDownloadContractProto signs a download contract from the verifiers side.

func VerifyDataQueryResponse

func VerifyDataQueryResponse(publicKey crypto.PubKey, response DataQueryResponse) (bool, error)

VerifyDataQueryResponse verifies a data query response messages given the node's public key.

func VerifyDownloadContractProto

func VerifyDownloadContractProto(publicKeyVerifier crypto.PubKey, contract *DownloadContractProto) (bool, error)

VerifyDownloadContractProto verifies a download contract.

Types

type BlockDownloadRequestProto

type BlockDownloadRequestProto struct {
	From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To   uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

BlockDownloadRequestProto represents a block download request range.

func (*BlockDownloadRequestProto) Descriptor deprecated

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

Deprecated: Use BlockDownloadRequestProto.ProtoReflect.Descriptor instead.

func (*BlockDownloadRequestProto) GetFrom

func (x *BlockDownloadRequestProto) GetFrom() uint64

func (*BlockDownloadRequestProto) GetTo

func (x *BlockDownloadRequestProto) GetTo() uint64

func (*BlockDownloadRequestProto) ProtoMessage

func (*BlockDownloadRequestProto) ProtoMessage()

func (*BlockDownloadRequestProto) ProtoReflect

func (*BlockDownloadRequestProto) Reset

func (x *BlockDownloadRequestProto) Reset()

func (*BlockDownloadRequestProto) String

func (x *BlockDownloadRequestProto) String() string

type BlockDownloadResponseProto

type BlockDownloadResponseProto struct {
	From       uint64              `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To         uint64              `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	Error      bool                `protobuf:"varint,3,opt,name=error,proto3" json:"error,omitempty"`
	NodeHeight uint64              `protobuf:"varint,4,opt,name=node_height,json=nodeHeight,proto3" json:"node_height,omitempty"`
	Blocks     []*block.ProtoBlock `protobuf:"bytes,5,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

BlockDownloadResponseProto represents a block download response.

func (*BlockDownloadResponseProto) Descriptor deprecated

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

Deprecated: Use BlockDownloadResponseProto.ProtoReflect.Descriptor instead.

func (*BlockDownloadResponseProto) GetBlocks

func (x *BlockDownloadResponseProto) GetBlocks() []*block.ProtoBlock

func (*BlockDownloadResponseProto) GetError

func (x *BlockDownloadResponseProto) GetError() bool

func (*BlockDownloadResponseProto) GetFrom

func (x *BlockDownloadResponseProto) GetFrom() uint64

func (*BlockDownloadResponseProto) GetNodeHeight

func (x *BlockDownloadResponseProto) GetNodeHeight() uint64

func (*BlockDownloadResponseProto) GetTo

func (*BlockDownloadResponseProto) ProtoMessage

func (*BlockDownloadResponseProto) ProtoMessage()

func (*BlockDownloadResponseProto) ProtoReflect

func (*BlockDownloadResponseProto) Reset

func (x *BlockDownloadResponseProto) Reset()

func (*BlockDownloadResponseProto) String

func (x *BlockDownloadResponseProto) String() string

type BlockchainHeightResponseProto

type BlockchainHeightResponseProto struct {
	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

BlockchainHeightResponseProto represents the height of a node's blockchain.

func (*BlockchainHeightResponseProto) Descriptor deprecated

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

Deprecated: Use BlockchainHeightResponseProto.ProtoReflect.Descriptor instead.

func (*BlockchainHeightResponseProto) GetHeight

func (x *BlockchainHeightResponseProto) GetHeight() uint64

func (*BlockchainHeightResponseProto) ProtoMessage

func (*BlockchainHeightResponseProto) ProtoMessage()

func (*BlockchainHeightResponseProto) ProtoReflect

func (*BlockchainHeightResponseProto) Reset

func (x *BlockchainHeightResponseProto) Reset()

func (*BlockchainHeightResponseProto) String

type DataQueryRequest

type DataQueryRequest struct {
	FileHashes   [][]byte
	FromPeerAddr string
	Hash         []byte
	Timestamp    int64
}

DataQueryRequest represents a data query message.

func ToDataQueryRequest

func ToDataQueryRequest(dqr *DataQueryRequestProto) DataQueryRequest

ToDataQueryRequest returns a domain DataQueryRequest object.

func (DataQueryRequest) GetHash

func (dqr DataQueryRequest) GetHash() []byte

GetHash gets the hash of data query request.

func (DataQueryRequest) Validate

func (dqr DataQueryRequest) Validate() error

Validate a data query request.

type DataQueryRequestProto

type DataQueryRequestProto struct {
	FileHashes   [][]byte `protobuf:"bytes,1,rep,name=file_hashes,json=fileHashes,proto3" json:"file_hashes,omitempty"`
	FromPeerAddr string   `protobuf:"bytes,2,opt,name=from_peer_addr,json=fromPeerAddr,proto3" json:"from_peer_addr,omitempty"`
	Hash         []byte   `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	Timestamp    int64    `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

DataQueryRequestProto represents a data query message.

func ToDataQueryRequestProto

func ToDataQueryRequestProto(dqr DataQueryRequest) *DataQueryRequestProto

ToDataQueryRequestProto returns a protobuf message of DataQueryRequest object.

func (*DataQueryRequestProto) Descriptor deprecated

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

Deprecated: Use DataQueryRequestProto.ProtoReflect.Descriptor instead.

func (*DataQueryRequestProto) GetFileHashes

func (x *DataQueryRequestProto) GetFileHashes() [][]byte

func (*DataQueryRequestProto) GetFromPeerAddr

func (x *DataQueryRequestProto) GetFromPeerAddr() string

func (*DataQueryRequestProto) GetHash

func (x *DataQueryRequestProto) GetHash() []byte

func (*DataQueryRequestProto) GetTimestamp

func (x *DataQueryRequestProto) GetTimestamp() int64

func (*DataQueryRequestProto) ProtoMessage

func (*DataQueryRequestProto) ProtoMessage()

func (*DataQueryRequestProto) ProtoReflect

func (x *DataQueryRequestProto) ProtoReflect() protoreflect.Message

func (*DataQueryRequestProto) Reset

func (x *DataQueryRequestProto) Reset()

func (*DataQueryRequestProto) String

func (x *DataQueryRequestProto) String() string

type DataQueryResponse

type DataQueryResponse struct {
	FromPeerAddr          string
	FeesPerByte           string
	HashDataQueryRequest  []byte
	PublicKey             []byte
	Signature             []byte
	FileHashes            [][]byte
	FileHashesSizes       []uint64
	UnavailableFileHashes [][]byte
	Timestamp             int64
	FileMerkleRootHashes  [][]byte
	FileNames             []string
	FileFeesPerByte       []string
}

DataQueryResponse represents a data query response.

func ToDataQueryResponse

func ToDataQueryResponse(dqr *DataQueryResponseProto) DataQueryResponse

ToDataQueryResponse returns a domain DataQueryResponse object.

type DataQueryResponseProto

type DataQueryResponseProto struct {
	FromPeerAddr string `protobuf:"bytes,1,opt,name=from_peer_addr,json=fromPeerAddr,proto3" json:"from_peer_addr,omitempty"`
	FeesPerByte  string `protobuf:"bytes,2,opt,name=fees_per_byte,json=feesPerByte,proto3" json:"fees_per_byte,omitempty"`
	// hash_data_query_request must be same as the DataQueryRequestProto hash
	HashDataQueryRequest []byte   `protobuf:"bytes,3,opt,name=hash_data_query_request,json=hashDataQueryRequest,proto3" json:"hash_data_query_request,omitempty"`
	PublicKey            []byte   `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Signature            []byte   `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	FileHashes           [][]byte `protobuf:"bytes,6,rep,name=file_hashes,json=fileHashes,proto3" json:"file_hashes,omitempty"`
	// file_hashes_sizes contains the file sizes of each hash in file_hashes.
	FileHashesSizes       []uint64 `protobuf:"varint,7,rep,packed,name=file_hashes_sizes,json=fileHashesSizes,proto3" json:"file_hashes_sizes,omitempty"`
	UnavailableFileHashes [][]byte `` /* 126-byte string literal not displayed */
	Timestamp             int64    `protobuf:"varint,9,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	FileNames             []string `protobuf:"bytes,10,rep,name=file_names,json=fileNames,proto3" json:"file_names,omitempty"`
	FileMerkleRootHashes  [][]byte `` /* 126-byte string literal not displayed */
	// file_fees_per_byte with the introduction of dynamic pricing this field is used to indicate fees for each file.
	FileFeesPerByte []string `protobuf:"bytes,12,rep,name=file_fees_per_byte,json=fileFeesPerByte,proto3" json:"file_fees_per_byte,omitempty"`
	// contains filtered or unexported fields
}

DataQueryResponseProto represents a data query response.

func ToDataQueryResponseProto

func ToDataQueryResponseProto(dqr DataQueryResponse) *DataQueryResponseProto

ToDataQueryResponseProto returns a ToDataQueryResponseProto from a doman ToDataQueryResponse.

func (*DataQueryResponseProto) Descriptor deprecated

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

Deprecated: Use DataQueryResponseProto.ProtoReflect.Descriptor instead.

func (*DataQueryResponseProto) GetFeesPerByte

func (x *DataQueryResponseProto) GetFeesPerByte() string

func (*DataQueryResponseProto) GetFileFeesPerByte added in v1.3.0

func (x *DataQueryResponseProto) GetFileFeesPerByte() []string

func (*DataQueryResponseProto) GetFileHashes

func (x *DataQueryResponseProto) GetFileHashes() [][]byte

func (*DataQueryResponseProto) GetFileHashesSizes

func (x *DataQueryResponseProto) GetFileHashesSizes() []uint64

func (*DataQueryResponseProto) GetFileMerkleRootHashes added in v1.1.23

func (x *DataQueryResponseProto) GetFileMerkleRootHashes() [][]byte

func (*DataQueryResponseProto) GetFileNames added in v1.1.23

func (x *DataQueryResponseProto) GetFileNames() []string

func (*DataQueryResponseProto) GetFromPeerAddr

func (x *DataQueryResponseProto) GetFromPeerAddr() string

func (*DataQueryResponseProto) GetHashDataQueryRequest

func (x *DataQueryResponseProto) GetHashDataQueryRequest() []byte

func (*DataQueryResponseProto) GetPublicKey

func (x *DataQueryResponseProto) GetPublicKey() []byte

func (*DataQueryResponseProto) GetSignature

func (x *DataQueryResponseProto) GetSignature() []byte

func (*DataQueryResponseProto) GetTimestamp

func (x *DataQueryResponseProto) GetTimestamp() int64

func (*DataQueryResponseProto) GetUnavailableFileHashes

func (x *DataQueryResponseProto) GetUnavailableFileHashes() [][]byte

func (*DataQueryResponseProto) ProtoMessage

func (*DataQueryResponseProto) ProtoMessage()

func (*DataQueryResponseProto) ProtoReflect

func (x *DataQueryResponseProto) ProtoReflect() protoreflect.Message

func (*DataQueryResponseProto) Reset

func (x *DataQueryResponseProto) Reset()

func (*DataQueryResponseProto) String

func (x *DataQueryResponseProto) String() string

type DataQueryResponseTransferProto

type DataQueryResponseTransferProto struct {
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

DataQueryResponseTransferProto is used to request a data query response from a verifier.

func (*DataQueryResponseTransferProto) Descriptor deprecated

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

Deprecated: Use DataQueryResponseTransferProto.ProtoReflect.Descriptor instead.

func (*DataQueryResponseTransferProto) GetHash

func (x *DataQueryResponseTransferProto) GetHash() []byte

func (*DataQueryResponseTransferProto) ProtoMessage

func (*DataQueryResponseTransferProto) ProtoMessage()

func (*DataQueryResponseTransferProto) ProtoReflect

func (*DataQueryResponseTransferProto) Reset

func (x *DataQueryResponseTransferProto) Reset()

func (*DataQueryResponseTransferProto) String

type DataQueryResponseTransferResultProto

type DataQueryResponseTransferResultProto struct {
	Responses []*DataQueryResponseProto `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

DataQueryResponseTransferResultProto encapsulates multiple data query responses from verifier to the querying node.

func (*DataQueryResponseTransferResultProto) Descriptor deprecated

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

Deprecated: Use DataQueryResponseTransferResultProto.ProtoReflect.Descriptor instead.

func (*DataQueryResponseTransferResultProto) GetResponses

func (*DataQueryResponseTransferResultProto) ProtoMessage

func (*DataQueryResponseTransferResultProto) ProtoMessage()

func (*DataQueryResponseTransferResultProto) ProtoReflect

func (*DataQueryResponseTransferResultProto) Reset

func (*DataQueryResponseTransferResultProto) String

type DownloadContractInTransactionDataProto

type DownloadContractInTransactionDataProto struct {
	ContractHash               []byte `protobuf:"bytes,1,opt,name=contract_hash,json=contractHash,proto3" json:"contract_hash,omitempty"`
	FileRequesterNodePublicKey []byte `` /* 145-byte string literal not displayed */
	FileHosterNodePublicKey    []byte `` /* 136-byte string literal not displayed */
	VerifierPublicKey          []byte `protobuf:"bytes,4,opt,name=verifier_public_key,json=verifierPublicKey,proto3" json:"verifier_public_key,omitempty"`
	VerifierFees               string `protobuf:"bytes,5,opt,name=verifier_fees,json=verifierFees,proto3" json:"verifier_fees,omitempty"`
	FileHosterTotalFees        string `protobuf:"bytes,6,opt,name=file_hoster_total_fees,json=fileHosterTotalFees,proto3" json:"file_hoster_total_fees,omitempty"`
	// contains filtered or unexported fields
}

DownloadContractInTransactionDataProto is a contract metadata with the smallest fingerprint.

func (*DownloadContractInTransactionDataProto) Descriptor deprecated

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

Deprecated: Use DownloadContractInTransactionDataProto.ProtoReflect.Descriptor instead.

func (*DownloadContractInTransactionDataProto) GetContractHash

func (x *DownloadContractInTransactionDataProto) GetContractHash() []byte

func (*DownloadContractInTransactionDataProto) GetFileHosterNodePublicKey

func (x *DownloadContractInTransactionDataProto) GetFileHosterNodePublicKey() []byte

func (*DownloadContractInTransactionDataProto) GetFileHosterTotalFees added in v1.3.1

func (x *DownloadContractInTransactionDataProto) GetFileHosterTotalFees() string

func (*DownloadContractInTransactionDataProto) GetFileRequesterNodePublicKey

func (x *DownloadContractInTransactionDataProto) GetFileRequesterNodePublicKey() []byte

func (*DownloadContractInTransactionDataProto) GetVerifierFees

func (x *DownloadContractInTransactionDataProto) GetVerifierFees() string

func (*DownloadContractInTransactionDataProto) GetVerifierPublicKey

func (x *DownloadContractInTransactionDataProto) GetVerifierPublicKey() []byte

func (*DownloadContractInTransactionDataProto) ProtoMessage

func (*DownloadContractInTransactionDataProto) ProtoReflect

func (*DownloadContractInTransactionDataProto) Reset

func (*DownloadContractInTransactionDataProto) String

type DownloadContractProto

type DownloadContractProto struct {
	FileHosterResponse         *DataQueryResponseProto `protobuf:"bytes,1,opt,name=file_hoster_response,json=fileHosterResponse,proto3" json:"file_hoster_response,omitempty"`
	FileRequesterNodePublicKey []byte                  `` /* 145-byte string literal not displayed */
	FileHashesNeeded           [][]byte                `protobuf:"bytes,3,rep,name=file_hashes_needed,json=fileHashesNeeded,proto3" json:"file_hashes_needed,omitempty"`
	// file_hashes_sizes contains the file sizes of each hash in file_hashes.
	FileHashesNeededSizes []uint64 `` /* 136-byte string literal not displayed */
	VerifierPublicKey     []byte   `protobuf:"bytes,5,opt,name=verifier_public_key,json=verifierPublicKey,proto3" json:"verifier_public_key,omitempty"`
	VerifierFees          string   `protobuf:"bytes,6,opt,name=verifier_fees,json=verifierFees,proto3" json:"verifier_fees,omitempty"`
	ContractHash          []byte   `protobuf:"bytes,7,opt,name=contract_hash,json=contractHash,proto3" json:"contract_hash,omitempty"`
	VerifierSignature     []byte   `protobuf:"bytes,8,opt,name=verifier_signature,json=verifierSignature,proto3" json:"verifier_signature,omitempty"`
	// contains filtered or unexported fields
}

DownloadContractProto represents a download contract.

func (*DownloadContractProto) Descriptor deprecated

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

Deprecated: Use DownloadContractProto.ProtoReflect.Descriptor instead.

func (*DownloadContractProto) GetContractHash

func (x *DownloadContractProto) GetContractHash() []byte

func (*DownloadContractProto) GetFileHashesNeeded

func (x *DownloadContractProto) GetFileHashesNeeded() [][]byte

func (*DownloadContractProto) GetFileHashesNeededSizes

func (x *DownloadContractProto) GetFileHashesNeededSizes() []uint64

func (*DownloadContractProto) GetFileHosterResponse

func (x *DownloadContractProto) GetFileHosterResponse() *DataQueryResponseProto

func (*DownloadContractProto) GetFileRequesterNodePublicKey

func (x *DownloadContractProto) GetFileRequesterNodePublicKey() []byte

func (*DownloadContractProto) GetVerifierFees

func (x *DownloadContractProto) GetVerifierFees() string

func (*DownloadContractProto) GetVerifierPublicKey

func (x *DownloadContractProto) GetVerifierPublicKey() []byte

func (*DownloadContractProto) GetVerifierSignature

func (x *DownloadContractProto) GetVerifierSignature() []byte

func (*DownloadContractProto) ProtoMessage

func (*DownloadContractProto) ProtoMessage()

func (*DownloadContractProto) ProtoReflect

func (x *DownloadContractProto) ProtoReflect() protoreflect.Message

func (*DownloadContractProto) Reset

func (x *DownloadContractProto) Reset()

func (*DownloadContractProto) String

func (x *DownloadContractProto) String() string

type DownloadContractsHashesProto

type DownloadContractsHashesProto struct {
	Contracts []*DownloadContractInTransactionDataProto `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts,omitempty"`
	// contains filtered or unexported fields
}

DownloadContractsHashesProto contains a list of contracts hashes which will be send as a transaction data payload.

func (*DownloadContractsHashesProto) Descriptor deprecated

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

Deprecated: Use DownloadContractsHashesProto.ProtoReflect.Descriptor instead.

func (*DownloadContractsHashesProto) GetContracts

func (*DownloadContractsHashesProto) ProtoMessage

func (*DownloadContractsHashesProto) ProtoMessage()

func (*DownloadContractsHashesProto) ProtoReflect

func (*DownloadContractsHashesProto) Reset

func (x *DownloadContractsHashesProto) Reset()

func (*DownloadContractsHashesProto) String

type FileTransferInfoProto

type FileTransferInfoProto struct {
	ContractHash []byte `protobuf:"bytes,1,opt,name=contract_hash,json=contractHash,proto3" json:"contract_hash,omitempty"`
	FileHash     []byte `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty"`
	FileSize     uint64 `protobuf:"varint,3,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
	// from indicates the starting file byte range to be requested
	From int64 `protobuf:"varint,4,opt,name=from,proto3" json:"from,omitempty"`
	// to indicates the end of the file byte range to be requested
	To int64 `protobuf:"varint,5,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

FileTransferInfoProto is a message which includes the contract hash, file hash and the size of the file. this message is a request payload from file downloader node to file hoster node. when this message is received, it should start writing to the network stream the data which is encrypted and cut into shuffled segments

func (*FileTransferInfoProto) Descriptor deprecated

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

Deprecated: Use FileTransferInfoProto.ProtoReflect.Descriptor instead.

func (*FileTransferInfoProto) GetContractHash

func (x *FileTransferInfoProto) GetContractHash() []byte

func (*FileTransferInfoProto) GetFileHash

func (x *FileTransferInfoProto) GetFileHash() []byte

func (*FileTransferInfoProto) GetFileSize

func (x *FileTransferInfoProto) GetFileSize() uint64

func (*FileTransferInfoProto) GetFrom

func (x *FileTransferInfoProto) GetFrom() int64

func (*FileTransferInfoProto) GetTo

func (x *FileTransferInfoProto) GetTo() int64

func (*FileTransferInfoProto) ProtoMessage

func (*FileTransferInfoProto) ProtoMessage()

func (*FileTransferInfoProto) ProtoReflect

func (x *FileTransferInfoProto) ProtoReflect() protoreflect.Message

func (*FileTransferInfoProto) Reset

func (x *FileTransferInfoProto) Reset()

func (*FileTransferInfoProto) String

func (x *FileTransferInfoProto) String() string

type GossipPayload

type GossipPayload struct {

	// Types that are assignable to Message:
	//
	//	*GossipPayload_Blocks
	//	*GossipPayload_Transaction
	//	*GossipPayload_Query
	//	*GossipPayload_StorageQuery
	Message isGossipPayload_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

GossipPayload represents a gossip payload.

func (*GossipPayload) Descriptor deprecated

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

Deprecated: Use GossipPayload.ProtoReflect.Descriptor instead.

func (*GossipPayload) GetBlocks

func (x *GossipPayload) GetBlocks() *ProtoBlocks

func (*GossipPayload) GetMessage

func (m *GossipPayload) GetMessage() isGossipPayload_Message

func (*GossipPayload) GetQuery

func (x *GossipPayload) GetQuery() *DataQueryRequestProto

func (*GossipPayload) GetStorageQuery added in v1.1.16

func (x *GossipPayload) GetStorageQuery() *StorageQueryRequestProto

func (*GossipPayload) GetTransaction

func (x *GossipPayload) GetTransaction() *transaction.ProtoTransaction

func (*GossipPayload) ProtoMessage

func (*GossipPayload) ProtoMessage()

func (*GossipPayload) ProtoReflect

func (x *GossipPayload) ProtoReflect() protoreflect.Message

func (*GossipPayload) Reset

func (x *GossipPayload) Reset()

func (*GossipPayload) String

func (x *GossipPayload) String() string

type GossipPayload_Blocks

type GossipPayload_Blocks struct {
	Blocks *ProtoBlocks `protobuf:"bytes,1,opt,name=blocks,proto3,oneof"`
}

type GossipPayload_Query

type GossipPayload_Query struct {
	Query *DataQueryRequestProto `protobuf:"bytes,3,opt,name=query,proto3,oneof"`
}

type GossipPayload_StorageQuery added in v1.1.16

type GossipPayload_StorageQuery struct {
	StorageQuery *StorageQueryRequestProto `protobuf:"bytes,4,opt,name=storage_query,json=storageQuery,proto3,oneof"`
}

type GossipPayload_Transaction

type GossipPayload_Transaction struct {
	Transaction *transaction.ProtoTransaction `protobuf:"bytes,2,opt,name=transaction,proto3,oneof"`
}

type KeyIVProto

type KeyIVProto struct {
	ContractHash       []byte `protobuf:"bytes,1,opt,name=contract_hash,json=contractHash,proto3" json:"contract_hash,omitempty"`
	FileHash           []byte `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty"`
	FileMerkleRootHash []byte `protobuf:"bytes,3,opt,name=file_merkle_root_hash,json=fileMerkleRootHash,proto3" json:"file_merkle_root_hash,omitempty"`
	// contains filtered or unexported fields
}

KeyIVProto is a message that represents a data encryption payload request to verifier node.

func (*KeyIVProto) Descriptor deprecated

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

Deprecated: Use KeyIVProto.ProtoReflect.Descriptor instead.

func (*KeyIVProto) GetContractHash

func (x *KeyIVProto) GetContractHash() []byte

func (*KeyIVProto) GetFileHash

func (x *KeyIVProto) GetFileHash() []byte

func (*KeyIVProto) GetFileMerkleRootHash

func (x *KeyIVProto) GetFileMerkleRootHash() []byte

func (*KeyIVProto) ProtoMessage

func (*KeyIVProto) ProtoMessage()

func (*KeyIVProto) ProtoReflect

func (x *KeyIVProto) ProtoReflect() protoreflect.Message

func (*KeyIVProto) Reset

func (x *KeyIVProto) Reset()

func (*KeyIVProto) String

func (x *KeyIVProto) String() string

type KeyIVRandomizedFileSegmentsEnvelopeProto

type KeyIVRandomizedFileSegmentsEnvelopeProto struct {
	KeyIvRandomizedFileSegments []*KeyIVRandomizedFileSegmentsProto `` /* 148-byte string literal not displayed */
	// contains filtered or unexported fields
}

KeyIVRandomizedFileSegmentsEnvelopeProto is a list of KeyIVRandomizedFileSegmentsProto to be sent to the file requester all together.

func (*KeyIVRandomizedFileSegmentsEnvelopeProto) Descriptor deprecated

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

Deprecated: Use KeyIVRandomizedFileSegmentsEnvelopeProto.ProtoReflect.Descriptor instead.

func (*KeyIVRandomizedFileSegmentsEnvelopeProto) GetKeyIvRandomizedFileSegments

func (x *KeyIVRandomizedFileSegmentsEnvelopeProto) GetKeyIvRandomizedFileSegments() []*KeyIVRandomizedFileSegmentsProto

func (*KeyIVRandomizedFileSegmentsEnvelopeProto) ProtoMessage

func (*KeyIVRandomizedFileSegmentsEnvelopeProto) ProtoReflect

func (*KeyIVRandomizedFileSegmentsEnvelopeProto) Reset

func (*KeyIVRandomizedFileSegmentsEnvelopeProto) String

type KeyIVRandomizedFileSegmentsProto

type KeyIVRandomizedFileSegmentsProto struct {
	FileSize                        uint64  `protobuf:"varint,1,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
	ContractHash                    []byte  `protobuf:"bytes,2,opt,name=contract_hash,json=contractHash,proto3" json:"contract_hash,omitempty"`
	FileHash                        []byte  `protobuf:"bytes,3,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty"`
	Key                             []byte  `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	Iv                              []byte  `protobuf:"bytes,5,opt,name=iv,proto3" json:"iv,omitempty"`
	MerkleRootHash                  []byte  `protobuf:"bytes,6,opt,name=merkle_root_hash,json=merkleRootHash,proto3" json:"merkle_root_hash,omitempty"`
	EncryptionType                  int32   `protobuf:"varint,7,opt,name=encryption_type,json=encryptionType,proto3" json:"encryption_type,omitempty"`
	RandomizedSegments              []int32 `protobuf:"varint,8,rep,packed,name=randomized_segments,json=randomizedSegments,proto3" json:"randomized_segments,omitempty"`
	TotalSizeRawUnencryptedSegments uint64  `` /* 161-byte string literal not displayed */
	Error                           string  `protobuf:"bytes,10,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

KeyIVRandomizedFileSegmentsProto is a message which contains the private key, the iv, encryption type and randomized order of segments and the raw unencrypted data size. this message is sent from the file hoster to the verifier. this message should be written to the netowrk stream and after read the total_size_raw_unencrypted_segments number of bytes

func (*KeyIVRandomizedFileSegmentsProto) Descriptor deprecated

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

Deprecated: Use KeyIVRandomizedFileSegmentsProto.ProtoReflect.Descriptor instead.

func (*KeyIVRandomizedFileSegmentsProto) GetContractHash

func (x *KeyIVRandomizedFileSegmentsProto) GetContractHash() []byte

func (*KeyIVRandomizedFileSegmentsProto) GetEncryptionType

func (x *KeyIVRandomizedFileSegmentsProto) GetEncryptionType() int32

func (*KeyIVRandomizedFileSegmentsProto) GetError

func (*KeyIVRandomizedFileSegmentsProto) GetFileHash

func (x *KeyIVRandomizedFileSegmentsProto) GetFileHash() []byte

func (*KeyIVRandomizedFileSegmentsProto) GetFileSize

func (x *KeyIVRandomizedFileSegmentsProto) GetFileSize() uint64

func (*KeyIVRandomizedFileSegmentsProto) GetIv

func (*KeyIVRandomizedFileSegmentsProto) GetKey

func (x *KeyIVRandomizedFileSegmentsProto) GetKey() []byte

func (*KeyIVRandomizedFileSegmentsProto) GetMerkleRootHash

func (x *KeyIVRandomizedFileSegmentsProto) GetMerkleRootHash() []byte

func (*KeyIVRandomizedFileSegmentsProto) GetRandomizedSegments

func (x *KeyIVRandomizedFileSegmentsProto) GetRandomizedSegments() []int32

func (*KeyIVRandomizedFileSegmentsProto) GetTotalSizeRawUnencryptedSegments

func (x *KeyIVRandomizedFileSegmentsProto) GetTotalSizeRawUnencryptedSegments() uint64

func (*KeyIVRandomizedFileSegmentsProto) ProtoMessage

func (*KeyIVRandomizedFileSegmentsProto) ProtoMessage()

func (*KeyIVRandomizedFileSegmentsProto) ProtoReflect

func (*KeyIVRandomizedFileSegmentsProto) Reset

func (*KeyIVRandomizedFileSegmentsProto) String

type KeyIVRequestsProto

type KeyIVRequestsProto struct {
	KeyIvs []*KeyIVProto `protobuf:"bytes,1,rep,name=key_ivs,json=keyIvs,proto3" json:"key_ivs,omitempty"`
	// contains filtered or unexported fields
}

KeyIVRequestProto is a message that represents a list of data encryption payloads to verifier node.

func (*KeyIVRequestsProto) Descriptor deprecated

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

Deprecated: Use KeyIVRequestsProto.ProtoReflect.Descriptor instead.

func (*KeyIVRequestsProto) GetKeyIvs

func (x *KeyIVRequestsProto) GetKeyIvs() []*KeyIVProto

func (*KeyIVRequestsProto) ProtoMessage

func (*KeyIVRequestsProto) ProtoMessage()

func (*KeyIVRequestsProto) ProtoReflect

func (x *KeyIVRequestsProto) ProtoReflect() protoreflect.Message

func (*KeyIVRequestsProto) Reset

func (x *KeyIVRequestsProto) Reset()

func (*KeyIVRequestsProto) String

func (x *KeyIVRequestsProto) String() string

type MerkleTreeNodesOfFileContractProto

type MerkleTreeNodesOfFileContractProto struct {
	ContractHash    []byte   `protobuf:"bytes,1,opt,name=contract_hash,json=contractHash,proto3" json:"contract_hash,omitempty"`
	FileHash        []byte   `protobuf:"bytes,2,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty"`
	MerkleTreeNodes [][]byte `protobuf:"bytes,3,rep,name=merkle_tree_nodes,json=merkleTreeNodes,proto3" json:"merkle_tree_nodes,omitempty"`
	// contains filtered or unexported fields
}

MerkleTreeNodesOfFileContractProto is a message which contains a list of merkle tree nodes, contract and file hashes.

func (*MerkleTreeNodesOfFileContractProto) Descriptor deprecated

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

Deprecated: Use MerkleTreeNodesOfFileContractProto.ProtoReflect.Descriptor instead.

func (*MerkleTreeNodesOfFileContractProto) GetContractHash

func (x *MerkleTreeNodesOfFileContractProto) GetContractHash() []byte

func (*MerkleTreeNodesOfFileContractProto) GetFileHash

func (x *MerkleTreeNodesOfFileContractProto) GetFileHash() []byte

func (*MerkleTreeNodesOfFileContractProto) GetMerkleTreeNodes

func (x *MerkleTreeNodesOfFileContractProto) GetMerkleTreeNodes() [][]byte

func (*MerkleTreeNodesOfFileContractProto) ProtoMessage

func (*MerkleTreeNodesOfFileContractProto) ProtoMessage()

func (*MerkleTreeNodesOfFileContractProto) ProtoReflect

func (*MerkleTreeNodesOfFileContractProto) Reset

func (*MerkleTreeNodesOfFileContractProto) String

type ProtoBlocks

type ProtoBlocks struct {
	Blocks []*block.ProtoBlock `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

ProtoBlocks is the proto representation of blocks envelope.

func (*ProtoBlocks) Descriptor deprecated

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

Deprecated: Use ProtoBlocks.ProtoReflect.Descriptor instead.

func (*ProtoBlocks) GetBlocks

func (x *ProtoBlocks) GetBlocks() []*block.ProtoBlock

func (*ProtoBlocks) ProtoMessage

func (*ProtoBlocks) ProtoMessage()

func (*ProtoBlocks) ProtoReflect

func (x *ProtoBlocks) ProtoReflect() protoreflect.Message

func (*ProtoBlocks) Reset

func (x *ProtoBlocks) Reset()

func (*ProtoBlocks) String

func (x *ProtoBlocks) String() string

type StorageCapabilitiesProto added in v1.3.0

type StorageCapabilitiesProto struct {
	AllowFeesOverride bool   `protobuf:"varint,1,opt,name=allow_fees_override,json=allowFeesOverride,proto3" json:"allow_fees_override,omitempty"`
	FeesPerByte       string `protobuf:"bytes,2,opt,name=fees_per_byte,json=feesPerByte,proto3" json:"fees_per_byte,omitempty"`
	Uptime            int64  `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"`
	Platform          string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"`
	StorageCapacity   uint64 `protobuf:"varint,5,opt,name=storage_capacity,json=storageCapacity,proto3" json:"storage_capacity,omitempty"`
	// contains filtered or unexported fields
}

StorageCapabilitiesProto is a response of a storage node containing the configuration of the storage node.

func (*StorageCapabilitiesProto) Descriptor deprecated added in v1.3.0

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

Deprecated: Use StorageCapabilitiesProto.ProtoReflect.Descriptor instead.

func (*StorageCapabilitiesProto) GetAllowFeesOverride added in v1.3.0

func (x *StorageCapabilitiesProto) GetAllowFeesOverride() bool

func (*StorageCapabilitiesProto) GetFeesPerByte added in v1.3.0

func (x *StorageCapabilitiesProto) GetFeesPerByte() string

func (*StorageCapabilitiesProto) GetPlatform added in v1.3.0

func (x *StorageCapabilitiesProto) GetPlatform() string

func (*StorageCapabilitiesProto) GetStorageCapacity added in v1.3.0

func (x *StorageCapabilitiesProto) GetStorageCapacity() uint64

func (*StorageCapabilitiesProto) GetUptime added in v1.3.0

func (x *StorageCapabilitiesProto) GetUptime() int64

func (*StorageCapabilitiesProto) ProtoMessage added in v1.3.0

func (*StorageCapabilitiesProto) ProtoMessage()

func (*StorageCapabilitiesProto) ProtoReflect added in v1.3.0

func (x *StorageCapabilitiesProto) ProtoReflect() protoreflect.Message

func (*StorageCapabilitiesProto) Reset added in v1.3.0

func (x *StorageCapabilitiesProto) Reset()

func (*StorageCapabilitiesProto) String added in v1.3.0

func (x *StorageCapabilitiesProto) String() string

type StorageFileUploadMetadataProto added in v1.1.16

type StorageFileUploadMetadataProto struct {
	FileName    string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
	FeesPerByte string `protobuf:"bytes,2,opt,name=fees_per_byte,json=feesPerByte,proto3" json:"fees_per_byte,omitempty"`
	// public_key_owner is the owner's public key
	PublicKeyOwner []byte `protobuf:"bytes,3,opt,name=public_key_owner,json=publicKeyOwner,proto3" json:"public_key_owner,omitempty"`
	// contains filtered or unexported fields
}

StorageFileUploadMetadataProto represents a file's name and associated channel node item hash.

func (*StorageFileUploadMetadataProto) Descriptor deprecated added in v1.1.16

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

Deprecated: Use StorageFileUploadMetadataProto.ProtoReflect.Descriptor instead.

func (*StorageFileUploadMetadataProto) GetFeesPerByte added in v1.3.0

func (x *StorageFileUploadMetadataProto) GetFeesPerByte() string

func (*StorageFileUploadMetadataProto) GetFileName added in v1.1.16

func (x *StorageFileUploadMetadataProto) GetFileName() string

func (*StorageFileUploadMetadataProto) GetPublicKeyOwner added in v1.3.0

func (x *StorageFileUploadMetadataProto) GetPublicKeyOwner() []byte

func (*StorageFileUploadMetadataProto) ProtoMessage added in v1.1.16

func (*StorageFileUploadMetadataProto) ProtoMessage()

func (*StorageFileUploadMetadataProto) ProtoReflect added in v1.1.16

func (*StorageFileUploadMetadataProto) Reset added in v1.1.16

func (x *StorageFileUploadMetadataProto) Reset()

func (*StorageFileUploadMetadataProto) String added in v1.1.16

type StorageQueryRequestProto added in v1.1.16

type StorageQueryRequestProto struct {
	FromPeerAddr      string `protobuf:"bytes,1,opt,name=from_peer_addr,json=fromPeerAddr,proto3" json:"from_peer_addr,omitempty"`
	PreferredLocation string `protobuf:"bytes,2,opt,name=preferred_location,json=preferredLocation,proto3" json:"preferred_location,omitempty"`
	// contains filtered or unexported fields
}

StorageQueryRequestProto represents a storage query message.

func (*StorageQueryRequestProto) Descriptor deprecated added in v1.1.16

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

Deprecated: Use StorageQueryRequestProto.ProtoReflect.Descriptor instead.

func (*StorageQueryRequestProto) GetFromPeerAddr added in v1.1.16

func (x *StorageQueryRequestProto) GetFromPeerAddr() string

func (*StorageQueryRequestProto) GetPreferredLocation added in v1.1.16

func (x *StorageQueryRequestProto) GetPreferredLocation() string

func (*StorageQueryRequestProto) ProtoMessage added in v1.1.16

func (*StorageQueryRequestProto) ProtoMessage()

func (*StorageQueryRequestProto) ProtoReflect added in v1.1.16

func (x *StorageQueryRequestProto) ProtoReflect() protoreflect.Message

func (*StorageQueryRequestProto) Reset added in v1.1.16

func (x *StorageQueryRequestProto) Reset()

func (*StorageQueryRequestProto) String added in v1.1.16

func (x *StorageQueryRequestProto) String() string

type StorageQueryResponseProto added in v1.1.16

type StorageQueryResponseProto struct {
	StorageProviderPeerAddr string `` /* 134-byte string literal not displayed */
	Location                string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	FeesPerByte             string `protobuf:"bytes,3,opt,name=fees_per_byte,json=feesPerByte,proto3" json:"fees_per_byte,omitempty"`
	PublicKey               []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Hash                    []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
	Signature               []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	Uptime                  int64  `protobuf:"varint,7,opt,name=uptime,proto3" json:"uptime,omitempty"`
	SystemUptime            int64  `protobuf:"varint,8,opt,name=system_uptime,json=systemUptime,proto3" json:"system_uptime,omitempty"`
	StorageCapacity         uint64 `protobuf:"varint,9,opt,name=storage_capacity,json=storageCapacity,proto3" json:"storage_capacity,omitempty"`
	Platform                string `protobuf:"bytes,10,opt,name=platform,proto3" json:"platform,omitempty"`
	AllowFeesOverride       bool   `protobuf:"varint,11,opt,name=allow_fees_override,json=allowFeesOverride,proto3" json:"allow_fees_override,omitempty"`
	// contains filtered or unexported fields
}

StorageQueryResponseProto represents a storage response message.

func (*StorageQueryResponseProto) Descriptor deprecated added in v1.1.16

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

Deprecated: Use StorageQueryResponseProto.ProtoReflect.Descriptor instead.

func (*StorageQueryResponseProto) GetAllowFeesOverride added in v1.3.0

func (x *StorageQueryResponseProto) GetAllowFeesOverride() bool

func (*StorageQueryResponseProto) GetFeesPerByte added in v1.1.16

func (x *StorageQueryResponseProto) GetFeesPerByte() string

func (*StorageQueryResponseProto) GetHash added in v1.1.16

func (x *StorageQueryResponseProto) GetHash() []byte

func (*StorageQueryResponseProto) GetLocation added in v1.1.16

func (x *StorageQueryResponseProto) GetLocation() string

func (*StorageQueryResponseProto) GetPlatform added in v1.1.25

func (x *StorageQueryResponseProto) GetPlatform() string

func (*StorageQueryResponseProto) GetPublicKey added in v1.1.16

func (x *StorageQueryResponseProto) GetPublicKey() []byte

func (*StorageQueryResponseProto) GetSignature added in v1.1.16

func (x *StorageQueryResponseProto) GetSignature() []byte

func (*StorageQueryResponseProto) GetStorageCapacity added in v1.1.21

func (x *StorageQueryResponseProto) GetStorageCapacity() uint64

func (*StorageQueryResponseProto) GetStorageProviderPeerAddr added in v1.1.16

func (x *StorageQueryResponseProto) GetStorageProviderPeerAddr() string

func (*StorageQueryResponseProto) GetSystemUptime added in v1.1.21

func (x *StorageQueryResponseProto) GetSystemUptime() int64

func (*StorageQueryResponseProto) GetUptime added in v1.1.21

func (x *StorageQueryResponseProto) GetUptime() int64

func (*StorageQueryResponseProto) ProtoMessage added in v1.1.16

func (*StorageQueryResponseProto) ProtoMessage()

func (*StorageQueryResponseProto) ProtoReflect added in v1.1.16

func (*StorageQueryResponseProto) Reset added in v1.1.16

func (x *StorageQueryResponseProto) Reset()

func (*StorageQueryResponseProto) String added in v1.1.16

func (x *StorageQueryResponseProto) String() string

Jump to

Keyboard shortcuts

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