Merge c12731d4d48c321251de5e5b762edd0c1cff2207 into 03cc7dfc194cdb2e9f637bceec1bb8070a903c5e

This commit is contained in:
Ori Newman 2025-03-19 20:24:04 +00:00 committed by GitHub
commit 7d7f00ae43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 1406 additions and 279 deletions

View File

@ -167,6 +167,10 @@ const (
CmdGetFeeEstimateResponseMessage
CmdSubmitTransactionReplacementRequestMessage
CmdSubmitTransactionReplacementResponseMessage
CmdGetPruningWindowRootsRequestMessage
CmdGetPruningWindowRootsResponseMessage
CmdAddArchivalBlocksRequestMessage
CmdAddArchivalBlocksResponseMessage
)
// ProtocolMessageCommandToString maps all MessageCommands to their string representation
@ -308,6 +312,10 @@ var RPCMessageCommandToString = map[MessageCommand]string{
CmdGetFeeEstimateResponseMessage: "GetFeeEstimateResponse",
CmdSubmitTransactionReplacementRequestMessage: "SubmitTransactionReplacementRequest",
CmdSubmitTransactionReplacementResponseMessage: "SubmitTransactionReplacementResponse",
CmdGetPruningWindowRootsRequestMessage: "GetPruningWindowRootsRequestMessage",
CmdGetPruningWindowRootsResponseMessage: "GetPruningWindowRootsResponseMessage",
CmdAddArchivalBlocksRequestMessage: "AddArchivalBlocksRequestMessage",
CmdAddArchivalBlocksResponseMessage: "AddArchivalBlocksResponseMessage",
}
// Message is an interface that describes a kaspa message. A type that

View File

@ -0,0 +1,42 @@
package appmessage
type ArchivalBlock struct {
Block *RPCBlock
Child string
}
// AddArchivalBlocksRequestMessage represents a request to add archival blocks
type AddArchivalBlocksRequestMessage struct {
baseMessage
Blocks []*ArchivalBlock
}
// Command returns the protocol command string for the message
func (msg *AddArchivalBlocksRequestMessage) Command() MessageCommand {
return CmdAddArchivalBlocksRequestMessage
}
// NewAddArchivalBlocksRequestMessage returns a instance of the message
func NewAddArchivalBlocksRequestMessage(blocks []*ArchivalBlock) *AddArchivalBlocksRequestMessage {
return &AddArchivalBlocksRequestMessage{
Blocks: blocks,
}
}
// AddArchivalBlocksResponseMessage represents a response to the AddArchivalBlocks request
type AddArchivalBlocksResponseMessage struct {
baseMessage
Error *RPCError
}
// Command returns the protocol command string for the message
func (msg *AddArchivalBlocksResponseMessage) Command() MessageCommand {
return CmdAddArchivalBlocksResponseMessage
}
// NewAddArchivalBlocksResponseMessage returns a instance of the message
func NewAddArchivalBlocksResponseMessage(err *RPCError) *AddArchivalBlocksResponseMessage {
return &AddArchivalBlocksResponseMessage{
Error: err,
}
}

View File

@ -0,0 +1,30 @@
package appmessage
// GetPruningWindowRootsRequestMessage is an appmessage corresponding to
// its respective RPC message
type GetPruningWindowRootsRequestMessage struct {
baseMessage
}
// Command returns the protocol command string for the message
func (msg *GetPruningWindowRootsRequestMessage) Command() MessageCommand {
return CmdGetPruningWindowRootsRequestMessage
}
type PruningWindowRoots struct {
PPRoots []string
PPIndex uint64
}
// GetPruningWindowRootsResponseMessage is an appmessage corresponding to
// its respective RPC message
type GetPruningWindowRootsResponseMessage struct {
baseMessage
Roots []*PruningWindowRoots
Error *RPCError
}
// Command returns the protocol command string for the message
func (msg *GetPruningWindowRootsResponseMessage) Command() MessageCommand {
return CmdGetPruningWindowRootsResponseMessage
}

View File

@ -0,0 +1,76 @@
package main
import (
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/kaspanet/kaspad/infrastructure/config"
"github.com/kaspanet/kaspad/util"
"github.com/pkg/errors"
"github.com/jessevdk/go-flags"
"github.com/kaspanet/kaspad/version"
)
const (
defaultLogFilename = "archiveexport.log"
defaultErrLogFilename = "archiveexport_err.log"
)
var (
// Default configuration options
defaultAppDir = util.AppDir("archiveexport", false)
defaultLogFile = filepath.Join(defaultAppDir, defaultLogFilename)
defaultErrLogFile = filepath.Join(defaultAppDir, defaultErrLogFilename)
defaultRPCServer = "localhost"
defaultDataDir = filepath.Join(config.DefaultAppDir)
)
type configFlags struct {
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
RPCServer string `short:"s" long:"rpcserver" description:"RPC server to connect to"`
Profile string `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"`
AppDir string `short:"b" long:"appdir" description:"Node datadir"`
config.NetworkFlags
}
func parseConfig() (*configFlags, error) {
cfg := &configFlags{
RPCServer: defaultRPCServer,
AppDir: defaultDataDir,
}
parser := flags.NewParser(cfg, flags.PrintErrors|flags.HelpFlag)
_, err := parser.Parse()
// Show the version and exit if the version flag was specified.
if cfg.ShowVersion {
appName := filepath.Base(os.Args[0])
appName = strings.TrimSuffix(appName, filepath.Ext(appName))
fmt.Println(appName, "version", version.Version())
os.Exit(0)
}
if err != nil {
return nil, err
}
err = cfg.ResolveNetwork(parser)
if err != nil {
return nil, err
}
if cfg.Profile != "" {
profilePort, err := strconv.Atoi(cfg.Profile)
if err != nil || profilePort < 1024 || profilePort > 65535 {
return nil, errors.New("The profile port must be between 1024 and 65535")
}
}
initLog(defaultLogFile, defaultErrLogFile)
return cfg, nil
}

39
cmd/archiveexport/log.go Normal file
View File

@ -0,0 +1,39 @@
package main
import (
"fmt"
"github.com/kaspanet/kaspad/infrastructure/logger"
"github.com/kaspanet/kaspad/util/panics"
"os"
)
var (
backendLog = logger.NewBackend()
log = backendLog.Logger("ARCH")
spawn = panics.GoroutineWrapperFunc(log)
)
func initLog(logFile, errLogFile string) {
log.SetLevel(logger.LevelDebug)
err := backendLog.AddLogFile(logFile, logger.LevelTrace)
if err != nil {
fmt.Fprintf(os.Stderr, "Error adding log file %s as log rotator for level %s: %s", logFile, logger.LevelTrace, err)
os.Exit(1)
}
err = backendLog.AddLogFile(errLogFile, logger.LevelWarn)
if err != nil {
fmt.Fprintf(os.Stderr, "Error adding log file %s as log rotator for level %s: %s", errLogFile, logger.LevelWarn, err)
os.Exit(1)
}
err = backendLog.AddLogWriter(os.Stdout, logger.LevelInfo)
if err != nil {
fmt.Fprintf(os.Stderr, "Error adding stdout to the loggerfor level %s: %s", logger.LevelWarn, err)
os.Exit(1)
}
err = backendLog.Run()
if err != nil {
fmt.Fprintf(os.Stderr, "Error starting the logger: %s ", err)
os.Exit(1)
}
}

212
cmd/archiveexport/main.go Normal file
View File

@ -0,0 +1,212 @@
package main
import (
"fmt"
"os"
"path/filepath"
"time"
"github.com/kaspanet/kaspad/app/appmessage"
"github.com/kaspanet/kaspad/domain/consensus"
"github.com/kaspanet/kaspad/domain/consensus/model"
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
"github.com/kaspanet/kaspad/infrastructure/config"
"github.com/kaspanet/kaspad/infrastructure/db/database"
"github.com/kaspanet/kaspad/infrastructure/network/rpcclient"
"github.com/kaspanet/kaspad/util/profiling"
"github.com/kaspanet/kaspad/version"
"github.com/pkg/errors"
)
func main() {
// defer panics.HandlePanic(log, "MAIN", nil)
cfg, err := parseConfig()
if err != nil {
printErrorAndExit(errors.Errorf("Error parsing command-line arguments: %s", err))
}
defer backendLog.Close()
// Show version at startup.
log.Infof("Version %s", version.Version())
// Enable http profiling server if requested.
if cfg.Profile != "" {
profiling.Start(cfg.Profile, log)
}
err = mainImpl(cfg)
if err != nil {
printErrorAndExit(err)
}
}
func mainImpl(cfg *configFlags) error {
appDir := config.CleanAndExpandPath(cfg.AppDir)
appDir = filepath.Join(appDir, cfg.NetParams().Name)
dataDir := filepath.Join(appDir, "datadir2")
consensusConfig := &consensus.Config{Params: *cfg.NetParams()}
factory := consensus.NewFactory()
factory.SetTestDataDir(dataDir)
factory.AutoSetActivePrefix(true)
tc, tearDownFunc, err := factory.NewTestConsensus(consensusConfig, "archiveexport")
if err != nil {
return err
}
defer tearDownFunc(true)
rpcAddress, err := cfg.NetParams().NormalizeRPCServerAddress(cfg.RPCServer)
if err != nil {
return err
}
rpcClient, err := rpcclient.NewRPCClient(rpcAddress)
if err != nil {
return err
}
rootsResp, err := rpcClient.GetPruningWindowRoots()
if err != nil {
return err
}
ppHeaders, err := tc.PruningPointHeaders()
if err != nil {
return err
}
for _, root := range rootsResp.Roots {
log.Infof("Got root %s", root.PPRoots)
}
counterStart := time.Now()
counter := 0
for _, root := range rootsResp.Roots {
ppRoots, err := externalapi.NewDomainHashesFromStrings(root.PPRoots)
if err != nil {
return err
}
log.Infof("Adding past of %s", ppRoots)
if err != nil {
return err
}
nextPP := ppHeaders[root.PPIndex-1]
blockToChild := make(map[externalapi.DomainHash]externalapi.DomainHash)
// TODO: Since GD data is not always available, we should extract the blue work from the header and use that for topological traversal
heap := tc.DAGTraversalManager().NewDownHeap(model.NewStagingArea())
for _, ppRoot := range ppRoots {
heap.Push(ppRoot)
}
visited := make(map[externalapi.DomainHash]struct{})
chunk := make([]*appmessage.ArchivalBlock, 0, 1000)
for heap.Len() > 0 {
hash := heap.Pop()
if _, ok := visited[*hash]; ok {
continue
}
visited[*hash] = struct{}{}
// TODO: Use header data instead of GD data
blockGHOSTDAGData, err := tc.GHOSTDAGDataStore().Get(tc.DatabaseContext(), model.NewStagingArea(), hash, false)
if err != nil {
return err
}
if blockGHOSTDAGData.BlueWork().Cmp(nextPP.BlueWork()) <= 0 {
break
}
block, err := tc.BlockStore().Block(tc.DatabaseContext(), model.NewStagingArea(), hash)
if database.IsNotFoundError(err) {
continue
}
if err != nil {
return err
}
archivalBlock := &appmessage.ArchivalBlock{
Block: appmessage.DomainBlockToRPCBlock(block),
}
if child, ok := blockToChild[*hash]; ok {
archivalBlock.Child = child.String()
}
chunk = append(chunk, archivalBlock)
if len(chunk) == 1 {
log.Infof("Added %s to chunk", consensushashing.BlockHash(block))
}
if len(chunk) == cap(chunk) {
err := sendChunk(rpcClient, chunk)
if err != nil {
return err
}
counter += len(chunk)
counterDuration := time.Since(counterStart)
if counterDuration > 10*time.Second {
rate := float64(counter) / counterDuration.Seconds()
log.Infof("Sent %d blocks in the last %.2f seconds (%.2f blocks/second)", counter, counterDuration.Seconds(), rate)
counterStart = time.Now()
counter = 0
}
chunk = chunk[:0]
}
for _, parent := range block.Header.DirectParents() {
heap.Push(parent)
blockToChild[*parent] = *hash
}
}
if len(chunk) > 0 {
sendChunk(rpcClient, chunk)
}
}
return nil
}
func sendChunk(rpcClient *rpcclient.RPCClient, chunk []*appmessage.ArchivalBlock) error {
log.Infof("Sending chunk")
_, err := rpcClient.AddArchivalBlocks(chunk)
if err != nil {
return err
}
log.Infof("Sent chunk")
// Checking existence of first block for sanity
block := chunk[0]
domainBlock, err := appmessage.RPCBlockToDomainBlock(block.Block)
if err != nil {
return err
}
blockHash := consensushashing.BlockHash(domainBlock)
log.Infof("Checking block %s", blockHash)
resp, err := rpcClient.GetBlock(blockHash.String(), true)
if err != nil {
return err
}
if len(resp.Block.Transactions) == 0 {
return errors.Errorf("Block %s has no transactions on the server", blockHash)
}
return nil
}
func printErrorAndExit(err error) {
fmt.Fprintf(os.Stderr, "%+v\n", err)
os.Exit(1)
}

View File

@ -41,6 +41,9 @@ var commandTypes = []reflect.Type{
reflect.TypeOf(protowire.KaspadMessage_BanRequest{}),
reflect.TypeOf(protowire.KaspadMessage_UnbanRequest{}),
reflect.TypeOf(protowire.KaspadMessage_GetPruningWindowRootsRequest{}),
reflect.TypeOf(protowire.KaspadMessage_AddArchivalBlocksRequest{}),
}
type commandDescription struct {

View File

@ -12,6 +12,7 @@ import (
"github.com/kaspanet/kaspad/domain/consensus/processes/blockparentbuilder"
parentssanager "github.com/kaspanet/kaspad/domain/consensus/processes/parentsmanager"
"github.com/kaspanet/kaspad/domain/consensus/processes/pruningproofmanager"
"github.com/kaspanet/kaspad/domain/prefixmanager"
"github.com/kaspanet/kaspad/util/staging"
"github.com/pkg/errors"
@ -89,6 +90,8 @@ type Factory interface {
SetTestPreAllocateCache(preallocateCaches bool)
SetTestPastMedianTimeManager(medianTimeConstructor PastMedianTimeManagerConstructor)
SetTestDifficultyManager(difficultyConstructor DifficultyManagerConstructor)
AutoSetActivePrefix(value bool)
}
type factory struct {
@ -98,6 +101,7 @@ type factory struct {
difficultyConstructor DifficultyManagerConstructor
cacheSizeMiB *int
preallocateCaches *bool
autoCheckActivePrefix bool
}
// NewFactory creates a new Consensus factory
@ -106,6 +110,7 @@ func NewFactory() Factory {
ghostdagConstructor: ghostdagmanager.New,
pastMedianTimeConsructor: pastmediantimemanager.New,
difficultyConstructor: difficultymanager.New,
autoCheckActivePrefix: false,
}
}
@ -588,8 +593,19 @@ func (f *factory) NewTestConsensus(config *Config, testName string) (
return nil, nil, err
}
testConsensusDBPrefix := &prefix.Prefix{}
consensusAsInterface, shouldMigrate, err := f.NewConsensus(config, db, testConsensusDBPrefix, nil)
prefix := &prefix.Prefix{}
if f.autoCheckActivePrefix {
activePrefix, exists, err := prefixmanager.ActivePrefix(db)
if err != nil {
return nil, nil, err
}
if exists {
prefix = activePrefix
}
}
consensusAsInterface, shouldMigrate, err := f.NewConsensus(config, db, prefix, nil)
if err != nil {
return nil, nil, err
}
@ -648,6 +664,11 @@ func (f *factory) SetTestPreAllocateCache(preallocateCaches bool) {
f.preallocateCaches = &preallocateCaches
}
// AutoSetActivePrefix implements Factory.
func (f *factory) AutoSetActivePrefix(value bool) {
f.autoCheckActivePrefix = value
}
func dagStores(config *Config,
prefixBucket model.DBBucket,
pruningWindowSizePlusFinalityDepthForCache, pruningWindowSizeForCaches int,

View File

@ -59,6 +59,18 @@ func NewDomainHashFromString(hashString string) (*DomainHash, error) {
return NewDomainHashFromByteSlice(hashBytes)
}
func NewDomainHashesFromStrings(hashStrings []string) ([]*DomainHash, error) {
hashes := make([]*DomainHash, len(hashStrings))
for i, hashString := range hashStrings {
hash, err := NewDomainHashFromString(hashString)
if err != nil {
return nil, err
}
hashes[i] = hash
}
return hashes, nil
}
// String returns the Hash as the hexadecimal string of the hash.
func (hash DomainHash) String() string {
return hex.EncodeToString(hash.hashArray[:])

View File

@ -149,9 +149,9 @@ type ServiceOptions struct {
ServiceCommand string `short:"s" long:"service" description:"Service command {install, remove, start, stop}"`
}
// cleanAndExpandPath expands environment variables and leading ~ in the
// CleanAndExpandPath expands environment variables and leading ~ in the
// passed path, cleans the result, and returns it.
func cleanAndExpandPath(path string) string {
func CleanAndExpandPath(path string) string {
// Expand initial ~ to OS specific home directory.
if strings.HasPrefix(path, "~") {
homeDir := filepath.Dir(DefaultAppDir)
@ -320,7 +320,7 @@ func LoadConfig() (*Config, error) {
}
cfg.RelayNonStd = relayNonStd
cfg.AppDir = cleanAndExpandPath(cfg.AppDir)
cfg.AppDir = CleanAndExpandPath(cfg.AppDir)
// Append the network type to the app directory so it is "namespaced"
// per network.
// All data is specific to a network, so namespacing the data directory
@ -332,7 +332,7 @@ func LoadConfig() (*Config, error) {
if cfg.LogDir == "" {
cfg.LogDir = filepath.Join(cfg.AppDir, defaultLogDirname)
}
cfg.LogDir = cleanAndExpandPath(cfg.LogDir)
cfg.LogDir = CleanAndExpandPath(cfg.LogDir)
// Special show command to list supported subsystems and exit.
if cfg.LogLevel == "show" {

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc v3.12.3
// protoc-gen-go v1.36.5
// protoc v3.12.4
// source: messages.proto
package protowire
@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@ -176,6 +177,10 @@ type KaspadMessage struct {
// *KaspadMessage_GetFeeEstimateResponse
// *KaspadMessage_GetFeeEstimateExperimentalResponse
// *KaspadMessage_GetCurrentBlockColorResponse
// *KaspadMessage_GetPruningWindowRootsRequest
// *KaspadMessage_GetPruningWindowRootsResponse
// *KaspadMessage_AddArchivalBlocksRequest
// *KaspadMessage_AddArchivalBlocksResponse
Payload isKaspadMessage_Payload `protobuf_oneof:"payload"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
@ -1586,6 +1591,42 @@ func (x *KaspadMessage) GetGetCurrentBlockColorResponse() *GetCurrentBlockColorR
return nil
}
func (x *KaspadMessage) GetGetPruningWindowRootsRequest() *GetPruningWindowRootsRequestMessage {
if x != nil {
if x, ok := x.Payload.(*KaspadMessage_GetPruningWindowRootsRequest); ok {
return x.GetPruningWindowRootsRequest
}
}
return nil
}
func (x *KaspadMessage) GetGetPruningWindowRootsResponse() *GetPruningWindowRootsResponseMessage {
if x != nil {
if x, ok := x.Payload.(*KaspadMessage_GetPruningWindowRootsResponse); ok {
return x.GetPruningWindowRootsResponse
}
}
return nil
}
func (x *KaspadMessage) GetAddArchivalBlocksRequest() *AddArchivalBlocksRequestMessage {
if x != nil {
if x, ok := x.Payload.(*KaspadMessage_AddArchivalBlocksRequest); ok {
return x.AddArchivalBlocksRequest
}
}
return nil
}
func (x *KaspadMessage) GetAddArchivalBlocksResponse() *AddArchivalBlocksResponseMessage {
if x != nil {
if x, ok := x.Payload.(*KaspadMessage_AddArchivalBlocksResponse); ok {
return x.AddArchivalBlocksResponse
}
}
return nil
}
type isKaspadMessage_Payload interface {
isKaspadMessage_Payload()
}
@ -2198,6 +2239,22 @@ type KaspadMessage_GetCurrentBlockColorResponse struct {
GetCurrentBlockColorResponse *GetCurrentBlockColorResponseMessage `protobuf:"bytes,1111,opt,name=getCurrentBlockColorResponse,proto3,oneof"`
}
type KaspadMessage_GetPruningWindowRootsRequest struct {
GetPruningWindowRootsRequest *GetPruningWindowRootsRequestMessage `protobuf:"bytes,1113,opt,name=getPruningWindowRootsRequest,proto3,oneof"`
}
type KaspadMessage_GetPruningWindowRootsResponse struct {
GetPruningWindowRootsResponse *GetPruningWindowRootsResponseMessage `protobuf:"bytes,1114,opt,name=getPruningWindowRootsResponse,proto3,oneof"`
}
type KaspadMessage_AddArchivalBlocksRequest struct {
AddArchivalBlocksRequest *AddArchivalBlocksRequestMessage `protobuf:"bytes,1115,opt,name=addArchivalBlocksRequest,proto3,oneof"`
}
type KaspadMessage_AddArchivalBlocksResponse struct {
AddArchivalBlocksResponse *AddArchivalBlocksResponseMessage `protobuf:"bytes,1116,opt,name=addArchivalBlocksResponse,proto3,oneof"`
}
func (*KaspadMessage_Addresses) isKaspadMessage_Payload() {}
func (*KaspadMessage_Block) isKaspadMessage_Payload() {}
@ -2502,13 +2559,21 @@ func (*KaspadMessage_GetFeeEstimateExperimentalResponse) isKaspadMessage_Payload
func (*KaspadMessage_GetCurrentBlockColorResponse) isKaspadMessage_Payload() {}
func (*KaspadMessage_GetPruningWindowRootsRequest) isKaspadMessage_Payload() {}
func (*KaspadMessage_GetPruningWindowRootsResponse) isKaspadMessage_Payload() {}
func (*KaspadMessage_AddArchivalBlocksRequest) isKaspadMessage_Payload() {}
func (*KaspadMessage_AddArchivalBlocksResponse) isKaspadMessage_Payload() {}
var File_messages_proto protoreflect.FileDescriptor
var file_messages_proto_rawDesc = []byte{
var file_messages_proto_rawDesc = string([]byte{
0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x1a, 0x09, 0x70, 0x32, 0x70,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x80, 0x80, 0x01, 0x0a, 0x0d, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73,
0x6f, 0x22, 0xca, 0x83, 0x01, 0x0a, 0x0d, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
0x69, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x4d, 0x65, 0x73,
@ -3531,31 +3596,60 @@ var file_messages_proto_rawDesc = []byte{
0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x1c, 0x67, 0x65,
0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6c,
0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32, 0x50, 0x0a, 0x03, 0x50, 0x32, 0x50, 0x12, 0x49, 0x0a, 0x0d,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x1c, 0x67, 0x65,
0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f,
0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0xd9, 0x08, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x47, 0x65,
0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f,
0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x48, 0x00, 0x52, 0x1c, 0x67, 0x65, 0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x57,
0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x78, 0x0a, 0x1d, 0x67, 0x65, 0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x57,
0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x18, 0xda, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67,
0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x1d, 0x67, 0x65,
0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f,
0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x18, 0x61,
0x64, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0xdb, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x72,
0x63, 0x68, 0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x18, 0x61, 0x64,
0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6c, 0x0a, 0x19, 0x61, 0x64, 0x64, 0x41, 0x72, 0x63,
0x68, 0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x18, 0xdc, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76,
0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x19, 0x61, 0x64, 0x64, 0x41, 0x72,
0x63, 0x68, 0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32,
0x50, 0x0a, 0x03, 0x50, 0x32, 0x50, 0x12, 0x49, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x32, 0x50, 0x0a, 0x03, 0x52, 0x50, 0x43, 0x12, 0x49,
0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12,
0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70,
0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61,
0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30,
0x01, 0x32, 0x50, 0x0a, 0x03, 0x52, 0x50, 0x43, 0x12, 0x49, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65, 0x74,
0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72,
0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
0x61, 0x67, 0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e,
0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28,
0x01, 0x30, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61,
0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
})
var (
file_messages_proto_rawDescOnce sync.Once
file_messages_proto_rawDescData = file_messages_proto_rawDesc
file_messages_proto_rawDescData []byte
)
func file_messages_proto_rawDescGZIP() []byte {
file_messages_proto_rawDescOnce.Do(func() {
file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_messages_proto_rawDescData)
file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)))
})
return file_messages_proto_rawDescData
}
@ -3714,6 +3808,10 @@ var file_messages_proto_goTypes = []any{
(*GetFeeEstimateResponseMessage)(nil), // 149: protowire.GetFeeEstimateResponseMessage
(*GetFeeEstimateExperimentalResponseMessage)(nil), // 150: protowire.GetFeeEstimateExperimentalResponseMessage
(*GetCurrentBlockColorResponseMessage)(nil), // 151: protowire.GetCurrentBlockColorResponseMessage
(*GetPruningWindowRootsRequestMessage)(nil), // 152: protowire.GetPruningWindowRootsRequestMessage
(*GetPruningWindowRootsResponseMessage)(nil), // 153: protowire.GetPruningWindowRootsResponseMessage
(*AddArchivalBlocksRequestMessage)(nil), // 154: protowire.AddArchivalBlocksRequestMessage
(*AddArchivalBlocksResponseMessage)(nil), // 155: protowire.AddArchivalBlocksResponseMessage
}
var file_messages_proto_depIdxs = []int32{
1, // 0: protowire.KaspadMessage.addresses:type_name -> protowire.AddressesMessage
@ -3868,15 +3966,19 @@ var file_messages_proto_depIdxs = []int32{
149, // 149: protowire.KaspadMessage.getFeeEstimateResponse:type_name -> protowire.GetFeeEstimateResponseMessage
150, // 150: protowire.KaspadMessage.getFeeEstimateExperimentalResponse:type_name -> protowire.GetFeeEstimateExperimentalResponseMessage
151, // 151: protowire.KaspadMessage.getCurrentBlockColorResponse:type_name -> protowire.GetCurrentBlockColorResponseMessage
0, // 152: protowire.P2P.MessageStream:input_type -> protowire.KaspadMessage
0, // 153: protowire.RPC.MessageStream:input_type -> protowire.KaspadMessage
0, // 154: protowire.P2P.MessageStream:output_type -> protowire.KaspadMessage
0, // 155: protowire.RPC.MessageStream:output_type -> protowire.KaspadMessage
154, // [154:156] is the sub-list for method output_type
152, // [152:154] is the sub-list for method input_type
152, // [152:152] is the sub-list for extension type_name
152, // [152:152] is the sub-list for extension extendee
0, // [0:152] is the sub-list for field type_name
152, // 152: protowire.KaspadMessage.getPruningWindowRootsRequest:type_name -> protowire.GetPruningWindowRootsRequestMessage
153, // 153: protowire.KaspadMessage.getPruningWindowRootsResponse:type_name -> protowire.GetPruningWindowRootsResponseMessage
154, // 154: protowire.KaspadMessage.addArchivalBlocksRequest:type_name -> protowire.AddArchivalBlocksRequestMessage
155, // 155: protowire.KaspadMessage.addArchivalBlocksResponse:type_name -> protowire.AddArchivalBlocksResponseMessage
0, // 156: protowire.P2P.MessageStream:input_type -> protowire.KaspadMessage
0, // 157: protowire.RPC.MessageStream:input_type -> protowire.KaspadMessage
0, // 158: protowire.P2P.MessageStream:output_type -> protowire.KaspadMessage
0, // 159: protowire.RPC.MessageStream:output_type -> protowire.KaspadMessage
158, // [158:160] is the sub-list for method output_type
156, // [156:158] is the sub-list for method input_type
156, // [156:156] is the sub-list for extension type_name
156, // [156:156] is the sub-list for extension extendee
0, // [0:156] is the sub-list for field type_name
}
func init() { file_messages_proto_init() }
@ -4039,12 +4141,16 @@ func file_messages_proto_init() {
(*KaspadMessage_GetFeeEstimateResponse)(nil),
(*KaspadMessage_GetFeeEstimateExperimentalResponse)(nil),
(*KaspadMessage_GetCurrentBlockColorResponse)(nil),
(*KaspadMessage_GetPruningWindowRootsRequest)(nil),
(*KaspadMessage_GetPruningWindowRootsResponse)(nil),
(*KaspadMessage_AddArchivalBlocksRequest)(nil),
(*KaspadMessage_AddArchivalBlocksResponse)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_messages_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@ -4055,7 +4161,6 @@ func file_messages_proto_init() {
MessageInfos: file_messages_proto_msgTypes,
}.Build()
File_messages_proto = out.File
file_messages_proto_rawDesc = nil
file_messages_proto_goTypes = nil
file_messages_proto_depIdxs = nil
}

View File

@ -29,12 +29,15 @@ message KaspadMessage {
UnexpectedPruningPointMessage unexpectedPruningPoint = 27;
IbdBlockLocatorMessage ibdBlockLocator = 30;
IbdBlockLocatorHighestHashMessage ibdBlockLocatorHighestHash = 31;
RequestNextPruningPointUtxoSetChunkMessage requestNextPruningPointUtxoSetChunk = 33;
RequestNextPruningPointUtxoSetChunkMessage
requestNextPruningPointUtxoSetChunk = 33;
DonePruningPointUtxoSetChunksMessage donePruningPointUtxoSetChunks = 34;
IbdBlockLocatorHighestHashNotFoundMessage ibdBlockLocatorHighestHashNotFound = 35;
IbdBlockLocatorHighestHashNotFoundMessage
ibdBlockLocatorHighestHashNotFound = 35;
BlockWithTrustedDataMessage blockWithTrustedData = 36;
DoneBlocksWithTrustedDataMessage doneBlocksWithTrustedData = 37;
RequestPruningPointAndItsAnticoneMessage requestPruningPointAndItsAnticone = 40;
RequestPruningPointAndItsAnticoneMessage requestPruningPointAndItsAnticone =
40;
BlockHeadersMessage blockHeaders = 41;
RequestNextHeadersMessage requestNextHeaders = 42;
DoneHeadersMessage DoneHeaders = 43;
@ -50,7 +53,8 @@ message KaspadMessage {
RequestIBDChainBlockLocatorMessage requestIBDChainBlockLocator = 53;
IbdChainBlockLocatorMessage ibdChainBlockLocator = 54;
RequestAnticoneMessage requestAnticone = 55;
RequestNextPruningPointAndItsAnticoneBlocksMessage requestNextPruningPointAndItsAnticoneBlocks = 56;
RequestNextPruningPointAndItsAnticoneBlocksMessage
requestNextPruningPointAndItsAnticoneBlocks = 56;
GetCurrentNetworkRequestMessage getCurrentNetworkRequest = 1001;
GetCurrentNetworkResponseMessage getCurrentNetworkResponse = 1002;
@ -73,15 +77,20 @@ message KaspadMessage {
AddPeerResponseMessage addPeerResponse = 1019;
SubmitTransactionRequestMessage submitTransactionRequest = 1020;
SubmitTransactionResponseMessage submitTransactionResponse = 1021;
NotifyVirtualSelectedParentChainChangedRequestMessage notifyVirtualSelectedParentChainChangedRequest = 1022;
NotifyVirtualSelectedParentChainChangedResponseMessage notifyVirtualSelectedParentChainChangedResponse = 1023;
VirtualSelectedParentChainChangedNotificationMessage virtualSelectedParentChainChangedNotification = 1024;
NotifyVirtualSelectedParentChainChangedRequestMessage
notifyVirtualSelectedParentChainChangedRequest = 1022;
NotifyVirtualSelectedParentChainChangedResponseMessage
notifyVirtualSelectedParentChainChangedResponse = 1023;
VirtualSelectedParentChainChangedNotificationMessage
virtualSelectedParentChainChangedNotification = 1024;
GetBlockRequestMessage getBlockRequest = 1025;
GetBlockResponseMessage getBlockResponse = 1026;
GetSubnetworkRequestMessage getSubnetworkRequest = 1027;
GetSubnetworkResponseMessage getSubnetworkResponse = 1028;
GetVirtualSelectedParentChainFromBlockRequestMessage getVirtualSelectedParentChainFromBlockRequest = 1029;
GetVirtualSelectedParentChainFromBlockResponseMessage getVirtualSelectedParentChainFromBlockResponse = 1030;
GetVirtualSelectedParentChainFromBlockRequestMessage
getVirtualSelectedParentChainFromBlockRequest = 1029;
GetVirtualSelectedParentChainFromBlockResponseMessage
getVirtualSelectedParentChainFromBlockResponse = 1030;
GetBlocksRequestMessage getBlocksRequest = 1031;
GetBlocksResponseMessage getBlocksResponse = 1032;
GetBlockCountRequestMessage getBlockCountRequest = 1033;
@ -89,11 +98,14 @@ message KaspadMessage {
GetBlockDagInfoRequestMessage getBlockDagInfoRequest = 1035;
GetBlockDagInfoResponseMessage getBlockDagInfoResponse = 1036;
ResolveFinalityConflictRequestMessage resolveFinalityConflictRequest = 1037;
ResolveFinalityConflictResponseMessage resolveFinalityConflictResponse = 1038;
ResolveFinalityConflictResponseMessage resolveFinalityConflictResponse =
1038;
NotifyFinalityConflictsRequestMessage notifyFinalityConflictsRequest = 1039;
NotifyFinalityConflictsResponseMessage notifyFinalityConflictsResponse = 1040;
NotifyFinalityConflictsResponseMessage notifyFinalityConflictsResponse =
1040;
FinalityConflictNotificationMessage finalityConflictNotification = 1041;
FinalityConflictResolvedNotificationMessage finalityConflictResolvedNotification = 1042;
FinalityConflictResolvedNotificationMessage
finalityConflictResolvedNotification = 1042;
GetMempoolEntriesRequestMessage getMempoolEntriesRequest = 1043;
GetMempoolEntriesResponseMessage getMempoolEntriesResponse = 1044;
ShutDownRequestMessage shutDownRequest = 1045;
@ -105,29 +117,46 @@ message KaspadMessage {
UtxosChangedNotificationMessage utxosChangedNotification = 1051;
GetUtxosByAddressesRequestMessage getUtxosByAddressesRequest = 1052;
GetUtxosByAddressesResponseMessage getUtxosByAddressesResponse = 1053;
GetVirtualSelectedParentBlueScoreRequestMessage getVirtualSelectedParentBlueScoreRequest = 1054;
GetVirtualSelectedParentBlueScoreResponseMessage getVirtualSelectedParentBlueScoreResponse = 1055;
NotifyVirtualSelectedParentBlueScoreChangedRequestMessage notifyVirtualSelectedParentBlueScoreChangedRequest = 1056;
NotifyVirtualSelectedParentBlueScoreChangedResponseMessage notifyVirtualSelectedParentBlueScoreChangedResponse = 1057;
VirtualSelectedParentBlueScoreChangedNotificationMessage virtualSelectedParentBlueScoreChangedNotification = 1058;
GetVirtualSelectedParentBlueScoreRequestMessage
getVirtualSelectedParentBlueScoreRequest = 1054;
GetVirtualSelectedParentBlueScoreResponseMessage
getVirtualSelectedParentBlueScoreResponse = 1055;
NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
notifyVirtualSelectedParentBlueScoreChangedRequest = 1056;
NotifyVirtualSelectedParentBlueScoreChangedResponseMessage
notifyVirtualSelectedParentBlueScoreChangedResponse = 1057;
VirtualSelectedParentBlueScoreChangedNotificationMessage
virtualSelectedParentBlueScoreChangedNotification = 1058;
BanRequestMessage banRequest = 1059;
BanResponseMessage banResponse = 1060;
UnbanRequestMessage unbanRequest = 1061;
UnbanResponseMessage unbanResponse = 1062;
GetInfoRequestMessage getInfoRequest = 1063;
GetInfoResponseMessage getInfoResponse = 1064;
StopNotifyingUtxosChangedRequestMessage stopNotifyingUtxosChangedRequest = 1065;
StopNotifyingUtxosChangedResponseMessage stopNotifyingUtxosChangedResponse = 1066;
NotifyPruningPointUTXOSetOverrideRequestMessage notifyPruningPointUTXOSetOverrideRequest = 1067;
NotifyPruningPointUTXOSetOverrideResponseMessage notifyPruningPointUTXOSetOverrideResponse = 1068;
PruningPointUTXOSetOverrideNotificationMessage pruningPointUTXOSetOverrideNotification = 1069;
StopNotifyingPruningPointUTXOSetOverrideRequestMessage stopNotifyingPruningPointUTXOSetOverrideRequest = 1070;
StopNotifyingPruningPointUTXOSetOverrideResponseMessage stopNotifyingPruningPointUTXOSetOverrideResponse = 1071;
EstimateNetworkHashesPerSecondRequestMessage estimateNetworkHashesPerSecondRequest = 1072;
EstimateNetworkHashesPerSecondResponseMessage estimateNetworkHashesPerSecondResponse = 1073;
NotifyVirtualDaaScoreChangedRequestMessage notifyVirtualDaaScoreChangedRequest = 1074;
NotifyVirtualDaaScoreChangedResponseMessage notifyVirtualDaaScoreChangedResponse = 1075;
VirtualDaaScoreChangedNotificationMessage virtualDaaScoreChangedNotification = 1076;
StopNotifyingUtxosChangedRequestMessage stopNotifyingUtxosChangedRequest =
1065;
StopNotifyingUtxosChangedResponseMessage stopNotifyingUtxosChangedResponse =
1066;
NotifyPruningPointUTXOSetOverrideRequestMessage
notifyPruningPointUTXOSetOverrideRequest = 1067;
NotifyPruningPointUTXOSetOverrideResponseMessage
notifyPruningPointUTXOSetOverrideResponse = 1068;
PruningPointUTXOSetOverrideNotificationMessage
pruningPointUTXOSetOverrideNotification = 1069;
StopNotifyingPruningPointUTXOSetOverrideRequestMessage
stopNotifyingPruningPointUTXOSetOverrideRequest = 1070;
StopNotifyingPruningPointUTXOSetOverrideResponseMessage
stopNotifyingPruningPointUTXOSetOverrideResponse = 1071;
EstimateNetworkHashesPerSecondRequestMessage
estimateNetworkHashesPerSecondRequest = 1072;
EstimateNetworkHashesPerSecondResponseMessage
estimateNetworkHashesPerSecondResponse = 1073;
NotifyVirtualDaaScoreChangedRequestMessage
notifyVirtualDaaScoreChangedRequest = 1074;
NotifyVirtualDaaScoreChangedResponseMessage
notifyVirtualDaaScoreChangedResponse = 1075;
VirtualDaaScoreChangedNotificationMessage
virtualDaaScoreChangedNotification = 1076;
GetBalanceByAddressRequestMessage getBalanceByAddressRequest = 1077;
GetBalanceByAddressResponseMessage getBalanceByAddressResponse = 1078;
GetBalancesByAddressesRequestMessage getBalancesByAddressesRequest = 1079;
@ -135,39 +164,51 @@ message KaspadMessage {
NotifyNewBlockTemplateRequestMessage notifyNewBlockTemplateRequest = 1081;
NotifyNewBlockTemplateResponseMessage notifyNewBlockTemplateResponse = 1082;
NewBlockTemplateNotificationMessage newBlockTemplateNotification = 1083;
GetMempoolEntriesByAddressesRequestMessage getMempoolEntriesByAddressesRequest = 1084;
GetMempoolEntriesByAddressesResponseMessage getMempoolEntriesByAddressesResponse = 1085;
GetMempoolEntriesByAddressesRequestMessage
getMempoolEntriesByAddressesRequest = 1084;
GetMempoolEntriesByAddressesResponseMessage
getMempoolEntriesByAddressesResponse = 1085;
GetCoinSupplyRequestMessage getCoinSupplyRequest = 1086;
GetCoinSupplyResponseMessage getCoinSupplyResponse= 1087;
GetCoinSupplyResponseMessage getCoinSupplyResponse = 1087;
PingRequestMessage pingRequest = 1088;
GetMetricsRequestMessage getMetricsRequest = 1090;
GetServerInfoRequestMessage getServerInfoRequest = 1092;
GetSyncStatusRequestMessage getSyncStatusRequest = 1094;
GetDaaScoreTimestampEstimateRequestMessage getDaaScoreTimestampEstimateRequest = 1096;
SubmitTransactionReplacementRequestMessage submitTransactionReplacementRequest = 1100;
GetDaaScoreTimestampEstimateRequestMessage
getDaaScoreTimestampEstimateRequest = 1096;
SubmitTransactionReplacementRequestMessage
submitTransactionReplacementRequest = 1100;
GetConnectionsRequestMessage getConnectionsRequest = 1102;
GetSystemInfoRequestMessage getSystemInfoRequest = 1104;
GetFeeEstimateRequestMessage getFeeEstimateRequest = 1106;
GetFeeEstimateExperimentalRequestMessage getFeeEstimateExperimentalRequest = 1108;
GetFeeEstimateExperimentalRequestMessage getFeeEstimateExperimentalRequest =
1108;
GetCurrentBlockColorRequestMessage getCurrentBlockColorRequest = 1110;
PingResponseMessage pingResponse= 1089;
GetMetricsResponseMessage getMetricsResponse= 1091;
PingResponseMessage pingResponse = 1089;
GetMetricsResponseMessage getMetricsResponse = 1091;
GetServerInfoResponseMessage getServerInfoResponse = 1093;
GetSyncStatusResponseMessage getSyncStatusResponse = 1095;
GetDaaScoreTimestampEstimateResponseMessage getDaaScoreTimestampEstimateResponse = 1097;
SubmitTransactionReplacementResponseMessage submitTransactionReplacementResponse = 1101;
GetConnectionsResponseMessage getConnectionsResponse= 1103;
GetSystemInfoResponseMessage getSystemInfoResponse= 1105;
GetDaaScoreTimestampEstimateResponseMessage
getDaaScoreTimestampEstimateResponse = 1097;
SubmitTransactionReplacementResponseMessage
submitTransactionReplacementResponse = 1101;
GetConnectionsResponseMessage getConnectionsResponse = 1103;
GetSystemInfoResponseMessage getSystemInfoResponse = 1105;
GetFeeEstimateResponseMessage getFeeEstimateResponse = 1107;
GetFeeEstimateExperimentalResponseMessage getFeeEstimateExperimentalResponse = 1109;
GetFeeEstimateExperimentalResponseMessage
getFeeEstimateExperimentalResponse = 1109;
GetCurrentBlockColorResponseMessage getCurrentBlockColorResponse = 1111;
GetPruningWindowRootsRequestMessage getPruningWindowRootsRequest = 1113;
GetPruningWindowRootsResponseMessage getPruningWindowRootsResponse = 1114;
AddArchivalBlocksRequestMessage addArchivalBlocksRequest = 1115;
AddArchivalBlocksResponseMessage addArchivalBlocksResponse = 1116;
}
}
service P2P {
rpc MessageStream (stream KaspadMessage) returns (stream KaspadMessage) {}
rpc MessageStream(stream KaspadMessage) returns (stream KaspadMessage) {}
}
service RPC {
rpc MessageStream (stream KaspadMessage) returns (stream KaspadMessage) {}
rpc MessageStream(stream KaspadMessage) returns (stream KaspadMessage) {}
}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.12.3
// - protoc-gen-go-grpc v1.5.1
// - protoc v3.12.4
// source: messages.proto
package protowire
@ -15,14 +15,18 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
P2P_MessageStream_FullMethodName = "/protowire.P2P/MessageStream"
)
// P2PClient is the client API for P2P service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type P2PClient interface {
MessageStream(ctx context.Context, opts ...grpc.CallOption) (P2P_MessageStreamClient, error)
MessageStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[KaspadMessage, KaspadMessage], error)
}
type p2PClient struct {
@ -33,53 +37,39 @@ func NewP2PClient(cc grpc.ClientConnInterface) P2PClient {
return &p2PClient{cc}
}
func (c *p2PClient) MessageStream(ctx context.Context, opts ...grpc.CallOption) (P2P_MessageStreamClient, error) {
stream, err := c.cc.NewStream(ctx, &P2P_ServiceDesc.Streams[0], "/protowire.P2P/MessageStream", opts...)
func (c *p2PClient) MessageStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[KaspadMessage, KaspadMessage], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &P2P_ServiceDesc.Streams[0], P2P_MessageStream_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &p2PMessageStreamClient{stream}
x := &grpc.GenericClientStream[KaspadMessage, KaspadMessage]{ClientStream: stream}
return x, nil
}
type P2P_MessageStreamClient interface {
Send(*KaspadMessage) error
Recv() (*KaspadMessage, error)
grpc.ClientStream
}
type p2PMessageStreamClient struct {
grpc.ClientStream
}
func (x *p2PMessageStreamClient) Send(m *KaspadMessage) error {
return x.ClientStream.SendMsg(m)
}
func (x *p2PMessageStreamClient) Recv() (*KaspadMessage, error) {
m := new(KaspadMessage)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type P2P_MessageStreamClient = grpc.BidiStreamingClient[KaspadMessage, KaspadMessage]
// P2PServer is the server API for P2P service.
// All implementations must embed UnimplementedP2PServer
// for forward compatibility
// for forward compatibility.
type P2PServer interface {
MessageStream(P2P_MessageStreamServer) error
MessageStream(grpc.BidiStreamingServer[KaspadMessage, KaspadMessage]) error
mustEmbedUnimplementedP2PServer()
}
// UnimplementedP2PServer must be embedded to have forward compatible implementations.
type UnimplementedP2PServer struct {
}
// UnimplementedP2PServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedP2PServer struct{}
func (UnimplementedP2PServer) MessageStream(P2P_MessageStreamServer) error {
func (UnimplementedP2PServer) MessageStream(grpc.BidiStreamingServer[KaspadMessage, KaspadMessage]) error {
return status.Errorf(codes.Unimplemented, "method MessageStream not implemented")
}
func (UnimplementedP2PServer) mustEmbedUnimplementedP2PServer() {}
func (UnimplementedP2PServer) testEmbeddedByValue() {}
// UnsafeP2PServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to P2PServer will
@ -89,34 +79,22 @@ type UnsafeP2PServer interface {
}
func RegisterP2PServer(s grpc.ServiceRegistrar, srv P2PServer) {
// If the following call pancis, it indicates UnimplementedP2PServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&P2P_ServiceDesc, srv)
}
func _P2P_MessageStream_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(P2PServer).MessageStream(&p2PMessageStreamServer{stream})
return srv.(P2PServer).MessageStream(&grpc.GenericServerStream[KaspadMessage, KaspadMessage]{ServerStream: stream})
}
type P2P_MessageStreamServer interface {
Send(*KaspadMessage) error
Recv() (*KaspadMessage, error)
grpc.ServerStream
}
type p2PMessageStreamServer struct {
grpc.ServerStream
}
func (x *p2PMessageStreamServer) Send(m *KaspadMessage) error {
return x.ServerStream.SendMsg(m)
}
func (x *p2PMessageStreamServer) Recv() (*KaspadMessage, error) {
m := new(KaspadMessage)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type P2P_MessageStreamServer = grpc.BidiStreamingServer[KaspadMessage, KaspadMessage]
// P2P_ServiceDesc is the grpc.ServiceDesc for P2P service.
// It's only intended for direct use with grpc.RegisterService,
@ -136,11 +114,15 @@ var P2P_ServiceDesc = grpc.ServiceDesc{
Metadata: "messages.proto",
}
const (
RPC_MessageStream_FullMethodName = "/protowire.RPC/MessageStream"
)
// RPCClient is the client API for RPC service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type RPCClient interface {
MessageStream(ctx context.Context, opts ...grpc.CallOption) (RPC_MessageStreamClient, error)
MessageStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[KaspadMessage, KaspadMessage], error)
}
type rPCClient struct {
@ -151,53 +133,39 @@ func NewRPCClient(cc grpc.ClientConnInterface) RPCClient {
return &rPCClient{cc}
}
func (c *rPCClient) MessageStream(ctx context.Context, opts ...grpc.CallOption) (RPC_MessageStreamClient, error) {
stream, err := c.cc.NewStream(ctx, &RPC_ServiceDesc.Streams[0], "/protowire.RPC/MessageStream", opts...)
func (c *rPCClient) MessageStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[KaspadMessage, KaspadMessage], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &RPC_ServiceDesc.Streams[0], RPC_MessageStream_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &rPCMessageStreamClient{stream}
x := &grpc.GenericClientStream[KaspadMessage, KaspadMessage]{ClientStream: stream}
return x, nil
}
type RPC_MessageStreamClient interface {
Send(*KaspadMessage) error
Recv() (*KaspadMessage, error)
grpc.ClientStream
}
type rPCMessageStreamClient struct {
grpc.ClientStream
}
func (x *rPCMessageStreamClient) Send(m *KaspadMessage) error {
return x.ClientStream.SendMsg(m)
}
func (x *rPCMessageStreamClient) Recv() (*KaspadMessage, error) {
m := new(KaspadMessage)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RPC_MessageStreamClient = grpc.BidiStreamingClient[KaspadMessage, KaspadMessage]
// RPCServer is the server API for RPC service.
// All implementations must embed UnimplementedRPCServer
// for forward compatibility
// for forward compatibility.
type RPCServer interface {
MessageStream(RPC_MessageStreamServer) error
MessageStream(grpc.BidiStreamingServer[KaspadMessage, KaspadMessage]) error
mustEmbedUnimplementedRPCServer()
}
// UnimplementedRPCServer must be embedded to have forward compatible implementations.
type UnimplementedRPCServer struct {
}
// UnimplementedRPCServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRPCServer struct{}
func (UnimplementedRPCServer) MessageStream(RPC_MessageStreamServer) error {
func (UnimplementedRPCServer) MessageStream(grpc.BidiStreamingServer[KaspadMessage, KaspadMessage]) error {
return status.Errorf(codes.Unimplemented, "method MessageStream not implemented")
}
func (UnimplementedRPCServer) mustEmbedUnimplementedRPCServer() {}
func (UnimplementedRPCServer) testEmbeddedByValue() {}
// UnsafeRPCServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RPCServer will
@ -207,34 +175,22 @@ type UnsafeRPCServer interface {
}
func RegisterRPCServer(s grpc.ServiceRegistrar, srv RPCServer) {
// If the following call pancis, it indicates UnimplementedRPCServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&RPC_ServiceDesc, srv)
}
func _RPC_MessageStream_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(RPCServer).MessageStream(&rPCMessageStreamServer{stream})
return srv.(RPCServer).MessageStream(&grpc.GenericServerStream[KaspadMessage, KaspadMessage]{ServerStream: stream})
}
type RPC_MessageStreamServer interface {
Send(*KaspadMessage) error
Recv() (*KaspadMessage, error)
grpc.ServerStream
}
type rPCMessageStreamServer struct {
grpc.ServerStream
}
func (x *rPCMessageStreamServer) Send(m *KaspadMessage) error {
return x.ServerStream.SendMsg(m)
}
func (x *rPCMessageStreamServer) Recv() (*KaspadMessage, error) {
m := new(KaspadMessage)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RPC_MessageStreamServer = grpc.BidiStreamingServer[KaspadMessage, KaspadMessage]
// RPC_ServiceDesc is the grpc.ServiceDesc for RPC service.
// It's only intended for direct use with grpc.RegisterService,

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc v3.12.3
// protoc-gen-go v1.36.5
// protoc v3.12.4
// source: p2p.proto
package protowire
@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@ -229,7 +230,7 @@ type TransactionMessage struct {
SubnetworkId *SubnetworkId `protobuf:"bytes,5,opt,name=subnetworkId,proto3" json:"subnetworkId,omitempty"`
Gas uint64 `protobuf:"varint,6,opt,name=gas,proto3" json:"gas,omitempty"`
Payload []byte `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"`
Mass uint64 `protobuf:"varint,9,opt,name=mass,proto3" json:"mass,omitempty"` // <<< BPS10 - Add mass to TransactionMessage
Mass uint64 `protobuf:"varint,9,opt,name=mass,proto3" json:"mass,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -3046,7 +3047,7 @@ func (x *TrustedDataMessage) GetGhostdagData() []*BlockGhostdagDataHashPair {
var File_p2p_proto protoreflect.FileDescriptor
var file_p2p_proto_rawDesc = []byte{
var file_p2p_proto_rawDesc = string([]byte{
0x0a, 0x09, 0x70, 0x32, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61,
@ -3442,16 +3443,16 @@ var file_p2p_proto_rawDesc = []byte{
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65,
0x74, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69,
0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_p2p_proto_rawDescOnce sync.Once
file_p2p_proto_rawDescData = file_p2p_proto_rawDesc
file_p2p_proto_rawDescData []byte
)
func file_p2p_proto_rawDescGZIP() []byte {
file_p2p_proto_rawDescOnce.Do(func() {
file_p2p_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_rawDescData)
file_p2p_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_p2p_proto_rawDesc), len(file_p2p_proto_rawDesc)))
})
return file_p2p_proto_rawDescData
}
@ -3598,7 +3599,7 @@ func file_p2p_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_p2p_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_p2p_proto_rawDesc), len(file_p2p_proto_rawDesc)),
NumEnums: 0,
NumMessages: 60,
NumExtensions: 0,
@ -3609,7 +3610,6 @@ func file_p2p_proto_init() {
MessageInfos: file_p2p_proto_msgTypes,
}.Build()
File_p2p_proto = out.File
file_p2p_proto_rawDesc = nil
file_p2p_proto_goTypes = nil
file_p2p_proto_depIdxs = nil
}

View File

@ -1,17 +1,20 @@
// RPC-related types. Request messages, response messages, and dependant types.
//
// Clients are expected to build RequestMessages and wrap them in KaspadMessage. (see messages.proto)
// Clients are expected to build RequestMessages and wrap them in KaspadMessage.
// (see messages.proto)
//
// Having received a RequestMessage, (wrapped in a KaspadMessage) the RPC server will respond with a
// ResponseMessage (likewise wrapped in a KaspadMessage) respective to the original RequestMessage.
// Having received a RequestMessage, (wrapped in a KaspadMessage) the RPC server
// will respond with a ResponseMessage (likewise wrapped in a KaspadMessage)
// respective to the original RequestMessage.
//
// **IMPORTANT:** This API is a work in progress and is subject to break between versions.
// **IMPORTANT:** This API is a work in progress and is subject to break between
// versions.
//
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.2
// protoc v3.12.3
// protoc-gen-go v1.36.5
// protoc v3.12.4
// source: rpc.proto
package protowire
@ -21,6 +24,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@ -81,7 +85,8 @@ func (SubmitBlockResponseMessage_RejectReason) EnumDescriptor() ([]byte, []int)
// RPCError represents a generic non-internal error.
//
// Receivers of any ResponseMessage are expected to check whether its error field is not null.
// Receivers of any ResponseMessage are expected to check whether its error
// field is not null.
type RPCError struct {
state protoimpl.MessageState `protogen:"open.v1"`
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
@ -488,7 +493,7 @@ type RpcTransaction struct {
Gas uint64 `protobuf:"varint,6,opt,name=gas,proto3" json:"gas,omitempty"`
Payload string `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"`
VerboseData *RpcTransactionVerboseData `protobuf:"bytes,9,opt,name=verboseData,proto3" json:"verboseData,omitempty"`
Mass uint64 `protobuf:"varint,10,opt,name=mass,proto3" json:"mass,omitempty"` // <<< BPS10 - Add mass to RpcTransaction
Mass uint64 `protobuf:"varint,10,opt,name=mass,proto3" json:"mass,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1058,7 +1063,8 @@ func (x *RpcTransactionOutputVerboseData) GetScriptPublicKeyAddress() string {
return ""
}
// GetCurrentNetworkRequestMessage requests the network kaspad is currently running against.
// GetCurrentNetworkRequestMessage requests the network kaspad is currently
// running against.
//
// Possible networks are: Mainnet, Testnet, Simnet, Devnet
type GetCurrentNetworkRequestMessage struct {
@ -1150,7 +1156,8 @@ func (x *GetCurrentNetworkResponseMessage) GetError() *RPCError {
}
// SubmitBlockRequestMessage requests to submit a block into the DAG.
// Blocks are generally expected to have been generated using the getBlockTemplate call.
// Blocks are generally expected to have been generated using the
// getBlockTemplate call.
//
// See: GetBlockTemplateRequestMessage
type SubmitBlockRequestMessage struct {
@ -1258,7 +1265,8 @@ func (x *SubmitBlockResponseMessage) GetError() *RPCError {
}
// GetBlockTemplateRequestMessage requests a current block template.
// Callers are expected to solve the block template and submit it using the submitBlock call
// Callers are expected to solve the block template and submit it using the
// submitBlock call
//
// See: SubmitBlockRequestMessage
type GetBlockTemplateRequestMessage struct {
@ -1318,9 +1326,10 @@ type GetBlockTemplateResponseMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
Block *RpcBlock `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"`
// Whether kaspad thinks that it's synced.
// Callers are discouraged (but not forbidden) from solving blocks when kaspad is not synced.
// That is because when kaspad isn't in sync with the rest of the network there's a high
// chance the block will never be accepted, thus the solving effort would have been wasted.
// Callers are discouraged (but not forbidden) from solving blocks when kaspad
// is not synced. That is because when kaspad isn't in sync with the rest of
// the network there's a high chance the block will never be accepted, thus
// the solving effort would have been wasted.
IsSynced bool `protobuf:"varint,2,opt,name=isSynced,proto3" json:"isSynced,omitempty"`
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
@ -1378,7 +1387,8 @@ func (x *GetBlockTemplateResponseMessage) GetError() *RPCError {
return nil
}
// NotifyBlockAddedRequestMessage registers this connection for blockAdded notifications.
// NotifyBlockAddedRequestMessage registers this connection for blockAdded
// notifications.
//
// See: BlockAddedNotificationMessage
type NotifyBlockAddedRequestMessage struct {
@ -1461,8 +1471,8 @@ func (x *NotifyBlockAddedResponseMessage) GetError() *RPCError {
return nil
}
// BlockAddedNotificationMessage is sent whenever a blocks has been added (NOT accepted)
// into the DAG.
// BlockAddedNotificationMessage is sent whenever a blocks has been added (NOT
// accepted) into the DAG.
//
// See: NotifyBlockAddedRequestMessage
type BlockAddedNotificationMessage struct {
@ -1509,8 +1519,8 @@ func (x *BlockAddedNotificationMessage) GetBlock() *RpcBlock {
return nil
}
// GetPeerAddressesRequestMessage requests the list of known kaspad addresses in the
// current network. (mainnet, testnet, etc.)
// GetPeerAddressesRequestMessage requests the list of known kaspad addresses in
// the current network. (mainnet, testnet, etc.)
type GetPeerAddressesRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@ -1741,8 +1751,8 @@ func (x *GetSelectedTipHashResponseMessage) GetError() *RPCError {
return nil
}
// GetMempoolEntryRequestMessage requests information about a specific transaction
// in the mempool.
// GetMempoolEntryRequestMessage requests information about a specific
// transaction in the mempool.
type GetMempoolEntryRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The transaction's TransactionID.
@ -1856,8 +1866,8 @@ func (x *GetMempoolEntryResponseMessage) GetError() *RPCError {
return nil
}
// GetMempoolEntriesRequestMessage requests information about all the transactions
// currently in the mempool.
// GetMempoolEntriesRequestMessage requests information about all the
// transactions currently in the mempool.
type GetMempoolEntriesRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
IncludeOrphanPool bool `protobuf:"varint,1,opt,name=includeOrphanPool,proto3" json:"includeOrphanPool,omitempty"`
@ -2022,8 +2032,8 @@ func (x *MempoolEntry) GetIsOrphan() bool {
return false
}
// GetConnectedPeerInfoRequestMessage requests information about all the p2p peers
// currently connected to this kaspad.
// GetConnectedPeerInfoRequestMessage requests information about all the p2p
// peers currently connected to this kaspad.
type GetConnectedPeerInfoRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@ -2430,7 +2440,8 @@ func (x *SubmitTransactionResponseMessage) GetError() *RPCError {
return nil
}
// NotifyVirtualSelectedParentChainChangedRequestMessage registers this connection for virtualSelectedParentChainChanged notifications.
// NotifyVirtualSelectedParentChainChangedRequestMessage registers this
// connection for virtualSelectedParentChainChanged notifications.
//
// See: VirtualSelectedParentChainChangedNotificationMessage
type NotifyVirtualSelectedParentChainChangedRequestMessage struct {
@ -2521,8 +2532,8 @@ func (x *NotifyVirtualSelectedParentChainChangedResponseMessage) GetError() *RPC
return nil
}
// VirtualSelectedParentChainChangedNotificationMessage is sent whenever the DAG's selected parent
// chain had changed.
// VirtualSelectedParentChainChangedNotificationMessage is sent whenever the
// DAG's selected parent chain had changed.
//
// See: NotifyVirtualSelectedParentChainChangedRequestMessage
type VirtualSelectedParentChainChangedNotificationMessage struct {
@ -2531,7 +2542,8 @@ type VirtualSelectedParentChainChangedNotificationMessage struct {
RemovedChainBlockHashes []string `protobuf:"bytes,1,rep,name=removedChainBlockHashes,proto3" json:"removedChainBlockHashes,omitempty"`
// The chain blocks that were added, in low-to-high order
AddedChainBlockHashes []string `protobuf:"bytes,3,rep,name=addedChainBlockHashes,proto3" json:"addedChainBlockHashes,omitempty"`
// Will be filled only if `includeAcceptedTransactionIds = true` in the notify request.
// Will be filled only if `includeAcceptedTransactionIds = true` in the notify
// request.
AcceptedTransactionIds []*AcceptedTransactionIds `protobuf:"bytes,2,rep,name=acceptedTransactionIds,proto3" json:"acceptedTransactionIds,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
@ -2794,8 +2806,8 @@ func (x *GetSubnetworkResponseMessage) GetError() *RPCError {
return nil
}
// GetVirtualSelectedParentChainFromBlockRequestMessage requests the virtual selected
// parent chain from some startHash to this kaspad's current virtual
// GetVirtualSelectedParentChainFromBlockRequestMessage requests the virtual
// selected parent chain from some startHash to this kaspad's current virtual
type GetVirtualSelectedParentChainFromBlockRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
StartHash string `protobuf:"bytes,1,opt,name=startHash,proto3" json:"startHash,omitempty"`
@ -2907,7 +2919,8 @@ type GetVirtualSelectedParentChainFromBlockResponseMessage struct {
// The chain blocks that were added, in low-to-high order
AddedChainBlockHashes []string `protobuf:"bytes,3,rep,name=addedChainBlockHashes,proto3" json:"addedChainBlockHashes,omitempty"`
// The transactions accepted by each block in addedChainBlockHashes.
// Will be filled only if `includeAcceptedTransactionIds = true` in the request.
// Will be filled only if `includeAcceptedTransactionIds = true` in the
// request.
AcceptedTransactionIds []*AcceptedTransactionIds `protobuf:"bytes,2,rep,name=acceptedTransactionIds,proto3" json:"acceptedTransactionIds,omitempty"`
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
@ -2972,8 +2985,8 @@ func (x *GetVirtualSelectedParentChainFromBlockResponseMessage) GetError() *RPCE
return nil
}
// GetBlocksRequestMessage requests blocks between a certain block lowHash up to this
// kaspad's current virtual.
// GetBlocksRequestMessage requests blocks between a certain block lowHash up to
// this kaspad's current virtual.
type GetBlocksRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
LowHash string `protobuf:"bytes,1,opt,name=lowHash,proto3" json:"lowHash,omitempty"`
@ -3094,8 +3107,8 @@ func (x *GetBlocksResponseMessage) GetError() *RPCError {
return nil
}
// GetBlockCountRequestMessage requests the current number of blocks in this kaspad.
// Note that this number may decrease as pruning occurs.
// GetBlockCountRequestMessage requests the current number of blocks in this
// kaspad. Note that this number may decrease as pruning occurs.
type GetBlockCountRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@ -3192,8 +3205,8 @@ func (x *GetBlockCountResponseMessage) GetError() *RPCError {
return nil
}
// GetBlockDagInfoRequestMessage requests general information about the current state
// of this kaspad's DAG.
// GetBlockDagInfoRequestMessage requests general information about the current
// state of this kaspad's DAG.
type GetBlockDagInfoRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@ -3797,8 +3810,8 @@ func (x *GetHeadersResponseMessage) GetError() *RPCError {
return nil
}
// NotifyUtxosChangedRequestMessage registers this connection for utxoChanged notifications
// for the given addresses.
// NotifyUtxosChangedRequestMessage registers this connection for utxoChanged
// notifications for the given addresses.
//
// This call is only available when this kaspad was started with `--utxoindex`
//
@ -3891,7 +3904,8 @@ func (x *NotifyUtxosChangedResponseMessage) GetError() *RPCError {
return nil
}
// UtxosChangedNotificationMessage is sent whenever the UTXO index had been updated.
// UtxosChangedNotificationMessage is sent whenever the UTXO index had been
// updated.
//
// See: NotifyUtxosChangedRequestMessage
type UtxosChangedNotificationMessage struct {
@ -4006,8 +4020,8 @@ func (x *UtxosByAddressesEntry) GetUtxoEntry() *RpcUtxoEntry {
return nil
}
// StopNotifyingUtxosChangedRequestMessage unregisters this connection for utxoChanged notifications
// for the given addresses.
// StopNotifyingUtxosChangedRequestMessage unregisters this connection for
// utxoChanged notifications for the given addresses.
//
// This call is only available when this kaspad was started with `--utxoindex`
//
@ -4100,7 +4114,8 @@ func (x *StopNotifyingUtxosChangedResponseMessage) GetError() *RPCError {
return nil
}
// GetUtxosByAddressesRequestMessage requests all current UTXOs for the given kaspad addresses
// GetUtxosByAddressesRequestMessage requests all current UTXOs for the given
// kaspad addresses
//
// This call is only available when this kaspad was started with `--utxoindex`
type GetUtxosByAddressesRequestMessage struct {
@ -4199,7 +4214,8 @@ func (x *GetUtxosByAddressesResponseMessage) GetError() *RPCError {
return nil
}
// GetBalanceByAddressRequest returns the total balance in unspent transactions towards a given address
// GetBalanceByAddressRequest returns the total balance in unspent transactions
// towards a given address
//
// This call is only available when this kaspad was started with `--utxoindex`
type GetBalanceByAddressRequestMessage struct {
@ -4454,8 +4470,8 @@ func (x *GetBalancesByAddressesResponseMessage) GetError() *RPCError {
return nil
}
// GetVirtualSelectedParentBlueScoreRequestMessage requests the blue score of the current selected parent
// of the virtual block.
// GetVirtualSelectedParentBlueScoreRequestMessage requests the blue score of
// the current selected parent of the virtual block.
type GetVirtualSelectedParentBlueScoreRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@ -4544,8 +4560,8 @@ func (x *GetVirtualSelectedParentBlueScoreResponseMessage) GetError() *RPCError
return nil
}
// NotifyVirtualSelectedParentBlueScoreChangedRequestMessage registers this connection for
// virtualSelectedParentBlueScoreChanged notifications.
// NotifyVirtualSelectedParentBlueScoreChangedRequestMessage registers this
// connection for virtualSelectedParentBlueScoreChanged notifications.
//
// See: VirtualSelectedParentBlueScoreChangedNotificationMessage
type NotifyVirtualSelectedParentBlueScoreChangedRequestMessage struct {
@ -4628,8 +4644,8 @@ func (x *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) GetError()
return nil
}
// VirtualSelectedParentBlueScoreChangedNotificationMessage is sent whenever the blue score
// of the virtual's selected parent changes.
// VirtualSelectedParentBlueScoreChangedNotificationMessage is sent whenever the
// blue score of the virtual's selected parent changes.
//
// See NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
type VirtualSelectedParentBlueScoreChangedNotificationMessage struct {
@ -4894,8 +4910,8 @@ func (x *NotifyPruningPointUTXOSetOverrideResponseMessage) GetError() *RPCError
return nil
}
// PruningPointUTXOSetOverrideNotificationMessage is sent whenever the UTXO index
// resets due to pruning point change via IBD.
// PruningPointUTXOSetOverrideNotificationMessage is sent whenever the UTXO
// index resets due to pruning point change via IBD.
//
// See NotifyPruningPointUTXOSetOverrideRequestMessage
type PruningPointUTXOSetOverrideNotificationMessage struct {
@ -4934,8 +4950,8 @@ func (*PruningPointUTXOSetOverrideNotificationMessage) Descriptor() ([]byte, []i
return file_rpc_proto_rawDescGZIP(), []int{89}
}
// StopNotifyingPruningPointUTXOSetOverrideRequestMessage unregisters this connection for
// pruning point UTXO set override notifications.
// StopNotifyingPruningPointUTXOSetOverrideRequestMessage unregisters this
// connection for pruning point UTXO set override notifications.
//
// This call is only available when this kaspad was started with `--utxoindex`
//
@ -5507,8 +5523,8 @@ func (x *NotifyNewBlockTemplateResponseMessage) GetError() *RPCError {
return nil
}
// NewBlockTemplateNotificationMessage is sent whenever a new updated block template is
// available for miners.
// NewBlockTemplateNotificationMessage is sent whenever a new updated block
// template is available for miners.
//
// See NotifyNewBlockTemplateRequestMessage
type NewBlockTemplateNotificationMessage struct {
@ -5756,10 +5772,11 @@ func (*GetCoinSupplyRequestMessage) Descriptor() ([]byte, []int) {
}
type GetCoinSupplyResponseMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
MaxSompi uint64 `protobuf:"varint,1,opt,name=maxSompi,proto3" json:"maxSompi,omitempty"` // note: this is a hard coded maxSupply, actual maxSupply is expected to deviate by upto -5%, but cannot be measured exactly.
CirculatingSompi uint64 `protobuf:"varint,2,opt,name=circulatingSompi,proto3" json:"circulatingSompi,omitempty"`
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
state protoimpl.MessageState `protogen:"open.v1"`
MaxSompi uint64 `protobuf:"varint,1,opt,name=maxSompi,proto3" json:"maxSompi,omitempty"` // note: this is a hard coded maxSupply, actual maxSupply is expected
// to deviate by upto -5%, but cannot be measured exactly.
CirculatingSompi uint64 `protobuf:"varint,2,opt,name=circulatingSompi,proto3" json:"circulatingSompi,omitempty"`
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -7795,9 +7812,289 @@ func (x *SubmitTransactionReplacementResponseMessage) GetError() *RPCError {
return nil
}
type GetPruningWindowRootsRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetPruningWindowRootsRequestMessage) Reset() {
*x = GetPruningWindowRootsRequestMessage{}
mi := &file_rpc_proto_msgTypes[139]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetPruningWindowRootsRequestMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPruningWindowRootsRequestMessage) ProtoMessage() {}
func (x *GetPruningWindowRootsRequestMessage) ProtoReflect() protoreflect.Message {
mi := &file_rpc_proto_msgTypes[139]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPruningWindowRootsRequestMessage.ProtoReflect.Descriptor instead.
func (*GetPruningWindowRootsRequestMessage) Descriptor() ([]byte, []int) {
return file_rpc_proto_rawDescGZIP(), []int{139}
}
type PruningWindowRoots struct {
state protoimpl.MessageState `protogen:"open.v1"`
PpRoots []string `protobuf:"bytes,1,rep,name=pp_roots,json=ppRoots,proto3" json:"pp_roots,omitempty"`
PpIndex uint64 `protobuf:"varint,2,opt,name=pp_index,json=ppIndex,proto3" json:"pp_index,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PruningWindowRoots) Reset() {
*x = PruningWindowRoots{}
mi := &file_rpc_proto_msgTypes[140]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PruningWindowRoots) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PruningWindowRoots) ProtoMessage() {}
func (x *PruningWindowRoots) ProtoReflect() protoreflect.Message {
mi := &file_rpc_proto_msgTypes[140]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PruningWindowRoots.ProtoReflect.Descriptor instead.
func (*PruningWindowRoots) Descriptor() ([]byte, []int) {
return file_rpc_proto_rawDescGZIP(), []int{140}
}
func (x *PruningWindowRoots) GetPpRoots() []string {
if x != nil {
return x.PpRoots
}
return nil
}
func (x *PruningWindowRoots) GetPpIndex() uint64 {
if x != nil {
return x.PpIndex
}
return 0
}
type GetPruningWindowRootsResponseMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
Roots []*PruningWindowRoots `protobuf:"bytes,1,rep,name=roots,proto3" json:"roots,omitempty"`
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetPruningWindowRootsResponseMessage) Reset() {
*x = GetPruningWindowRootsResponseMessage{}
mi := &file_rpc_proto_msgTypes[141]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetPruningWindowRootsResponseMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPruningWindowRootsResponseMessage) ProtoMessage() {}
func (x *GetPruningWindowRootsResponseMessage) ProtoReflect() protoreflect.Message {
mi := &file_rpc_proto_msgTypes[141]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPruningWindowRootsResponseMessage.ProtoReflect.Descriptor instead.
func (*GetPruningWindowRootsResponseMessage) Descriptor() ([]byte, []int) {
return file_rpc_proto_rawDescGZIP(), []int{141}
}
func (x *GetPruningWindowRootsResponseMessage) GetRoots() []*PruningWindowRoots {
if x != nil {
return x.Roots
}
return nil
}
func (x *GetPruningWindowRootsResponseMessage) GetError() *RPCError {
if x != nil {
return x.Error
}
return nil
}
type ArchivalBlock struct {
state protoimpl.MessageState `protogen:"open.v1"`
Child string `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"`
Block *RpcBlock `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ArchivalBlock) Reset() {
*x = ArchivalBlock{}
mi := &file_rpc_proto_msgTypes[142]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ArchivalBlock) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ArchivalBlock) ProtoMessage() {}
func (x *ArchivalBlock) ProtoReflect() protoreflect.Message {
mi := &file_rpc_proto_msgTypes[142]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ArchivalBlock.ProtoReflect.Descriptor instead.
func (*ArchivalBlock) Descriptor() ([]byte, []int) {
return file_rpc_proto_rawDescGZIP(), []int{142}
}
func (x *ArchivalBlock) GetChild() string {
if x != nil {
return x.Child
}
return ""
}
func (x *ArchivalBlock) GetBlock() *RpcBlock {
if x != nil {
return x.Block
}
return nil
}
type AddArchivalBlocksRequestMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
Blocks []*ArchivalBlock `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AddArchivalBlocksRequestMessage) Reset() {
*x = AddArchivalBlocksRequestMessage{}
mi := &file_rpc_proto_msgTypes[143]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AddArchivalBlocksRequestMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddArchivalBlocksRequestMessage) ProtoMessage() {}
func (x *AddArchivalBlocksRequestMessage) ProtoReflect() protoreflect.Message {
mi := &file_rpc_proto_msgTypes[143]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddArchivalBlocksRequestMessage.ProtoReflect.Descriptor instead.
func (*AddArchivalBlocksRequestMessage) Descriptor() ([]byte, []int) {
return file_rpc_proto_rawDescGZIP(), []int{143}
}
func (x *AddArchivalBlocksRequestMessage) GetBlocks() []*ArchivalBlock {
if x != nil {
return x.Blocks
}
return nil
}
type AddArchivalBlocksResponseMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AddArchivalBlocksResponseMessage) Reset() {
*x = AddArchivalBlocksResponseMessage{}
mi := &file_rpc_proto_msgTypes[144]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AddArchivalBlocksResponseMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddArchivalBlocksResponseMessage) ProtoMessage() {}
func (x *AddArchivalBlocksResponseMessage) ProtoReflect() protoreflect.Message {
mi := &file_rpc_proto_msgTypes[144]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddArchivalBlocksResponseMessage.ProtoReflect.Descriptor instead.
func (*AddArchivalBlocksResponseMessage) Descriptor() ([]byte, []int) {
return file_rpc_proto_rawDescGZIP(), []int{144}
}
func (x *AddArchivalBlocksResponseMessage) GetError() *RPCError {
if x != nil {
return x.Error
}
return nil
}
var File_rpc_proto protoreflect.FileDescriptor
var file_rpc_proto_rawDesc = []byte{
var file_rpc_proto_rawDesc = string([]byte{
0x0a, 0x09, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x22, 0x24, 0x0a, 0x08, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72,
0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
@ -8947,26 +9244,57 @@ var file_rpc_proto_rawDesc = []byte{
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8,
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72,
0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
0x72, 0x22, 0x25, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x57,
0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4a, 0x0a, 0x12, 0x50, 0x72, 0x75, 0x6e,
0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x19,
0x0a, 0x08, 0x70, 0x70, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
0x52, 0x07, 0x70, 0x70, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x70, 0x5f,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x70, 0x70, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x22, 0x87, 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x50, 0x72, 0x75, 0x6e,
0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a,
0x05, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67,
0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x52, 0x05, 0x72, 0x6f, 0x6f,
0x74, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52,
0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x50,
0x0a, 0x0d, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x63, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x29, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65,
0x2e, 0x52, 0x70, 0x63, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
0x22, 0x53, 0x0a, 0x1f, 0x41, 0x64, 0x64, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x61, 0x6c, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e,
0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x4e, 0x0a, 0x20, 0x41, 0x64, 0x64, 0x41, 0x72, 0x63, 0x68,
0x69, 0x76, 0x61, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72,
0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x61, 0x73,
0x70, 0x61, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
})
var (
file_rpc_proto_rawDescOnce sync.Once
file_rpc_proto_rawDescData = file_rpc_proto_rawDesc
file_rpc_proto_rawDescData []byte
)
func file_rpc_proto_rawDescGZIP() []byte {
file_rpc_proto_rawDescOnce.Do(func() {
file_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_proto_rawDescData)
file_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_rpc_proto_rawDesc), len(file_rpc_proto_rawDesc)))
})
return file_rpc_proto_rawDescData
}
var file_rpc_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 139)
var file_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 145)
var file_rpc_proto_goTypes = []any{
(SubmitBlockResponseMessage_RejectReason)(0), // 0: protowire.SubmitBlockResponseMessage.RejectReason
(*RPCError)(nil), // 1: protowire.RPCError
@ -9108,6 +9436,12 @@ var file_rpc_proto_goTypes = []any{
(*GetCurrentBlockColorResponseMessage)(nil), // 137: protowire.GetCurrentBlockColorResponseMessage
(*SubmitTransactionReplacementRequestMessage)(nil), // 138: protowire.SubmitTransactionReplacementRequestMessage
(*SubmitTransactionReplacementResponseMessage)(nil), // 139: protowire.SubmitTransactionReplacementResponseMessage
(*GetPruningWindowRootsRequestMessage)(nil), // 140: protowire.GetPruningWindowRootsRequestMessage
(*PruningWindowRoots)(nil), // 141: protowire.PruningWindowRoots
(*GetPruningWindowRootsResponseMessage)(nil), // 142: protowire.GetPruningWindowRootsResponseMessage
(*ArchivalBlock)(nil), // 143: protowire.ArchivalBlock
(*AddArchivalBlocksRequestMessage)(nil), // 144: protowire.AddArchivalBlocksRequestMessage
(*AddArchivalBlocksResponseMessage)(nil), // 145: protowire.AddArchivalBlocksResponseMessage
}
var file_rpc_proto_depIdxs = []int32{
3, // 0: protowire.RpcBlock.header:type_name -> protowire.RpcBlockHeader
@ -9211,11 +9545,16 @@ var file_rpc_proto_depIdxs = []int32{
6, // 98: protowire.SubmitTransactionReplacementRequestMessage.transaction:type_name -> protowire.RpcTransaction
6, // 99: protowire.SubmitTransactionReplacementResponseMessage.replacedTransaction:type_name -> protowire.RpcTransaction
1, // 100: protowire.SubmitTransactionReplacementResponseMessage.error:type_name -> protowire.RPCError
101, // [101:101] is the sub-list for method output_type
101, // [101:101] is the sub-list for method input_type
101, // [101:101] is the sub-list for extension type_name
101, // [101:101] is the sub-list for extension extendee
0, // [0:101] is the sub-list for field type_name
141, // 101: protowire.GetPruningWindowRootsResponseMessage.roots:type_name -> protowire.PruningWindowRoots
1, // 102: protowire.GetPruningWindowRootsResponseMessage.error:type_name -> protowire.RPCError
2, // 103: protowire.ArchivalBlock.block:type_name -> protowire.RpcBlock
143, // 104: protowire.AddArchivalBlocksRequestMessage.blocks:type_name -> protowire.ArchivalBlock
1, // 105: protowire.AddArchivalBlocksResponseMessage.error:type_name -> protowire.RPCError
106, // [106:106] is the sub-list for method output_type
106, // [106:106] is the sub-list for method input_type
106, // [106:106] is the sub-list for extension type_name
106, // [106:106] is the sub-list for extension extendee
0, // [0:106] is the sub-list for field type_name
}
func init() { file_rpc_proto_init() }
@ -9227,9 +9566,9 @@ func file_rpc_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_rpc_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_rpc_proto_rawDesc), len(file_rpc_proto_rawDesc)),
NumEnums: 1,
NumMessages: 139,
NumMessages: 145,
NumExtensions: 0,
NumServices: 0,
},
@ -9239,7 +9578,6 @@ func file_rpc_proto_init() {
MessageInfos: file_rpc_proto_msgTypes,
}.Build()
File_rpc_proto = out.File
file_rpc_proto_rawDesc = nil
file_rpc_proto_goTypes = nil
file_rpc_proto_depIdxs = nil
}

View File

@ -888,4 +888,25 @@ message SubmitTransactionReplacementResponseMessage {
RpcTransaction replacedTransaction = 2;
RPCError error = 1000;
}
}
message GetPruningWindowRootsRequestMessage {}
message PruningWindowRoots {
repeated string pp_roots = 1;
uint64 pp_index = 2;
}
message GetPruningWindowRootsResponseMessage {
repeated PruningWindowRoots roots = 1;
RPCError error = 1000;
}
message ArchivalBlock {
string child = 1;
RpcBlock block = 2;
}
message AddArchivalBlocksRequestMessage { repeated ArchivalBlock blocks = 1; }
message AddArchivalBlocksResponseMessage { RPCError error = 1000; }

View File

@ -0,0 +1,87 @@
package protowire
import (
"github.com/kaspanet/kaspad/app/appmessage"
"github.com/pkg/errors"
)
func (x *KaspadMessage_AddArchivalBlocksRequest) toAppMessage() (appmessage.Message, error) {
if x == nil {
return nil, errors.Wrapf(errorNil, "KaspadMessage_AddArchivalBlocksRequest is nil")
}
blocks := make([]*appmessage.ArchivalBlock, len(x.AddArchivalBlocksRequest.Blocks))
for i, block := range x.AddArchivalBlocksRequest.Blocks {
rpcBlock, err := block.Block.toAppMessage()
if err != nil {
return nil, err
}
blocks[i] = &appmessage.ArchivalBlock{
Block: rpcBlock,
Child: block.Child,
}
}
return &appmessage.AddArchivalBlocksRequestMessage{
Blocks: blocks,
}, nil
}
func (x *KaspadMessage_AddArchivalBlocksRequest) fromAppMessage(message *appmessage.AddArchivalBlocksRequestMessage) error {
blocks := make([]*ArchivalBlock, len(message.Blocks))
for i, block := range message.Blocks {
protoBlock := &ArchivalBlock{
Child: block.Child,
}
if block.Block != nil {
protoBlock.Block = &RpcBlock{}
err := protoBlock.Block.fromAppMessage(block.Block)
if err != nil {
return err
}
}
blocks[i] = protoBlock
}
x.AddArchivalBlocksRequest = &AddArchivalBlocksRequestMessage{
Blocks: blocks,
}
return nil
}
func (x *KaspadMessage_AddArchivalBlocksResponse) toAppMessage() (appmessage.Message, error) {
if x == nil {
return nil, errors.Wrapf(errorNil, "KaspadMessage_AddArchivalBlocksResponse is nil")
}
return x.AddArchivalBlocksResponse.toAppMessage()
}
func (x *KaspadMessage_AddArchivalBlocksResponse) fromAppMessage(message *appmessage.AddArchivalBlocksResponseMessage) error {
var err *RPCError
if message.Error != nil {
err = &RPCError{Message: message.Error.Message}
}
x.AddArchivalBlocksResponse = &AddArchivalBlocksResponseMessage{
Error: err,
}
return nil
}
func (x *AddArchivalBlocksResponseMessage) toAppMessage() (appmessage.Message, error) {
if x == nil {
return nil, errors.Wrapf(errorNil, "AddArchivalBlocksResponseMessage is nil")
}
rpcErr, err := x.Error.toAppMessage()
// Error is an optional field
if err != nil && !errors.Is(err, errorNil) {
return nil, err
}
return &appmessage.AddArchivalBlocksResponseMessage{
Error: rpcErr,
}, nil
}

View File

@ -0,0 +1,70 @@
package protowire
import (
"github.com/kaspanet/kaspad/app/appmessage"
"github.com/pkg/errors"
)
func (x *KaspadMessage_GetPruningWindowRootsRequest) toAppMessage() (appmessage.Message, error) {
if x == nil {
return nil, errors.Wrapf(errorNil, "KaspadMessage_GetPruningWindowRootsRequest is nil")
}
return &appmessage.GetPeerAddressesRequestMessage{}, nil
}
func (x *KaspadMessage_GetPruningWindowRootsRequest) fromAppMessage(_ *appmessage.GetPruningWindowRootsRequestMessage) error {
return nil
}
func (x *KaspadMessage_GetPruningWindowRootsResponse) toAppMessage() (appmessage.Message, error) {
if x == nil {
return nil, errors.Wrapf(errorNil, "KaspadMessage_GetPruningWindowRootsResponse is nil")
}
return x.GetPruningWindowRootsResponse.toAppMessage()
}
func (x *KaspadMessage_GetPruningWindowRootsResponse) fromAppMessage(message *appmessage.GetPruningWindowRootsResponseMessage) error {
var err *RPCError
if message.Error != nil {
err = &RPCError{Message: message.Error.Message}
}
roots := make([]*PruningWindowRoots, len(message.Roots))
for i, root := range message.Roots {
roots[i] = &PruningWindowRoots{
PpRoots: root.PPRoots,
PpIndex: root.PPIndex,
}
}
x.GetPruningWindowRootsResponse = &GetPruningWindowRootsResponseMessage{
Roots: roots,
Error: err,
}
return nil
}
func (x *GetPruningWindowRootsResponseMessage) toAppMessage() (appmessage.Message, error) {
if x == nil {
return nil, errors.Wrapf(errorNil, "GetPeerAddressesResponseMessage is nil")
}
rpcErr, err := x.Error.toAppMessage()
// Error is an optional field
if err != nil && !errors.Is(err, errorNil) {
return nil, err
}
roots := make([]*appmessage.PruningWindowRoots, len(x.Roots))
for i, root := range x.Roots {
roots[i] = &appmessage.PruningWindowRoots{
PPRoots: root.PpRoots,
PPIndex: root.PpIndex,
}
}
return &appmessage.GetPruningWindowRootsResponseMessage{
Roots: roots,
Error: rpcErr,
}, nil
}

View File

@ -989,6 +989,34 @@ func toRPCPayload(message appmessage.Message) (isKaspadMessage_Payload, error) {
return nil, err
}
return payload, nil
case *appmessage.GetPruningWindowRootsRequestMessage:
payload := new(KaspadMessage_GetPruningWindowRootsRequest)
err := payload.fromAppMessage(message)
if err != nil {
return nil, err
}
return payload, nil
case *appmessage.GetPruningWindowRootsResponseMessage:
payload := new(KaspadMessage_GetPruningWindowRootsResponse)
err := payload.fromAppMessage(message)
if err != nil {
return nil, err
}
return payload, nil
case *appmessage.AddArchivalBlocksRequestMessage:
payload := new(KaspadMessage_AddArchivalBlocksRequest)
err := payload.fromAppMessage(message)
if err != nil {
return nil, err
}
return payload, nil
case *appmessage.AddArchivalBlocksResponseMessage:
payload := new(KaspadMessage_AddArchivalBlocksResponse)
err := payload.fromAppMessage(message)
if err != nil {
return nil, err
}
return payload, nil
default:
return nil, nil
}

View File

@ -0,0 +1,19 @@
package rpcclient
import "github.com/kaspanet/kaspad/app/appmessage"
func (c *RPCClient) AddArchivalBlocks(blocks []*appmessage.ArchivalBlock) (*appmessage.AddArchivalBlocksResponseMessage, error) {
err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewAddArchivalBlocksRequestMessage(blocks))
if err != nil {
return nil, err
}
response, err := c.route(appmessage.CmdAddArchivalBlocksResponseMessage).DequeueWithTimeout(c.timeout)
if err != nil {
return nil, err
}
convertedResp := response.(*appmessage.AddArchivalBlocksResponseMessage)
if convertedResp.Error != nil {
return nil, c.convertRPCError(convertedResp.Error)
}
return convertedResp, nil
}

View File

@ -0,0 +1,19 @@
package rpcclient
import "github.com/kaspanet/kaspad/app/appmessage"
func (c *RPCClient) GetPruningWindowRoots() (*appmessage.GetPruningWindowRootsResponseMessage, error) {
err := c.rpcRouter.outgoingRoute().Enqueue(&appmessage.GetPruningWindowRootsRequestMessage{})
if err != nil {
return nil, err
}
response, err := c.route(appmessage.CmdGetPruningWindowRootsResponseMessage).DequeueWithTimeout(c.timeout)
if err != nil {
return nil, err
}
convertedResp := response.(*appmessage.GetPruningWindowRootsResponseMessage)
if convertedResp.Error != nil {
return nil, c.convertRPCError(convertedResp.Error)
}
return convertedResp, nil
}