Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(solver): init solver v2 from v1 #2755

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

kevinhalliday
Copy link
Contributor

Clone solver app into app/v2.

This code is unused. This will allow us to start iterate on v2 in sandbox.

issue: none

Clone solver app into app/v2.
@kevinhalliday
Copy link
Contributor Author

Diff just in package name

diff -rupP app/app.go app/v2/app.go
--- app/app.go	2024-12-16 10:39:42
+++ app/v2/app.go	2025-01-07 18:44:09
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
diff -rupP app/bindings.go app/v2/bindings.go
--- app/bindings.go	2025-01-06 09:50:44
+++ app/v2/bindings.go	2025-01-07 18:44:01
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"github.com/omni-network/omni/contracts/bindings"
diff -rupP app/config.go app/v2/config.go
--- app/config.go	2024-12-16 10:39:42
+++ app/v2/config.go	2025-01-07 18:43:56
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"bytes"
diff -rupP app/config_test.go app/v2/config_test.go
--- app/config_test.go	2024-12-16 10:39:42
+++ app/v2/config_test.go	2025-01-07 18:43:52
@@ -1,4 +1,4 @@
-package app_test
+package appv2_test
 
 import (
 	"os"
diff -rupP app/cursor.go app/v2/cursor.go
--- app/cursor.go	2024-11-29 10:00:25
+++ app/v2/cursor.go	2025-01-07 18:58:11
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
@@ -31,7 +31,7 @@ func newCursors(db db.DB) (*cursors, error) {
 
 func newCursors(db db.DB) (*cursors, error) {
 	schema := &ormv1alpha1.ModuleSchemaDescriptor{SchemaFile: []*ormv1alpha1.ModuleSchemaDescriptor_FileEntry{
-		{Id: 1, ProtoFileName: File_solver_app_solver_proto.Path()},
+		{Id: 1, ProtoFileName: File_solver_app_v2_solver_proto.Path()},
 	}}
 
 	storeSvc := dbStoreService{DB: db}
diff -rupP app/ephemeral.go app/v2/ephemeral.go
--- app/ephemeral.go	2025-01-06 09:50:44
+++ app/v2/ephemeral.go	2025-01-07 18:43:45
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
diff -rupP app/helpers.go app/v2/helpers.go
--- app/helpers.go	2025-01-06 09:50:44
+++ app/v2/helpers.go	2025-01-07 18:43:43
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
diff -rupP app/metrics.go app/v2/metrics.go
--- app/metrics.go	2025-01-06 09:50:44
+++ app/v2/metrics.go	2025-01-07 18:59:22
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"github.com/prometheus/client_golang/prometheus"
@@ -7,14 +7,14 @@ var (
 
 var (
 	statusOffset = promauto.NewGaugeVec(prometheus.GaugeOpts{
-		Namespace: "solver",
+		Namespace: "solver_v2",
 		Subsystem: "processor",
 		Name:      "status_offset",
 		Help:      "Last inbox offset processed by chain and status",
 	}, []string{"chain", "target", "status"})
 
 	processedEvents = promauto.NewCounterVec(prometheus.CounterOpts{
-		Namespace: "solver",
+		Namespace: "solver_v2",
 		Subsystem: "processor",
 		Name:      "processed_events_total",
 		Help:      "Total number of events processed by chain and status",
diff -rupP app/procdeps.go app/v2/procdeps.go
--- app/procdeps.go	2025-01-07 16:43:45
+++ app/v2/procdeps.go	2025-01-07 18:43:31
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
diff -rupP app/processor.go app/v2/processor.go
--- app/processor.go	2025-01-06 09:50:44
+++ app/v2/processor.go	2025-01-07 18:43:27
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
diff -rupP app/processor_internal_test.go app/v2/processor_internal_test.go
--- app/processor_internal_test.go	2025-01-06 09:50:44
+++ app/v2/processor_internal_test.go	2025-01-07 18:43:25
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
diff -rupP app/reject.go app/v2/reject.go
--- app/reject.go	2025-01-07 16:44:23
+++ app/v2/reject.go	2025-01-07 18:43:22
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"context"
diff -rupP app/rejectreason_string.go app/v2/rejectreason_string.go
--- app/rejectreason_string.go	2025-01-06 09:50:44
+++ app/v2/rejectreason_string.go	2025-01-07 18:43:11
@@ -1,6 +1,6 @@
 // Code generated by "stringer -type=rejectReason -trimprefix=reject"; DO NOT EDIT.
 
-package app
+package appv2
 
 import "strconv"
 
diff -rupP app/solver.cosmos_orm.go app/v2/solver.cosmos_orm.go
--- app/solver.cosmos_orm.go	2025-01-07 19:00:59
+++ app/v2/solver.cosmos_orm.go	2025-01-07 19:00:59
@@ -1,6 +1,6 @@
 // Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
 
-package app
+package appv2
 
 import (
 	context "context"
diff -rupP app/solver.pb.go app/v2/solver.pb.go
--- app/solver.pb.go	2025-01-07 19:00:59
+++ app/v2/solver.pb.go	2025-01-07 19:00:59
@@ -2,9 +2,9 @@
 // versions:
 // 	protoc-gen-go v1.35.2
 // 	protoc        (unknown)
-// source: solver/app/solver.proto
+// source: solver/app/v2/solver.proto
 
-package app
+package appv2
 
 import (
 	_ "cosmossdk.io/api/cosmos/orm/v1"
@@ -33,7 +33,7 @@ func (x *Cursor) Reset() {
 
 func (x *Cursor) Reset() {
 	*x = Cursor{}
-	mi := &file_solver_app_solver_proto_msgTypes[0]
+	mi := &file_solver_app_v2_solver_proto_msgTypes[0]
 	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 	ms.StoreMessageInfo(mi)
 }
@@ -45,7 +45,7 @@ func (x *Cursor) ProtoReflect() protoreflect.Message {
 func (*Cursor) ProtoMessage() {}
 
 func (x *Cursor) ProtoReflect() protoreflect.Message {
-	mi := &file_solver_app_solver_proto_msgTypes[0]
+	mi := &file_solver_app_v2_solver_proto_msgTypes[0]
 	if x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -58,7 +58,7 @@ func (*Cursor) Descriptor() ([]byte, []int) {
 
 // Deprecated: Use Cursor.ProtoReflect.Descriptor instead.
 func (*Cursor) Descriptor() ([]byte, []int) {
-	return file_solver_app_solver_proto_rawDescGZIP(), []int{0}
+	return file_solver_app_v2_solver_proto_rawDescGZIP(), []int{0}
 }
 
 func (x *Cursor) GetChainId() uint64 {
@@ -82,51 +82,52 @@ func (x *Cursor) GetBlockHeight() uint64 {
 	return 0
 }
 
-var File_solver_app_solver_proto protoreflect.FileDescriptor
+var File_solver_app_v2_solver_proto protoreflect.FileDescriptor
 
-var file_solver_app_solver_proto_rawDesc = []byte{
-	0x0a, 0x17, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x6f, 0x6c,
-	0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x6f, 0x6c, 0x76, 0x65,
-	0x72, 0x2e, 0x61, 0x70, 0x70, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72,
-	0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86,
-	0x01, 0x0a, 0x06, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61,
-	0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, 0x61,
-	0x69, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6c, 0x65, 0x76,
-	0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x4c, 0x65,
-	0x76, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69,
-	0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
-	0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x15,
-	0x0a, 0x13, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x2c, 0x63, 0x6f, 0x6e, 0x66, 0x5f,
-	0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x42, 0x8f, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
-	0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x70, 0x42, 0x0b, 0x53, 0x6f, 0x6c, 0x76,
-	0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75,
-	0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f,
-	0x72, 0x6b, 0x2f, 0x6f, 0x6d, 0x6e, 0x69, 0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61,
-	0x70, 0x70, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0a, 0x53, 0x6f, 0x6c, 0x76, 0x65,
-	0x72, 0x2e, 0x41, 0x70, 0x70, 0xca, 0x02, 0x0a, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5c, 0x41,
-	0x70, 0x70, 0xe2, 0x02, 0x16, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5c, 0x41, 0x70, 0x70, 0x5c,
-	0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x53, 0x6f,
-	0x6c, 0x76, 0x65, 0x72, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+var file_solver_app_v2_solver_proto_rawDesc = []byte{
+	0x0a, 0x1a, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x32, 0x2f,
+	0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6f,
+	0x6c, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x32, 0x1a, 0x17, 0x63, 0x6f, 0x73,
+	0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x06, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12,
+	0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x04, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f,
+	0x6e, 0x66, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09,
+	0x63, 0x6f, 0x6e, 0x66, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f,
+	0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
+	0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x1f, 0xf2, 0x9e,
+	0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x15, 0x0a, 0x13, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64,
+	0x2c, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x42, 0xa8, 0x01,
+	0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x70,
+	0x2e, 0x76, 0x32, 0x42, 0x0b, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+	0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
+	0x6d, 0x6e, 0x69, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6f, 0x6d, 0x6e, 0x69,
+	0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x32, 0x3b, 0x61,
+	0x70, 0x70, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x6f, 0x6c,
+	0x76, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0d, 0x53, 0x6f, 0x6c,
+	0x76, 0x65, 0x72, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x19, 0x53, 0x6f, 0x6c,
+	0x76, 0x65, 0x72, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
+	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x3a,
+	0x3a, 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
-	file_solver_app_solver_proto_rawDescOnce sync.Once
-	file_solver_app_solver_proto_rawDescData = file_solver_app_solver_proto_rawDesc
+	file_solver_app_v2_solver_proto_rawDescOnce sync.Once
+	file_solver_app_v2_solver_proto_rawDescData = file_solver_app_v2_solver_proto_rawDesc
 )
 
-func file_solver_app_solver_proto_rawDescGZIP() []byte {
-	file_solver_app_solver_proto_rawDescOnce.Do(func() {
-		file_solver_app_solver_proto_rawDescData = protoimpl.X.CompressGZIP(file_solver_app_solver_proto_rawDescData)
+func file_solver_app_v2_solver_proto_rawDescGZIP() []byte {
+	file_solver_app_v2_solver_proto_rawDescOnce.Do(func() {
+		file_solver_app_v2_solver_proto_rawDescData = protoimpl.X.CompressGZIP(file_solver_app_v2_solver_proto_rawDescData)
 	})
-	return file_solver_app_solver_proto_rawDescData
+	return file_solver_app_v2_solver_proto_rawDescData
 }
 
-var file_solver_app_solver_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_solver_app_solver_proto_goTypes = []any{
-	(*Cursor)(nil), // 0: solver.app.Cursor
+var file_solver_app_v2_solver_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_solver_app_v2_solver_proto_goTypes = []any{
+	(*Cursor)(nil), // 0: solver.app.v2.Cursor
 }
-var file_solver_app_solver_proto_depIdxs = []int32{
+var file_solver_app_v2_solver_proto_depIdxs = []int32{
 	0, // [0:0] is the sub-list for method output_type
 	0, // [0:0] is the sub-list for method input_type
 	0, // [0:0] is the sub-list for extension type_name
@@ -134,27 +135,27 @@ var file_solver_app_solver_proto_depIdxs = []int32{
 	0, // [0:0] is the sub-list for field type_name
 }
 
-func init() { file_solver_app_solver_proto_init() }
-func file_solver_app_solver_proto_init() {
-	if File_solver_app_solver_proto != nil {
+func init() { file_solver_app_v2_solver_proto_init() }
+func file_solver_app_v2_solver_proto_init() {
+	if File_solver_app_v2_solver_proto != nil {
 		return
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
-			RawDescriptor: file_solver_app_solver_proto_rawDesc,
+			RawDescriptor: file_solver_app_v2_solver_proto_rawDesc,
 			NumEnums:      0,
 			NumMessages:   1,
 			NumExtensions: 0,
 			NumServices:   0,
 		},
-		GoTypes:           file_solver_app_solver_proto_goTypes,
-		DependencyIndexes: file_solver_app_solver_proto_depIdxs,
-		MessageInfos:      file_solver_app_solver_proto_msgTypes,
+		GoTypes:           file_solver_app_v2_solver_proto_goTypes,
+		DependencyIndexes: file_solver_app_v2_solver_proto_depIdxs,
+		MessageInfos:      file_solver_app_v2_solver_proto_msgTypes,
 	}.Build()
-	File_solver_app_solver_proto = out.File
-	file_solver_app_solver_proto_rawDesc = nil
-	file_solver_app_solver_proto_goTypes = nil
-	file_solver_app_solver_proto_depIdxs = nil
+	File_solver_app_v2_solver_proto = out.File
+	file_solver_app_v2_solver_proto_rawDesc = nil
+	file_solver_app_v2_solver_proto_goTypes = nil
+	file_solver_app_v2_solver_proto_depIdxs = nil
 }
diff -rupP app/solver.proto app/v2/solver.proto
--- app/solver.proto	2024-11-07 15:42:06
+++ app/v2/solver.proto	2025-01-07 18:30:29
@@ -1,10 +1,10 @@ syntax = "proto3";
 syntax = "proto3";
 
-package solver.app;
+package solver.app.v2;
 
 import "cosmos/orm/v1/orm.proto";
 
-option go_package = "solver/app";
+option go_package = "solver/app/v2";
 
 message Cursor {
   option (cosmos.orm.v1.table) = {
diff -rupP app/targets.go app/v2/targets.go
--- app/targets.go	2025-01-06 17:19:57
+++ app/v2/targets.go	2025-01-07 18:43:14
@@ -1,4 +1,4 @@
-package app
+package appv2
 
 import (
 	"github.com/omni-network/omni/contracts/bindings"
Only in app: v2

@kevinhalliday kevinhalliday merged commit f751674 into main Jan 9, 2025
19 checks passed
@kevinhalliday kevinhalliday deleted the kh/init-solver-v2 branch January 9, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants