diff --git a/internal/bft/abci/abci.go b/bft/abci/abci.go similarity index 67% rename from internal/bft/abci/abci.go rename to bft/abci/abci.go index 6330ce8..51b6777 100644 --- a/internal/bft/abci/abci.go +++ b/bft/abci/abci.go @@ -3,15 +3,23 @@ package verificationApp import ( "context" "encoding/base64" + "fmt" + "sort" + validatorpass_tracker "github.com/Openmesh-Network/nft-authorise/tracker" abcitypes "github.com/cometbft/cometbft/abci/types" + nm "github.com/cometbft/cometbft/node" + comettype "github.com/cometbft/cometbft/types" "github.com/dgraph-io/badger/v3" + help "github.com/openmesh-network/core/bft/helper" "google.golang.org/protobuf/proto" // "math/rand" + "crypto/sha256" + crypt "github.com/cometbft/cometbft/proto/tendermint/crypto" + "github.com/openmesh-network/core/bft/types" "github.com/openmesh-network/core/collector" - "github.com/openmesh-network/core/internal/bft/types" log "github.com/openmesh-network/core/internal/logger" ) @@ -22,6 +30,11 @@ type VerificationApp struct { assignedRequests []collector.Request validatorPriorities [][]collector.Request validatorFreeThisRound []bool + Node *nm.Node + CurrentMempool []comettype.Tx + Currblockno int64 + PolygonCheckpoint uint64 + Tracker *validatorpass_tracker.Tracker } const VALIDATOR_PREALLOCATED_COUNT = 2000 @@ -41,12 +54,166 @@ func (app *VerificationApp) PrepareProposal(_ context.Context, proposal *abcityp // Will currently accept all transactions. + var result [][]byte + var othertx = [][]byte{} + + log.Error("Sorting Done") + for _, slice := range proposal.Txs { + var transaction types.Transaction + err := proto.Unmarshal(slice, &transaction) + if err != nil { + log.Error("Error unmarshaling transaction data:", err) + } + + switch transaction.Type { + case types.TransactionType_VerificationTransaction: + result = append(result, slice) + + case types.TransactionType_SummaryTransaction: + log.Debug("We are removing this TX") + default: + othertx = append(othertx, slice) + } + + } + + var xoredTx = help.XorArrays(result) + + log.Debug("Merging Done") + + hash := sha256.Sum256(xoredTx) + hashString := base64.StdEncoding.EncodeToString(hash[:]) + transactionMessage := types.Transaction{ + Owner: "trial", + Signature: "", + Type: *types.TransactionType_SummaryTransaction.Enum(), + } + transactionMessage.Data = &types.Transaction_SummaryTransactionData{ + SummaryTransactionData: &types.SummaryTransactionData{ + Hash: hashString, + NumTx: int64(comettype.ToTxs(proposal.Txs).Len()), + }, + } + transactionBytes, err := proto.Marshal(&transactionMessage) + if err != nil { + panic(err) + } + log.Debug("Marshaling Done") + transactions := comettype.Tx(transactionBytes[:]) + + transactionMessage_checkpoint := types.Transaction{ + Owner: "trial", + Signature: "", + Type: *types.TransactionType_PolygonCheckpointTransaction.Enum(), + } + transactionMessage_checkpoint.Data = &types.Transaction_PolygonCheckpointTransactionData{ + PolygonCheckpointTransactionData: &types.PolygonCheckpointTransactionData{ + Blockno: uint64(app.Tracker.LastTrackerHeight), + Blockhash: "xyz", //not a necessary field just nice to have for record keeping + }, + } + transactionBytes_Checkpoint, err := proto.Marshal(&transactionMessage_checkpoint) + if err != nil { + panic(err) + } + + transactions_checkpoint := comettype.Tx(transactionBytes_Checkpoint[:]) + proposal.Txs = append(othertx, transactions, transactions_checkpoint) + log.Debug(proposal.Txs) return &abcitypes.ResponsePrepareProposal{Txs: proposal.Txs}, nil } func (app *VerificationApp) ProcessProposal(_ context.Context, proposal *abcitypes.RequestProcessProposal) (*abcitypes.ResponseProcessProposal, error) { // Supposedly it's bad for performance to reject crappy blocks. // I think we should be a strict as possible, and give death penalty to misbehaving nodes basically. + total_tx := app.Node.Mempool().ReapMaxTxs(-1) + log.Debug("The size for the node is") + log.Debug(app.Node.Mempool().Size()) + app.CurrentMempool = total_tx + if len(app.CurrentMempool) > 2 { + sort.Slice(app.CurrentMempool, func(i, j int) bool { + return string(app.CurrentMempool[i]) < string(app.CurrentMempool[j]) + }) + } + log.Debug("Sorting Done") + var result [][]byte + var othertx = [][]byte{} + for _, slice := range app.CurrentMempool { + var transaction types.Transaction + err := proto.Unmarshal(slice, &transaction) + if err != nil { + log.Error("Error unmarshaling transaction data:", err) + } + switch transaction.Type { + case types.TransactionType_VerificationTransaction: + result = append(result, slice) + + default: + othertx = append(othertx, slice) + } + + } + + var xoredTx = help.XorArrays(result) + + log.Debug("Merging Done") + + hash := sha256.Sum256(xoredTx) + hashString := base64.StdEncoding.EncodeToString(hash[:]) + + for _, tx := range proposal.Txs { + + if code := app.isValid(tx); code != 0 { + // log.Error("Error: invalid transaction index %v", i) + log.Error("A transaction got error") + return &abcitypes.ResponseProcessProposal{Status: abcitypes.ResponseProcessProposal_REJECT}, nil + } else { + var transaction types.Transaction + err := proto.Unmarshal(tx, &transaction) + if err != nil { + log.Error("Error unmarshaling transaction data:", err) + return &abcitypes.ResponseProcessProposal{Status: abcitypes.ResponseProcessProposal_REJECT}, nil + } + log.Debug(transaction.Type) + switch transaction.Type { + + case types.TransactionType_SummaryTransaction: + + summaryData := &types.SummaryTransactionData{} + summaryData = transaction.GetSummaryTransactionData() + // log.Debug("Resource Transaction Data:", transaction) + if err != nil { + log.Error("cannot decode them") + return &abcitypes.ResponseProcessProposal{Status: abcitypes.ResponseProcessProposal_REJECT}, nil + } + if hashString != summaryData.GetHash() { + log.Error("they are different") + return &abcitypes.ResponseProcessProposal{Status: abcitypes.ResponseProcessProposal_REJECT}, nil + } + log.Debug("they are similar") + + case types.TransactionType_PolygonCheckpointTransaction: + log.Debug("polygon tx found") + checkpointData := &types.PolygonCheckpointTransactionData{} + checkpointData = transaction.GetPolygonCheckpointTransactionData() + + if err != nil { + log.Error("Cannot decode tx") + return &abcitypes.ResponseProcessProposal{Status: abcitypes.ResponseProcessProposal_REJECT}, nil + } + + if checkpointData.Blockno > uint64(app.Tracker.LastTrackerHeight) { + return &abcitypes.ResponseProcessProposal{Status: abcitypes.ResponseProcessProposal_REJECT}, nil + } + log.Debug("the height is okay,the proposed height is ", checkpointData.Blockno, "the current height is", app.Tracker.LastTrackerHeight) + default: + log.Debug(transaction.Type) + log.Debug("Unknown transaction type") + + } + } + } + log.Debug("Signing Done") return &abcitypes.ResponseProcessProposal{Status: abcitypes.ResponseProcessProposal_ACCEPT}, nil } @@ -157,6 +324,14 @@ func (app *VerificationApp) FinalizeBlock(_ context.Context, req *abcitypes.Requ log.Debug("Node succesfully registered: ", len(validatorupdates)) // log.Debug("Node Registration Transaction Data:", registrationData) + case types.TransactionType_PolygonCheckpointTransaction: + polygonData := &types.PolygonCheckpointTransactionData{} + polygonData = transaction.GetPolygonCheckpointTransactionData() + app.PolygonCheckpoint = polygonData.Blockno + fmt.Println("The polygon checkpoint is ", app.PolygonCheckpoint) + txs[i] = &abcitypes.ExecTxResult{} + case types.TransactionType_SummaryTransaction: + txs[i] = &abcitypes.ExecTxResult{} default: log.Error("Unknown transaction type") txs[i] = &abcitypes.ExecTxResult{Code: code} @@ -271,7 +446,7 @@ func (app *VerificationApp) FinalizeBlock(_ context.Context, req *abcitypes.Requ // } // } // } - + app.Currblockno = req.Height return &abcitypes.ResponseFinalizeBlock{ TxResults: txs, ValidatorUpdates: validatorupdates, @@ -315,16 +490,29 @@ func (app *VerificationApp) isValid(tx []byte) uint32 { // Check the transaction type and handle accordingly switch transaction.Type { + case types.TransactionType_SummaryTransaction: + return 0 case types.TransactionType_NormalTransaction: // normalData := &types.NormalTransactionData{} // normalData = transaction.GetNormalData() // log.Info("Normal Transaction Data:", normalData) return 0 case types.TransactionType_VerificationTransaction: - // verificationData := &types.VerificationTransactionData{} - // verificationData = transaction.GetVerificationData() + verificationData := &types.VerificationTransactionData{} + verificationData = transaction.GetVerificationData() // log.Info("Verification Transaction Data:", verificationData) + if verificationData == nil { + log.Error("Error unmarshaling verification data", err) + return 1 + } + if verificationData.GetHeight() == app.Currblockno { + log.Debug("the transaction will be rejected due to blockheigh", app.Currblockno, verificationData.GetHeight()) + return 1 + + } + return 0 + case types.TransactionType_ResourceTransaction: // resourceData := &types.ResourceTransactionData{} // resourceData = transaction.GetResourceData() @@ -341,6 +529,17 @@ func (app *VerificationApp) isValid(tx []byte) uint32 { // log.Debug("Resource Transaction Data:", nodeRegistrationData) return 0 + case types.TransactionType_PolygonCheckpointTransaction: + polygonData := &types.PolygonCheckpointTransactionData{} + polygonData = transaction.GetPolygonCheckpointTransactionData() + + if polygonData == nil { + log.Error("Error unmarshaling resource transaction data:", err) + return 1 + } + // log.Debug("Resource Transaction Data:", nodeRegistrationData) + return 0 + default: log.Error("Unknown transaction type") return 1 diff --git a/internal/bft/cometbft.go b/bft/cometbft.go similarity index 71% rename from internal/bft/cometbft.go rename to bft/cometbft.go index ec3f8f6..cdf5460 100644 --- a/internal/bft/cometbft.go +++ b/bft/cometbft.go @@ -8,6 +8,7 @@ import ( "os" "time" + validatorpass_tracker "github.com/Openmesh-Network/nft-authorise/tracker" cfg "github.com/cometbft/cometbft/config" cmtflags "github.com/cometbft/cometbft/libs/cli/flags" cmtlog "github.com/cometbft/cometbft/libs/log" @@ -21,10 +22,10 @@ import ( rpctypes "github.com/cometbft/cometbft/rpc/jsonrpc/types" "github.com/dgraph-io/badger/v3" + abci "github.com/openmesh-network/core/bft/abci" + otypes "github.com/openmesh-network/core/bft/types" "github.com/openmesh-network/core/collector" - abci "github.com/openmesh-network/core/internal/bft/abci" - otypes "github.com/openmesh-network/core/internal/bft/types" - "github.com/openmesh-network/core/internal/config" + "github.com/openmesh-network/core/config" log "github.com/openmesh-network/core/internal/logger" "github.com/spf13/viper" ) @@ -95,6 +96,7 @@ func NewInstance(db *badger.DB, collector *collector.CollectorInstance) (*Instan nm.DefaultMetricsProvider(conf.Instrumentation), log, ) + app.Node = node // events := node.EventBus() // data := types.EventDataTx{} @@ -121,7 +123,7 @@ func (inst *Instance) Start(ctx context.Context) { registered := false registerSentTransaction := false - + latestblockheight := -1 // Event handler go func() { for { @@ -197,55 +199,64 @@ func (inst *Instance) Start(ctx context.Context) { } } } else { - transactionPushedCount := 0 - for i := 0; i < collector.WORKER_COUNT; i++ { - // Format as a transactionMessage - transactionMessage := otypes.Transaction{ - Owner: base64AddrString, - Signature: "", - Type: *otypes.TransactionType_VerificationTransaction.Enum(), - } - - // Build some dataset. - transactionMessage.Data = &otypes.Transaction_VerificationData{ - VerificationData: &otypes.VerificationTransactionData{ - // XXX: Actually provide attestation here. - Attestation: "", - // XXX: Need to decide how we're building the cids. - // There's a tradeoff between blockchain size and download speed. - // Make a fake but plausible CID - Cid: base64.StdEncoding.EncodeToString(rand.Bytes(40)), - Datasource: "examplesource" + "-" + "exampletopic", - // XXX: Should this be the time it started being recorded or ended? - Timestamp: time.Now().Unix(), - }, - } + res, err := env.Status(&rpctypes.Context{}) + if int(res.SyncInfo.LatestBlockHeight) >= latestblockheight { - transactionBytes, err := proto.Marshal(&transactionMessage) if err != nil { panic(err) } + transactionPushedCount := 0 + for i := 0; i < collector.WORKER_COUNT; i++ { + // Format as a transactionMessage + transactionMessage := otypes.Transaction{ + Owner: base64AddrString, + Signature: "", + Type: *otypes.TransactionType_VerificationTransaction.Enum(), + } - transaction := types.Tx(transactionBytes[:]) + // Build some dataset. + transactionMessage.Data = &otypes.Transaction_VerificationData{ + VerificationData: &otypes.VerificationTransactionData{ + // XXX: Actually provide attestation here. + Attestation: "", + // XXX: Need to decide how we're building the cids. + // There's a tradeoff between blockchain size and download speed. + // Make a fake but plausible CID + Cid: base64.StdEncoding.EncodeToString(rand.Bytes(40)), + Datasource: "examplesource" + "-" + "exampletopic", + // XXX: Should this be the time it started being recorded or ended? + Timestamp: time.Now().Unix(), + Height: res.SyncInfo.LatestBlockHeight + 2, + }, + } - env, err := inst.BftNode.ConfigureRPC() + transactionBytes, err := proto.Marshal(&transactionMessage) + if err != nil { + panic(err) + } - if err != nil { - fmt.Println(transaction) - panic(err) - } + transaction := types.Tx(transactionBytes[:]) - _, err = env.BroadcastTxAsync(&rpctypes.Context{}, transaction) + env, err := inst.BftNode.ConfigureRPC() - if err != nil { - log.Error("Couldn't push transaction, reason: ", err) - // panic(err) - } else { - transactionPushedCount++ + if err != nil { + fmt.Println(transaction) + panic(err) + } + + _, err = env.BroadcastTxAsync(&rpctypes.Context{}, transaction) + + if err != nil { + log.Error("Couldn't push transaction, reason: ", err) + // panic(err) + } else { + transactionPushedCount++ + } } - } - log.Debug("Pushed ", transactionPushedCount, "/", collector.WORKER_COUNT) + log.Debug("Pushed ", transactionPushedCount, "/", collector.WORKER_COUNT) + latestblockheight = int(res.SyncInfo.LatestBlockHeight) + } } } } @@ -259,6 +270,11 @@ func (inst *Instance) Start(ctx context.Context) { }() } +func (i *Instance) SetTracker(tracker *validatorpass_tracker.Tracker) error { + i.app.Tracker = tracker + return nil +} + // Stop the CometBFT node func (i *Instance) Stop() error { err := i.BftNode.Stop() diff --git a/bft/helper/utils.go b/bft/helper/utils.go new file mode 100644 index 0000000..9ffe157 --- /dev/null +++ b/bft/helper/utils.go @@ -0,0 +1,32 @@ +package help + +func XorArrays(arr [][]byte) []byte { + // Check if the array is empty + if len(arr) == 0 { + return nil + } + + length := len(arr[0]) + if length > 20 { + length = 20 + } + + for i, slice := range arr { + if len(slice) < 20 { + paddedSlice := make([]byte, 20) + copy(paddedSlice, slice) + arr[i] = paddedSlice + } + } + // Create a result slice with the same length as the first slice + result := make([]byte, length) + + // XOR each byte in the first 20 characters of each slice + for _, slice := range arr { + for i := 0; i < length; i++ { + result[i] ^= slice[i] + } + } + + return result +} diff --git a/bft/types/transaction.pb.go b/bft/types/transaction.pb.go new file mode 100644 index 0000000..b23ad91 --- /dev/null +++ b/bft/types/transaction.pb.go @@ -0,0 +1,860 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 +// source: transaction.proto + +package types + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TransactionType int32 + +const ( + TransactionType_NormalTransaction TransactionType = 0 + TransactionType_VerificationTransaction TransactionType = 1 + TransactionType_ResourceTransaction TransactionType = 2 + TransactionType_NodeRegistrationTransaction TransactionType = 3 + TransactionType_SummaryTransaction TransactionType = 4 + TransactionType_PolygonCheckpointTransaction TransactionType = 5 +) + +// Enum value maps for TransactionType. +var ( + TransactionType_name = map[int32]string{ + 0: "NormalTransaction", + 1: "VerificationTransaction", + 2: "ResourceTransaction", + 3: "NodeRegistrationTransaction", + 4: "SummaryTransaction", + 5: "PolygonCheckpointTransaction", + } + TransactionType_value = map[string]int32{ + "NormalTransaction": 0, + "VerificationTransaction": 1, + "ResourceTransaction": 2, + "NodeRegistrationTransaction": 3, + "SummaryTransaction": 4, + "PolygonCheckpointTransaction": 5, + } +) + +func (x TransactionType) Enum() *TransactionType { + p := new(TransactionType) + *p = x + return p +} + +func (x TransactionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionType) Descriptor() protoreflect.EnumDescriptor { + return file_transaction_proto_enumTypes[0].Descriptor() +} + +func (TransactionType) Type() protoreflect.EnumType { + return &file_transaction_proto_enumTypes[0] +} + +func (x TransactionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionType.Descriptor instead. +func (TransactionType) EnumDescriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{0} +} + +type PolygonCheckpointTransactionData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Blockno uint64 `protobuf:"varint,1,opt,name=blockno,proto3" json:"blockno,omitempty"` + Blockhash string `protobuf:"bytes,2,opt,name=blockhash,proto3" json:"blockhash,omitempty"` +} + +func (x *PolygonCheckpointTransactionData) Reset() { + *x = PolygonCheckpointTransactionData{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PolygonCheckpointTransactionData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PolygonCheckpointTransactionData) ProtoMessage() {} + +func (x *PolygonCheckpointTransactionData) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PolygonCheckpointTransactionData.ProtoReflect.Descriptor instead. +func (*PolygonCheckpointTransactionData) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{0} +} + +func (x *PolygonCheckpointTransactionData) GetBlockno() uint64 { + if x != nil { + return x.Blockno + } + return 0 +} + +func (x *PolygonCheckpointTransactionData) GetBlockhash() string { + if x != nil { + return x.Blockhash + } + return "" +} + +type VerificationTransactionData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Attestation string `protobuf:"bytes,1,opt,name=attestation,proto3" json:"attestation,omitempty"` + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` + Datasource string `protobuf:"bytes,3,opt,name=datasource,proto3" json:"datasource,omitempty"` + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *VerificationTransactionData) Reset() { + *x = VerificationTransactionData{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerificationTransactionData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerificationTransactionData) ProtoMessage() {} + +func (x *VerificationTransactionData) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerificationTransactionData.ProtoReflect.Descriptor instead. +func (*VerificationTransactionData) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{1} +} + +func (x *VerificationTransactionData) GetAttestation() string { + if x != nil { + return x.Attestation + } + return "" +} + +func (x *VerificationTransactionData) GetCid() string { + if x != nil { + return x.Cid + } + return "" +} + +func (x *VerificationTransactionData) GetDatasource() string { + if x != nil { + return x.Datasource + } + return "" +} + +func (x *VerificationTransactionData) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *VerificationTransactionData) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +type ResourceTransactionData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalResources float64 `protobuf:"fixed64,1,opt,name=totalResources,proto3" json:"totalResources,omitempty"` + RewardedResources float64 `protobuf:"fixed64,2,opt,name=rewardedResources,proto3" json:"rewardedResources,omitempty"` +} + +func (x *ResourceTransactionData) Reset() { + *x = ResourceTransactionData{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceTransactionData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceTransactionData) ProtoMessage() {} + +func (x *ResourceTransactionData) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceTransactionData.ProtoReflect.Descriptor instead. +func (*ResourceTransactionData) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{2} +} + +func (x *ResourceTransactionData) GetTotalResources() float64 { + if x != nil { + return x.TotalResources + } + return 0 +} + +func (x *ResourceTransactionData) GetRewardedResources() float64 { + if x != nil { + return x.RewardedResources + } + return 0 +} + +type NormalTransactionData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransactionAmount float64 `protobuf:"fixed64,1,opt,name=transactionAmount,proto3" json:"transactionAmount,omitempty"` + SentTo string `protobuf:"bytes,2,opt,name=sentTo,proto3" json:"sentTo,omitempty"` +} + +func (x *NormalTransactionData) Reset() { + *x = NormalTransactionData{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalTransactionData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalTransactionData) ProtoMessage() {} + +func (x *NormalTransactionData) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalTransactionData.ProtoReflect.Descriptor instead. +func (*NormalTransactionData) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3} +} + +func (x *NormalTransactionData) GetTransactionAmount() float64 { + if x != nil { + return x.TransactionAmount + } + return 0 +} + +func (x *NormalTransactionData) GetSentTo() string { + if x != nil { + return x.SentTo + } + return "" +} + +// Node Registration Transaction Data +type NodeRegistrationTransactionData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeAddress string `protobuf:"bytes,1,opt,name=nodeAddress,proto3" json:"nodeAddress,omitempty"` + NodeAttestation string `protobuf:"bytes,2,opt,name=nodeAttestation,proto3" json:"nodeAttestation,omitempty"` + NodeSignature string `protobuf:"bytes,3,opt,name=nodeSignature,proto3" json:"nodeSignature,omitempty"` +} + +func (x *NodeRegistrationTransactionData) Reset() { + *x = NodeRegistrationTransactionData{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeRegistrationTransactionData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeRegistrationTransactionData) ProtoMessage() {} + +func (x *NodeRegistrationTransactionData) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeRegistrationTransactionData.ProtoReflect.Descriptor instead. +func (*NodeRegistrationTransactionData) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{4} +} + +func (x *NodeRegistrationTransactionData) GetNodeAddress() string { + if x != nil { + return x.NodeAddress + } + return "" +} + +func (x *NodeRegistrationTransactionData) GetNodeAttestation() string { + if x != nil { + return x.NodeAttestation + } + return "" +} + +func (x *NodeRegistrationTransactionData) GetNodeSignature() string { + if x != nil { + return x.NodeSignature + } + return "" +} + +type SummaryTransactionData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + NumTx int64 `protobuf:"varint,2,opt,name=numTx,proto3" json:"numTx,omitempty"` +} + +func (x *SummaryTransactionData) Reset() { + *x = SummaryTransactionData{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SummaryTransactionData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SummaryTransactionData) ProtoMessage() {} + +func (x *SummaryTransactionData) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SummaryTransactionData.ProtoReflect.Descriptor instead. +func (*SummaryTransactionData) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{5} +} + +func (x *SummaryTransactionData) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *SummaryTransactionData) GetNumTx() int64 { + if x != nil { + return x.NumTx + } + return 0 +} + +type Transaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Type TransactionType `protobuf:"varint,3,opt,name=type,proto3,enum=TransactionType" json:"type,omitempty"` + // Types that are assignable to Data: + // *Transaction_VerificationData + // *Transaction_ResourceData + // *Transaction_NormalData + // *Transaction_NodeRegistrationData + // *Transaction_SummaryTransactionData + // *Transaction_PolygonCheckpointTransactionData + Data isTransaction_Data `protobuf_oneof:"data"` +} + +func (x *Transaction) Reset() { + *x = Transaction{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{6} +} + +func (x *Transaction) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *Transaction) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *Transaction) GetType() TransactionType { + if x != nil { + return x.Type + } + return TransactionType_NormalTransaction +} + +func (m *Transaction) GetData() isTransaction_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *Transaction) GetVerificationData() *VerificationTransactionData { + if x, ok := x.GetData().(*Transaction_VerificationData); ok { + return x.VerificationData + } + return nil +} + +func (x *Transaction) GetResourceData() *ResourceTransactionData { + if x, ok := x.GetData().(*Transaction_ResourceData); ok { + return x.ResourceData + } + return nil +} + +func (x *Transaction) GetNormalData() *NormalTransactionData { + if x, ok := x.GetData().(*Transaction_NormalData); ok { + return x.NormalData + } + return nil +} + +func (x *Transaction) GetNodeRegistrationData() *NodeRegistrationTransactionData { + if x, ok := x.GetData().(*Transaction_NodeRegistrationData); ok { + return x.NodeRegistrationData + } + return nil +} + +func (x *Transaction) GetSummaryTransactionData() *SummaryTransactionData { + if x, ok := x.GetData().(*Transaction_SummaryTransactionData); ok { + return x.SummaryTransactionData + } + return nil +} + +func (x *Transaction) GetPolygonCheckpointTransactionData() *PolygonCheckpointTransactionData { + if x, ok := x.GetData().(*Transaction_PolygonCheckpointTransactionData); ok { + return x.PolygonCheckpointTransactionData + } + return nil +} + +type isTransaction_Data interface { + isTransaction_Data() +} + +type Transaction_VerificationData struct { + VerificationData *VerificationTransactionData `protobuf:"bytes,4,opt,name=verificationData,proto3,oneof"` +} + +type Transaction_ResourceData struct { + ResourceData *ResourceTransactionData `protobuf:"bytes,5,opt,name=resourceData,proto3,oneof"` +} + +type Transaction_NormalData struct { + NormalData *NormalTransactionData `protobuf:"bytes,6,opt,name=normalData,proto3,oneof"` +} + +type Transaction_NodeRegistrationData struct { + NodeRegistrationData *NodeRegistrationTransactionData `protobuf:"bytes,7,opt,name=nodeRegistrationData,proto3,oneof"` +} + +type Transaction_SummaryTransactionData struct { + SummaryTransactionData *SummaryTransactionData `protobuf:"bytes,8,opt,name=SummaryTransactionData,proto3,oneof"` +} + +type Transaction_PolygonCheckpointTransactionData struct { + PolygonCheckpointTransactionData *PolygonCheckpointTransactionData `protobuf:"bytes,9,opt,name=PolygonCheckpointTransactionData,proto3,oneof"` +} + +func (*Transaction_VerificationData) isTransaction_Data() {} + +func (*Transaction_ResourceData) isTransaction_Data() {} + +func (*Transaction_NormalData) isTransaction_Data() {} + +func (*Transaction_NodeRegistrationData) isTransaction_Data() {} + +func (*Transaction_SummaryTransactionData) isTransaction_Data() {} + +func (*Transaction_PolygonCheckpointTransactionData) isTransaction_Data() {} + +var File_transaction_proto protoreflect.FileDescriptor + +var file_transaction_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x20, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x6e, + 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x22, + 0xa7, 0x01, 0x0a, 0x1b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x63, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x6f, 0x0a, 0x17, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x15, 0x4e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, + 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x28, 0x0a, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, + 0x42, 0x0a, 0x16, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x75, 0x6d, 0x54, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x75, + 0x6d, 0x54, 0x78, 0x22, 0xd1, 0x04, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, + 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0c, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x0a, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x56, 0x0a, 0x14, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x14, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x16, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x16, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x6f, + 0x0a, 0x20, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, + 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x20, 0x50, + 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, + 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0xb9, 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, + 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_transaction_proto_rawDescOnce sync.Once + file_transaction_proto_rawDescData = file_transaction_proto_rawDesc +) + +func file_transaction_proto_rawDescGZIP() []byte { + file_transaction_proto_rawDescOnce.Do(func() { + file_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_transaction_proto_rawDescData) + }) + return file_transaction_proto_rawDescData +} + +var file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_transaction_proto_goTypes = []interface{}{ + (TransactionType)(0), // 0: TransactionType + (*PolygonCheckpointTransactionData)(nil), // 1: PolygonCheckpointTransactionData + (*VerificationTransactionData)(nil), // 2: VerificationTransactionData + (*ResourceTransactionData)(nil), // 3: ResourceTransactionData + (*NormalTransactionData)(nil), // 4: NormalTransactionData + (*NodeRegistrationTransactionData)(nil), // 5: NodeRegistrationTransactionData + (*SummaryTransactionData)(nil), // 6: SummaryTransactionData + (*Transaction)(nil), // 7: Transaction +} +var file_transaction_proto_depIdxs = []int32{ + 0, // 0: Transaction.type:type_name -> TransactionType + 2, // 1: Transaction.verificationData:type_name -> VerificationTransactionData + 3, // 2: Transaction.resourceData:type_name -> ResourceTransactionData + 4, // 3: Transaction.normalData:type_name -> NormalTransactionData + 5, // 4: Transaction.nodeRegistrationData:type_name -> NodeRegistrationTransactionData + 6, // 5: Transaction.SummaryTransactionData:type_name -> SummaryTransactionData + 1, // 6: Transaction.PolygonCheckpointTransactionData:type_name -> PolygonCheckpointTransactionData + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_transaction_proto_init() } +func file_transaction_proto_init() { + if File_transaction_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_transaction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PolygonCheckpointTransactionData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VerificationTransactionData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceTransactionData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NormalTransactionData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeRegistrationTransactionData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SummaryTransactionData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_transaction_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*Transaction_VerificationData)(nil), + (*Transaction_ResourceData)(nil), + (*Transaction_NormalData)(nil), + (*Transaction_NodeRegistrationData)(nil), + (*Transaction_SummaryTransactionData)(nil), + (*Transaction_PolygonCheckpointTransactionData)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_transaction_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_transaction_proto_goTypes, + DependencyIndexes: file_transaction_proto_depIdxs, + EnumInfos: file_transaction_proto_enumTypes, + MessageInfos: file_transaction_proto_msgTypes, + }.Build() + File_transaction_proto = out.File + file_transaction_proto_rawDesc = nil + file_transaction_proto_goTypes = nil + file_transaction_proto_depIdxs = nil +} diff --git a/internal/bft/types/transaction.proto b/bft/types/transaction.proto similarity index 69% rename from internal/bft/types/transaction.proto rename to bft/types/transaction.proto index bd955f6..7fa478d 100644 --- a/internal/bft/types/transaction.proto +++ b/bft/types/transaction.proto @@ -1,11 +1,17 @@ syntax = "proto3"; -option go_package = github.com/openmesh-network/core/internal/bft/types"; enum TransactionType { NormalTransaction = 0; VerificationTransaction = 1; ResourceTransaction = 2; NodeRegistrationTransaction = 3; + SummaryTransaction = 4; + PolygonCheckpointTransaction = 5; +} + +message PolygonCheckpointTransactionData { + uint64 blockno = 1; + string blockhash = 2; } message VerificationTransactionData { @@ -13,6 +19,7 @@ message VerificationTransactionData { string cid = 2; string datasource = 3; int64 timestamp = 4; + int64 height = 5; } message ResourceTransactionData { @@ -29,7 +36,12 @@ message NormalTransactionData { message NodeRegistrationTransactionData { string nodeAddress = 1; string nodeAttestation = 2; - string nodeSignature = 3; + string nodeSignature = 3; +} + +message SummaryTransactionData { + string hash = 1; + int64 numTx = 2; } message Transaction { @@ -41,5 +53,7 @@ message Transaction { ResourceTransactionData resourceData = 5; NormalTransactionData normalData = 6; NodeRegistrationTransactionData nodeRegistrationData = 7; + SummaryTransactionData SummaryTransactionData = 8; + PolygonCheckpointTransactionData PolygonCheckpointTransactionData = 9; } } diff --git a/config.yml b/config.yml index beb2ecf..4af9840 100644 --- a/config.yml +++ b/config.yml @@ -1,3 +1,4 @@ + p2p: # 0.0.0.0 = localhost addr: 0.0.0.0 @@ -5,6 +6,14 @@ p2p: port: 0 groupName: xnode peerLimit: 50 +nft: + rpcAddress: https://rpc.ankr.com/eth_sepolia + unlimitedRPC: false + eventSignature: Redeemed(uint256,bytes32) + searchLimit: 3000 + deployBlock: 5618691 + confirmations: 20 + timing: 90 bft: homeDir: cbft-home db: @@ -30,7 +39,5 @@ log: maxSize: 10 maxAge: 7 maxBackups: 10 -nft: - trackerData: ./cbft/data/nft-tracked - rpcAddress: https://rpc.ankr.com/eth_sepolia - unlimitedRPC: false + + \ No newline at end of file diff --git a/internal/config/README.md b/config/README.md similarity index 100% rename from internal/config/README.md rename to config/README.md diff --git a/internal/config/config.go b/config/config.go similarity index 89% rename from internal/config/config.go rename to config/config.go index 7d180a2..a0175fe 100644 --- a/internal/config/config.go +++ b/config/config.go @@ -1,9 +1,10 @@ package config import ( - "github.com/spf13/viper" "log" "strings" + + "github.com/spf13/viper" ) // Config is a global variable that hold all the configurations need by the whole project @@ -12,6 +13,7 @@ var Config config // config is the configuration structure for the whole Openmesh Core project type config struct { + Nft TrConfig `yaml:"nft"` P2P P2pConfig `yaml:"p2p"` BFT BFTConfig `yaml:"bft"` Log LogConfig `yaml:"log"` @@ -26,6 +28,16 @@ type P2pConfig struct { PeerLimit int `yaml:"peerLimit"` // Max number of peers this node can establish connection to } +type TrConfig struct { + RpcAddress string `yaml:"rpcAddress"` + UnlimitedRPC bool `yaml:"unlimitedRPC"` + EventSignature string `yaml:"eventSignature"` + SearchLimit int `yaml:"searchLimit"` + DeployBlock int `yaml:"DeployBlock"` // Corrected field name + Confirmations int `yaml:"confirmations"` + Timing int `yaml:"timing"` // Corrected field name +} + // DBConfig is the configuration for database connection and operation type DBConfig struct { Username string `yaml:"username"` // Username for the specific database to be connected @@ -80,7 +92,7 @@ func ParseConfig(configAtCompileTime string, useRuntimeConfigFile bool) { // This should NEVER run! We can't allow faulty configs to be compiled to the executable. panic(err) } - } else { + } else { coreConf.AddConfigPath(Path) coreConf.SetConfigName(Name) coreConf.SetConfigType("yaml") @@ -88,7 +100,7 @@ func ParseConfig(configAtCompileTime string, useRuntimeConfigFile bool) { if err := coreConf.ReadInConfig(); err != nil { log.Fatalf("Failed to read the configuration: %s", err.Error()) } - } + } if err := coreConf.Unmarshal(&Config); err != nil { log.Fatalf("Failed to parse the configuration: %s", err.Error()) diff --git a/internal/config/flags.go b/config/flags.go similarity index 100% rename from internal/config/flags.go rename to config/flags.go diff --git a/go.mod b/go.mod index 1bce75e..030541c 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,11 @@ module github.com/openmesh-network/core -go 1.21 +go 1.22.1 + +toolchain go1.22.2 require ( + github.com/Openmesh-Network/nft-authorise v0.0.0-20240509074056-66765710e7e3 github.com/cometbft/cometbft v0.38.6 github.com/dgraph-io/badger/v3 v3.2103.5 github.com/ethereum/go-ethereum v1.13.14 diff --git a/go.sum b/go.sum index 81543fc..0b9c22a 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,8 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Openmesh-Network/nft-authorise v0.0.0-20240509074056-66765710e7e3 h1:taqsq0MvVecbZAGNDLhfdj9pHNVaET7VRbUu3I6EG8Y= +github.com/Openmesh-Network/nft-authorise v0.0.0-20240509074056-66765710e7e3/go.mod h1:UTMg2S2HcIGf8+XOIow8bXyYOcPZS2CgKRIHdZthaJg= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= diff --git a/internal/bft/types/transaction.pb.go b/internal/bft/types/transaction.pb.go deleted file mode 100644 index 7e2cbb7..0000000 --- a/internal/bft/types/transaction.pb.go +++ /dev/null @@ -1,654 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 -// source: internal/types/transaction.proto - -package types - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TransactionType int32 - -const ( - TransactionType_NormalTransaction TransactionType = 0 - TransactionType_VerificationTransaction TransactionType = 1 - TransactionType_ResourceTransaction TransactionType = 2 - TransactionType_NodeRegistrationTransaction TransactionType = 3 -) - -// Enum value maps for TransactionType. -var ( - TransactionType_name = map[int32]string{ - 0: "NormalTransaction", - 1: "VerificationTransaction", - 2: "ResourceTransaction", - 3: "NodeRegistrationTransaction", - } - TransactionType_value = map[string]int32{ - "NormalTransaction": 0, - "VerificationTransaction": 1, - "ResourceTransaction": 2, - "NodeRegistrationTransaction": 3, - } -) - -func (x TransactionType) Enum() *TransactionType { - p := new(TransactionType) - *p = x - return p -} - -func (x TransactionType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TransactionType) Descriptor() protoreflect.EnumDescriptor { - return file_internal_types_transaction_proto_enumTypes[0].Descriptor() -} - -func (TransactionType) Type() protoreflect.EnumType { - return &file_internal_types_transaction_proto_enumTypes[0] -} - -func (x TransactionType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TransactionType.Descriptor instead. -func (TransactionType) EnumDescriptor() ([]byte, []int) { - return file_internal_types_transaction_proto_rawDescGZIP(), []int{0} -} - -type VerificationTransactionData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Attestation string `protobuf:"bytes,1,opt,name=attestation,proto3" json:"attestation,omitempty"` - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - Datasource string `protobuf:"bytes,3,opt,name=datasource,proto3" json:"datasource,omitempty"` - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *VerificationTransactionData) Reset() { - *x = VerificationTransactionData{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_types_transaction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerificationTransactionData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerificationTransactionData) ProtoMessage() {} - -func (x *VerificationTransactionData) ProtoReflect() protoreflect.Message { - mi := &file_internal_types_transaction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerificationTransactionData.ProtoReflect.Descriptor instead. -func (*VerificationTransactionData) Descriptor() ([]byte, []int) { - return file_internal_types_transaction_proto_rawDescGZIP(), []int{0} -} - -func (x *VerificationTransactionData) GetAttestation() string { - if x != nil { - return x.Attestation - } - return "" -} - -func (x *VerificationTransactionData) GetCid() string { - if x != nil { - return x.Cid - } - return "" -} - -func (x *VerificationTransactionData) GetDatasource() string { - if x != nil { - return x.Datasource - } - return "" -} - -func (x *VerificationTransactionData) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -type ResourceTransactionData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TotalResources float64 `protobuf:"fixed64,1,opt,name=totalResources,proto3" json:"totalResources,omitempty"` - RewardedResources float64 `protobuf:"fixed64,2,opt,name=rewardedResources,proto3" json:"rewardedResources,omitempty"` -} - -func (x *ResourceTransactionData) Reset() { - *x = ResourceTransactionData{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_types_transaction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceTransactionData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceTransactionData) ProtoMessage() {} - -func (x *ResourceTransactionData) ProtoReflect() protoreflect.Message { - mi := &file_internal_types_transaction_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceTransactionData.ProtoReflect.Descriptor instead. -func (*ResourceTransactionData) Descriptor() ([]byte, []int) { - return file_internal_types_transaction_proto_rawDescGZIP(), []int{1} -} - -func (x *ResourceTransactionData) GetTotalResources() float64 { - if x != nil { - return x.TotalResources - } - return 0 -} - -func (x *ResourceTransactionData) GetRewardedResources() float64 { - if x != nil { - return x.RewardedResources - } - return 0 -} - -type NormalTransactionData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TransactionAmount float64 `protobuf:"fixed64,1,opt,name=transactionAmount,proto3" json:"transactionAmount,omitempty"` - SentTo string `protobuf:"bytes,2,opt,name=sentTo,proto3" json:"sentTo,omitempty"` -} - -func (x *NormalTransactionData) Reset() { - *x = NormalTransactionData{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_types_transaction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NormalTransactionData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NormalTransactionData) ProtoMessage() {} - -func (x *NormalTransactionData) ProtoReflect() protoreflect.Message { - mi := &file_internal_types_transaction_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NormalTransactionData.ProtoReflect.Descriptor instead. -func (*NormalTransactionData) Descriptor() ([]byte, []int) { - return file_internal_types_transaction_proto_rawDescGZIP(), []int{2} -} - -func (x *NormalTransactionData) GetTransactionAmount() float64 { - if x != nil { - return x.TransactionAmount - } - return 0 -} - -func (x *NormalTransactionData) GetSentTo() string { - if x != nil { - return x.SentTo - } - return "" -} - -// Node Registration Transaction Data -type NodeRegistrationTransactionData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeAddress string `protobuf:"bytes,1,opt,name=nodeAddress,proto3" json:"nodeAddress,omitempty"` - NodeAttestation string `protobuf:"bytes,2,opt,name=nodeAttestation,proto3" json:"nodeAttestation,omitempty"` - NodeSignature string `protobuf:"bytes,3,opt,name=nodeSignature,proto3" json:"nodeSignature,omitempty"` -} - -func (x *NodeRegistrationTransactionData) Reset() { - *x = NodeRegistrationTransactionData{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_types_transaction_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeRegistrationTransactionData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeRegistrationTransactionData) ProtoMessage() {} - -func (x *NodeRegistrationTransactionData) ProtoReflect() protoreflect.Message { - mi := &file_internal_types_transaction_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeRegistrationTransactionData.ProtoReflect.Descriptor instead. -func (*NodeRegistrationTransactionData) Descriptor() ([]byte, []int) { - return file_internal_types_transaction_proto_rawDescGZIP(), []int{3} -} - -func (x *NodeRegistrationTransactionData) GetNodeAddress() string { - if x != nil { - return x.NodeAddress - } - return "" -} - -func (x *NodeRegistrationTransactionData) GetNodeAttestation() string { - if x != nil { - return x.NodeAttestation - } - return "" -} - -func (x *NodeRegistrationTransactionData) GetNodeSignature() string { - if x != nil { - return x.NodeSignature - } - return "" -} - -type Transaction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - Type TransactionType `protobuf:"varint,3,opt,name=type,proto3,enum=TransactionType" json:"type,omitempty"` - // Types that are assignable to Data: - // *Transaction_VerificationData - // *Transaction_ResourceData - // *Transaction_NormalData - // *Transaction_NodeRegistrationData - Data isTransaction_Data `protobuf_oneof:"data"` -} - -func (x *Transaction) Reset() { - *x = Transaction{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_types_transaction_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction) ProtoMessage() {} - -func (x *Transaction) ProtoReflect() protoreflect.Message { - mi := &file_internal_types_transaction_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. -func (*Transaction) Descriptor() ([]byte, []int) { - return file_internal_types_transaction_proto_rawDescGZIP(), []int{4} -} - -func (x *Transaction) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Transaction) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -func (x *Transaction) GetType() TransactionType { - if x != nil { - return x.Type - } - return TransactionType_NormalTransaction -} - -func (m *Transaction) GetData() isTransaction_Data { - if m != nil { - return m.Data - } - return nil -} - -func (x *Transaction) GetVerificationData() *VerificationTransactionData { - if x, ok := x.GetData().(*Transaction_VerificationData); ok { - return x.VerificationData - } - return nil -} - -func (x *Transaction) GetResourceData() *ResourceTransactionData { - if x, ok := x.GetData().(*Transaction_ResourceData); ok { - return x.ResourceData - } - return nil -} - -func (x *Transaction) GetNormalData() *NormalTransactionData { - if x, ok := x.GetData().(*Transaction_NormalData); ok { - return x.NormalData - } - return nil -} - -func (x *Transaction) GetNodeRegistrationData() *NodeRegistrationTransactionData { - if x, ok := x.GetData().(*Transaction_NodeRegistrationData); ok { - return x.NodeRegistrationData - } - return nil -} - -type isTransaction_Data interface { - isTransaction_Data() -} - -type Transaction_VerificationData struct { - VerificationData *VerificationTransactionData `protobuf:"bytes,4,opt,name=verificationData,proto3,oneof"` -} - -type Transaction_ResourceData struct { - ResourceData *ResourceTransactionData `protobuf:"bytes,5,opt,name=resourceData,proto3,oneof"` -} - -type Transaction_NormalData struct { - NormalData *NormalTransactionData `protobuf:"bytes,6,opt,name=normalData,proto3,oneof"` -} - -type Transaction_NodeRegistrationData struct { - NodeRegistrationData *NodeRegistrationTransactionData `protobuf:"bytes,7,opt,name=nodeRegistrationData,proto3,oneof"` -} - -func (*Transaction_VerificationData) isTransaction_Data() {} - -func (*Transaction_ResourceData) isTransaction_Data() {} - -func (*Transaction_NormalData) isTransaction_Data() {} - -func (*Transaction_NodeRegistrationData) isTransaction_Data() {} - -var File_internal_types_transaction_proto protoreflect.FileDescriptor - -var file_internal_types_transaction_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0x6f, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x26, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x15, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x74, 0x54, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, - 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x6f, - 0x64, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x6f, 0x64, - 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x8d, 0x03, 0x0a, 0x0b, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x10, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x3e, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x38, 0x0a, 0x0a, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, - 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x56, 0x0a, 0x14, 0x6e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, - 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x14, 0x6e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, - 0x74, 0x61, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x7f, 0x0a, 0x0f, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, - 0x11, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, - 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x42, 0x1e, 0x5a, 0x1c, 0x6f, - 0x70, 0x65, 0x6e, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_internal_types_transaction_proto_rawDescOnce sync.Once - file_internal_types_transaction_proto_rawDescData = file_internal_types_transaction_proto_rawDesc -) - -func file_internal_types_transaction_proto_rawDescGZIP() []byte { - file_internal_types_transaction_proto_rawDescOnce.Do(func() { - file_internal_types_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_types_transaction_proto_rawDescData) - }) - return file_internal_types_transaction_proto_rawDescData -} - -var file_internal_types_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_internal_types_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_internal_types_transaction_proto_goTypes = []interface{}{ - (TransactionType)(0), // 0: TransactionType - (*VerificationTransactionData)(nil), // 1: VerificationTransactionData - (*ResourceTransactionData)(nil), // 2: ResourceTransactionData - (*NormalTransactionData)(nil), // 3: NormalTransactionData - (*NodeRegistrationTransactionData)(nil), // 4: NodeRegistrationTransactionData - (*Transaction)(nil), // 5: Transaction -} -var file_internal_types_transaction_proto_depIdxs = []int32{ - 0, // 0: Transaction.type:type_name -> TransactionType - 1, // 1: Transaction.verificationData:type_name -> VerificationTransactionData - 2, // 2: Transaction.resourceData:type_name -> ResourceTransactionData - 3, // 3: Transaction.normalData:type_name -> NormalTransactionData - 4, // 4: Transaction.nodeRegistrationData:type_name -> NodeRegistrationTransactionData - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_internal_types_transaction_proto_init() } -func file_internal_types_transaction_proto_init() { - if File_internal_types_transaction_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_internal_types_transaction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerificationTransactionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_types_transaction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceTransactionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_types_transaction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NormalTransactionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_types_transaction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeRegistrationTransactionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_types_transaction_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_internal_types_transaction_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*Transaction_VerificationData)(nil), - (*Transaction_ResourceData)(nil), - (*Transaction_NormalData)(nil), - (*Transaction_NodeRegistrationData)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_types_transaction_proto_rawDesc, - NumEnums: 1, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_internal_types_transaction_proto_goTypes, - DependencyIndexes: file_internal_types_transaction_proto_depIdxs, - EnumInfos: file_internal_types_transaction_proto_enumTypes, - MessageInfos: file_internal_types_transaction_proto_msgTypes, - }.Build() - File_internal_types_transaction_proto = out.File - file_internal_types_transaction_proto_rawDesc = nil - file_internal_types_transaction_proto_goTypes = nil - file_internal_types_transaction_proto_depIdxs = nil -} diff --git a/internal/core/instance.go b/internal/core/instance.go index 1ae2ba7..101aba4 100644 --- a/internal/core/instance.go +++ b/internal/core/instance.go @@ -3,17 +3,19 @@ package core import ( "context" - "github.com/openmesh-network/core/internal/bft" + "github.com/openmesh-network/core/bft" "github.com/openmesh-network/core/internal/database" "github.com/openmesh-network/core/internal/logger" + "github.com/openmesh-network/core/internal/tracker" "github.com/openmesh-network/core/networking/p2p" ) // Instance is the top-level instance type Instance struct { - pi *p2p.Instance - DB *database.Instance - BFT *bft.Instance + pi *p2p.Instance + DB *database.Instance + BFT *bft.Instance + Tracker *tracker.Instance } // NewInstance initialise an empty top-level instance @@ -36,14 +38,20 @@ func (i *Instance) SetBFTInstance(bft *bft.Instance) *Instance { return i } +func (i *Instance) SetTrackerInstance(tracker *tracker.Instance) *Instance { + i.Tracker = tracker + return i +} + // Start the top-level instance as well as all the low-level instances func (i *Instance) Start(ctx context.Context) { // err := i.pi.Start() // if err != nil { // logger.Fatalf("Failed to start p2p instance: %s", err.Error()) // } - + i.Tracker.Start(ctx) i.BFT.Start(ctx) + i.BFT.SetTracker(i.Tracker.Tracker) } // Stop the top-level instance as well as all the low-level instances diff --git a/internal/logger/logger_test.go b/internal/logger/logger_test.go index f9f9a21..3b459ee 100644 --- a/internal/logger/logger_test.go +++ b/internal/logger/logger_test.go @@ -3,7 +3,7 @@ package logger import ( "testing" - "github.com/openmesh-network/core/internal/config" + "github.com/openmesh-network/core/config" "github.com/stretchr/testify/assert" ) diff --git a/internal/logger/zap.go b/internal/logger/zap.go index 6e690a2..89eeeaf 100644 --- a/internal/logger/zap.go +++ b/internal/logger/zap.go @@ -1,175 +1,176 @@ package logger import ( - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "gopkg.in/natefinch/lumberjack.v2" - "github.com/openmesh-network/core/internal/config" - "os" + "os" + + "github.com/openmesh-network/core/config" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "gopkg.in/natefinch/lumberjack.v2" ) var ( - syncs []func() error - Debug func(...interface{}) - Debugf func(string, ...interface{}) - Debugw func(string, ...interface{}) - Debugln func(...interface{}) - Info func(...interface{}) - Infof func(string, ...interface{}) - Infow func(string, ...interface{}) - Infoln func(...interface{}) - Warn func(...interface{}) - Warnf func(string, ...interface{}) - Warnw func(string, ...interface{}) - Warnln func(...interface{}) - Error func(...interface{}) - Errorf func(string, ...interface{}) - Errorw func(string, ...interface{}) - Errorln func(...interface{}) - DPanic func(...interface{}) - DPanicf func(string, ...interface{}) - DPanicw func(string, ...interface{}) - DPanicln func(...interface{}) - Panic func(...interface{}) - Panicf func(string, ...interface{}) - Panicw func(string, ...interface{}) - Panicln func(...interface{}) - Fatal func(...interface{}) - Fatalf func(string, ...interface{}) - Fatalw func(string, ...interface{}) - Fatalln func(...interface{}) + syncs []func() error + Debug func(...interface{}) + Debugf func(string, ...interface{}) + Debugw func(string, ...interface{}) + Debugln func(...interface{}) + Info func(...interface{}) + Infof func(string, ...interface{}) + Infow func(string, ...interface{}) + Infoln func(...interface{}) + Warn func(...interface{}) + Warnf func(string, ...interface{}) + Warnw func(string, ...interface{}) + Warnln func(...interface{}) + Error func(...interface{}) + Errorf func(string, ...interface{}) + Errorw func(string, ...interface{}) + Errorln func(...interface{}) + DPanic func(...interface{}) + DPanicf func(string, ...interface{}) + DPanicw func(string, ...interface{}) + DPanicln func(...interface{}) + Panic func(...interface{}) + Panicf func(string, ...interface{}) + Panicw func(string, ...interface{}) + Panicln func(...interface{}) + Fatal func(...interface{}) + Fatalf func(string, ...interface{}) + Fatalw func(string, ...interface{}) + Fatalln func(...interface{}) ) // InitLogger initialise a logger and assign it to the global variables func InitLogger() { - stdout := zapcore.AddSync(os.Stdout) - infoLevel := zap.NewAtomicLevelAt(zap.InfoLevel) - infoConfig := config.Config.Log.InfoConfig - infoFile := zapcore.AddSync(&lumberjack.Logger{ - Filename: infoConfig.FileName, - MaxSize: infoConfig.MaxSize, - MaxAge: infoConfig.MaxAge, - MaxBackups: infoConfig.MaxBackups, - LocalTime: true, - }) - - stderr := zapcore.AddSync(os.Stderr) - errLevel := zap.NewAtomicLevelAt(zap.ErrorLevel) - errConfig := config.Config.Log.ErrorConfig - errFile := zapcore.AddSync(&lumberjack.Logger{ - Filename: errConfig.FileName, - MaxSize: errConfig.MaxSize, - MaxAge: errConfig.MaxAge, - MaxBackups: errConfig.MaxBackups, - LocalTime: true, - }) - - // Initialise log config based on development/production config - var encoder zapcore.Encoder - cfg := zap.NewDevelopmentEncoderConfig() - if !config.Config.Log.Development { - cfg = zap.NewProductionEncoderConfig() - cfg.TimeKey = "timestamp" - cfg.EncodeTime = zapcore.ISO8601TimeEncoder - encoder = getEncoder(config.Config.Log.Encoding, cfg) - } else { - cfg.EncodeLevel = zapcore.CapitalColorLevelEncoder - encoder = getEncoder("console", cfg) - } - - // Add log configs to the core based on the configuration provided - cores := make([]zapcore.Core, 0) - if config.Config.Log.Development { - cores = append(cores, zapcore.NewCore(encoder, stdout, zap.NewAtomicLevelAt(zap.DebugLevel))) - cores = append(cores, zapcore.NewCore(encoder, stderr, errLevel)) - } else { - if infoConfig.ToFile { - cores = append(cores, zapcore.NewCore(encoder, infoFile, infoLevel)) - syncs = append(syncs, infoFile.Sync) - } - if infoConfig.ToStdout { - cores = append(cores, zapcore.NewCore(encoder, stdout, infoLevel)) - } - if errConfig.ToFile { - cores = append(cores, zapcore.NewCore(encoder, errFile, errLevel)) - syncs = append(syncs, errFile.Sync) - } - if errConfig.ToStderr { - cores = append(cores, zapcore.NewCore(encoder, stderr, errLevel)) - } - } - - // Initialise Zap logger - core := zapcore.NewTee(cores...) - logger := zap.New(core) - zap.ReplaceGlobals(logger) - - // Convert it to a sugared logger to use something like Infof() and Info() - sugar := logger.Sugar() - - // Assign global variables - // DEBUG level (-1) - Debug = sugar.Debug - Debugf = sugar.Debugf - Debugw = sugar.Debugw - Debugln = sugar.Debugln - - // INFO level (0) - Info = sugar.Info - Infof = sugar.Infof - Infow = sugar.Infow - Infoln = sugar.Infoln - - // WARN level (1) - Warn = sugar.Warn - Warnf = sugar.Warnf - Warnw = sugar.Warnw - Warnln = sugar.Warnln - - // ERROR level (2) - Error = sugar.Error - Errorf = sugar.Errorf - Errorw = sugar.Errorw - Errorln = sugar.Errorln - - // DPANIC level (3) - DPanic = sugar.DPanic - DPanicf = sugar.DPanicf - DPanicw = sugar.DPanicw - DPanicln = sugar.DPanicln - - // PANIC level (4) - Panic = sugar.Panic - Panicf = sugar.Panicf - Panicw = sugar.Panicw - Panicln = sugar.Panicln - - // FATAL level (5) - Fatal = sugar.Fatal - Fatalf = sugar.Fatalf - Fatalw = sugar.Fatalw - Fatalln = sugar.Fatalln + stdout := zapcore.AddSync(os.Stdout) + infoLevel := zap.NewAtomicLevelAt(zap.InfoLevel) + infoConfig := config.Config.Log.InfoConfig + infoFile := zapcore.AddSync(&lumberjack.Logger{ + Filename: infoConfig.FileName, + MaxSize: infoConfig.MaxSize, + MaxAge: infoConfig.MaxAge, + MaxBackups: infoConfig.MaxBackups, + LocalTime: true, + }) + + stderr := zapcore.AddSync(os.Stderr) + errLevel := zap.NewAtomicLevelAt(zap.ErrorLevel) + errConfig := config.Config.Log.ErrorConfig + errFile := zapcore.AddSync(&lumberjack.Logger{ + Filename: errConfig.FileName, + MaxSize: errConfig.MaxSize, + MaxAge: errConfig.MaxAge, + MaxBackups: errConfig.MaxBackups, + LocalTime: true, + }) + + // Initialise log config based on development/production config + var encoder zapcore.Encoder + cfg := zap.NewDevelopmentEncoderConfig() + if !config.Config.Log.Development { + cfg = zap.NewProductionEncoderConfig() + cfg.TimeKey = "timestamp" + cfg.EncodeTime = zapcore.ISO8601TimeEncoder + encoder = getEncoder(config.Config.Log.Encoding, cfg) + } else { + cfg.EncodeLevel = zapcore.CapitalColorLevelEncoder + encoder = getEncoder("console", cfg) + } + + // Add log configs to the core based on the configuration provided + cores := make([]zapcore.Core, 0) + if config.Config.Log.Development { + cores = append(cores, zapcore.NewCore(encoder, stdout, zap.NewAtomicLevelAt(zap.DebugLevel))) + cores = append(cores, zapcore.NewCore(encoder, stderr, errLevel)) + } else { + if infoConfig.ToFile { + cores = append(cores, zapcore.NewCore(encoder, infoFile, infoLevel)) + syncs = append(syncs, infoFile.Sync) + } + if infoConfig.ToStdout { + cores = append(cores, zapcore.NewCore(encoder, stdout, infoLevel)) + } + if errConfig.ToFile { + cores = append(cores, zapcore.NewCore(encoder, errFile, errLevel)) + syncs = append(syncs, errFile.Sync) + } + if errConfig.ToStderr { + cores = append(cores, zapcore.NewCore(encoder, stderr, errLevel)) + } + } + + // Initialise Zap logger + core := zapcore.NewTee(cores...) + logger := zap.New(core) + zap.ReplaceGlobals(logger) + + // Convert it to a sugared logger to use something like Infof() and Info() + sugar := logger.Sugar() + + // Assign global variables + // DEBUG level (-1) + Debug = sugar.Debug + Debugf = sugar.Debugf + Debugw = sugar.Debugw + Debugln = sugar.Debugln + + // INFO level (0) + Info = sugar.Info + Infof = sugar.Infof + Infow = sugar.Infow + Infoln = sugar.Infoln + + // WARN level (1) + Warn = sugar.Warn + Warnf = sugar.Warnf + Warnw = sugar.Warnw + Warnln = sugar.Warnln + + // ERROR level (2) + Error = sugar.Error + Errorf = sugar.Errorf + Errorw = sugar.Errorw + Errorln = sugar.Errorln + + // DPANIC level (3) + DPanic = sugar.DPanic + DPanicf = sugar.DPanicf + DPanicw = sugar.DPanicw + DPanicln = sugar.DPanicln + + // PANIC level (4) + Panic = sugar.Panic + Panicf = sugar.Panicf + Panicw = sugar.Panicw + Panicln = sugar.Panicln + + // FATAL level (5) + Fatal = sugar.Fatal + Fatalf = sugar.Fatalf + Fatalw = sugar.Fatalw + Fatalln = sugar.Fatalln } // SyncAll sync all the files added to the logger func SyncAll() error { - for _, sync := range syncs { - err := sync() - if err != nil { - return err - } - } - return nil + for _, sync := range syncs { + err := sync() + if err != nil { + return err + } + } + return nil } // getEncoder create and return a proper encoder based on the format specified func getEncoder(format string, c zapcore.EncoderConfig) zapcore.Encoder { - switch format { - case "json": - return zapcore.NewJSONEncoder(c) - case "console": - return zapcore.NewConsoleEncoder(c) - default: - return zapcore.NewJSONEncoder(c) - } + switch format { + case "json": + return zapcore.NewJSONEncoder(c) + case "console": + return zapcore.NewConsoleEncoder(c) + default: + return zapcore.NewJSONEncoder(c) + } } diff --git a/internal/tracker/tracker.go b/internal/tracker/tracker.go new file mode 100644 index 0000000..e5c2e60 --- /dev/null +++ b/internal/tracker/tracker.go @@ -0,0 +1,34 @@ +package tracker + +import ( + "context" + "time" + + validatorpass_tracker "github.com/Openmesh-Network/nft-authorise/tracker" + log "github.com/openmesh-network/core/internal/logger" + + "github.com/openmesh-network/core/config" +) + +type Instance struct { + Tracker *validatorpass_tracker.Tracker +} + +func NewInstance() (*Instance, error) { + i := &Instance{} + log.Error("the rpc address is", config.Config) + trackerobj := validatorpass_tracker.NewTracker(config.Config.Nft.RpcAddress, config.Config.Nft.SearchLimit, validatorpass_tracker.NewRedeemEvent("Redeemed(uint256,bytes32)", "0x8D64aB58a17dA7d8788367549c513386f09a0A70", config.Config.Nft.DeployBlock)) + i.Tracker = trackerobj + return i, nil +} + +// Stop the CometBFT node +func (i *Instance) Start(ctx context.Context) { + go i.Tracker.StartTracking(ctx, time.Second*time.Duration(config.Config.Nft.Timing), config.Config.Nft.Confirmations) + msg := <-i.Tracker.Startsig + if msg == "done" { + abc := i.Tracker.LastTrackerHeight + log.Error("height is blah", abc) + } + +} diff --git a/main.go b/main.go index d466382..5843e2d 100644 --- a/main.go +++ b/main.go @@ -11,12 +11,13 @@ import ( "net/http" _ "net/http/pprof" + "github.com/openmesh-network/core/bft" "github.com/openmesh-network/core/collector" - "github.com/openmesh-network/core/internal/bft" - "github.com/openmesh-network/core/internal/config" + "github.com/openmesh-network/core/config" "github.com/openmesh-network/core/internal/core" "github.com/openmesh-network/core/internal/database" "github.com/openmesh-network/core/internal/logger" + "github.com/openmesh-network/core/internal/tracker" "github.com/openmesh-network/core/updater" ) @@ -65,11 +66,16 @@ func main() { // Initialise BadgerDB connection dbInstance, err := database.NewInstance() + if err != nil { logger.Fatalf("Failed to establish BadgerDB connection: %s", err.Error()) } + trackerInstance, err := tracker.NewInstance() + if err != nil { + logger.Fatalf("Failed to initialise tracker instance: %s", err.Error()) + } - // Need collector before bft. + // Need collector before bft var collectorInstance *collector.CollectorInstance collectorInstance = nil // collectorInstance = collector.New() @@ -89,7 +95,8 @@ func main() { ins := core.NewInstance(). //SetP2pInstance(p2pInstance). SetDBInstance(dbInstance). - SetBFTInstance(bftInstance) + SetBFTInstance(bftInstance). + SetTrackerInstance(trackerInstance) ins.Start(cancelCtx) logger.Infof("Openmesh Core started successfully.") defer ins.Stop() diff --git a/networking/p2p/libp2p.go b/networking/p2p/libp2p.go index 78ea43f..940a65e 100644 --- a/networking/p2p/libp2p.go +++ b/networking/p2p/libp2p.go @@ -17,7 +17,7 @@ import ( "github.com/libp2p/go-libp2p/p2p/discovery/mdns" "github.com/libp2p/go-libp2p/p2p/security/noise" "github.com/multiformats/go-multiaddr" - "github.com/openmesh-network/core/internal/config" + "github.com/openmesh-network/core/config" ) // Instance is the libp2p instance for networking usage. diff --git a/networking/p2p/libp2p_test.go b/networking/p2p/libp2p_test.go index 05277ea..6e63d40 100644 --- a/networking/p2p/libp2p_test.go +++ b/networking/p2p/libp2p_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/openmesh-network/core/internal/config" + "github.com/openmesh-network/core/config" "github.com/stretchr/testify/assert" ) diff --git a/tests/testnet/config-template.toml b/tests/testnet/config-template.toml index 64fcd12..7280a18 100644 --- a/tests/testnet/config-template.toml +++ b/tests/testnet/config-template.toml @@ -408,7 +408,7 @@ timeout_precommit_delta = "500ms" # How long we wait after committing a block, before starting on the new # height (this gives us a chance to receive some more precommits, even # though we already have +2/3). -timeout_commit = "20s" +timeout_commit = "5s" # How many blocks to look back to check existence of the node's consensus votes before joining consensus # When non-zero, the node will panic upon restart diff --git a/tests/two-nodes-test/node1/cbft-home/config/config.toml b/tests/two-nodes-test/node1/cbft-home/config/config.toml index 37707eb..9732d18 100644 --- a/tests/two-nodes-test/node1/cbft-home/config/config.toml +++ b/tests/two-nodes-test/node1/cbft-home/config/config.toml @@ -16,7 +16,7 @@ version = "0.38.6" # TCP or UNIX socket address of the ABCI application, # or the name of an ABCI application compiled in with the CometBFT binary -proxy_app = "tcp://192.168.2.1:26658" +proxy_app = "tcp://0.0.0.0:27658" # A custom human readable name for this node moniker = "harsh-virtual-machine" @@ -87,7 +87,7 @@ filter_peers = false [rpc] # TCP or UNIX socket address for the RPC server to listen on -laddr = "tcp://192.168.2.1:26657" +laddr = "tcp://0.0.0.0:27657" # A list of origins a cross-domain request can be executed from # Default value '[]' disables cors support @@ -198,7 +198,7 @@ pprof_laddr = "" [p2p] # Address to listen for incoming connections -laddr = "tcp://192.168.2.1:26656" +laddr = "tcp://0.0.0.0:27656" # Address to advertise to peers for them to dial. If empty, will use the same # port as the laddr, and will introspect on the listener to figure out the diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000001.log b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000001.log new file mode 100644 index 0000000..15e558d Binary files /dev/null and b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000001.log differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000008.ldb b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000008.ldb deleted file mode 100644 index 67f1767..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000008.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000009.log b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000009.log deleted file mode 100644 index f8be45b..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/000009.log and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/CURRENT b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/CURRENT index 3051f81..feda7d6 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/CURRENT +++ b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/CURRENT @@ -1 +1 @@ -MANIFEST-000010 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/CURRENT.bak b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/CURRENT.bak deleted file mode 100644 index 875cf23..0000000 --- a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000007 diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/LOG b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/LOG index de998ac..0095ded 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/LOG +++ b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/LOG @@ -1,41 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:55:35.584281 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:55:35.602939 db@open opening -15:55:35.603058 version@stat F·[] S·0B[] Sc·[] -15:55:35.608685 db@janitor F·2 G·0 -15:55:35.608698 db@open done T·5.748557ms -=============== Apr 9, 2024 (AEST) =============== -15:58:58.181322 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:58:58.181416 version@stat F·[] S·0B[] Sc·[] -15:58:58.181431 db@open opening -15:58:58.181464 journal@recovery F·1 -15:58:58.181542 journal@recovery recovering @1 -15:58:58.193451 memdb@flush created L0@2 N·690 S·147KiB "BH:..261,v225":"blo..ore,v6" -15:58:58.193547 version@stat F·[1] S·147KiB[147KiB] Sc·[0.25] -15:58:58.208568 db@janitor F·3 G·0 -15:58:58.208581 db@open done T·27.14506ms -=============== Apr 18, 2024 (AEST) =============== -15:44:12.214568 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:12.214669 version@stat F·[1] S·147KiB[147KiB] Sc·[0.25] -15:44:12.214705 db@open opening -15:44:12.214731 journal@recovery F·1 -15:44:12.214769 journal@recovery recovering @3 -15:44:12.229745 memdb@flush created L0@5 N·5040 S·1MiB "BH:..ca8,v4048":"blo..ore,v697" -15:44:12.229838 version@stat F·[2] S·1MiB[1MiB] Sc·[0.50] -15:44:12.244478 db@janitor F·4 G·0 -15:44:12.244499 db@open done T·29.784603ms -15:44:12.311238 table@compaction L0·2 -> L1·0 S·1MiB Q·5732 -15:44:12.324968 table@build created L1@8 N·4776 S·1MiB "BH:..261,v225":"blo..ore,v5731" -15:44:12.324992 version@stat F·[0 1] S·1MiB[0B 1MiB] Sc·[0.00 0.02] -15:44:12.330457 table@compaction committed F-1 S+8KiB Ke·0 D·954 T·19.172888ms -15:44:12.330535 table@remove removed @2 -=============== Apr 18, 2024 (AEST) =============== -15:46:57.671051 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:57.671141 version@stat F·[0 1] S·1MiB[0B 1MiB] Sc·[0.00 0.02] -15:46:57.671153 db@open opening -15:46:57.671178 journal@recovery F·1 -15:46:57.671221 journal@recovery recovering @6 -15:46:57.671357 version@stat F·[0 1] S·1MiB[0B 1MiB] Sc·[0.00 0.02] -15:46:57.693988 db@janitor F·4 G·1 -15:46:57.693996 db@janitor removing table-5 -15:46:57.694129 db@open done T·22.971913ms +=============== May 1, 2024 (AEST) =============== +11:28:02.881026 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:28:02.885743 db@open opening +11:28:02.886585 version@stat F·[] S·0B[] Sc·[] +11:28:02.888073 db@janitor F·2 G·0 +11:28:02.888360 db@open done T·2.452241ms diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/MANIFEST-000000 b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/MANIFEST-000010 b/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/MANIFEST-000010 deleted file mode 100644 index 8f9d528..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/blockstore.db/MANIFEST-000010 and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/cs.wal/wal b/tests/two-nodes-test/node1/cbft-home/data/cs.wal/wal index f45024e..26f1299 100644 Binary files a/tests/two-nodes-test/node1/cbft-home/data/cs.wal/wal and b/tests/two-nodes-test/node1/cbft-home/data/cs.wal/wal differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/000006.log b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/000001.log similarity index 100% rename from tests/two-nodes-test/node1/cbft-home/data/evidence.db/000006.log rename to tests/two-nodes-test/node1/cbft-home/data/evidence.db/000001.log diff --git a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/CURRENT b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/CURRENT index 875cf23..feda7d6 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/CURRENT +++ b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/CURRENT @@ -1 +1 @@ -MANIFEST-000007 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/CURRENT.bak b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/CURRENT.bak deleted file mode 100644 index aa5bb8e..0000000 --- a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000005 diff --git a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/LOG b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/LOG index 043f754..0182f59 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/LOG +++ b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/LOG @@ -1,33 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:55:35.662983 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:55:35.676675 db@open opening -15:55:35.676766 version@stat F·[] S·0B[] Sc·[] -15:55:35.682996 db@janitor F·2 G·0 -15:55:35.683004 db@open done T·6.322169ms -=============== Apr 9, 2024 (AEST) =============== -15:58:58.269563 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:58:58.269631 version@stat F·[] S·0B[] Sc·[] -15:58:58.269642 db@open opening -15:58:58.269664 journal@recovery F·1 -15:58:58.269703 journal@recovery recovering @1 -15:58:58.269787 version@stat F·[] S·0B[] Sc·[] -15:58:58.284883 db@janitor F·2 G·0 -15:58:58.284896 db@open done T·15.249407ms -=============== Apr 18, 2024 (AEST) =============== -15:44:12.396760 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:12.396879 version@stat F·[] S·0B[] Sc·[] -15:44:12.396892 db@open opening -15:44:12.396914 journal@recovery F·1 -15:44:12.396951 journal@recovery recovering @2 -15:44:12.397191 version@stat F·[] S·0B[] Sc·[] -15:44:12.411572 db@janitor F·2 G·0 -15:44:12.411584 db@open done T·14.688324ms -=============== Apr 18, 2024 (AEST) =============== -15:46:57.826468 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:57.826553 version@stat F·[] S·0B[] Sc·[] -15:46:57.826565 db@open opening -15:46:57.826589 journal@recovery F·1 -15:46:57.826635 journal@recovery recovering @4 -15:46:57.826723 version@stat F·[] S·0B[] Sc·[] -15:46:57.841150 db@janitor F·2 G·0 -15:46:57.841164 db@open done T·14.594638ms +=============== May 1, 2024 (AEST) =============== +11:28:02.906105 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:28:02.908368 db@open opening +11:28:02.908690 version@stat F·[] S·0B[] Sc·[] +11:28:02.909512 db@janitor F·2 G·0 +11:28:02.909547 db@open done T·1.159856ms diff --git a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/MANIFEST-000000 b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/MANIFEST-000007 b/tests/two-nodes-test/node1/cbft-home/data/evidence.db/MANIFEST-000007 deleted file mode 100644 index 47bf23d..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/evidence.db/MANIFEST-000007 and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/priv_validator_state.json b/tests/two-nodes-test/node1/cbft-home/data/priv_validator_state.json index a834ba1..9b118c0 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/priv_validator_state.json +++ b/tests/two-nodes-test/node1/cbft-home/data/priv_validator_state.json @@ -1,7 +1,7 @@ { - "height": "989", - "round": 0, + "height": "34", + "round": 1, "step": 2, - "signature": "PsmOiEmTfaY/D/fOg83iAkHVorWKkgUkskEpRyX3fz3KvhwWFgdMaLxnyJtdk71/tZcmKMxXzRoBvoUWggAIAw==", - "signbytes": "76080111DD0300000000000022480A20C645BB1C14677FB199F3E61CBDD3AC028CAB71ED6C04B957E32B9F57066CD6ED122408011220F8821A091257B16EC495E7817549B366A42E48148C3E3DAA9F222D948A0F29DD2A0C08FDE782B10610D0D1A086013211746573742D636861696E2D75784D645368" + "signature": "NyOF5zkKqR/Qj7bNtcK/SNEDY4iKGnnN71yN8fTgCclH2tuL66x7nLY8ZYzHNrHpTxcngPwUG/RDpEoqoiUGCA==", + "signbytes": "7E080111220000000000000019010000000000000022480A20F0C2C092A10BFA4750895B791B50E008A866F8FAE3C5EF9A0DD645C9B5D6E0CA1224080112204088CE90103B797EDFBADFEE72C26D69710C513FB8924D9BF19697D168EBD16F2A0B08E0B5C6B10610C9B7BA133211746573742D636861696E2D75784D645368" } \ No newline at end of file diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/000010.log b/tests/two-nodes-test/node1/cbft-home/data/state.db/000001.log similarity index 60% rename from tests/two-nodes-test/node1/cbft-home/data/state.db/000010.log rename to tests/two-nodes-test/node1/cbft-home/data/state.db/000001.log index e0ebe01..8158218 100644 Binary files a/tests/two-nodes-test/node1/cbft-home/data/state.db/000010.log and b/tests/two-nodes-test/node1/cbft-home/data/state.db/000001.log differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/000008.ldb b/tests/two-nodes-test/node1/cbft-home/data/state.db/000008.ldb deleted file mode 100644 index d122846..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/state.db/000008.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/000009.ldb b/tests/two-nodes-test/node1/cbft-home/data/state.db/000009.ldb deleted file mode 100644 index fee4a80..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/state.db/000009.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/CURRENT b/tests/two-nodes-test/node1/cbft-home/data/state.db/CURRENT index 5b54010..feda7d6 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/state.db/CURRENT +++ b/tests/two-nodes-test/node1/cbft-home/data/state.db/CURRENT @@ -1 +1 @@ -MANIFEST-000011 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/CURRENT.bak b/tests/two-nodes-test/node1/cbft-home/data/state.db/CURRENT.bak deleted file mode 100644 index 875cf23..0000000 --- a/tests/two-nodes-test/node1/cbft-home/data/state.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000007 diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/LOG b/tests/two-nodes-test/node1/cbft-home/data/state.db/LOG index 6929456..c0c5eb8 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/state.db/LOG +++ b/tests/two-nodes-test/node1/cbft-home/data/state.db/LOG @@ -1,42 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:55:35.608774 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:55:35.620664 db@open opening -15:55:35.620750 version@stat F·[] S·0B[] Sc·[] -15:55:35.626089 db@janitor F·2 G·0 -15:55:35.626103 db@open done T·5.430076ms -=============== Apr 9, 2024 (AEST) =============== -15:58:58.208670 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:58:58.208727 version@stat F·[] S·0B[] Sc·[] -15:58:58.208739 db@open opening -15:58:58.208761 journal@recovery F·1 -15:58:58.208803 journal@recovery recovering @1 -15:58:58.212754 memdb@flush created L0@2 N·581 S·21KiB "abc..y:1,v7":"val..:99,v489" -15:58:58.212842 version@stat F·[1] S·21KiB[21KiB] Sc·[0.25] -15:58:58.227581 db@janitor F·3 G·0 -15:58:58.227591 db@open done T·18.849065ms -=============== Apr 18, 2024 (AEST) =============== -15:44:12.244628 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:12.244691 version@stat F·[1] S·21KiB[21KiB] Sc·[0.25] -15:44:12.244701 db@open opening -15:44:12.244724 journal@recovery F·1 -15:44:12.244767 journal@recovery recovering @3 -15:44:12.251917 memdb@flush created L0@5 N·4201 S·152KiB "abc..116,v584":"val..957,v4781" -15:44:12.252006 version@stat F·[2] S·174KiB[174KiB] Sc·[0.50] -15:44:12.266848 db@janitor F·4 G·0 -15:44:12.266861 db@open done T·22.156253ms -15:44:12.311343 table@compaction L0·2 -> L1·0 S·174KiB Q·4784 -15:44:12.315949 table@build created L1@8 N·2872 S·22KiB "abc..y:1,v7":"val..:99,v489" -15:44:12.315972 version@stat F·[0 1] S·22KiB[0B 22KiB] Sc·[0.00 0.00] -15:44:12.320829 table@compaction committed F-1 S-151KiB Ke·0 D·1910 T·9.468152ms -15:44:12.320925 table@remove removed @2 -=============== Apr 18, 2024 (AEST) =============== -15:46:57.694241 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:57.694313 version@stat F·[0 1] S·22KiB[0B 22KiB] Sc·[0.00 0.00] -15:46:57.694323 db@open opening -15:46:57.694350 journal@recovery F·1 -15:46:57.694386 journal@recovery recovering @6 -15:46:57.700835 memdb@flush created L0@9 N·1 S·141B "off..Key,v4785":"off..Key,v4785" -15:46:57.700910 version@stat F·[1 1] S·23KiB[141B 22KiB] Sc·[0.25 0.00] -15:46:57.723431 db@janitor F·5 G·1 -15:46:57.723439 db@janitor removing table-5 -15:46:57.723501 db@open done T·29.17508ms +=============== May 1, 2024 (AEST) =============== +11:28:02.889114 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:28:02.893833 db@open opening +11:28:02.894402 version@stat F·[] S·0B[] Sc·[] +11:28:02.895659 db@janitor F·2 G·0 +11:28:02.895914 db@open done T·1.97652ms diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/MANIFEST-000000 b/tests/two-nodes-test/node1/cbft-home/data/state.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node1/cbft-home/data/state.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/state.db/MANIFEST-000011 b/tests/two-nodes-test/node1/cbft-home/data/state.db/MANIFEST-000011 deleted file mode 100644 index 73cc0da..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/state.db/MANIFEST-000011 and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000001.log b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000001.log new file mode 100644 index 0000000..2bf67b8 Binary files /dev/null and b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000001.log differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000002.ldb b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000002.ldb deleted file mode 100644 index 0b2ffc8..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000002.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000005.ldb b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000005.ldb deleted file mode 100644 index 591a297..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000005.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000008.log b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000008.log deleted file mode 100644 index 9311f82..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/000008.log and /dev/null differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/CURRENT b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/CURRENT index 6ba31a3..feda7d6 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/CURRENT +++ b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/CURRENT @@ -1 +1 @@ -MANIFEST-000009 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/CURRENT.bak b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/CURRENT.bak deleted file mode 100644 index 875cf23..0000000 --- a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000007 diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/LOG b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/LOG index 29306ab..88a2e3f 100644 --- a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/LOG +++ b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/LOG @@ -1,35 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:55:35.629385 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:55:35.651086 db@open opening -15:55:35.651193 version@stat F·[] S·0B[] Sc·[] -15:55:35.659901 db@janitor F·2 G·0 -15:55:35.659911 db@open done T·8.818597ms -=============== Apr 9, 2024 (AEST) =============== -15:58:58.227890 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:58:58.227977 version@stat F·[] S·0B[] Sc·[] -15:58:58.227990 db@open opening -15:58:58.228026 journal@recovery F·1 -15:58:58.228076 journal@recovery recovering @1 -15:58:58.232686 memdb@flush created L0@2 N·1255 S·87KiB "\x00\xd9:..FpC,v822":"\xff\xb2e..B\x84\xd4,v1172" -15:58:58.232772 version@stat F·[1] S·87KiB[87KiB] Sc·[0.25] -15:58:58.247422 db@janitor F·3 G·0 -15:58:58.247434 db@open done T·19.437766ms -=============== Apr 18, 2024 (AEST) =============== -15:44:12.267164 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:12.267220 version@stat F·[1] S·87KiB[87KiB] Sc·[0.25] -15:44:12.267231 db@open opening -15:44:12.267260 journal@recovery F·1 -15:44:12.267342 journal@recovery recovering @3 -15:44:12.289319 memdb@flush created L0@5 N·18770 S·1MiB "\x00\x01\x17..\x1f\xeaV,v6339":"\xff\xf3\x87..ݻp,v3649" -15:44:12.289425 version@stat F·[2] S·1MiB[1MiB] Sc·[0.50] -15:44:12.305880 db@janitor F·4 G·0 -15:44:12.305895 db@open done T·38.659712ms -=============== Apr 18, 2024 (AEST) =============== -15:46:57.723869 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:57.723967 version@stat F·[2] S·1MiB[1MiB] Sc·[0.50] -15:46:57.723978 db@open opening -15:46:57.724002 journal@recovery F·1 -15:46:57.724057 journal@recovery recovering @6 -15:46:57.724155 version@stat F·[2] S·1MiB[1MiB] Sc·[0.50] -15:46:57.739859 db@janitor F·4 G·0 -15:46:57.739870 db@open done T·15.888195ms +=============== May 1, 2024 (AEST) =============== +11:28:02.899241 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:28:02.902686 db@open opening +11:28:02.903121 version@stat F·[] S·0B[] Sc·[] +11:28:02.904105 db@janitor F·2 G·0 +11:28:02.904166 db@open done T·1.454825ms diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/MANIFEST-000000 b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/MANIFEST-000009 b/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/MANIFEST-000009 deleted file mode 100644 index c62dd38..0000000 Binary files a/tests/two-nodes-test/node1/cbft-home/data/tx_index.db/MANIFEST-000009 and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/config/config.toml b/tests/two-nodes-test/node2/cbft-home/config/config.toml index 8d66037..279a8f3 100644 --- a/tests/two-nodes-test/node2/cbft-home/config/config.toml +++ b/tests/two-nodes-test/node2/cbft-home/config/config.toml @@ -16,7 +16,7 @@ version = "0.38.6" # TCP or UNIX socket address of the ABCI application, # or the name of an ABCI application compiled in with the CometBFT binary -proxy_app = "tcp://192.168.2.2:26658" +proxy_app = "tcp://0.0.0.0:26658" # A custom human readable name for this node moniker = "zbook" @@ -87,7 +87,7 @@ filter_peers = false [rpc] # TCP or UNIX socket address for the RPC server to listen on -laddr = "tcp://192.168.2.2:26657" +laddr = "tcp://0.0.0.0:26657" # A list of origins a cross-domain request can be executed from # Default value '[]' disables cors support @@ -198,7 +198,7 @@ pprof_laddr = "" [p2p] # Address to listen for incoming connections -laddr = "tcp://192.168.2.2:26656" +laddr = "tcp://0.0.0.0:26656" # Address to advertise to peers for them to dial. If empty, will use the same # port as the laddr, and will introspect on the listener to figure out the @@ -209,7 +209,7 @@ external_address = "" seeds = "" # Comma separated list of nodes to keep persistent connections to -persistent_peers = "2a41ce3551fdf4dfdd2100b7ebb02538b7b7e996@192.168.2.1:26656" +persistent_peers = "2a41ce3551fdf4dfdd2100b7ebb02538b7b7e996@0.0.0.0:27656" # Path to address book addr_book_file = "config/addrbook.json" diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000001.log b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000001.log new file mode 100644 index 0000000..15e558d Binary files /dev/null and b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000001.log differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000004.ldb b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000004.ldb deleted file mode 100644 index 62d20c7..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000004.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000009.log b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000009.log deleted file mode 100644 index 2033389..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/000009.log and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/CURRENT b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/CURRENT index 3051f81..feda7d6 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/CURRENT +++ b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/CURRENT @@ -1 +1 @@ -MANIFEST-000010 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/CURRENT.bak b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/CURRENT.bak deleted file mode 100644 index d408ea0..0000000 --- a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000008 diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/LOG b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/LOG index d078c21..d8f30d2 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/LOG +++ b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/LOG @@ -1,43 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:59:06.373327 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:59:06.384985 db@open opening -15:59:06.385095 version@stat F·[] S·0B[] Sc·[] -15:59:06.390601 db@janitor F·2 G·0 -15:59:06.390611 db@open done T·5.616356ms -=============== Apr 9, 2024 (AEST) =============== -16:04:02.511618 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -16:04:02.511721 version@stat F·[] S·0B[] Sc·[] -16:04:02.511733 db@open opening -16:04:02.511754 journal@recovery F·1 -16:04:02.511821 journal@recovery recovering @1 -16:04:02.511925 version@stat F·[] S·0B[] Sc·[] -16:04:02.533568 db@janitor F·2 G·0 -16:04:02.533579 db@open done T·21.840634ms -=============== Apr 18, 2024 (AEST) =============== -15:44:01.847781 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:01.847880 version@stat F·[] S·0B[] Sc·[] -15:44:01.847891 db@open opening -15:44:01.847939 journal@recovery F·1 -15:44:01.847986 journal@recovery recovering @2 -15:44:01.863941 memdb@flush created L0@4 N·5724 S·1MiB "BH:..261,v225":"blo..ore,v6" -15:44:01.864044 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:44:01.878539 db@janitor F·3 G·0 -15:44:01.878553 db@open done T·30.657326ms -=============== Apr 18, 2024 (AEST) =============== -15:44:09.304559 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:09.304659 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:44:09.304675 db@open opening -15:44:09.304708 journal@recovery F·1 -15:44:09.304759 journal@recovery recovering @5 -15:44:09.304862 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:44:09.327302 db@janitor F·3 G·0 -15:44:09.327316 db@open done T·22.634077ms -=============== Apr 18, 2024 (AEST) =============== -15:46:54.392870 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:54.392971 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:46:54.392985 db@open opening -15:46:54.393011 journal@recovery F·1 -15:46:54.393058 journal@recovery recovering @7 -15:46:54.393174 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:46:54.415092 db@janitor F·3 G·0 -15:46:54.415105 db@open done T·22.115262ms +=============== May 1, 2024 (AEST) =============== +11:27:32.073018 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:27:32.077816 db@open opening +11:27:32.078868 version@stat F·[] S·0B[] Sc·[] +11:27:32.080282 db@janitor F·2 G·0 +11:27:32.080494 db@open done T·2.526778ms diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/MANIFEST-000000 b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/MANIFEST-000010 b/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/MANIFEST-000010 deleted file mode 100644 index 80911f9..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/blockstore.db/MANIFEST-000010 and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/cs.wal/wal b/tests/two-nodes-test/node2/cbft-home/data/cs.wal/wal index 4332a3c..1d8692b 100644 Binary files a/tests/two-nodes-test/node2/cbft-home/data/cs.wal/wal and b/tests/two-nodes-test/node2/cbft-home/data/cs.wal/wal differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/000008.log b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/000001.log similarity index 100% rename from tests/two-nodes-test/node2/cbft-home/data/evidence.db/000008.log rename to tests/two-nodes-test/node2/cbft-home/data/evidence.db/000001.log diff --git a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/CURRENT b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/CURRENT index 6ba31a3..feda7d6 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/CURRENT +++ b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/CURRENT @@ -1 +1 @@ -MANIFEST-000009 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/CURRENT.bak b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/CURRENT.bak deleted file mode 100644 index 875cf23..0000000 --- a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000007 diff --git a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/LOG b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/LOG index 9bad630..3fb1598 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/LOG +++ b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/LOG @@ -1,42 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:59:06.432398 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:59:06.444196 db@open opening -15:59:06.444313 version@stat F·[] S·0B[] Sc·[] -15:59:06.450235 db@janitor F·2 G·0 -15:59:06.450248 db@open done T·6.04351ms -=============== Apr 9, 2024 (AEST) =============== -16:04:02.571088 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -16:04:02.571164 version@stat F·[] S·0B[] Sc·[] -16:04:02.571174 db@open opening -16:04:02.571196 journal@recovery F·1 -16:04:02.571242 journal@recovery recovering @1 -16:04:02.571372 version@stat F·[] S·0B[] Sc·[] -16:04:02.586112 db@janitor F·2 G·0 -16:04:02.586124 db@open done T·14.945794ms -=============== Apr 18, 2024 (AEST) =============== -15:44:02.032046 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:02.032120 version@stat F·[] S·0B[] Sc·[] -15:44:02.032132 db@open opening -15:44:02.032156 journal@recovery F·1 -15:44:02.032192 journal@recovery recovering @2 -15:44:02.032282 version@stat F·[] S·0B[] Sc·[] -15:44:02.048155 db@janitor F·2 G·0 -15:44:02.048170 db@open done T·16.034064ms -=============== Apr 18, 2024 (AEST) =============== -15:44:09.450023 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:09.450097 version@stat F·[] S·0B[] Sc·[] -15:44:09.450110 db@open opening -15:44:09.450138 journal@recovery F·1 -15:44:09.450204 journal@recovery recovering @4 -15:44:09.450320 version@stat F·[] S·0B[] Sc·[] -15:44:09.466722 db@janitor F·2 G·0 -15:44:09.466733 db@open done T·16.619191ms -=============== Apr 18, 2024 (AEST) =============== -15:46:54.536948 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:54.537035 version@stat F·[] S·0B[] Sc·[] -15:46:54.537048 db@open opening -15:46:54.537071 journal@recovery F·1 -15:46:54.537108 journal@recovery recovering @6 -15:46:54.537211 version@stat F·[] S·0B[] Sc·[] -15:46:54.551800 db@janitor F·2 G·0 -15:46:54.551813 db@open done T·14.761696ms +=============== May 1, 2024 (AEST) =============== +11:27:32.101692 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:27:32.104394 db@open opening +11:27:32.104736 version@stat F·[] S·0B[] Sc·[] +11:27:32.105801 db@janitor F·2 G·0 +11:27:32.105842 db@open done T·1.399924ms diff --git a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/MANIFEST-000000 b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/MANIFEST-000009 b/tests/two-nodes-test/node2/cbft-home/data/evidence.db/MANIFEST-000009 deleted file mode 100644 index 3dd087f..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/evidence.db/MANIFEST-000009 and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/priv_validator_state.json b/tests/two-nodes-test/node2/cbft-home/data/priv_validator_state.json index e6e0ac9..e89fbcf 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/priv_validator_state.json +++ b/tests/two-nodes-test/node2/cbft-home/data/priv_validator_state.json @@ -1,7 +1,7 @@ { - "height": "988", + "height": "34", "round": 0, "step": 3, - "signature": "T8U8TFsq8WgusuS3lGtcDSc83r9qkg/3fa7UB2+wNfMMOXFJqKgTWpQpon4SEKNhFvVY+7EKIXhFALImY190Cg==", - "signbytes": "75080211DC0300000000000022480A20E224A40CD4A8AF0A5D5D46375E61CF2894F7F82803C75A9B54161B23D6BB4C76122408011220A1CDD598FF1EBD0E8ABD90999017AE5BB5EA2D3649DC6D91EF61F32C762A196C2A0B08FCE782B10610939AE54D3211746573742D636861696E2D75784D645368" + "signature": "yvFOYNYQitzp6UL4jirytE2r9XoLPe1xU/HEM1XorKdzsqNjjmdHb4BsVij0yjpUrBS1vNoL7YbjX8nrNp9GDA==", + "signbytes": "2C08021122000000000000002A0C08DEB5C6B10610C888B0BD033211746573742D636861696E2D75784D645368" } \ No newline at end of file diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/000013.log b/tests/two-nodes-test/node2/cbft-home/data/state.db/000001.log similarity index 60% rename from tests/two-nodes-test/node2/cbft-home/data/state.db/000013.log rename to tests/two-nodes-test/node2/cbft-home/data/state.db/000001.log index de29365..8158218 100644 Binary files a/tests/two-nodes-test/node2/cbft-home/data/state.db/000013.log and b/tests/two-nodes-test/node2/cbft-home/data/state.db/000001.log differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/000008.ldb b/tests/two-nodes-test/node2/cbft-home/data/state.db/000008.ldb deleted file mode 100644 index 9da4332..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/state.db/000008.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/000009.ldb b/tests/two-nodes-test/node2/cbft-home/data/state.db/000009.ldb deleted file mode 100644 index d666b28..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/state.db/000009.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/000012.ldb b/tests/two-nodes-test/node2/cbft-home/data/state.db/000012.ldb deleted file mode 100644 index dd6f29d..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/state.db/000012.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/CURRENT b/tests/two-nodes-test/node2/cbft-home/data/state.db/CURRENT index 23b73d9..feda7d6 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/state.db/CURRENT +++ b/tests/two-nodes-test/node2/cbft-home/data/state.db/CURRENT @@ -1 +1 @@ -MANIFEST-000014 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/CURRENT.bak b/tests/two-nodes-test/node2/cbft-home/data/state.db/CURRENT.bak deleted file mode 100644 index 5b54010..0000000 --- a/tests/two-nodes-test/node2/cbft-home/data/state.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000011 diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/LOG b/tests/two-nodes-test/node2/cbft-home/data/state.db/LOG index 1712d64..9af3f05 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/state.db/LOG +++ b/tests/two-nodes-test/node2/cbft-home/data/state.db/LOG @@ -1,52 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:59:06.390677 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:59:06.402208 db@open opening -15:59:06.402297 version@stat F·[] S·0B[] Sc·[] -15:59:06.408368 db@janitor F·2 G·0 -15:59:06.408376 db@open done T·6.162151ms -=============== Apr 9, 2024 (AEST) =============== -16:04:02.533618 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -16:04:02.533668 version@stat F·[] S·0B[] Sc·[] -16:04:02.533678 db@open opening -16:04:02.533697 journal@recovery F·1 -16:04:02.533738 journal@recovery recovering @1 -16:04:02.536883 memdb@flush created L0@2 N·6 S·937B "con..y:1,v4":"val..y:2,v3" -16:04:02.536952 version@stat F·[1] S·937B[937B] Sc·[0.25] -16:04:02.552252 db@janitor F·3 G·0 -16:04:02.552261 db@open done T·18.57932ms -=============== Apr 18, 2024 (AEST) =============== -15:44:01.878649 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:01.878705 version@stat F·[1] S·937B[937B] Sc·[0.25] -15:44:01.878715 db@open opening -15:44:01.878737 journal@recovery F·1 -15:44:01.878779 journal@recovery recovering @3 -15:44:01.886069 memdb@flush created L0@5 N·4775 S·172KiB "abc..y:1,v13":"val..:99,v495" -15:44:01.886140 version@stat F·[2] S·173KiB[173KiB] Sc·[0.50] -15:44:01.901406 db@janitor F·4 G·0 -15:44:01.901419 db@open done T·22.700657ms -15:44:01.951620 table@compaction L0·2 -> L1·0 S·173KiB Q·4783 -15:44:01.955906 table@build created L1@8 N·2869 S·22KiB "abc..y:1,v13":"val..:99,v495" -15:44:01.955932 version@stat F·[0 1] S·22KiB[0B 22KiB] Sc·[0.00 0.00] -15:44:01.961622 table@compaction committed F-1 S-150KiB Ke·0 D·1912 T·9.980954ms -15:44:01.961721 table@remove removed @2 -=============== Apr 18, 2024 (AEST) =============== -15:44:09.327411 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:09.327475 version@stat F·[0 1] S·22KiB[0B 22KiB] Sc·[0.00 0.00] -15:44:09.327490 db@open opening -15:44:09.327518 journal@recovery F·1 -15:44:09.327561 journal@recovery recovering @6 -15:44:09.330958 memdb@flush created L0@9 N·1 S·141B "off..Key,v4784":"off..Key,v4784" -15:44:09.331028 version@stat F·[1 1] S·23KiB[141B 22KiB] Sc·[0.25 0.00] -15:44:09.346720 db@janitor F·5 G·1 -15:44:09.346728 db@janitor removing table-5 -15:44:09.346774 db@open done T·19.279439ms -=============== Apr 18, 2024 (AEST) =============== -15:46:54.415198 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:54.415253 version@stat F·[1 1] S·23KiB[141B 22KiB] Sc·[0.25 0.00] -15:46:54.415263 db@open opening -15:46:54.415287 journal@recovery F·1 -15:46:54.415323 journal@recovery recovering @10 -15:46:54.418313 memdb@flush created L0@12 N·1 S·141B "off..Key,v4786":"off..Key,v4786" -15:46:54.418379 version@stat F·[2 1] S·23KiB[282B 22KiB] Sc·[0.50 0.00] -15:46:54.432786 db@janitor F·5 G·0 -15:46:54.432795 db@open done T·17.528931ms +=============== May 1, 2024 (AEST) =============== +11:27:32.081200 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:27:32.085207 db@open opening +11:27:32.085752 version@stat F·[] S·0B[] Sc·[] +11:27:32.086919 db@janitor F·2 G·0 +11:27:32.087097 db@open done T·1.746039ms diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/MANIFEST-000000 b/tests/two-nodes-test/node2/cbft-home/data/state.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node2/cbft-home/data/state.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/state.db/MANIFEST-000014 b/tests/two-nodes-test/node2/cbft-home/data/state.db/MANIFEST-000014 deleted file mode 100644 index 2f6eb09..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/state.db/MANIFEST-000014 and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000001.log b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000001.log new file mode 100644 index 0000000..2bf67b8 Binary files /dev/null and b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000001.log differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000004.ldb b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000004.ldb deleted file mode 100644 index aba1f5b..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000004.ldb and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000009.log b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000009.log deleted file mode 100644 index 564d1f7..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/000009.log and /dev/null differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/CURRENT b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/CURRENT index 3051f81..feda7d6 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/CURRENT +++ b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/CURRENT @@ -1 +1 @@ -MANIFEST-000010 +MANIFEST-000000 diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/CURRENT.bak b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/CURRENT.bak deleted file mode 100644 index d408ea0..0000000 --- a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/CURRENT.bak +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000008 diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/LOG b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/LOG index b494da6..9312e1d 100644 --- a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/LOG +++ b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/LOG @@ -1,43 +1,6 @@ -=============== Apr 9, 2024 (AEST) =============== -15:59:06.411856 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:59:06.422984 db@open opening -15:59:06.423084 version@stat F·[] S·0B[] Sc·[] -15:59:06.428711 db@janitor F·2 G·0 -15:59:06.428720 db@open done T·5.729181ms -=============== Apr 9, 2024 (AEST) =============== -16:04:02.552508 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -16:04:02.552563 version@stat F·[] S·0B[] Sc·[] -16:04:02.552572 db@open opening -16:04:02.552592 journal@recovery F·1 -16:04:02.552633 journal@recovery recovering @1 -16:04:02.552718 version@stat F·[] S·0B[] Sc·[] -16:04:02.567581 db@janitor F·2 G·0 -16:04:02.567591 db@open done T·15.015936ms -=============== Apr 18, 2024 (AEST) =============== -15:44:01.901877 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:01.901925 version@stat F·[] S·0B[] Sc·[] -15:44:01.901935 db@open opening -15:44:01.901957 journal@recovery F·1 -15:44:01.902001 journal@recovery recovering @2 -15:44:01.926806 memdb@flush created L0@4 N·20004 S·1MiB "\x00\x01\x17..\x1f\xeaV,v6338":"\xff\xf3\x87..ݻp,v3648" -15:44:01.926904 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:44:01.942508 db@janitor F·3 G·0 -15:44:01.942523 db@open done T·40.582241ms -=============== Apr 18, 2024 (AEST) =============== -15:44:09.347023 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:44:09.347072 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:44:09.347083 db@open opening -15:44:09.347129 journal@recovery F·1 -15:44:09.347206 journal@recovery recovering @5 -15:44:09.347343 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:44:09.363588 db@janitor F·3 G·0 -15:44:09.363599 db@open done T·16.512376ms -=============== Apr 18, 2024 (AEST) =============== -15:46:54.433038 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -15:46:54.433090 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:46:54.433100 db@open opening -15:46:54.433122 journal@recovery F·1 -15:46:54.433159 journal@recovery recovering @7 -15:46:54.433236 version@stat F·[1] S·1MiB[1MiB] Sc·[0.25] -15:46:54.448043 db@janitor F·3 G·0 -15:46:54.448051 db@open done T·14.948492ms +=============== May 1, 2024 (AEST) =============== +11:27:32.092745 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +11:27:32.096964 db@open opening +11:27:32.097365 version@stat F·[] S·0B[] Sc·[] +11:27:32.098202 db@janitor F·2 G·0 +11:27:32.098251 db@open done T·1.236809ms diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/MANIFEST-000000 b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/MANIFEST-000000 new file mode 100644 index 0000000..9d54f67 Binary files /dev/null and b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/MANIFEST-000000 differ diff --git a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/MANIFEST-000010 b/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/MANIFEST-000010 deleted file mode 100644 index b16db4f..0000000 Binary files a/tests/two-nodes-test/node2/cbft-home/data/tx_index.db/MANIFEST-000010 and /dev/null differ