From 04c627a307596976a67bc87ef5457da5be3ea922 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sun, 25 Feb 2024 22:36:20 +0100 Subject: [PATCH 01/42] WIP: converter to cfsm_bisimulation --- cfsm/cfsm.go | 18 ++++++++ cfsm/converter.go | 90 +++++++++++++++++++++++++++++++++++++++ cfsm/converter_test.go | 36 ++++++++++++++++ contract/contract.go | 18 ++++++++ internal/broker/broker.go | 15 +++++++ 5 files changed, 177 insertions(+) create mode 100644 cfsm/converter.go create mode 100644 cfsm/converter_test.go diff --git a/cfsm/cfsm.go b/cfsm/cfsm.go index 23593f7..0051393 100644 --- a/cfsm/cfsm.go +++ b/cfsm/cfsm.go @@ -256,6 +256,8 @@ type Transition interface { Label() string // Label is the marking on the transition. State() *State // State after transition. NameOfOtherCFSM() string // Name of the CFSM we are communicating with. + IsSend() bool // True if the transition is a Send, false if it's a Recv. + Message() string // Message payload. } // Send is a send transition (output). @@ -286,6 +288,14 @@ func (s *Send) Label() string { return fmt.Sprintf("%s ! %s", s.NameOfOtherCFSM(), s.msg) } +func (s *Send) IsSend() bool { + return true +} + +func (s *Send) Message() string { + return s.msg +} + // Name of the CFSM we are communicating with. func (s *Send) NameOfOtherCFSM() string { if s.to != nil { @@ -331,6 +341,14 @@ func (r *Recv) Label() string { return fmt.Sprintf("%s ? %s", r.NameOfOtherCFSM(), r.msg) } +func (r *Recv) IsSend() bool { + return false +} + +func (r *Recv) Message() string { + return r.msg +} + // Name of the CFSM we are communicating with. func (r *Recv) NameOfOtherCFSM() string { if r.from != nil { diff --git a/cfsm/converter.go b/cfsm/converter.go new file mode 100644 index 0000000..6996157 --- /dev/null +++ b/cfsm/converter.go @@ -0,0 +1,90 @@ +package cfsm + +import ( + "encoding/json" + "fmt" + "math/rand" + "regexp" +) + +// This function converts a CFSM to a string in the format of the Python Bisimulation library +// https://github.com/diegosenarruzza/bisimulation/ +func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { + // Import statement + const importStatement = "from cfsm_bisimulation import CommunicatingFiniteStateMachine\n\n" + + // Create CFSM + // Diego's format expects also the name for the CFSM we're defining, so we'll have to pick + // a name that is unused. We'll use 'self' unless it's already used. If it is, we'll generate + // a random string and use that (verifying it's also unused). + otherCFSMs := contract.OtherCFSMs() + selfname := "self" + restart := false + for restart { + restart = false + for _, name := range otherCFSMs { + if name == selfname { + selfname = "self_" + generateRandomString(5) + restart = true + break + } + } + } + allCFSMs := append(otherCFSMs, selfname) + allCFSMsJSON, err := json.Marshal(allCFSMs) + if err != nil { + return nil, err + } + createCFSM := "cfsm = CommunicatingFiniteStateMachine(" + string(allCFSMsJSON) + ")\n\n" + + // Add states + addStates := "" + for _, state := range contract.States() { + addStates += fmt.Sprintf("cfsm.add_states('%d')\n", state.ID) + } + addStates += "\n" + + // Set initial state + setInitialState := fmt.Sprintf("cfsm.set_as_initial('%d')\n\n", contract.Start.ID) + + // Add transitions + addTransitions := "" + for _, state := range contract.States() { + for _, transition := range state.Transitions() { + // cfsm_bisimulation format expects the message to be a string with the format + // is SenderReceiver[!|?]function([typed parameters]). e.g "ClientServer!f(int x)" or "ServerClient?g()" + + msgRegex := `\w+\(.*\)` + matched, err := regexp.MatchString(msgRegex, transition.Message()) + if err != nil { + return nil, err + } + if !matched { + return nil, fmt.Errorf("the message in transition %s does not match the format expected by cfsm_simulation", transition.Label()) + } + + var transitionTypeMarker string + if transition.IsSend() { + transitionTypeMarker = "!" + } else { + transitionTypeMarker = "?" + } + action := fmt.Sprintf("%s%s%s%s", selfname, transition.NameOfOtherCFSM(), transitionTypeMarker, transition.Message()) + addTransitions += fmt.Sprintf("cfsm.add_transition_between('%d', '%d', '%s', True)\n", state.ID, transition.State().ID, action) + } + } + + // Combine all code blocks + code := importStatement + createCFSM + addStates + setInitialState + addTransitions + "\n" + + return []byte(code), nil +} + +func generateRandomString(length int) string { + charset := "abcdefghijklmnopqrstuvwxyz0123456789" + result := make([]byte, length) + for i := range result { + result[i] = charset[rand.Intn(len(charset))] + } + return string(result) +} diff --git a/cfsm/converter_test.go b/cfsm/converter_test.go new file mode 100644 index 0000000..e9dfb63 --- /dev/null +++ b/cfsm/converter_test.go @@ -0,0 +1,36 @@ +package cfsm + +import ( + "bytes" + "reflect" + "testing" +) + +func TestConvertCFSMToPythonBisimulationFormat(t *testing.T) { + // Create a sample CFSM for testing + contract, err := ParseSingleCFSMFSA(bytes.NewReader([]byte(` + .outputs self + .state graph + q0 Server ! login() q1 + q1 Server ? accept() q2 + .marking q0 + .end + `))) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + expectedOutput := []byte(`from cfsm_bisimulation import CommunicatingFiniteStateMachine + + cfsm = CommunicatingFiniteStateMachine(["self", "Server"]) + `) + + output, err := ConvertCFSMToPythonBisimulationFormat(contract) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + if !reflect.DeepEqual(output, expectedOutput) { + t.Errorf("Output does not match expected value.\nExpected: %s\nGot: %s", expectedOutput, output) + } +} diff --git a/contract/contract.go b/contract/contract.go index 73f226b..c5baf65 100644 --- a/contract/contract.go +++ b/contract/contract.go @@ -11,10 +11,17 @@ import ( pb "github.com/pmontepagano/search/gen/go/search/v1" ) +type ContractOutputFormats int + +const ( + SingleCFSMPythonBisimulation ContractOutputFormats = iota +) + type Contract interface { GetContractID() string GetRemoteParticipantNames() []string // Returns the names of all participants in this contract (except the Service Provider, who is unnamed). GetBytesRepr() []byte + Convert(ContractOutputFormats) ([]byte, error) } // LocalContract is an interface that represents a local view of a contract. It is used to @@ -171,3 +178,14 @@ func ConvertPBLocalContract(pbContract *pb.LocalContract) (LocalContract, error) } return nil, fmt.Errorf("not implemented") } + +func (lc *LocalCFSMContract) Convert(format ContractOutputFormats) ([]byte, error) { + if format == SingleCFSMPythonBisimulation { + return cfsm.ConvertCFSMToPythonBisimulationFormat(lc.CFSM) + } + return nil, fmt.Errorf("invalid output format for this type of contract") +} + +func (lc *GlobalCFSMContract) Convert(format ContractOutputFormats) ([]byte, error) { + return nil, fmt.Errorf("invalid output format for this type of contract") +} diff --git a/internal/broker/broker.go b/internal/broker/broker.go index c4ba063..f83c69c 100644 --- a/internal/broker/broker.go +++ b/internal/broker/broker.go @@ -67,6 +67,21 @@ func allContractsIncompatible(ctx context.Context, req contract.LocalContract, p return false, nil, nil } +func bisimilarityAlgorithm(ctx context.Context, req contract.LocalContract, prov contract.LocalContract) (bool, map[string]string, error) { + reqPyFormat, err := req.Convert(contract.SingleCFSMPythonBisimulation) + if err != nil { + return false, nil, fmt.Errorf("error converting requirement contract to Python bisimulation format: %w", err) + } + provPyFormat, err := prov.Convert(contract.SingleCFSMPythonBisimulation) + if err != nil { + return false, nil, fmt.Errorf("error converting provider contract to Python bisimulation format: %w", err) + } + log.Printf("reqPyFormat: %s", reqPyFormat) + log.Printf("provPyFormat: %s", provPyFormat) + + return false, nil, nil +} + // returns new slice with keys of r filtered-out from orig. All keys of r MUST be present in orig func filterParticipants(orig []string, r map[string]*pb.RemoteParticipant) []string { result := make([]string, 0) From 24eb2496c7f633af765feea9d2dee753ceaab28f Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Tue, 27 Feb 2024 22:40:46 +0100 Subject: [PATCH 02/42] Converter is working. --- cfsm/cfsm_bisimulation_example.py | 155 ++++++++++++++++++++++++++++++ cfsm/converter.go | 70 ++++++++++---- cfsm/converter_test.go | 16 ++- 3 files changed, 221 insertions(+), 20 deletions(-) create mode 100644 cfsm/cfsm_bisimulation_example.py diff --git a/cfsm/cfsm_bisimulation_example.py b/cfsm/cfsm_bisimulation_example.py new file mode 100644 index 0000000..7024ea0 --- /dev/null +++ b/cfsm/cfsm_bisimulation_example.py @@ -0,0 +1,155 @@ +from cfsm_bisimulation import CommunicatingFiniteStateMachine +from z3 import Int + +cfsm_clientapp = CommunicatingFiniteStateMachine(['Clientapp', 'Srv', 'Pps']) +cfsm_clientapp.add_states('clientq0', 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7') +cfsm_clientapp.set_as_initial('clientq0') +cfsm_clientapp.add_transition_between( + 'clientq0', + 'q1', + 'Clientapp Srv ! PurchaseRequest()' +) +cfsm_clientapp.add_transition_between( + 'q1', + 'q2', + 'Clientapp Srv ? TotalAmount()' +) +cfsm_clientapp.add_transition_between( + 'q2', + 'q3', + 'Clientapp Pps ! CardDetailsWithTotalAmount()' +) +cfsm_clientapp.add_transition_between( + 'q3', + 'q4', + 'Clientapp Pps ? PaymentNonce()' +) +cfsm_clientapp.add_transition_between( + 'q4', + 'q5', + 'Clientapp Srv ! PurchaseWithPaymentNonce()' +) +cfsm_clientapp.add_transition_between( + 'q5', + 'q6', + 'Clientapp Srv ? PurchaseOK()' +) +cfsm_clientapp.add_transition_between( + 'q5', + 'q7', + 'Clientapp Srv ? PurchaseFail()' +) + + + +cfsm_srv = CommunicatingFiniteStateMachine(['Srv', 'Clientapp', 'Pps']) +cfsm_srv.add_states('srvq0', 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8') +cfsm_srv.set_as_initial('srvq0') +cfsm_srv.add_transition_between( + 'srvq0', + 'q1', + 'Srv Clientapp ? PurchaseRequest()' +) +cfsm_srv.add_transition_between( + 'q1', + 'q2', + 'Srv Clientapp ! TotalAmount()' +) +cfsm_srv.add_transition_between( + 'q2', + 'q3', + 'Srv Clientapp ? PurchaseWithPaymentNonce()' +) +cfsm_srv.add_transition_between( + 'q3', + 'q4', + 'Srv Pps ! RequestChargeWithNonce()' +) +cfsm_srv.add_transition_between( + 'q4', + 'q5', + 'Srv Pps ? ChargeOK()' +) +cfsm_srv.add_transition_between( + 'q4', + 'q6', + 'Srv Pps ? ChargeFail()' +) +cfsm_srv.add_transition_between( + 'q5', + 'q7', + 'Srv Clientapp ! PurchaseOK()' +) +cfsm_srv.add_transition_between( + 'q6', + 'q8', + 'Srv Clientapp ! PurchaseFail()' +) + + + +cfsm_pps = CommunicatingFiniteStateMachine(['Pps', 'Clientapp', 'Srv']) +cfsm_pps.add_states('ppsq0', 'q1', 'q2', 'q3', 'q4', 'q5') +cfsm_pps.set_as_initial('ppsq0') +cfsm_pps.add_transition_between( + 'ppsq0', + 'q1', + 'Pps Clientapp ? CardDetailsWithTotalAmount()' +) +cfsm_pps.add_transition_between( + 'q1', + 'q2', + 'Pps Clientapp ! PaymentNonce()' +) +cfsm_pps.add_transition_between( + 'q2', + 'q3', + 'Pps Srv ? RequestChargeWithNonce()' +) +cfsm_pps.add_transition_between( + 'q3', + 'q4', + 'Pps Srv ! ChargeOK()' +) +cfsm_pps.add_transition_between( + 'q3', + 'q5', + 'Pps Srv ! ChargeFail()' +) + + +cfsm_pps_alt = CommunicatingFiniteStateMachine(['Ppsalt', 'Cliente', 'Backend', ]) +cfsm_pps_alt.add_states('ppsaltq0', 'q1', 'q2', 'q3', 'q4', 'q5') +cfsm_pps_alt.set_as_initial('ppsaltq0') +cfsm_pps_alt.add_transition_between( + 'ppsaltq0', + 'q1', + 'Ppsalt Cliente ? CardDetailsWithTotalAmount()' +) +cfsm_pps_alt.add_transition_between( + 'q1', + 'q2', + 'Ppsalt Cliente ! PaymentNonce()' +) +cfsm_pps_alt.add_transition_between( + 'q2', + 'q3', + 'Ppsalt Backend ? RequestChargeWithNonce()' +) +cfsm_pps_alt.add_transition_between( + 'q3', + 'q4', + 'Ppsalt Backend ! ChargeOK()' +) +cfsm_pps_alt.add_transition_between( + 'q3', + 'q5', + 'Ppsalt Backend ! ChargeFail()' +) + + +relation, matches = cfsm_pps.calculate_bisimulation_with(cfsm_pps_alt) + +assert bool(relation) + +assert {'Pps': 'Ppsalt', 'Srv': 'Backend', 'Clientapp': 'Cliente'} == matches['participants'] diff --git a/cfsm/converter.go b/cfsm/converter.go index 6996157..24fd3a9 100644 --- a/cfsm/converter.go +++ b/cfsm/converter.go @@ -5,6 +5,7 @@ import ( "fmt" "math/rand" "regexp" + "strings" ) // This function converts a CFSM to a string in the format of the Python Bisimulation library @@ -13,24 +14,44 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { // Import statement const importStatement = "from cfsm_bisimulation import CommunicatingFiniteStateMachine\n\n" - // Create CFSM + // We need all participant names to start with a single uppercase letter and then all lowercase or numbers. + // We'll have to keep track of all the translations we do here, so we can translate back when we're done. + participantNameTranslations := make(map[string]string) + otherCFSMs := make([]string, 0) + for _, name := range contract.OtherCFSMs() { + msgRegex := `[A-Z][a-z0-9]*` + matched, err := regexp.MatchString(msgRegex, name) + if err != nil { + return nil, err + } + translatedName := name + if matched { + participantNameTranslations[name] = name + } else { + translatedName = "C" + filterOutNonAlphanumeric(name) + participantNameTranslations[name] = translatedName + // TODO: check that the new name is unique. + } + otherCFSMs = append(otherCFSMs, translatedName) + } + // Diego's format expects also the name for the CFSM we're defining, so we'll have to pick // a name that is unused. We'll use 'self' unless it's already used. If it is, we'll generate // a random string and use that (verifying it's also unused). - otherCFSMs := contract.OtherCFSMs() - selfname := "self" - restart := false + + selfname := "Self" + restart := true for restart { restart = false for _, name := range otherCFSMs { if name == selfname { - selfname = "self_" + generateRandomString(5) + selfname = "Self" + generateRandomString(5) restart = true break } } } - allCFSMs := append(otherCFSMs, selfname) + allCFSMs := append([]string{selfname}, otherCFSMs...) allCFSMsJSON, err := json.Marshal(allCFSMs) if err != nil { return nil, err @@ -49,18 +70,27 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { // Add transitions addTransitions := "" + messageTranslations := make(map[string]string) + messageTranslationsInverted := make(map[string]string) for _, state := range contract.States() { for _, transition := range state.Transitions() { - // cfsm_bisimulation format expects the message to be a string with the format - // is SenderReceiver[!|?]function([typed parameters]). e.g "ClientServer!f(int x)" or "ServerClient?g()" + // cfsm_bisimulation format expects the message to be a string with the format like this: + // Sender Receiver [!|?] function([typed parameters]). e.g "Client Server ! f(int x)" or "ServerClient?g()" + // It actually uses this regex to match the "action_string" paramter: + // (?P[A-Z][a-z0-9]*)\s*(?P[A-Z][a-z0-9]*)\s*(?P!|\?)\s*(?P\w+)\((?P.*)\) + // https://github.com/diegosenarruzza/bisimulation/blob/81af48aed977b79e41b2a96c36160354e230f5b2/src/cfsm_bisimulation/models/communicating_system/action_parser.py#L5-L8 - msgRegex := `\w+\(.*\)` - matched, err := regexp.MatchString(msgRegex, transition.Message()) - if err != nil { - return nil, err - } - if !matched { - return nil, fmt.Errorf("the message in transition %s does not match the format expected by cfsm_simulation", transition.Label()) + // So we need participant names to start with a single uppercase letter and then all lowercase or numbers. + // We also need the "tag" to have parentheses after it. We're not going to use the payload (leave empty). + // We also will not set any conditions, so we'll use TrueFormula for that. + + // We'll have to keep track of all the translations we do here, so we can translate back when we're done. + + translatedMessage, ok := messageTranslations[transition.Message()] + if !ok { + translatedMessage = fmt.Sprintf("message%d()", len(messageTranslations)) + messageTranslations[transition.Message()] = translatedMessage + messageTranslationsInverted[translatedMessage] = transition.Message() } var transitionTypeMarker string @@ -69,8 +99,8 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { } else { transitionTypeMarker = "?" } - action := fmt.Sprintf("%s%s%s%s", selfname, transition.NameOfOtherCFSM(), transitionTypeMarker, transition.Message()) - addTransitions += fmt.Sprintf("cfsm.add_transition_between('%d', '%d', '%s', True)\n", state.ID, transition.State().ID, action) + action := fmt.Sprintf("%s %s %s %s", selfname, participantNameTranslations[transition.NameOfOtherCFSM()], transitionTypeMarker, translatedMessage) + addTransitions += fmt.Sprintf("cfsm.add_transition_between('%d', '%d', '%s')\n", state.ID, transition.State().ID, action) } } @@ -88,3 +118,9 @@ func generateRandomString(length int) string { } return string(result) } + +var nonAlphanumericRegex = regexp.MustCompile(`[^a-z0-9]+`) + +func filterOutNonAlphanumeric(str string) string { + return nonAlphanumericRegex.ReplaceAllString(strings.ToLower(str), "") +} diff --git a/cfsm/converter_test.go b/cfsm/converter_test.go index e9dfb63..be0a2ea 100644 --- a/cfsm/converter_test.go +++ b/cfsm/converter_test.go @@ -21,9 +21,19 @@ func TestConvertCFSMToPythonBisimulationFormat(t *testing.T) { } expectedOutput := []byte(`from cfsm_bisimulation import CommunicatingFiniteStateMachine - - cfsm = CommunicatingFiniteStateMachine(["self", "Server"]) - `) + +cfsm = CommunicatingFiniteStateMachine(["Self","Server"]) + +cfsm.add_states('0') +cfsm.add_states('1') +cfsm.add_states('2') + +cfsm.set_as_initial('0') + +cfsm.add_transition_between('0', '1', 'Self Server ! message0()') +cfsm.add_transition_between('1', '2', 'Self Server ? message1()') + +`) output, err := ConvertCFSMToPythonBisimulationFormat(contract) if err != nil { From ea788549e13a94ab69d35449129d94c899e6b87f Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Wed, 28 Feb 2024 18:38:27 +0100 Subject: [PATCH 03/42] Regenerate mocks. --- mocks/Contract.go | 86 +++++++++++++++++++++++++++++++++--- mocks/GlobalContract.go | 97 ++++++++++++++++++++++++++++++++++++++--- mocks/LocalContract.go | 89 ++++++++++++++++++++++++++++++++++--- 3 files changed, 252 insertions(+), 20 deletions(-) diff --git a/mocks/Contract.go b/mocks/Contract.go index 608e209..0e99d31 100644 --- a/mocks/Contract.go +++ b/mocks/Contract.go @@ -1,8 +1,11 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks -import mock "github.com/stretchr/testify/mock" +import ( + contract "github.com/pmontepagano/search/contract" + mock "github.com/stretchr/testify/mock" +) // Contract is an autogenerated mock type for the Contract type type Contract struct { @@ -17,10 +20,72 @@ func (_m *Contract) EXPECT() *Contract_Expecter { return &Contract_Expecter{mock: &_m.Mock} } +// Convert provides a mock function with given fields: _a0 +func (_m *Contract) Convert(_a0 contract.ContractOutputFormats) ([]byte, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Convert") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) ([]byte, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) []byte); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(contract.ContractOutputFormats) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Contract_Convert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Convert' +type Contract_Convert_Call struct { + *mock.Call +} + +// Convert is a helper method to define mock.On call +// - _a0 contract.ContractOutputFormats +func (_e *Contract_Expecter) Convert(_a0 interface{}) *Contract_Convert_Call { + return &Contract_Convert_Call{Call: _e.mock.On("Convert", _a0)} +} + +func (_c *Contract_Convert_Call) Run(run func(_a0 contract.ContractOutputFormats)) *Contract_Convert_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(contract.ContractOutputFormats)) + }) + return _c +} + +func (_c *Contract_Convert_Call) Return(_a0 []byte, _a1 error) *Contract_Convert_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Contract_Convert_Call) RunAndReturn(run func(contract.ContractOutputFormats) ([]byte, error)) *Contract_Convert_Call { + _c.Call.Return(run) + return _c +} + // GetBytesRepr provides a mock function with given fields: func (_m *Contract) GetBytesRepr() []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetBytesRepr") + } + var r0 []byte if rf, ok := ret.Get(0).(func() []byte); ok { r0 = rf() @@ -64,6 +129,10 @@ func (_c *Contract_GetBytesRepr_Call) RunAndReturn(run func() []byte) *Contract_ func (_m *Contract) GetContractID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetContractID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -105,6 +174,10 @@ func (_c *Contract_GetContractID_Call) RunAndReturn(run func() string) *Contract func (_m *Contract) GetRemoteParticipantNames() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRemoteParticipantNames") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -144,13 +217,12 @@ func (_c *Contract_GetRemoteParticipantNames_Call) RunAndReturn(run func() []str return _c } -type mockConstructorTestingTNewContract interface { +// NewContract creates a new instance of Contract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewContract(t interface { mock.TestingT Cleanup(func()) -} - -// NewContract creates a new instance of Contract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewContract(t mockConstructorTestingTNewContract) *Contract { +}) *Contract { mock := &Contract{} mock.Mock.Test(t) diff --git a/mocks/GlobalContract.go b/mocks/GlobalContract.go index 3fce3de..0e569cd 100644 --- a/mocks/GlobalContract.go +++ b/mocks/GlobalContract.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -22,10 +22,72 @@ func (_m *GlobalContract) EXPECT() *GlobalContract_Expecter { return &GlobalContract_Expecter{mock: &_m.Mock} } +// Convert provides a mock function with given fields: _a0 +func (_m *GlobalContract) Convert(_a0 contract.ContractOutputFormats) ([]byte, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Convert") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) ([]byte, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) []byte); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(contract.ContractOutputFormats) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GlobalContract_Convert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Convert' +type GlobalContract_Convert_Call struct { + *mock.Call +} + +// Convert is a helper method to define mock.On call +// - _a0 contract.ContractOutputFormats +func (_e *GlobalContract_Expecter) Convert(_a0 interface{}) *GlobalContract_Convert_Call { + return &GlobalContract_Convert_Call{Call: _e.mock.On("Convert", _a0)} +} + +func (_c *GlobalContract_Convert_Call) Run(run func(_a0 contract.ContractOutputFormats)) *GlobalContract_Convert_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(contract.ContractOutputFormats)) + }) + return _c +} + +func (_c *GlobalContract_Convert_Call) Return(_a0 []byte, _a1 error) *GlobalContract_Convert_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GlobalContract_Convert_Call) RunAndReturn(run func(contract.ContractOutputFormats) ([]byte, error)) *GlobalContract_Convert_Call { + _c.Call.Return(run) + return _c +} + // GetBytesRepr provides a mock function with given fields: func (_m *GlobalContract) GetBytesRepr() []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetBytesRepr") + } + var r0 []byte if rf, ok := ret.Get(0).(func() []byte); ok { r0 = rf() @@ -69,6 +131,10 @@ func (_c *GlobalContract_GetBytesRepr_Call) RunAndReturn(run func() []byte) *Glo func (_m *GlobalContract) GetContractID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetContractID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -110,6 +176,10 @@ func (_c *GlobalContract_GetContractID_Call) RunAndReturn(run func() string) *Gl func (_m *GlobalContract) GetFormat() v1.GlobalContractFormat { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetFormat") + } + var r0 v1.GlobalContractFormat if rf, ok := ret.Get(0).(func() v1.GlobalContractFormat); ok { r0 = rf() @@ -151,6 +221,10 @@ func (_c *GlobalContract_GetFormat_Call) RunAndReturn(run func() v1.GlobalContra func (_m *GlobalContract) GetLocalParticipantName() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetLocalParticipantName") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -192,6 +266,10 @@ func (_c *GlobalContract_GetLocalParticipantName_Call) RunAndReturn(run func() s func (_m *GlobalContract) GetParticipants() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetParticipants") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -235,6 +313,10 @@ func (_c *GlobalContract_GetParticipants_Call) RunAndReturn(run func() []string) func (_m *GlobalContract) GetProjection(_a0 string) (contract.LocalContract, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetProjection") + } + var r0 contract.LocalContract var r1 error if rf, ok := ret.Get(0).(func(string) (contract.LocalContract, error)); ok { @@ -289,6 +371,10 @@ func (_c *GlobalContract_GetProjection_Call) RunAndReturn(run func(string) (cont func (_m *GlobalContract) GetRemoteParticipantNames() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRemoteParticipantNames") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -328,13 +414,12 @@ func (_c *GlobalContract_GetRemoteParticipantNames_Call) RunAndReturn(run func() return _c } -type mockConstructorTestingTNewGlobalContract interface { +// NewGlobalContract creates a new instance of GlobalContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewGlobalContract(t interface { mock.TestingT Cleanup(func()) -} - -// NewGlobalContract creates a new instance of GlobalContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGlobalContract(t mockConstructorTestingTNewGlobalContract) *GlobalContract { +}) *GlobalContract { mock := &GlobalContract{} mock.Mock.Test(t) diff --git a/mocks/LocalContract.go b/mocks/LocalContract.go index 1c90a00..fe7aba2 100644 --- a/mocks/LocalContract.go +++ b/mocks/LocalContract.go @@ -1,10 +1,12 @@ -// Code generated by mockery v2.27.1. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks import ( - v1 "github.com/pmontepagano/search/gen/go/search/v1" + contract "github.com/pmontepagano/search/contract" mock "github.com/stretchr/testify/mock" + + v1 "github.com/pmontepagano/search/gen/go/search/v1" ) // LocalContract is an autogenerated mock type for the LocalContract type @@ -20,10 +22,72 @@ func (_m *LocalContract) EXPECT() *LocalContract_Expecter { return &LocalContract_Expecter{mock: &_m.Mock} } +// Convert provides a mock function with given fields: _a0 +func (_m *LocalContract) Convert(_a0 contract.ContractOutputFormats) ([]byte, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Convert") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) ([]byte, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) []byte); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(contract.ContractOutputFormats) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LocalContract_Convert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Convert' +type LocalContract_Convert_Call struct { + *mock.Call +} + +// Convert is a helper method to define mock.On call +// - _a0 contract.ContractOutputFormats +func (_e *LocalContract_Expecter) Convert(_a0 interface{}) *LocalContract_Convert_Call { + return &LocalContract_Convert_Call{Call: _e.mock.On("Convert", _a0)} +} + +func (_c *LocalContract_Convert_Call) Run(run func(_a0 contract.ContractOutputFormats)) *LocalContract_Convert_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(contract.ContractOutputFormats)) + }) + return _c +} + +func (_c *LocalContract_Convert_Call) Return(_a0 []byte, _a1 error) *LocalContract_Convert_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LocalContract_Convert_Call) RunAndReturn(run func(contract.ContractOutputFormats) ([]byte, error)) *LocalContract_Convert_Call { + _c.Call.Return(run) + return _c +} + // GetBytesRepr provides a mock function with given fields: func (_m *LocalContract) GetBytesRepr() []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetBytesRepr") + } + var r0 []byte if rf, ok := ret.Get(0).(func() []byte); ok { r0 = rf() @@ -67,6 +131,10 @@ func (_c *LocalContract_GetBytesRepr_Call) RunAndReturn(run func() []byte) *Loca func (_m *LocalContract) GetContractID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetContractID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -108,6 +176,10 @@ func (_c *LocalContract_GetContractID_Call) RunAndReturn(run func() string) *Loc func (_m *LocalContract) GetFormat() v1.LocalContractFormat { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetFormat") + } + var r0 v1.LocalContractFormat if rf, ok := ret.Get(0).(func() v1.LocalContractFormat); ok { r0 = rf() @@ -149,6 +221,10 @@ func (_c *LocalContract_GetFormat_Call) RunAndReturn(run func() v1.LocalContract func (_m *LocalContract) GetRemoteParticipantNames() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRemoteParticipantNames") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -188,13 +264,12 @@ func (_c *LocalContract_GetRemoteParticipantNames_Call) RunAndReturn(run func() return _c } -type mockConstructorTestingTNewLocalContract interface { +// NewLocalContract creates a new instance of LocalContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewLocalContract(t interface { mock.TestingT Cleanup(func()) -} - -// NewLocalContract creates a new instance of LocalContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLocalContract(t mockConstructorTestingTNewLocalContract) *LocalContract { +}) *LocalContract { mock := &LocalContract{} mock.Mock.Test(t) From 3a778a848acefd5084d26d70dc42bff4e0d62916 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Wed, 28 Feb 2024 18:59:14 +0100 Subject: [PATCH 04/42] lint --- cfsm/converter.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cfsm/converter.go b/cfsm/converter.go index 24fd3a9..3f75412 100644 --- a/cfsm/converter.go +++ b/cfsm/converter.go @@ -18,12 +18,10 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { // We'll have to keep track of all the translations we do here, so we can translate back when we're done. participantNameTranslations := make(map[string]string) otherCFSMs := make([]string, 0) + msgRegex := regexp.MustCompile(`[A-Z][a-z0-9]*`) for _, name := range contract.OtherCFSMs() { - msgRegex := `[A-Z][a-z0-9]*` - matched, err := regexp.MatchString(msgRegex, name) - if err != nil { - return nil, err - } + + matched := msgRegex.MatchString(name) translatedName := name if matched { participantNameTranslations[name] = name From 8c07535aafcfbe415e56da1d2de3729682ba83ca Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Wed, 28 Feb 2024 21:48:05 +0100 Subject: [PATCH 05/42] Refactor to include participants, name and message translations. --- cfsm/converter.go | 29 ++++++++++++++++------------- cfsm/converter_test.go | 2 +- contract/contract.go | 26 +++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/cfsm/converter.go b/cfsm/converter.go index 3f75412..ed7aec9 100644 --- a/cfsm/converter.go +++ b/cfsm/converter.go @@ -6,17 +6,22 @@ import ( "math/rand" "regexp" "strings" + + "github.com/vishalkuo/bimap" ) // This function converts a CFSM to a string in the format of the Python Bisimulation library // https://github.com/diegosenarruzza/bisimulation/ -func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { +func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, participantNameTranslations, messageTranslations *bimap.BiMap[string, string], funcErr error) { // Import statement const importStatement = "from cfsm_bisimulation import CommunicatingFiniteStateMachine\n\n" // We need all participant names to start with a single uppercase letter and then all lowercase or numbers. // We'll have to keep track of all the translations we do here, so we can translate back when we're done. - participantNameTranslations := make(map[string]string) + + participantNameTranslations = bimap.NewBiMap[string, string]() + messageTranslations = bimap.NewBiMap[string, string]() + otherCFSMs := make([]string, 0) msgRegex := regexp.MustCompile(`[A-Z][a-z0-9]*`) for _, name := range contract.OtherCFSMs() { @@ -24,10 +29,10 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { matched := msgRegex.MatchString(name) translatedName := name if matched { - participantNameTranslations[name] = name + participantNameTranslations.Insert(name, name) } else { translatedName = "C" + filterOutNonAlphanumeric(name) - participantNameTranslations[name] = translatedName + participantNameTranslations.Insert(name, translatedName) // TODO: check that the new name is unique. } otherCFSMs = append(otherCFSMs, translatedName) @@ -52,7 +57,7 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { allCFSMs := append([]string{selfname}, otherCFSMs...) allCFSMsJSON, err := json.Marshal(allCFSMs) if err != nil { - return nil, err + return nil, participantNameTranslations, messageTranslations, err } createCFSM := "cfsm = CommunicatingFiniteStateMachine(" + string(allCFSMsJSON) + ")\n\n" @@ -68,8 +73,6 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { // Add transitions addTransitions := "" - messageTranslations := make(map[string]string) - messageTranslationsInverted := make(map[string]string) for _, state := range contract.States() { for _, transition := range state.Transitions() { // cfsm_bisimulation format expects the message to be a string with the format like this: @@ -84,11 +87,10 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { // We'll have to keep track of all the translations we do here, so we can translate back when we're done. - translatedMessage, ok := messageTranslations[transition.Message()] + translatedMessage, ok := messageTranslations.Get(transition.Message()) if !ok { - translatedMessage = fmt.Sprintf("message%d()", len(messageTranslations)) - messageTranslations[transition.Message()] = translatedMessage - messageTranslationsInverted[translatedMessage] = transition.Message() + translatedMessage = fmt.Sprintf("message%d()", messageTranslations.Size()) + messageTranslations.Insert(transition.Message(), translatedMessage) } var transitionTypeMarker string @@ -97,7 +99,8 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { } else { transitionTypeMarker = "?" } - action := fmt.Sprintf("%s %s %s %s", selfname, participantNameTranslations[transition.NameOfOtherCFSM()], transitionTypeMarker, translatedMessage) + otherParticipantName, _ := participantNameTranslations.Get(transition.NameOfOtherCFSM()) + action := fmt.Sprintf("%s %s %s %s", selfname, otherParticipantName, transitionTypeMarker, translatedMessage) addTransitions += fmt.Sprintf("cfsm.add_transition_between('%d', '%d', '%s')\n", state.ID, transition.State().ID, action) } } @@ -105,7 +108,7 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) ([]byte, error) { // Combine all code blocks code := importStatement + createCFSM + addStates + setInitialState + addTransitions + "\n" - return []byte(code), nil + return []byte(code), participantNameTranslations, messageTranslations, nil } func generateRandomString(length int) string { diff --git a/cfsm/converter_test.go b/cfsm/converter_test.go index be0a2ea..d4540cd 100644 --- a/cfsm/converter_test.go +++ b/cfsm/converter_test.go @@ -35,7 +35,7 @@ cfsm.add_transition_between('1', '2', 'Self Server ? message1()') `) - output, err := ConvertCFSMToPythonBisimulationFormat(contract) + output, _, _, err := ConvertCFSMToPythonBisimulationFormat(contract) if err != nil { t.Errorf("Unexpected error: %v", err) } diff --git a/contract/contract.go b/contract/contract.go index c5baf65..663cf71 100644 --- a/contract/contract.go +++ b/contract/contract.go @@ -7,6 +7,7 @@ import ( "sync" "github.com/pmontepagano/search/cfsm" + "github.com/vishalkuo/bimap" pb "github.com/pmontepagano/search/gen/go/search/v1" ) @@ -181,7 +182,8 @@ func ConvertPBLocalContract(pbContract *pb.LocalContract) (LocalContract, error) func (lc *LocalCFSMContract) Convert(format ContractOutputFormats) ([]byte, error) { if format == SingleCFSMPythonBisimulation { - return cfsm.ConvertCFSMToPythonBisimulationFormat(lc.CFSM) + code, _, _, err := cfsm.ConvertCFSMToPythonBisimulationFormat(lc.CFSM) + return code, err } return nil, fmt.Errorf("invalid output format for this type of contract") } @@ -189,3 +191,25 @@ func (lc *LocalCFSMContract) Convert(format ContractOutputFormats) ([]byte, erro func (lc *GlobalCFSMContract) Convert(format ContractOutputFormats) ([]byte, error) { return nil, fmt.Errorf("invalid output format for this type of contract") } + +type LocalPyCFSMContract struct { + pythonCode []byte + id string + sync.Mutex + convertedFrom *LocalCFSMContract + participantNameTranslations *bimap.BiMap[string, string] + messageTranslations *bimap.BiMap[string, string] +} + +func (lc *LocalCFSMContract) ConvertToPyCFSM() (*LocalPyCFSMContract, error) { + pythonCode, participantTranslations, messageTranslations, err := cfsm.ConvertCFSMToPythonBisimulationFormat(lc.CFSM) + if err != nil { + return nil, err + } + return &LocalPyCFSMContract{ + pythonCode: pythonCode, + convertedFrom: lc, + participantNameTranslations: participantTranslations, + messageTranslations: messageTranslations, + }, nil +} From 38484491ed22f5a8d743a1a0dfb49bbfdae7a4ad Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 29 Feb 2024 12:31:47 +0100 Subject: [PATCH 06/42] Refactor --- contract/contract.go | 105 +++++++++++------- gen/go/search/v1/app_message.pb.go | 2 +- gen/go/search/v1/broker.pb.go | 2 +- gen/go/search/v1/contracts.pb.go | 38 ++++--- gen/go/search/v1/middleware.pb.go | 2 +- .../search/v1/AppMessageOuterClass.java | 2 +- .../ar/com/montepagano/search/v1/Broker.java | 2 +- .../com/montepagano/search/v1/Contracts.java | 30 ++++- .../com/montepagano/search/v1/Middleware.java | 2 +- gen/python/search/v1/__init__.py | 4 + gen/ts/search/v1/contracts_pb.ts | 8 ++ internal/broker/broker.go | 4 +- mocks/Contract.go | 63 +---------- mocks/GlobalContract.go | 58 ---------- mocks/LocalContract.go | 22 ++-- proto/search/v1/contracts.proto | 1 + 16 files changed, 146 insertions(+), 199 deletions(-) diff --git a/contract/contract.go b/contract/contract.go index 663cf71..d7577b0 100644 --- a/contract/contract.go +++ b/contract/contract.go @@ -12,17 +12,10 @@ import ( pb "github.com/pmontepagano/search/gen/go/search/v1" ) -type ContractOutputFormats int - -const ( - SingleCFSMPythonBisimulation ContractOutputFormats = iota -) - type Contract interface { GetContractID() string GetRemoteParticipantNames() []string // Returns the names of all participants in this contract (except the Service Provider, who is unnamed). GetBytesRepr() []byte - Convert(ContractOutputFormats) ([]byte, error) } // LocalContract is an interface that represents a local view of a contract. It is used to @@ -30,6 +23,7 @@ type Contract interface { type LocalContract interface { Contract GetFormat() pb.LocalContractFormat + Convert(pb.LocalContractFormat) (LocalContract, error) // TODO: add GetNextState() } @@ -50,13 +44,6 @@ type LocalCFSMContract struct { sync.Mutex } -type GlobalCFSMContract struct { - *cfsm.System - id string - localParticipant *cfsm.CFSM - sync.Mutex -} - func (c *LocalCFSMContract) GetContractID() string { locked := c.TryLock() if locked { @@ -73,6 +60,32 @@ func (c *LocalCFSMContract) GetContractID() string { return id } +func (lc *LocalCFSMContract) GetRemoteParticipantNames() []string { + return lc.CFSM.OtherCFSMs() +} + +func (c *LocalCFSMContract) GetBytesRepr() []byte { + return c.Bytes() +} + +func (lc *LocalCFSMContract) GetFormat() pb.LocalContractFormat { + return pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA +} + +func (lc *LocalCFSMContract) Convert(format pb.LocalContractFormat) (LocalContract, error) { + if format == pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE { + return lc.ConvertToPyCFSM() + } + return nil, fmt.Errorf("invalid output format for this type of contract") +} + +type GlobalCFSMContract struct { + *cfsm.System + id string + localParticipant *cfsm.CFSM + sync.Mutex +} + func (c *GlobalCFSMContract) GetContractID() string { locked := c.TryLock() if locked { @@ -89,10 +102,6 @@ func (c *GlobalCFSMContract) GetContractID() string { return id } -func (lc *LocalCFSMContract) GetRemoteParticipantNames() []string { - return lc.CFSM.OtherCFSMs() -} - func (c *GlobalCFSMContract) GetParticipants() (ret []string) { for _, m := range c.CFSMs { ret = append(ret, m.Name) @@ -122,18 +131,10 @@ func (c *GlobalCFSMContract) GetBytesRepr() []byte { return c.Bytes() } -func (c *LocalCFSMContract) GetBytesRepr() []byte { - return c.Bytes() -} - func (c *GlobalCFSMContract) GetFormat() pb.GlobalContractFormat { return pb.GlobalContractFormat_GLOBAL_CONTRACT_FORMAT_FSA } -func (lc *LocalCFSMContract) GetFormat() pb.LocalContractFormat { - return pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA -} - func (c *GlobalCFSMContract) GetProjection(participantName string) (LocalContract, error) { // TODO: Do a deep copy of the CFSM and remove pointers to other machines. machine, err := c.GetMachine(participantName) @@ -180,18 +181,6 @@ func ConvertPBLocalContract(pbContract *pb.LocalContract) (LocalContract, error) return nil, fmt.Errorf("not implemented") } -func (lc *LocalCFSMContract) Convert(format ContractOutputFormats) ([]byte, error) { - if format == SingleCFSMPythonBisimulation { - code, _, _, err := cfsm.ConvertCFSMToPythonBisimulationFormat(lc.CFSM) - return code, err - } - return nil, fmt.Errorf("invalid output format for this type of contract") -} - -func (lc *GlobalCFSMContract) Convert(format ContractOutputFormats) ([]byte, error) { - return nil, fmt.Errorf("invalid output format for this type of contract") -} - type LocalPyCFSMContract struct { pythonCode []byte id string @@ -213,3 +202,43 @@ func (lc *LocalCFSMContract) ConvertToPyCFSM() (*LocalPyCFSMContract, error) { messageTranslations: messageTranslations, }, nil } + +// TODO: this is copy-pasted from LocalCFSMContract's implementation. Refactor w/ a common interface. +func (c *LocalPyCFSMContract) GetContractID() string { + locked := c.TryLock() + if locked { + defer c.Unlock() + if c.id != "" { + return c.id + } + } + contractHash := sha512.Sum512(c.GetBytesRepr()) + id := fmt.Sprintf("%x", contractHash[:]) + if locked { + c.id = id + } + return id +} + +func (lc *LocalPyCFSMContract) GetRemoteParticipantNames() []string { + inverseMap := lc.participantNameTranslations.GetInverseMap() + res := make([]string, len(inverseMap)) + i := 0 + for k := range inverseMap { + res[i] = k + i++ + } + return res +} + +func (c *LocalPyCFSMContract) GetBytesRepr() []byte { + return c.pythonCode +} + +func (lc *LocalPyCFSMContract) GetFormat() pb.LocalContractFormat { + return pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE +} + +func (lc *LocalPyCFSMContract) Convert(format pb.LocalContractFormat) (LocalContract, error) { + return nil, fmt.Errorf("not implemented") +} diff --git a/gen/go/search/v1/app_message.pb.go b/gen/go/search/v1/app_message.pb.go index a5e6960..c88b6e2 100644 --- a/gen/go/search/v1/app_message.pb.go +++ b/gen/go/search/v1/app_message.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc (unknown) // source: search/v1/app_message.proto diff --git a/gen/go/search/v1/broker.pb.go b/gen/go/search/v1/broker.pb.go index a3dd5fc..444eb54 100644 --- a/gen/go/search/v1/broker.pb.go +++ b/gen/go/search/v1/broker.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc (unknown) // source: search/v1/broker.proto diff --git a/gen/go/search/v1/contracts.pb.go b/gen/go/search/v1/contracts.pb.go index eaa9af0..8b2402b 100644 --- a/gen/go/search/v1/contracts.pb.go +++ b/gen/go/search/v1/contracts.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc (unknown) // source: search/v1/contracts.proto @@ -72,8 +72,9 @@ func (GlobalContractFormat) EnumDescriptor() ([]byte, []int) { type LocalContractFormat int32 const ( - LocalContractFormat_LOCAL_CONTRACT_FORMAT_UNSPECIFIED LocalContractFormat = 0 - LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA LocalContractFormat = 1 // Single CFSM in FSA file format (for Service Providers). + LocalContractFormat_LOCAL_CONTRACT_FORMAT_UNSPECIFIED LocalContractFormat = 0 + LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA LocalContractFormat = 1 // Single CFSM in FSA file format (for Service Providers). + LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE LocalContractFormat = 2 // Python code to construct CFSM for https://github.com/diegosenarruzza/bisimulation/ ) // Enum value maps for LocalContractFormat. @@ -81,10 +82,12 @@ var ( LocalContractFormat_name = map[int32]string{ 0: "LOCAL_CONTRACT_FORMAT_UNSPECIFIED", 1: "LOCAL_CONTRACT_FORMAT_FSA", + 2: "LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE", } LocalContractFormat_value = map[string]int32{ - "LOCAL_CONTRACT_FORMAT_UNSPECIFIED": 0, - "LOCAL_CONTRACT_FORMAT_FSA": 1, + "LOCAL_CONTRACT_FORMAT_UNSPECIFIED": 0, + "LOCAL_CONTRACT_FORMAT_FSA": 1, + "LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE": 2, } ) @@ -261,18 +264,21 @@ var file_search_v1_contracts_proto_rawDesc = []byte{ 0x4f, 0x42, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x46, 0x53, 0x41, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x46, 0x4f, - 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x47, 0x43, 0x10, 0x02, 0x2a, 0x5b, 0x0a, 0x13, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x12, 0x25, 0x0a, 0x21, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, - 0x43, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4c, 0x4f, 0x43, 0x41, 0x4c, + 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x47, 0x43, 0x10, 0x02, 0x2a, 0x8f, 0x01, 0x0a, 0x13, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x25, 0x0a, 0x21, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, + 0x41, 0x43, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4c, 0x4f, 0x43, 0x41, + 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, + 0x54, 0x5f, 0x46, 0x53, 0x41, 0x10, 0x01, 0x12, 0x32, 0x0a, 0x2e, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, - 0x5f, 0x46, 0x53, 0x41, 0x10, 0x01, 0x42, 0x48, 0x0a, 0x1c, 0x61, 0x72, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6d, 0x6f, 0x6e, 0x74, 0x65, 0x70, 0x61, 0x67, 0x61, 0x6e, 0x6f, 0x2e, 0x73, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x6d, 0x6f, 0x6e, 0x74, 0x65, 0x70, 0x61, 0x67, 0x61, 0x6e, 0x6f, 0x2f, - 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x5f, 0x42, 0x49, 0x53, 0x49, 0x4d, 0x55, 0x4c, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x02, 0x42, 0x48, 0x0a, 0x1c, 0x61, + 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x6f, 0x6e, 0x74, 0x65, 0x70, 0x61, 0x67, 0x61, 0x6e, + 0x6f, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x5a, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6d, 0x6f, 0x6e, 0x74, 0x65, 0x70, 0x61, + 0x67, 0x61, 0x6e, 0x6f, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/go/search/v1/middleware.pb.go b/gen/go/search/v1/middleware.pb.go index 79afeaf..e5a6ec8 100644 --- a/gen/go/search/v1/middleware.pb.go +++ b/gen/go/search/v1/middleware.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc (unknown) // source: search/v1/middleware.proto diff --git a/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java b/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java index 6b0a2de..72dc095 100644 --- a/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java +++ b/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: search/v1/app_message.proto -// Protobuf Java Version: 3.25.0 +// Protobuf Java Version: 3.25.3 package ar.com.montepagano.search.v1; public final class AppMessageOuterClass { diff --git a/gen/java/ar/com/montepagano/search/v1/Broker.java b/gen/java/ar/com/montepagano/search/v1/Broker.java index 6b6dd80..ba4fb28 100644 --- a/gen/java/ar/com/montepagano/search/v1/Broker.java +++ b/gen/java/ar/com/montepagano/search/v1/Broker.java @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: search/v1/broker.proto -// Protobuf Java Version: 3.25.0 +// Protobuf Java Version: 3.25.3 package ar.com.montepagano.search.v1; public final class Broker { diff --git a/gen/java/ar/com/montepagano/search/v1/Contracts.java b/gen/java/ar/com/montepagano/search/v1/Contracts.java index ff9312d..64b29f9 100644 --- a/gen/java/ar/com/montepagano/search/v1/Contracts.java +++ b/gen/java/ar/com/montepagano/search/v1/Contracts.java @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: search/v1/contracts.proto -// Protobuf Java Version: 3.25.0 +// Protobuf Java Version: 3.25.3 package ar.com.montepagano.search.v1; public final class Contracts { @@ -165,6 +165,14 @@ public enum LocalContractFormat * LOCAL_CONTRACT_FORMAT_FSA = 1; */ LOCAL_CONTRACT_FORMAT_FSA(1), + /** + *
+     * Python code to construct CFSM for https://github.com/diegosenarruzza/bisimulation/
+     * 
+ * + * LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE = 2; + */ + LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE(2), UNRECOGNIZED(-1), ; @@ -180,6 +188,14 @@ public enum LocalContractFormat * LOCAL_CONTRACT_FORMAT_FSA = 1; */ public static final int LOCAL_CONTRACT_FORMAT_FSA_VALUE = 1; + /** + *
+     * Python code to construct CFSM for https://github.com/diegosenarruzza/bisimulation/
+     * 
+ * + * LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE = 2; + */ + public static final int LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE_VALUE = 2; public final int getNumber() { @@ -208,6 +224,7 @@ public static LocalContractFormat forNumber(int value) { switch (value) { case 0: return LOCAL_CONTRACT_FORMAT_UNSPECIFIED; case 1: return LOCAL_CONTRACT_FORMAT_FSA; + case 2: return LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE; default: return null; } } @@ -1605,11 +1622,12 @@ public ar.com.montepagano.search.v1.Contracts.LocalContract getDefaultInstanceFo "at*}\n\024GlobalContractFormat\022&\n\"GLOBAL_CON" + "TRACT_FORMAT_UNSPECIFIED\020\000\022\036\n\032GLOBAL_CON" + "TRACT_FORMAT_FSA\020\001\022\035\n\031GLOBAL_CONTRACT_FO" + - "RMAT_GC\020\002*[\n\023LocalContractFormat\022%\n!LOCA" + - "L_CONTRACT_FORMAT_UNSPECIFIED\020\000\022\035\n\031LOCAL" + - "_CONTRACT_FORMAT_FSA\020\001BH\n\034ar.com.montepa" + - "gano.search.v1Z(github.com/pmontepagano/" + - "search/gen/go/v1b\006proto3" + "RMAT_GC\020\002*\217\001\n\023LocalContractFormat\022%\n!LOC" + + "AL_CONTRACT_FORMAT_UNSPECIFIED\020\000\022\035\n\031LOCA" + + "L_CONTRACT_FORMAT_FSA\020\001\0222\n.LOCAL_CONTRAC" + + "T_FORMAT_PYTHON_BISIMULATION_CODE\020\002BH\n\034a" + + "r.com.montepagano.search.v1Z(github.com/" + + "pmontepagano/search/gen/go/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/gen/java/ar/com/montepagano/search/v1/Middleware.java b/gen/java/ar/com/montepagano/search/v1/Middleware.java index f27a7b3..2a75657 100644 --- a/gen/java/ar/com/montepagano/search/v1/Middleware.java +++ b/gen/java/ar/com/montepagano/search/v1/Middleware.java @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: search/v1/middleware.proto -// Protobuf Java Version: 3.25.0 +// Protobuf Java Version: 3.25.3 package ar.com.montepagano.search.v1; public final class Middleware { diff --git a/gen/python/search/v1/__init__.py b/gen/python/search/v1/__init__.py index 0d48e5f..068b557 100644 --- a/gen/python/search/v1/__init__.py +++ b/gen/python/search/v1/__init__.py @@ -35,6 +35,7 @@ class GlobalContractFormat(betterproto.Enum): class LocalContractFormat(betterproto.Enum): LOCAL_CONTRACT_FORMAT_UNSPECIFIED = 0 LOCAL_CONTRACT_FORMAT_FSA = 1 + LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE = 2 class AppSendResponseResult(betterproto.Enum): @@ -449,6 +450,7 @@ async def message_exchange( class BrokerServiceBase(ServiceBase): + async def broker_channel( self, broker_channel_request: "BrokerChannelRequest" ) -> "BrokerChannelResponse": @@ -493,6 +495,7 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class PrivateMiddlewareServiceBase(ServiceBase): + async def register_channel( self, register_channel_request: "RegisterChannelRequest" ) -> "RegisterChannelResponse": @@ -590,6 +593,7 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]: class PublicMiddlewareServiceBase(ServiceBase): + async def init_channel( self, init_channel_request: "InitChannelRequest" ) -> "InitChannelResponse": diff --git a/gen/ts/search/v1/contracts_pb.ts b/gen/ts/search/v1/contracts_pb.ts index 0a7c575..b71ca3d 100644 --- a/gen/ts/search/v1/contracts_pb.ts +++ b/gen/ts/search/v1/contracts_pb.ts @@ -51,11 +51,19 @@ export enum LocalContractFormat { * @generated from enum value: LOCAL_CONTRACT_FORMAT_FSA = 1; */ FSA = 1, + + /** + * Python code to construct CFSM for https://github.com/diegosenarruzza/bisimulation/ + * + * @generated from enum value: LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE = 2; + */ + PYTHON_BISIMULATION_CODE = 2, } // Retrieve enum metadata with: proto3.getEnumType(LocalContractFormat) proto3.util.setEnumType(LocalContractFormat, "search.v1.LocalContractFormat", [ { no: 0, name: "LOCAL_CONTRACT_FORMAT_UNSPECIFIED" }, { no: 1, name: "LOCAL_CONTRACT_FORMAT_FSA" }, + { no: 2, name: "LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE" }, ]); /** diff --git a/internal/broker/broker.go b/internal/broker/broker.go index f83c69c..d3a3ef5 100644 --- a/internal/broker/broker.go +++ b/internal/broker/broker.go @@ -68,11 +68,11 @@ func allContractsIncompatible(ctx context.Context, req contract.LocalContract, p } func bisimilarityAlgorithm(ctx context.Context, req contract.LocalContract, prov contract.LocalContract) (bool, map[string]string, error) { - reqPyFormat, err := req.Convert(contract.SingleCFSMPythonBisimulation) + reqPyFormat, err := req.Convert(pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE) if err != nil { return false, nil, fmt.Errorf("error converting requirement contract to Python bisimulation format: %w", err) } - provPyFormat, err := prov.Convert(contract.SingleCFSMPythonBisimulation) + provPyFormat, err := prov.Convert(pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE) if err != nil { return false, nil, fmt.Errorf("error converting provider contract to Python bisimulation format: %w", err) } diff --git a/mocks/Contract.go b/mocks/Contract.go index 0e99d31..cc8e796 100644 --- a/mocks/Contract.go +++ b/mocks/Contract.go @@ -2,10 +2,7 @@ package mocks -import ( - contract "github.com/pmontepagano/search/contract" - mock "github.com/stretchr/testify/mock" -) +import mock "github.com/stretchr/testify/mock" // Contract is an autogenerated mock type for the Contract type type Contract struct { @@ -20,64 +17,6 @@ func (_m *Contract) EXPECT() *Contract_Expecter { return &Contract_Expecter{mock: &_m.Mock} } -// Convert provides a mock function with given fields: _a0 -func (_m *Contract) Convert(_a0 contract.ContractOutputFormats) ([]byte, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Convert") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) ([]byte, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) []byte); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(contract.ContractOutputFormats) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Contract_Convert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Convert' -type Contract_Convert_Call struct { - *mock.Call -} - -// Convert is a helper method to define mock.On call -// - _a0 contract.ContractOutputFormats -func (_e *Contract_Expecter) Convert(_a0 interface{}) *Contract_Convert_Call { - return &Contract_Convert_Call{Call: _e.mock.On("Convert", _a0)} -} - -func (_c *Contract_Convert_Call) Run(run func(_a0 contract.ContractOutputFormats)) *Contract_Convert_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(contract.ContractOutputFormats)) - }) - return _c -} - -func (_c *Contract_Convert_Call) Return(_a0 []byte, _a1 error) *Contract_Convert_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Contract_Convert_Call) RunAndReturn(run func(contract.ContractOutputFormats) ([]byte, error)) *Contract_Convert_Call { - _c.Call.Return(run) - return _c -} - // GetBytesRepr provides a mock function with given fields: func (_m *Contract) GetBytesRepr() []byte { ret := _m.Called() diff --git a/mocks/GlobalContract.go b/mocks/GlobalContract.go index 0e569cd..026421e 100644 --- a/mocks/GlobalContract.go +++ b/mocks/GlobalContract.go @@ -22,64 +22,6 @@ func (_m *GlobalContract) EXPECT() *GlobalContract_Expecter { return &GlobalContract_Expecter{mock: &_m.Mock} } -// Convert provides a mock function with given fields: _a0 -func (_m *GlobalContract) Convert(_a0 contract.ContractOutputFormats) ([]byte, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Convert") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) ([]byte, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) []byte); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(contract.ContractOutputFormats) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GlobalContract_Convert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Convert' -type GlobalContract_Convert_Call struct { - *mock.Call -} - -// Convert is a helper method to define mock.On call -// - _a0 contract.ContractOutputFormats -func (_e *GlobalContract_Expecter) Convert(_a0 interface{}) *GlobalContract_Convert_Call { - return &GlobalContract_Convert_Call{Call: _e.mock.On("Convert", _a0)} -} - -func (_c *GlobalContract_Convert_Call) Run(run func(_a0 contract.ContractOutputFormats)) *GlobalContract_Convert_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(contract.ContractOutputFormats)) - }) - return _c -} - -func (_c *GlobalContract_Convert_Call) Return(_a0 []byte, _a1 error) *GlobalContract_Convert_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *GlobalContract_Convert_Call) RunAndReturn(run func(contract.ContractOutputFormats) ([]byte, error)) *GlobalContract_Convert_Call { - _c.Call.Return(run) - return _c -} - // GetBytesRepr provides a mock function with given fields: func (_m *GlobalContract) GetBytesRepr() []byte { ret := _m.Called() diff --git a/mocks/LocalContract.go b/mocks/LocalContract.go index fe7aba2..7601edb 100644 --- a/mocks/LocalContract.go +++ b/mocks/LocalContract.go @@ -23,27 +23,27 @@ func (_m *LocalContract) EXPECT() *LocalContract_Expecter { } // Convert provides a mock function with given fields: _a0 -func (_m *LocalContract) Convert(_a0 contract.ContractOutputFormats) ([]byte, error) { +func (_m *LocalContract) Convert(_a0 v1.LocalContractFormat) (contract.LocalContract, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for Convert") } - var r0 []byte + var r0 contract.LocalContract var r1 error - if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) ([]byte, error)); ok { + if rf, ok := ret.Get(0).(func(v1.LocalContractFormat) (contract.LocalContract, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(contract.ContractOutputFormats) []byte); ok { + if rf, ok := ret.Get(0).(func(v1.LocalContractFormat) contract.LocalContract); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) + r0 = ret.Get(0).(contract.LocalContract) } } - if rf, ok := ret.Get(1).(func(contract.ContractOutputFormats) error); ok { + if rf, ok := ret.Get(1).(func(v1.LocalContractFormat) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -58,24 +58,24 @@ type LocalContract_Convert_Call struct { } // Convert is a helper method to define mock.On call -// - _a0 contract.ContractOutputFormats +// - _a0 v1.LocalContractFormat func (_e *LocalContract_Expecter) Convert(_a0 interface{}) *LocalContract_Convert_Call { return &LocalContract_Convert_Call{Call: _e.mock.On("Convert", _a0)} } -func (_c *LocalContract_Convert_Call) Run(run func(_a0 contract.ContractOutputFormats)) *LocalContract_Convert_Call { +func (_c *LocalContract_Convert_Call) Run(run func(_a0 v1.LocalContractFormat)) *LocalContract_Convert_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(contract.ContractOutputFormats)) + run(args[0].(v1.LocalContractFormat)) }) return _c } -func (_c *LocalContract_Convert_Call) Return(_a0 []byte, _a1 error) *LocalContract_Convert_Call { +func (_c *LocalContract_Convert_Call) Return(_a0 contract.LocalContract, _a1 error) *LocalContract_Convert_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *LocalContract_Convert_Call) RunAndReturn(run func(contract.ContractOutputFormats) ([]byte, error)) *LocalContract_Convert_Call { +func (_c *LocalContract_Convert_Call) RunAndReturn(run func(v1.LocalContractFormat) (contract.LocalContract, error)) *LocalContract_Convert_Call { _c.Call.Return(run) return _c } diff --git a/proto/search/v1/contracts.proto b/proto/search/v1/contracts.proto index 25fde91..5636d5d 100644 --- a/proto/search/v1/contracts.proto +++ b/proto/search/v1/contracts.proto @@ -24,4 +24,5 @@ message LocalContract { enum LocalContractFormat { LOCAL_CONTRACT_FORMAT_UNSPECIFIED = 0; LOCAL_CONTRACT_FORMAT_FSA = 1; // Single CFSM in FSA file format (for Service Providers). + LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE = 2; // Python code to construct CFSM for https://github.com/diegosenarruzza/bisimulation/ } From 095c25470486e45b77b7bfa53f44876e74a3b962 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 29 Feb 2024 14:24:47 +0100 Subject: [PATCH 07/42] bisim check --- cfsm/converter.go | 14 ++++---- cfsm/converter_test.go | 20 +++++------- contract/contract.go | 22 +++++++++++++ internal/broker/broker.go | 60 +++++++++++++++++++++++++++++++--- internal/broker/broker_test.go | 55 +++++++++++++++++++++++++++++++ 5 files changed, 147 insertions(+), 24 deletions(-) diff --git a/cfsm/converter.go b/cfsm/converter.go index ed7aec9..9a20a7c 100644 --- a/cfsm/converter.go +++ b/cfsm/converter.go @@ -13,8 +13,6 @@ import ( // This function converts a CFSM to a string in the format of the Python Bisimulation library // https://github.com/diegosenarruzza/bisimulation/ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, participantNameTranslations, messageTranslations *bimap.BiMap[string, string], funcErr error) { - // Import statement - const importStatement = "from cfsm_bisimulation import CommunicatingFiniteStateMachine\n\n" // We need all participant names to start with a single uppercase letter and then all lowercase or numbers. // We'll have to keep track of all the translations we do here, so we can translate back when we're done. @@ -23,7 +21,7 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, p messageTranslations = bimap.NewBiMap[string, string]() otherCFSMs := make([]string, 0) - msgRegex := regexp.MustCompile(`[A-Z][a-z0-9]*`) + msgRegex := regexp.MustCompile(`^[A-Z][a-z0-9]*$`) for _, name := range contract.OtherCFSMs() { matched := msgRegex.MatchString(name) @@ -59,17 +57,17 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, p if err != nil { return nil, participantNameTranslations, messageTranslations, err } - createCFSM := "cfsm = CommunicatingFiniteStateMachine(" + string(allCFSMsJSON) + ")\n\n" + createCFSM := "{{.MachineName}} = CommunicatingFiniteStateMachine(" + string(allCFSMsJSON) + ")\n\n" // Add states addStates := "" for _, state := range contract.States() { - addStates += fmt.Sprintf("cfsm.add_states('%d')\n", state.ID) + addStates += fmt.Sprintf("{{.MachineName}}.add_states('%d')\n", state.ID) } addStates += "\n" // Set initial state - setInitialState := fmt.Sprintf("cfsm.set_as_initial('%d')\n\n", contract.Start.ID) + setInitialState := fmt.Sprintf("{{.MachineName}}.set_as_initial('%d')\n\n", contract.Start.ID) // Add transitions addTransitions := "" @@ -101,12 +99,12 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, p } otherParticipantName, _ := participantNameTranslations.Get(transition.NameOfOtherCFSM()) action := fmt.Sprintf("%s %s %s %s", selfname, otherParticipantName, transitionTypeMarker, translatedMessage) - addTransitions += fmt.Sprintf("cfsm.add_transition_between('%d', '%d', '%s')\n", state.ID, transition.State().ID, action) + addTransitions += fmt.Sprintf("{{.MachineName}}.add_transition_between('%d', '%d', '%s')\n", state.ID, transition.State().ID, action) } } // Combine all code blocks - code := importStatement + createCFSM + addStates + setInitialState + addTransitions + "\n" + code := createCFSM + addStates + setInitialState + addTransitions + "\n" return []byte(code), participantNameTranslations, messageTranslations, nil } diff --git a/cfsm/converter_test.go b/cfsm/converter_test.go index d4540cd..b9bcbab 100644 --- a/cfsm/converter_test.go +++ b/cfsm/converter_test.go @@ -11,8 +11,8 @@ func TestConvertCFSMToPythonBisimulationFormat(t *testing.T) { contract, err := ParseSingleCFSMFSA(bytes.NewReader([]byte(` .outputs self .state graph - q0 Server ! login() q1 - q1 Server ? accept() q2 + q0 OurServer ! login() q1 + q1 OurServer ? accept() q2 .marking q0 .end `))) @@ -20,18 +20,16 @@ func TestConvertCFSMToPythonBisimulationFormat(t *testing.T) { t.Errorf("Unexpected error: %v", err) } - expectedOutput := []byte(`from cfsm_bisimulation import CommunicatingFiniteStateMachine + expectedOutput := []byte(`{{.MachineName}} = CommunicatingFiniteStateMachine(["Self","Courserver"]) -cfsm = CommunicatingFiniteStateMachine(["Self","Server"]) +{{.MachineName}}.add_states('0') +{{.MachineName}}.add_states('1') +{{.MachineName}}.add_states('2') -cfsm.add_states('0') -cfsm.add_states('1') -cfsm.add_states('2') +{{.MachineName}}.set_as_initial('0') -cfsm.set_as_initial('0') - -cfsm.add_transition_between('0', '1', 'Self Server ! message0()') -cfsm.add_transition_between('1', '2', 'Self Server ? message1()') +{{.MachineName}}.add_transition_between('0', '1', 'Self Courserver ! message0()') +{{.MachineName}}.add_transition_between('1', '2', 'Self Courserver ? message1()') `) diff --git a/contract/contract.go b/contract/contract.go index d7577b0..c29a204 100644 --- a/contract/contract.go +++ b/contract/contract.go @@ -5,6 +5,7 @@ import ( "crypto/sha512" "fmt" "sync" + "text/template" "github.com/pmontepagano/search/cfsm" "github.com/vishalkuo/bimap" @@ -242,3 +243,24 @@ func (lc *LocalPyCFSMContract) GetFormat() pb.LocalContractFormat { func (lc *LocalPyCFSMContract) Convert(format pb.LocalContractFormat) (LocalContract, error) { return nil, fmt.Errorf("not implemented") } + +func (lc *LocalPyCFSMContract) GetPythonCode(varName string) string { + type templateData struct { + MachineName string + } + // Parse the template string + tmpl, err := template.New("templatePyCFSM").Parse(string(lc.pythonCode)) + if err != nil { + panic(err) + } + + // Create a buffer to capture the output + var buffer bytes.Buffer + + // Execute the template + err = tmpl.Execute(&buffer, templateData{MachineName: varName}) + if err != nil { + panic(err) + } + return buffer.String() +} diff --git a/internal/broker/broker.go b/internal/broker/broker.go index d3a3ef5..c6ee288 100644 --- a/internal/broker/broker.go +++ b/internal/broker/broker.go @@ -2,12 +2,14 @@ package broker import ( "context" + "encoding/json" "errors" "fmt" "log" "net" "net/url" "os" + "os/exec" "sort" "time" @@ -67,19 +69,67 @@ func allContractsIncompatible(ctx context.Context, req contract.LocalContract, p return false, nil, nil } +// This function assumes that it can call out to Python with the cfsm-bisimulation package installed. +// It also assumes both contracts are CFSMs. func bisimilarityAlgorithm(ctx context.Context, req contract.LocalContract, prov contract.LocalContract) (bool, map[string]string, error) { - reqPyFormat, err := req.Convert(pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE) + reqPyFormatInterface, err := req.Convert(pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE) if err != nil { return false, nil, fmt.Errorf("error converting requirement contract to Python bisimulation format: %w", err) } - provPyFormat, err := prov.Convert(pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE) + provPyFormatInterface, err := prov.Convert(pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE) if err != nil { return false, nil, fmt.Errorf("error converting provider contract to Python bisimulation format: %w", err) } - log.Printf("reqPyFormat: %s", reqPyFormat) - log.Printf("provPyFormat: %s", provPyFormat) + reqPyFormat, ok := reqPyFormatInterface.(*contract.LocalPyCFSMContract) + if !ok { + return false, nil, errors.New("error casting requirement contract to LocalPyCFSMContract") + } + provPyFormat, ok := provPyFormatInterface.(*contract.LocalPyCFSMContract) + if !ok { + return false, nil, errors.New("error casting provider contract to LocalPyCFSMContract") + } + // log.Printf("reqPyFormat: %s", reqPyFormat.GetBytesRepr()) + // log.Printf("provPyFormat: %s", provPyFormat.GetBytesRepr()) - return false, nil, nil + pythonScript := "import json\n" + pythonScript += "from cfsm_bisimulation import CommunicatingFiniteStateMachine\n\n" + + pythonScript += reqPyFormat.GetPythonCode("req") + "\n\n" + pythonScript += provPyFormat.GetPythonCode("prov") + "\n\n" + pythonScript += "relation, matches = req.calculate_bisimulation_with(prov)\n\n" + pythonScript += "print(json.dumps({'relation': bool(relation), 'participant_matches': matches['participants']}))\n" + + // Create a temporary file to store the Python code + tempFile, err := os.CreateTemp("", "bisimilarity_check_*.py") + if err != nil { + panic(err) + } + defer os.Remove(tempFile.Name()) // Delete the temporary file when finished + + // Write the Python code to the temporary file + _, err = tempFile.WriteString(pythonScript) + if err != nil { + panic(err) + } + + // Execute the Python code using exec.Command + cmd := exec.Command("python", tempFile.Name()) + output, err := cmd.CombinedOutput() + if err != nil { + return false, nil, fmt.Errorf("error executing Python code: %w", err) + } + + type BisimOuput struct { + Result bool `json:"relation"` + ParticipantNameTranslations map[string]string `json:"participant_matches"` + } + var data BisimOuput + err = json.Unmarshal(output, &data) + if err != nil { + return false, nil, fmt.Errorf("Error parsing JSON: %w", err) + } + + return data.Result, data.ParticipantNameTranslations, nil } // returns new slice with keys of r filtered-out from orig. All keys of r MUST be present in orig diff --git a/internal/broker/broker_test.go b/internal/broker/broker_test.go index 305f853..a4c1d5e 100644 --- a/internal/broker/broker_test.go +++ b/internal/broker/broker_test.go @@ -573,3 +573,58 @@ func TestGetBestCandidate_CachedResult(t *testing.T) { require.Equal(t, provider1RegisteredProvider.ContractID, result.ContractID) // assert.Equal(t, 1, numberOfCallsToCompatFunc) // Compatibility check is only run for provider 2. } + +func TestBisimulationPython(t *testing.T) { + testDir := t.TempDir() + b := NewBrokerServer(fmt.Sprintf("%s/t.db", testDir)) + t.Cleanup(b.Stop) + + const prov1FSA = `.outputs PPS + .state graph + q0 ClientApp ? CardDetailsWithTotalAmount q1 + q1 ClientApp ! PaymentNonce q2 + q2 Srv ? RequestChargeWithNonce q3 + q3 Srv ! ChargeOK q4 + q3 Srv ! ChargeFail q5 + .marking q0 + .end` + + const prov2FSA = `.outputs PPS2 + .state graph + q0 cliente ? CardDetailsWithTotalAmount q1 + q1 cliente ! PaymentNonce q2 + q2 backend ? RequestChargeWithNonce q3 + q3 backend ! ChargeOK q4 + q3 backend ! ChargeFail q5 + .marking q0 + .end` + + prov1Contract, err := contract.ConvertPBLocalContract( + &pb.LocalContract{ + Contract: []byte(prov1FSA), + Format: pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA, + }, + ) + if err != nil { + t.Fatalf("error converting contract: %v", err) + } + + prov2Contract, err := contract.ConvertPBLocalContract( + &pb.LocalContract{ + Contract: []byte(prov2FSA), + Format: pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA, + }, + ) + if err != nil { + t.Fatalf("error converting contract: %v", err) + } + + res, _, err := bisimilarityAlgorithm(context.Background(), prov1Contract, prov2Contract) + if err != nil { + t.Fatalf("error running bisimilarity algorithm: %v", err) + } + if !res { + t.Fatalf("bisimilarity algorithm returned false") + } + +} From d1e64a02a0aa6c81fb04f8f9aaedb3af30c5b73b Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 29 Feb 2024 16:31:38 +0100 Subject: [PATCH 08/42] ahora anda llamar al programa de diego para chequear --- Dockerfile | 19 +- cfsm/converter.go | 8 +- cfsm/converter_test.go | 2 +- cmd/broker/broker.go | 16 +- contract/contract.go | 12 +- .../payments-service-ts/.nvmrc | 1 - .../payments-service-ts/Dockerfile | 16 - .../payments-service-ts/README.md | 1 - .../payments-service-ts/main.ts | 34 - .../payments-service-ts/package-lock.json | 900 ------------------ .../payments-service-ts/package.json | 27 - .../payments-service-ts/tsconfig.json | 111 --- internal/broker/broker.go | 23 +- internal/broker/broker_test.go | 30 +- 14 files changed, 86 insertions(+), 1114 deletions(-) delete mode 100644 examples/credit-card-payments/payments-service-ts/.nvmrc delete mode 100644 examples/credit-card-payments/payments-service-ts/Dockerfile delete mode 100644 examples/credit-card-payments/payments-service-ts/README.md delete mode 100644 examples/credit-card-payments/payments-service-ts/main.ts delete mode 100644 examples/credit-card-payments/payments-service-ts/package-lock.json delete mode 100644 examples/credit-card-payments/payments-service-ts/package.json delete mode 100644 examples/credit-card-payments/payments-service-ts/tsconfig.json diff --git a/Dockerfile b/Dockerfile index afbfb89..02ed3ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,21 @@ RUN --mount=type=cache,target=/home/$USERNAME/.cache/go-build \ go build -v -o /usr/local/bin/middleware cmd/middleware/middleware.go # FROM scratch AS prod -# RUN GRPC_HEALTH_PROBE_VERSION=v0.4.22 && \ -# wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ -# chmod +x /bin/grpc_health_probe +# ENV PATH=/ +# COPY --from=dev /bin/grpc_health_probe / # COPY --from=dev /usr/local/bin/middleware / # COPY --from=dev /usr/local/bin/broker / + + +# Use Python 3.12 as base image +FROM python:3.12 as with-python-vfsm-bisimulation +ENV PYTHONUNBUFFERED=1 + +# Set working directory to /app +WORKDIR /app + +RUN pip install z3-solver cfsm-bisimulation + +COPY --from=dev /bin/grpc_health_probe /usr/local/bin/ +COPY --from=dev /usr/local/bin/middleware /usr/local/bin/ +COPY --from=dev /usr/local/bin/broker /usr/local/bin/ \ No newline at end of file diff --git a/cfsm/converter.go b/cfsm/converter.go index 9a20a7c..0fb222e 100644 --- a/cfsm/converter.go +++ b/cfsm/converter.go @@ -12,7 +12,7 @@ import ( // This function converts a CFSM to a string in the format of the Python Bisimulation library // https://github.com/diegosenarruzza/bisimulation/ -func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, participantNameTranslations, messageTranslations *bimap.BiMap[string, string], funcErr error) { +func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, participantNameTranslations, messageTranslations *bimap.BiMap[string, string], selfname string, funcErr error) { // We need all participant names to start with a single uppercase letter and then all lowercase or numbers. // We'll have to keep track of all the translations we do here, so we can translate back when we're done. @@ -40,7 +40,7 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, p // a name that is unused. We'll use 'self' unless it's already used. If it is, we'll generate // a random string and use that (verifying it's also unused). - selfname := "Self" + selfname = "Self" restart := true for restart { restart = false @@ -55,7 +55,7 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, p allCFSMs := append([]string{selfname}, otherCFSMs...) allCFSMsJSON, err := json.Marshal(allCFSMs) if err != nil { - return nil, participantNameTranslations, messageTranslations, err + return nil, participantNameTranslations, messageTranslations, "", err } createCFSM := "{{.MachineName}} = CommunicatingFiniteStateMachine(" + string(allCFSMsJSON) + ")\n\n" @@ -106,7 +106,7 @@ func ConvertCFSMToPythonBisimulationFormat(contract *CFSM) (pythonCode []byte, p // Combine all code blocks code := createCFSM + addStates + setInitialState + addTransitions + "\n" - return []byte(code), participantNameTranslations, messageTranslations, nil + return []byte(code), participantNameTranslations, messageTranslations, selfname, nil } func generateRandomString(length int) string { diff --git a/cfsm/converter_test.go b/cfsm/converter_test.go index b9bcbab..63f30a3 100644 --- a/cfsm/converter_test.go +++ b/cfsm/converter_test.go @@ -33,7 +33,7 @@ func TestConvertCFSMToPythonBisimulationFormat(t *testing.T) { `) - output, _, _, err := ConvertCFSMToPythonBisimulationFormat(contract) + output, _, _, _, err := ConvertCFSMToPythonBisimulationFormat(contract) if err != nil { t.Errorf("Unexpected error: %v", err) } diff --git a/cmd/broker/broker.go b/cmd/broker/broker.go index fef6b11..37f1a58 100644 --- a/cmd/broker/broker.go +++ b/cmd/broker/broker.go @@ -8,17 +8,21 @@ import ( ) var ( - tls = flag.Bool("tls", false, "Connection uses TLS if true, else plain TCP") - certFile = flag.String("cert_file", "", "The TLS cert file") - keyFile = flag.String("key_file", "", "The TLS key file") - host = flag.String("host", "", "The host on which the broker listens (defaults to all interfaces)") - port = flag.Int("port", 10000, "Port number on which the broker listens") - databaseFile = flag.String("database_file", "SEARCHbroker.db", "The path for the broker database") + tls = flag.Bool("tls", false, "Connection uses TLS if true, else plain TCP") + certFile = flag.String("cert_file", "", "The TLS cert file") + keyFile = flag.String("key_file", "", "The TLS key file") + host = flag.String("host", "", "The host on which the broker listens (defaults to all interfaces)") + port = flag.Int("port", 10000, "Port number on which the broker listens") + databaseFile = flag.String("database_file", "SEARCHbroker.db", "The path for the broker database") + usePythonBisimulation = flag.Bool("use_python_bisimulation", false, "Use the Python Bisimulation library to check for bisimulation") ) func main() { flag.Parse() b := broker.NewBrokerServer(*databaseFile) + if *usePythonBisimulation { + b.SetCompatFunc(broker.BisimilarityAlgorithm) + } address := fmt.Sprintf("%s:%d", *host, *port) b.StartServer(address, *tls, *certFile, *keyFile, nil) } diff --git a/contract/contract.go b/contract/contract.go index c29a204..37ac824 100644 --- a/contract/contract.go +++ b/contract/contract.go @@ -189,10 +189,11 @@ type LocalPyCFSMContract struct { convertedFrom *LocalCFSMContract participantNameTranslations *bimap.BiMap[string, string] messageTranslations *bimap.BiMap[string, string] + Selfname string } func (lc *LocalCFSMContract) ConvertToPyCFSM() (*LocalPyCFSMContract, error) { - pythonCode, participantTranslations, messageTranslations, err := cfsm.ConvertCFSMToPythonBisimulationFormat(lc.CFSM) + pythonCode, participantTranslations, messageTranslations, selfname, err := cfsm.ConvertCFSMToPythonBisimulationFormat(lc.CFSM) if err != nil { return nil, err } @@ -201,6 +202,7 @@ func (lc *LocalCFSMContract) ConvertToPyCFSM() (*LocalPyCFSMContract, error) { convertedFrom: lc, participantNameTranslations: participantTranslations, messageTranslations: messageTranslations, + Selfname: selfname, }, nil } @@ -264,3 +266,11 @@ func (lc *LocalPyCFSMContract) GetPythonCode(varName string) string { } return buffer.String() } + +func (lc *LocalPyCFSMContract) GetOriginalParticipantName(translated string) (string, error) { + original, ok := lc.participantNameTranslations.GetInverse(translated) + if !ok { + return "", fmt.Errorf("translated name not found") + } + return original, nil +} diff --git a/examples/credit-card-payments/payments-service-ts/.nvmrc b/examples/credit-card-payments/payments-service-ts/.nvmrc deleted file mode 100644 index 209e3ef..0000000 --- a/examples/credit-card-payments/payments-service-ts/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/examples/credit-card-payments/payments-service-ts/Dockerfile b/examples/credit-card-payments/payments-service-ts/Dockerfile deleted file mode 100644 index 38e094a..0000000 --- a/examples/credit-card-payments/payments-service-ts/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM node:20-alpine - -# Set the working directory to /app -WORKDIR /app - -# WARNING! Paths in the Dockerfile are relative to the root of the repository. -# We do that to be able to copy the generated stubs from the gen directory. -# The context is set in the docker-compose.yml file. -COPY examples/credit-card-payments/payments-service/package*.json . -RUN npm install -COPY examples/credit-card-payments/payments-service/ . -RUN rm lib -COPY gen/ts ./lib -# RUN npm build - -CMD ["npm", "start"] diff --git a/examples/credit-card-payments/payments-service-ts/README.md b/examples/credit-card-payments/payments-service-ts/README.md deleted file mode 100644 index 2f0ae89..0000000 --- a/examples/credit-card-payments/payments-service-ts/README.md +++ /dev/null @@ -1 +0,0 @@ -This is a draft alternative implementation of the payments-service example using TypeScript instead of Go. It's incomplete. diff --git a/examples/credit-card-payments/payments-service-ts/main.ts b/examples/credit-card-payments/payments-service-ts/main.ts deleted file mode 100644 index b4dc96b..0000000 --- a/examples/credit-card-payments/payments-service-ts/main.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { createPromiseClient } from "@connectrpc/connect"; -import { PrivateMiddlewareService } from "search/v1/middleware_connect"; -import { LocalContract, LocalContractFormat } from "search/v1/contracts_pb"; -import { createConnectTransport } from "@connectrpc/connect-node"; - -const transport = createConnectTransport({ -// baseUrl: "http://middleware-payments:11000", - baseUrl: "http://localhost:11000", - httpVersion: "2" -}); - - -const ppsContract = new LocalContract(); -ppsContract.format = LocalContractFormat.FSA; -ppsContract.contract = Buffer.from(` -.outputs PPS -.state graph -q0 ClientApp ? CardDetailsWithTotalAmount q1 -q1 ClientApp ! PaymentNonce q2 -q2 Srv ? RequestChargeWithNonce q3 -q3 Srv ! ChargeOK q4 -q3 Srv ! ChargeFail q5 -.marking q0 -.end`); - - -async function main() { - const client = createPromiseClient(PrivateMiddlewareService, transport); - const res = await client.registerApp({ - providerContract: ppsContract, - }); - console.log(res); -} -void main(); diff --git a/examples/credit-card-payments/payments-service-ts/package-lock.json b/examples/credit-card-payments/payments-service-ts/package-lock.json deleted file mode 100644 index e96e5cb..0000000 --- a/examples/credit-card-payments/payments-service-ts/package-lock.json +++ /dev/null @@ -1,900 +0,0 @@ -{ - "name": "payments-service", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "payments-service", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@bufbuild/buf": "^1.28.0", - "@bufbuild/protobuf": "^1.4.2", - "@bufbuild/protoc-gen-es": "^1.4.2", - "@connectrpc/connect": "^1.1.3", - "@connectrpc/connect-node": "^1.1.3", - "@connectrpc/protoc-gen-connect-es": "^1.1.3", - "ts-node": "^10.9.1", - "tsx": "^4.1.1", - "typescript": "^5.2.2" - } - }, - "node_modules/@bufbuild/buf": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.28.0.tgz", - "integrity": "sha512-QizjughxiWj53BTFijxQN5YDCcIriLAsCSYgxk+l9YzEC3hHAjCBen0hGJcSezWDLKWiGxAD6AMXiRIfAHKZjQ==", - "hasInstallScript": true, - "bin": { - "buf": "bin/buf", - "protoc-gen-buf-breaking": "bin/protoc-gen-buf-breaking", - "protoc-gen-buf-lint": "bin/protoc-gen-buf-lint" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@bufbuild/buf-darwin-arm64": "1.28.0", - "@bufbuild/buf-darwin-x64": "1.28.0", - "@bufbuild/buf-linux-aarch64": "1.28.0", - "@bufbuild/buf-linux-x64": "1.28.0", - "@bufbuild/buf-win32-arm64": "1.28.0", - "@bufbuild/buf-win32-x64": "1.28.0" - } - }, - "node_modules/@bufbuild/buf-darwin-arm64": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.28.0.tgz", - "integrity": "sha512-trbnKKCINrRUXf0Rs88QmniZeQ4ODdsA9yISOj5JdeVDr9rQf1j/P2NUM+JimQpLm78I1CRR5qQPIX3Q8xR0NA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-darwin-x64": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.28.0.tgz", - "integrity": "sha512-AVhGVJjaR26Qe0gNv+3AijeaQABJyFY8tlInEOOtTaQi2UGR8cgQoYBCziL3NQfH06wi7nEwTJm/ej2JUpAt2Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-linux-aarch64": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.28.0.tgz", - "integrity": "sha512-5qzLdO2MpXHPh2W5Rlf58oW8iH+wwOIjQs3vlgtgeI0nGu0FhRgpcrJ1E0lswTUE0NW19RMLI+q/QpjEl9W3aw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-linux-x64": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.28.0.tgz", - "integrity": "sha512-gZm7vGjhcabb1Zqp+ARYiJYCNm2mtbXFqo9Cqy0hpaonWaKAn7lbjtT0tG7rVX++QIfOpE3CwnjUNHck5xKP6A==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-win32-arm64": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.28.0.tgz", - "integrity": "sha512-ptIfiTYW2cMlPOcnkz3YF/aSR9ztAzeozycv460qDR0p0c0KYHKRTTFKD8TRahoyU7znmWEluYBdmKZAbbtwKg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/buf-win32-x64": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.28.0.tgz", - "integrity": "sha512-vwjMUfelrB8RD/xHdR6MVEl9XqIxvASvzj0szz70hvQmzmU4BEOEUTHtERMOnBJxiPE1a28YEfpUlxyvm+COCg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@bufbuild/protobuf": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.4.2.tgz", - "integrity": "sha512-JyEH8Z+OD5Sc2opSg86qMHn1EM1Sa+zj/Tc0ovxdwk56ByVNONJSabuCUbLQp+eKN3rWNfrho0X+3SEqEPXIow==" - }, - "node_modules/@bufbuild/protoc-gen-es": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.4.2.tgz", - "integrity": "sha512-/It7M2s8H1zTDvUMJu6vhBmtnzeFL2VS6e78RYIY38602pNXDK/vbteKUo4KrG0O07lOPFu87hHZ0Y+w5Ib6iw==", - "dependencies": { - "@bufbuild/protobuf": "^1.4.2", - "@bufbuild/protoplugin": "1.4.2" - }, - "bin": { - "protoc-gen-es": "bin/protoc-gen-es" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@bufbuild/protobuf": "1.4.2" - }, - "peerDependenciesMeta": { - "@bufbuild/protobuf": { - "optional": true - } - } - }, - "node_modules/@bufbuild/protoplugin": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.4.2.tgz", - "integrity": "sha512-5IwGC1ZRD2A+KydGXeaSOErwfILLqVtvMH/RkN+cOoHcQd4EYXFStcF7g7aR+yICRDEEjQVi5tQF/qPGBSr9vg==", - "dependencies": { - "@bufbuild/protobuf": "1.4.2", - "@typescript/vfs": "^1.4.0", - "typescript": "4.5.2" - } - }, - "node_modules/@bufbuild/protoplugin/node_modules/typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@connectrpc/connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-1.1.3.tgz", - "integrity": "sha512-AXkbsLQe2Nm7VuoN5nqp05GEb9mPa/f5oFzDqTbHME4i8TghTrlY03uefbhuAq4wjsnfDnmuxHZvn6ndlgXmbg==", - "peerDependencies": { - "@bufbuild/protobuf": "^1.3.3" - } - }, - "node_modules/@connectrpc/connect-node": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@connectrpc/connect-node/-/connect-node-1.1.3.tgz", - "integrity": "sha512-oq7Uk8XlLzC2+eHaxZTX189dhujD0/tK9plizxofsFHUnLquMSmzQQ2GzvTv4u6U05eZYc/crySmf86Sqpi1bA==", - "dependencies": { - "undici": "^5.26.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@bufbuild/protobuf": "^1.3.3", - "@connectrpc/connect": "1.1.3" - } - }, - "node_modules/@connectrpc/protoc-gen-connect-es": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@connectrpc/protoc-gen-connect-es/-/protoc-gen-connect-es-1.1.3.tgz", - "integrity": "sha512-Irt1WM1o45KL0DNz8D8nraNfRrOyZfn7rzRsOyfrwbNzeVO1JV3rELFpARqGAvtVveYBoO9uwYtQ8TKLXsnrng==", - "dependencies": { - "@bufbuild/protobuf": "^1.3.3", - "@bufbuild/protoplugin": "^1.3.3" - }, - "bin": { - "protoc-gen-connect-es": "bin/protoc-gen-connect-es" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@bufbuild/protoc-gen-es": "^1.3.3", - "@connectrpc/connect": "1.1.3" - }, - "peerDependenciesMeta": { - "@bufbuild/protoc-gen-es": { - "optional": true - }, - "@connectrpc/connect": { - "optional": true - } - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", - "cpu": [ - "loong64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", - "cpu": [ - "mips64el" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", - "cpu": [ - "riscv64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", - "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" - }, - "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", - "peer": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@typescript/vfs": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.5.0.tgz", - "integrity": "sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==", - "dependencies": { - "debug": "^4.1.1" - } - }, - "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", - "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tsx": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.1.1.tgz", - "integrity": "sha512-zyPn5BFMB0TB5kMLbYPNx4x/oL/oSlaecdKCv6WeJ0TeSEfx8RTJWjuB5TZ2dSewktgfBsBO/HNA9mrMWqLXMA==", - "dependencies": { - "esbuild": "~0.18.20", - "get-tsconfig": "^4.7.2", - "source-map-support": "^0.5.21" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, - "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici": { - "version": "5.27.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", - "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "peer": true - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "engines": { - "node": ">=6" - } - } - } -} diff --git a/examples/credit-card-payments/payments-service-ts/package.json b/examples/credit-card-payments/payments-service-ts/package.json deleted file mode 100644 index 2fc408c..0000000 --- a/examples/credit-card-payments/payments-service-ts/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "payments-service", - "version": "1.0.0", - "description": "", - "main": "index.js", - "directories": { - "lib": "lib" - }, - "scripts": { - "start": "ts-node ./main.ts", - "build": "tsc ./main.ts" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "@bufbuild/buf": "^1.28.0", - "@bufbuild/protobuf": "^1.4.2", - "@bufbuild/protoc-gen-es": "^1.4.2", - "@connectrpc/connect": "^1.1.3", - "@connectrpc/connect-node": "^1.1.3", - "@connectrpc/protoc-gen-connect-es": "^1.1.3", - "ts-node": "^10.9.1", - "tsx": "^4.1.1", - "typescript": "^5.2.2" - } -} diff --git a/examples/credit-card-payments/payments-service-ts/tsconfig.json b/examples/credit-card-payments/payments-service-ts/tsconfig.json deleted file mode 100644 index 3fe690c..0000000 --- a/examples/credit-card-payments/payments-service-ts/tsconfig.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - "baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */ - "paths": { - "*": ["*", "lib/*"] - }, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - "preserveSymlinks": false, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } -} diff --git a/internal/broker/broker.go b/internal/broker/broker.go index c6ee288..627b51d 100644 --- a/internal/broker/broker.go +++ b/internal/broker/broker.go @@ -71,7 +71,7 @@ func allContractsIncompatible(ctx context.Context, req contract.LocalContract, p // This function assumes that it can call out to Python with the cfsm-bisimulation package installed. // It also assumes both contracts are CFSMs. -func bisimilarityAlgorithm(ctx context.Context, req contract.LocalContract, prov contract.LocalContract) (bool, map[string]string, error) { +func BisimilarityAlgorithm(ctx context.Context, req contract.LocalContract, prov contract.LocalContract) (bool, map[string]string, error) { reqPyFormatInterface, err := req.Convert(pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_PYTHON_BISIMULATION_CODE) if err != nil { return false, nil, fmt.Errorf("error converting requirement contract to Python bisimulation format: %w", err) @@ -129,7 +129,26 @@ func bisimilarityAlgorithm(ctx context.Context, req contract.LocalContract, prov return false, nil, fmt.Errorf("Error parsing JSON: %w", err) } - return data.Result, data.ParticipantNameTranslations, nil + // We need to translate participant names back because the Python code uses different naming schemas for the participants. + // data.ParticipantNameTranslations is a map from the participant names in the requirement contract to the participant names in the provider contract. + + participantMapping := make(map[string]string) + for k, v := range data.ParticipantNameTranslations { + if k == reqPyFormat.Selfname { + continue + } + nameInReq, err := reqPyFormat.GetOriginalParticipantName(k) + if err != nil { + return false, nil, fmt.Errorf("error getting original participant name for %s: %w", k, err) + } + nameInProv, err := provPyFormat.GetOriginalParticipantName(v) + if err != nil { + return false, nil, fmt.Errorf("error getting original participant name for %s: %w", v, err) + } + participantMapping[nameInReq] = nameInProv + } + + return data.Result, participantMapping, nil } // returns new slice with keys of r filtered-out from orig. All keys of r MUST be present in orig diff --git a/internal/broker/broker_test.go b/internal/broker/broker_test.go index a4c1d5e..542d3ce 100644 --- a/internal/broker/broker_test.go +++ b/internal/broker/broker_test.go @@ -579,7 +579,7 @@ func TestBisimulationPython(t *testing.T) { b := NewBrokerServer(fmt.Sprintf("%s/t.db", testDir)) t.Cleanup(b.Stop) - const prov1FSA = `.outputs PPS + const reqFSA = `.outputs PPS .state graph q0 ClientApp ? CardDetailsWithTotalAmount q1 q1 ClientApp ! PaymentNonce q2 @@ -589,7 +589,7 @@ func TestBisimulationPython(t *testing.T) { .marking q0 .end` - const prov2FSA = `.outputs PPS2 + const provFSA = `.outputs PPS2 .state graph q0 cliente ? CardDetailsWithTotalAmount q1 q1 cliente ! PaymentNonce q2 @@ -599,9 +599,9 @@ func TestBisimulationPython(t *testing.T) { .marking q0 .end` - prov1Contract, err := contract.ConvertPBLocalContract( + reqContract, err := contract.ConvertPBLocalContract( &pb.LocalContract{ - Contract: []byte(prov1FSA), + Contract: []byte(reqFSA), Format: pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA, }, ) @@ -609,9 +609,9 @@ func TestBisimulationPython(t *testing.T) { t.Fatalf("error converting contract: %v", err) } - prov2Contract, err := contract.ConvertPBLocalContract( + provContract, err := contract.ConvertPBLocalContract( &pb.LocalContract{ - Contract: []byte(prov2FSA), + Contract: []byte(provFSA), Format: pb.LocalContractFormat_LOCAL_CONTRACT_FORMAT_FSA, }, ) @@ -619,7 +619,7 @@ func TestBisimulationPython(t *testing.T) { t.Fatalf("error converting contract: %v", err) } - res, _, err := bisimilarityAlgorithm(context.Background(), prov1Contract, prov2Contract) + res, participantMapping, err := BisimilarityAlgorithm(context.Background(), reqContract, provContract) if err != nil { t.Fatalf("error running bisimilarity algorithm: %v", err) } @@ -627,4 +627,20 @@ func TestBisimulationPython(t *testing.T) { t.Fatalf("bisimilarity algorithm returned false") } + p, ok := participantMapping["ClientApp"] + if !ok { + t.Fatalf("participant mapping does not contain ClientApp") + } + if p != "cliente" { + t.Fatalf("participant mapping for ClientApp is not cliente") + } + + p, ok = participantMapping["Srv"] + if !ok { + t.Fatalf("participant mapping does not contain Srv") + } + if p != "backend" { + t.Fatalf("participant mapping for Srv is not backend") + } + } From d8177a6c623c8cd1023b052dd656c5f612227d5b Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 29 Feb 2024 16:32:47 +0100 Subject: [PATCH 09/42] adaptar ejemplo --- .../examples/creditcardpayments/Main.java | 35 ++++++++++--------- .../credit-card-payments/docker-compose.yaml | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java b/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java index 4a6aa78..d649e45 100644 --- a/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java +++ b/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java @@ -82,27 +82,28 @@ public static void main(String[] args) { PrivateMiddlewareServiceGrpc.newBlockingStub(channel); // Prompt the user to input hostname for the PPS and Srv apps. Both should have a default value of "middleware-payments:10000" and "middleware-backend:10000" respectively. - System.out.print("Enter the hostname for the PPS app (default: middleware-payments:10000): "); - String ppsHostname = scanner.nextLine(); - if (ppsHostname.isEmpty()) { - ppsHostname = "middleware-payments:10000"; - } - System.out.print("Enter the hostname for the Srv app (default: middleware-backend:10000): "); - String srvHostname = scanner.nextLine(); - if (srvHostname.isEmpty()) { - srvHostname = "middleware-backend:10000"; - } + // System.out.print("Enter the hostname for the PPS app (default: middleware-payments:10000): "); + // String ppsHostname = scanner.nextLine(); + // if (ppsHostname.isEmpty()) { + // ppsHostname = "middleware-payments:10000"; + // } + // System.out.print("Enter the hostname for the Srv app (default: middleware-backend:10000): "); + // String srvHostname = scanner.nextLine(); + // if (srvHostname.isEmpty()) { + // srvHostname = "middleware-backend:10000"; + // } // Prompt the user to input AppId for the PPS and Srv apps. They don't have default values and must be provided by the user. - System.out.print("Enter the AppId for the PPS app: "); - String ppsAppId = scanner.nextLine(); - System.out.print("Enter the AppId for the Srv app: "); - String srvAppId = scanner.nextLine(); + // System.out.print("Enter the AppId for the PPS app: "); + // String ppsAppId = scanner.nextLine(); + // System.out.print("Enter the AppId for the Srv app: "); + // String srvAppId = scanner.nextLine(); // Register channel with middleware using GlobalContract. // Add preset participants to the RegisterChannelRequest. We do this because we don't have an algorithm for compatibility checking in the broker. - RemoteParticipant pps = RemoteParticipant.newBuilder().setUrl(ppsHostname).setAppId(ppsAppId).build(); - RemoteParticipant srv = RemoteParticipant.newBuilder().setUrl(srvHostname).setAppId(srvAppId).build(); - RegisterChannelRequest request = RegisterChannelRequest.newBuilder().setRequirementsContract(contract).putPresetParticipants("PPS", pps).putPresetParticipants("Srv", srv).build(); + // RemoteParticipant pps = RemoteParticipant.newBuilder().setUrl(ppsHostname).setAppId(ppsAppId).build(); + // RemoteParticipant srv = RemoteParticipant.newBuilder().setUrl(srvHostname).setAppId(srvAppId).build(); + // RegisterChannelRequest request = RegisterChannelRequest.newBuilder().setRequirementsContract(contract).putPresetParticipants("PPS", pps).putPresetParticipants("Srv", srv).build(); + RegisterChannelRequest request = RegisterChannelRequest.newBuilder().setRequirementsContract(contract).build(); RegisterChannelResponse response = stub.registerChannel(request); var channelId = response.getChannelId(); diff --git a/examples/credit-card-payments/docker-compose.yaml b/examples/credit-card-payments/docker-compose.yaml index d197c25..0f4ed3b 100644 --- a/examples/credit-card-payments/docker-compose.yaml +++ b/examples/credit-card-payments/docker-compose.yaml @@ -35,7 +35,7 @@ services: build: ../../ networks: - broker_network - command: ["broker"] + command: ["broker", "-use_python_bisimulation"] middleware-backend: build: ../../ From ecff92e0bcd5848efcc33f31a66b7cb861973dd3 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 29 Feb 2024 22:24:56 +0100 Subject: [PATCH 10/42] install python in ci --- .github/workflows/main.yml | 11 +++++++++-- requirements.txt | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f7f845e..37e815c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,14 @@ jobs: with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: 'pip' # caching pip dependencies + - name: Install cfsm_bisimulation + run: pip install -r requirements.txt - name: Test run: go test ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./cfsm/...,./internal/...,./contract -timeout 30s - name: Print coverage info @@ -30,7 +37,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Go uses: actions/setup-go@v4 with: diff --git a/requirements.txt b/requirements.txt index ea42dd5..b4379fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ betterproto[compiler]==2.0.0b6 +cfsm-bisimulation +z3-solver From aeeb38734b13c69bb173bd6bc3d54d0c61d11028 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 29 Feb 2024 22:35:50 +0100 Subject: [PATCH 11/42] upgrade to go 1.22 --- .github/workflows/main.yml | 2 +- Dockerfile | 4 +- .../payments-service/Dockerfile | 4 +- go.mod | 29 ++++---- go.sum | 68 +++++++++---------- 5 files changed, 52 insertions(+), 55 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37e815c..fe3e8d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: [1.20.x, 1.21.x] + go-version: [1.21.x, 1.22.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: diff --git a/Dockerfile b/Dockerfile index 02ed3ba..c03aaf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -ARG GOVERSION="1.21" +ARG GOVERSION="1.22" ARG USERNAME=search FROM golang:${GOVERSION} as dev -RUN GRPC_HEALTH_PROBE_VERSION=v0.4.22 && \ +RUN GRPC_HEALTH_PROBE_VERSION=v0.4.24 && \ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ chmod +x /bin/grpc_health_probe diff --git a/examples/credit-card-payments/payments-service/Dockerfile b/examples/credit-card-payments/payments-service/Dockerfile index 3019db4..ee1989c 100644 --- a/examples/credit-card-payments/payments-service/Dockerfile +++ b/examples/credit-card-payments/payments-service/Dockerfile @@ -1,8 +1,8 @@ -ARG GOVERSION="1.21" +ARG GOVERSION="1.22" ARG USERNAME=search FROM golang:${GOVERSION} as dev -RUN GRPC_HEALTH_PROBE_VERSION=v0.4.22 && \ +RUN GRPC_HEALTH_PROBE_VERSION=v0.4.24 && \ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ chmod +x /bin/grpc_health_probe diff --git a/go.mod b/go.mod index c70717c..f47a246 100644 --- a/go.mod +++ b/go.mod @@ -1,36 +1,37 @@ module github.com/pmontepagano/search -go 1.21 +go 1.22 require ( - entgo.io/ent v0.12.4 - github.com/google/uuid v1.4.0 - github.com/mattn/go-sqlite3 v1.14.18 + entgo.io/ent v0.13.1 + github.com/google/uuid v1.6.0 + github.com/mattn/go-sqlite3 v1.14.22 github.com/sourcegraph/conc v0.3.0 github.com/stretchr/testify v1.8.4 github.com/vishalkuo/bimap v0.0.0-20230830142743-a9fb9b52066c - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.32.0 ) require ( - ariga.io/atlas v0.15.0 // indirect + ariga.io/atlas v0.19.1 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-openapi/inflect v0.19.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/hashicorp/hcl/v2 v2.19.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.1 // indirect - github.com/zclconf/go-cty v1.14.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/zclconf/go-cty v1.14.2 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.18.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index b01a8fa..7f35cc7 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,13 @@ -ariga.io/atlas v0.15.0 h1:9lwSVcO/D3WgaCzstSGqR1hEDtsGibu6JqUofEI/0sY= -ariga.io/atlas v0.15.0/go.mod h1:isZrlzJ5cpoCoKFoY9knZug7Lq4pP1cm8g3XciLZ0Pw= -entgo.io/ent v0.12.4 h1:LddPnAyxls/O7DTXZvUGDj0NZIdGSu317+aoNLJWbD8= -entgo.io/ent v0.12.4/go.mod h1:Y3JVAjtlIk8xVZYSn3t3mf8xlZIn5SAOXZQxD6kKI+Q= +ariga.io/atlas v0.19.1 h1:QzBHkakwzEhmPWOzNhw8Yr/Bbicj6Iq5hwEoNI/Jr9A= +ariga.io/atlas v0.19.1/go.mod h1:VPlcXdd4w2KqKnH54yEZcry79UAhpaWaxEsmn5JRNoE= +entgo.io/ent v0.13.1 h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE= +entgo.io/ent v0.13.1/go.mod h1:qCEmo+biw3ccBn9OyL4ZK5dfpwg++l1Gxwac5B1206A= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= @@ -21,18 +20,18 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= -github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= +github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= -github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -43,42 +42,39 @@ github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= -github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/vishalkuo/bimap v0.0.0-20230830142743-a9fb9b52066c h1:KEcyvVSSrD/dq45OZpwFG7/gi608xzyriB8kgquCgPU= github.com/vishalkuo/bimap v0.0.0-20230830142743-a9fb9b52066c/go.mod h1:oVZgsxuZOVCkAVcgSitAfucCKX0Ani+R8bIbfGdqAkg= -github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= -github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= +github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 h1:DKU1r6Tj5s1vlU/moGhuGz7E3xRfwjdAfDzbsaQJtEY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From b7ec2283e91c3d4491f34259062b1b076383ecaf Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 29 Feb 2024 22:42:03 +0100 Subject: [PATCH 12/42] Revert "upgrade to go 1.22" This reverts commit aeeb38734b13c69bb173bd6bc3d54d0c61d11028. --- .github/workflows/main.yml | 2 +- Dockerfile | 4 +- .../payments-service/Dockerfile | 4 +- go.mod | 29 ++++---- go.sum | 68 ++++++++++--------- 5 files changed, 55 insertions(+), 52 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe3e8d9..37e815c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: [1.21.x, 1.22.x] + go-version: [1.20.x, 1.21.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: diff --git a/Dockerfile b/Dockerfile index c03aaf7..02ed3ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -ARG GOVERSION="1.22" +ARG GOVERSION="1.21" ARG USERNAME=search FROM golang:${GOVERSION} as dev -RUN GRPC_HEALTH_PROBE_VERSION=v0.4.24 && \ +RUN GRPC_HEALTH_PROBE_VERSION=v0.4.22 && \ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ chmod +x /bin/grpc_health_probe diff --git a/examples/credit-card-payments/payments-service/Dockerfile b/examples/credit-card-payments/payments-service/Dockerfile index ee1989c..3019db4 100644 --- a/examples/credit-card-payments/payments-service/Dockerfile +++ b/examples/credit-card-payments/payments-service/Dockerfile @@ -1,8 +1,8 @@ -ARG GOVERSION="1.22" +ARG GOVERSION="1.21" ARG USERNAME=search FROM golang:${GOVERSION} as dev -RUN GRPC_HEALTH_PROBE_VERSION=v0.4.24 && \ +RUN GRPC_HEALTH_PROBE_VERSION=v0.4.22 && \ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ chmod +x /bin/grpc_health_probe diff --git a/go.mod b/go.mod index f47a246..c70717c 100644 --- a/go.mod +++ b/go.mod @@ -1,37 +1,36 @@ module github.com/pmontepagano/search -go 1.22 +go 1.21 require ( - entgo.io/ent v0.13.1 - github.com/google/uuid v1.6.0 - github.com/mattn/go-sqlite3 v1.14.22 + entgo.io/ent v0.12.4 + github.com/google/uuid v1.4.0 + github.com/mattn/go-sqlite3 v1.14.18 github.com/sourcegraph/conc v0.3.0 github.com/stretchr/testify v1.8.4 github.com/vishalkuo/bimap v0.0.0-20230830142743-a9fb9b52066c - google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 - google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 ) require ( - ariga.io/atlas v0.19.1 // indirect + ariga.io/atlas v0.15.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-openapi/inflect v0.19.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/hashicorp/hcl/v2 v2.20.0 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.2 // indirect - github.com/zclconf/go-cty v1.14.2 // indirect + github.com/stretchr/objx v0.5.1 // indirect + github.com/zclconf/go-cty v1.14.1 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.18.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.18.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 7f35cc7..b01a8fa 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,14 @@ -ariga.io/atlas v0.19.1 h1:QzBHkakwzEhmPWOzNhw8Yr/Bbicj6Iq5hwEoNI/Jr9A= -ariga.io/atlas v0.19.1/go.mod h1:VPlcXdd4w2KqKnH54yEZcry79UAhpaWaxEsmn5JRNoE= -entgo.io/ent v0.13.1 h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE= -entgo.io/ent v0.13.1/go.mod h1:qCEmo+biw3ccBn9OyL4ZK5dfpwg++l1Gxwac5B1206A= +ariga.io/atlas v0.15.0 h1:9lwSVcO/D3WgaCzstSGqR1hEDtsGibu6JqUofEI/0sY= +ariga.io/atlas v0.15.0/go.mod h1:isZrlzJ5cpoCoKFoY9knZug7Lq4pP1cm8g3XciLZ0Pw= +entgo.io/ent v0.12.4 h1:LddPnAyxls/O7DTXZvUGDj0NZIdGSu317+aoNLJWbD8= +entgo.io/ent v0.12.4/go.mod h1:Y3JVAjtlIk8xVZYSn3t3mf8xlZIn5SAOXZQxD6kKI+Q= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= @@ -20,18 +21,18 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= -github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= -github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= +github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -42,39 +43,42 @@ github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= +github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/vishalkuo/bimap v0.0.0-20230830142743-a9fb9b52066c h1:KEcyvVSSrD/dq45OZpwFG7/gi608xzyriB8kgquCgPU= github.com/vishalkuo/bimap v0.0.0-20230830142743-a9fb9b52066c/go.mod h1:oVZgsxuZOVCkAVcgSitAfucCKX0Ani+R8bIbfGdqAkg= -github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= -github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= +github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 h1:DKU1r6Tj5s1vlU/moGhuGz7E3xRfwjdAfDzbsaQJtEY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 8765270a6d674fbc238bdaa74d1d0d1b102875a2 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 09:14:12 +0100 Subject: [PATCH 13/42] wip readme --- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/README.md b/README.md index 52588f8..4a74e83 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,79 @@ +# SEArch + + +## Quickstart example + +Do you want to just see an example of the infrastructure runnung? + +You'll need Docker (v25+) and Docker Compose (v2.24+). + +Navigate in your terminal to the `examples/credit-card-payments` directory and run: + +``` +cd examples/credit-card-payments/ +docker-compose run client +``` + + +## How to compile and run the Broker and Middleware + +You need to have Go 1.21 installed and run: + + go build -o . ./... + + +This will generate the binaries `broker` and `middleware`. Both programs have a `--help` flag: + +``` +./broker --help +Usage of ./broker: + -cert_file string + The TLS cert file + -database_file string + The path for the broker database (default "SEARCHbroker.db") + -host string + The host on which the broker listens (defaults to all interfaces) + -key_file string + The TLS key file + -port int + Port number on which the broker listens (default 10000) + -tls + Connection uses TLS if true, else plain TCP + -use_python_bisimulation + Use the Python Bisimulation library to check for bisimulation +``` + +``` +./middleware --help +Usage of ./middleware: + -broker_addr string + The server address in the format of host:port (default "localhost:") + -cert_file string + The TLS cert file + -key_file string + The TLS key file + -private_host string + Host IP on which private service listens (default "localhost") + -private_port int + The port for private services (default 11000) + -public_host string + Host IP on which public service listens (defaults to all) + -public_port int + The port for public facing middleware (default 10000) + -public_url string + The URL for public facing middleware + -tls + Connection uses TLS if true, else plain TCP +``` + +## How to see + +## How to set up a development environment + +### Prerequisites + +If you want to modify and/or contribute to this project, you will n + # Implementación de SEArch ## Código generado (go protobufs y go-grpc) From 8d08101bbfabd63dd29f3b547e5ba8b70d407675 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 10:00:19 +0100 Subject: [PATCH 14/42] development readme --- README.md | 71 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 4a74e83..4d4a7d5 100644 --- a/README.md +++ b/README.md @@ -72,65 +72,74 @@ Usage of ./middleware: ### Prerequisites -If you want to modify and/or contribute to this project, you will n +If you want to modify and/or contribute to this project, you will need the following tools installed: -# Implementación de SEArch -## Código generado (go protobufs y go-grpc) +1. [Python 3.12](https://python.org/) and these Python packages: + - [python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. + - [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. + - [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. -### Buf para protobufs y gRPC +A simple way of installing all of these is to install Python 3.12 and run `pip install -r requirements.txt` -- Tenemos que tener instalado [este paquete para generar los stubs de Python](https://github.com/danielgtaylor/python-betterproto). La manera más sencilla es crear un virtual environment de Python e instalar el archivo `requirements.txt` que se encuentra en la raíz de este repositorio. -- También tenemos que tener instalada la herramienta [buf](https://buf.build/docs/installation). -- Luego, basta con ejecutar el siguiente comando: +2. [Go 1.21](https://go.dev/) and these tools + - [buf](https://buf.build/docs/installation), used to generate code from our Protocol Buffer definitions. + - [mockery](https://vektra.github.io/mockery/), used to generate mocks for tests. + +### Code generation from Protocol Buffer definitions + +Our Protocol Buffer definitions live in the `proto` directory. The generated code lives in the `gen` directory. If you modify the Protocol Buffer definitions or add more output languages (see `buf.gen.yaml`), just run: buf generate proto -### Entgo para manejo de la base de datos del broker +The generated code should be commited to the repository. - go generate ./ent +When modifying the Protocol Buffers, make sure you run the linter like this: -### Para regenerar mocks con [mockery](https://vektra.github.io/mockery/) + buf lint proto - mockery --dir contract --all --with-expecter +### Code generation for database management -## Comandos varios +We use [Ent](https://github.com/ent/ent) to model the database where we store contracts, providers and compatibility checks already computed. -### To get a report of code coverage +The database definitions live in `ent/schema`. The rest of the files and directories in the `ent` directory are auto-generated from the schema definitions. If you change the schemas, run the folllowing command to regenerate code and commit any changes to the repository: - go test ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./cfsm/...,./internal/...,./contract -timeout 30s - go tool cover -html=coverage.txt + go generate ./ent -### Para correr los tests +#### Other useful Ent commands - go test ./... +##### Show schema in CLI -Y con el [race detector](https://go.dev/doc/articles/race_detector): + go run -mod=mod entgo.io/ent/cmd/ent describe ./ent/schema - go test ./... -count=1 -race +##### Show schema in [Atlas Cloud](https://gh.atlasgo.cloud/) -### Para compilar los binarios de broker y middleware + go run -mod=mod ariga.io/entviz ./ent/schema - go build -o . ./... +##### Generate Entity Relation diagram locally -### Comandos útiles de Entgo (ORM) + go run -mod=mod github.com/a8m/enter ./ent/schema -#### Show schema in CLI +### Code generation for test mocks - go run -mod=mod entgo.io/ent/cmd/ent describe ./ent/schema + We use [mockery](https://vektra.github.io/mockery/) to generate test _mocks_ (only for the `contract` package for now). If you modify the `contact` package, regenerate the mocks by running the following command and commiting the changes to the repository. These generated mocks live in the `mocks` directory: -#### Show schema in [Atlas Cloud](https://gh.atlasgo.cloud/) + mockery --dir contract --all --with-expecter - go run -mod=mod ariga.io/entviz ./ent/schema +### Run tests -#### Generate Entity Relation diagram locally + go test ./... - go run -mod=mod github.com/a8m/enter ./ent/schema +And with [race detector](https://go.dev/doc/articles/race_detector): + go test ./... -count=1 -race + +### To get a report of code coverage -## Run ChorGram's gc2fsa + go test ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./cfsm/...,./internal/...,./contract -timeout 30s + go tool cover -html=coverage.txt -After `--` you send the parameters. In this example, we simply pass the input file name. +### To compile broker and middleware binaries: - wasmtime --dir=. gc2fsa.wasm -- pingpong.gc + go build -o . ./... From cff4063e72c0d9a9f76a0828aaea3490fbc85aa0 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 10:17:51 +0100 Subject: [PATCH 15/42] more readme --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4d4a7d5..9903ec4 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,12 @@ Do you want to just see an example of the infrastructure runnung? -You'll need Docker (v25+) and Docker Compose (v2.24+). +1. **Tools:** Docker (v25+) and Docker Compose (v2.24+). +2. Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`, or unzip [the file containing it](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip). +3. Once in the repository root, navigate in your terminal to the `examples/credit-card-payments` directory: `cd examples/credit-card-payments/` +4. Run the client: `docker-compose run client` -Navigate in your terminal to the `examples/credit-card-payments` directory and run: - -``` -cd examples/credit-card-payments/ -docker-compose run client -``` +Before running the client, Docker will first build the infraestructure (i.e., the Broker and the Middleware), the services and the client. Then, it will run everything within containers; the Broker, a Middleware for each service required by the example, and their corresponding services behind them. Finally, it will run a Middleware for the client, and the client application behind it. ## How to compile and run the Broker and Middleware @@ -143,3 +141,8 @@ And with [race detector](https://go.dev/doc/articles/race_detector): go build -o . ./... +## The example + +``` +cd examples/credit-card-payments +docker-compose build \ No newline at end of file From 304bd9e6bb01bb4c1ad32b0adbc848e5e7ccc72f Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 10:35:03 +0100 Subject: [PATCH 16/42] make bisimulation default behaviour --- README.md | 2 -- cmd/broker/broker.go | 19 +++++++++---------- .../credit-card-payments/docker-compose.yaml | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9903ec4..29a2f4a 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,6 @@ Usage of ./broker: Port number on which the broker listens (default 10000) -tls Connection uses TLS if true, else plain TCP - -use_python_bisimulation - Use the Python Bisimulation library to check for bisimulation ``` ``` diff --git a/cmd/broker/broker.go b/cmd/broker/broker.go index 37f1a58..d6de6d0 100644 --- a/cmd/broker/broker.go +++ b/cmd/broker/broker.go @@ -8,21 +8,20 @@ import ( ) var ( - tls = flag.Bool("tls", false, "Connection uses TLS if true, else plain TCP") - certFile = flag.String("cert_file", "", "The TLS cert file") - keyFile = flag.String("key_file", "", "The TLS key file") - host = flag.String("host", "", "The host on which the broker listens (defaults to all interfaces)") - port = flag.Int("port", 10000, "Port number on which the broker listens") - databaseFile = flag.String("database_file", "SEARCHbroker.db", "The path for the broker database") - usePythonBisimulation = flag.Bool("use_python_bisimulation", false, "Use the Python Bisimulation library to check for bisimulation") + tls = flag.Bool("tls", false, "Connection uses TLS if true, else plain TCP") + certFile = flag.String("cert_file", "", "The TLS cert file") + keyFile = flag.String("key_file", "", "The TLS key file") + host = flag.String("host", "", "The host on which the broker listens (defaults to all interfaces)") + port = flag.Int("port", 10000, "Port number on which the broker listens") + databaseFile = flag.String("database_file", "SEARCHbroker.db", "The path for the broker database") ) func main() { flag.Parse() b := broker.NewBrokerServer(*databaseFile) - if *usePythonBisimulation { - b.SetCompatFunc(broker.BisimilarityAlgorithm) - } + + // Set the bisimilarity algorithm as the default algorithm for the broker. + b.SetCompatFunc(broker.BisimilarityAlgorithm) address := fmt.Sprintf("%s:%d", *host, *port) b.StartServer(address, *tls, *certFile, *keyFile, nil) } diff --git a/examples/credit-card-payments/docker-compose.yaml b/examples/credit-card-payments/docker-compose.yaml index 0f4ed3b..d197c25 100644 --- a/examples/credit-card-payments/docker-compose.yaml +++ b/examples/credit-card-payments/docker-compose.yaml @@ -35,7 +35,7 @@ services: build: ../../ networks: - broker_network - command: ["broker", "-use_python_bisimulation"] + command: ["broker"] middleware-backend: build: ../../ From 1f615cb1cb5a559247094d1b97c140ba6dd0ea6f Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 10:37:20 +0100 Subject: [PATCH 17/42] add python package as required to run broker --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 29a2f4a..1b5c5b0 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,13 @@ Before running the client, Docker will first build the infraestructure (i.e., th ## How to compile and run the Broker and Middleware -You need to have Go 1.21 installed and run: - - go build -o . ./... +1. **Tools**: + 1.1. [Go 1.21](https://go.dev/). + 1.2. [Python 3.12](https://python.org/) and these packages (this is only required to run the _broker_, not the _middleware_): + 1.2.1. [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. + 1.2.2. [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. +2. **Build**: `go build -o . ./...` This will generate the binaries `broker` and `middleware`. Both programs have a `--help` flag: @@ -62,7 +65,6 @@ Usage of ./middleware: Connection uses TLS if true, else plain TCP ``` -## How to see ## How to set up a development environment From 826b3a2fea9d348423ec41555c7dd3a201777fb7 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 10:56:53 +0100 Subject: [PATCH 18/42] rename pps midleware --- examples/credit-card-payments/README.md | 2 +- .../search/examples/creditcardpayments/Main.java | 6 +++--- examples/credit-card-payments/docker-compose.yaml | 6 +++--- examples/credit-card-payments/payments-service/main.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/credit-card-payments/README.md b/examples/credit-card-payments/README.md index d5ba93d..468fed6 100644 --- a/examples/credit-card-payments/README.md +++ b/examples/credit-card-payments/README.md @@ -35,7 +35,7 @@ Selected Books: - The Catcher in the Rye - To Kill a Mockingbird Shipping Address: Balcarce 50 -Enter the hostname for the PPS app (default: middleware-payments:10000): +Enter the hostname for the PPS app (default: middleware-payments-service:10000): Enter the hostname for the Srv app (default: middleware-backend:10000): Enter the AppId for the PPS app: 7c697682-3646-4b2c-b99d-b25edd467cc2 Enter the AppId for the Srv app: 07d97309-dd52-4355-8149-a5f5b67b3324 diff --git a/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java b/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java index d649e45..1c2a0f5 100644 --- a/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java +++ b/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java @@ -81,11 +81,11 @@ public static void main(String[] args) { PrivateMiddlewareServiceGrpc.PrivateMiddlewareServiceBlockingStub stub = PrivateMiddlewareServiceGrpc.newBlockingStub(channel); - // Prompt the user to input hostname for the PPS and Srv apps. Both should have a default value of "middleware-payments:10000" and "middleware-backend:10000" respectively. - // System.out.print("Enter the hostname for the PPS app (default: middleware-payments:10000): "); + // Prompt the user to input hostname for the PPS and Srv apps. Both should have a default value of "middleware-payments-service:10000" and "middleware-backend:10000" respectively. + // System.out.print("Enter the hostname for the PPS app (default: middleware-payments-service:10000): "); // String ppsHostname = scanner.nextLine(); // if (ppsHostname.isEmpty()) { - // ppsHostname = "middleware-payments:10000"; + // ppsHostname = "middleware-payments-service:10000"; // } // System.out.print("Enter the hostname for the Srv app (default: middleware-backend:10000): "); // String srvHostname = scanner.nextLine(); diff --git a/examples/credit-card-payments/docker-compose.yaml b/examples/credit-card-payments/docker-compose.yaml index d197c25..90959f5 100644 --- a/examples/credit-card-payments/docker-compose.yaml +++ b/examples/credit-card-payments/docker-compose.yaml @@ -29,7 +29,7 @@ services: networks: - payments_network depends_on: - - middleware-payments + - middleware-payments-service broker: build: ../../ @@ -74,14 +74,14 @@ services: retries: 5 start_period: 1s - middleware-payments: + middleware-payments-service: build: ../../ networks: - payments_network - broker_network environment: - SERVICE_NAME=payments-service - command: "middleware -broker_addr broker:10000 -private_host 0.0.0.0 -public_url middleware-payments:10000" + command: "middleware -broker_addr broker:10000 -private_host 0.0.0.0 -public_url middleware-payments-service:10000" depends_on: - broker healthcheck: diff --git a/examples/credit-card-payments/payments-service/main.go b/examples/credit-card-payments/payments-service/main.go index fa558d9..91a9ef0 100644 --- a/examples/credit-card-payments/payments-service/main.go +++ b/examples/credit-card-payments/payments-service/main.go @@ -15,7 +15,7 @@ import ( pb "github.com/pmontepagano/search/gen/go/search/v1" ) -var middlewareURL = flag.String("middleware-url", "middleware-payments:11000", "The URL for the middleware") +var middlewareURL = flag.String("middleware-url", "middleware-payments-service:11000", "The URL for the middleware") const ppsContract = ` .outputs PPS From 5e28439c1b5139c8e589018b8d26e4ec371165fb Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 11:01:04 +0100 Subject: [PATCH 19/42] adapt example readme --- examples/credit-card-payments/README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/credit-card-payments/README.md b/examples/credit-card-payments/README.md index 468fed6..92bc981 100644 --- a/examples/credit-card-payments/README.md +++ b/examples/credit-card-payments/README.md @@ -35,10 +35,6 @@ Selected Books: - The Catcher in the Rye - To Kill a Mockingbird Shipping Address: Balcarce 50 -Enter the hostname for the PPS app (default: middleware-payments-service:10000): -Enter the hostname for the Srv app (default: middleware-backend:10000): -Enter the AppId for the PPS app: 7c697682-3646-4b2c-b99d-b25edd467cc2 -Enter the AppId for the Srv app: 07d97309-dd52-4355-8149-a5f5b67b3324 Total amount: 410.0 Enter the credit card number: 4111111111111 Enter the credit card expiration date: 11/25 @@ -47,8 +43,15 @@ Payment nonce: 1234567890 Purchase successful! ``` -For the AppId values, you will have to obtain them from the logs. To do that, open another terminal, navigate to this same directory, and run: - docker-compose logs -f backend payments-service +To see all the logs, open another terminal, navigate to this same directory, and run: -That command will show you the logs for the two Service Providers. The AppIds for each one will be shown. + docker-compose logs -f + +That command will show you the logs all the containers: + +- the broker +- the payments-service (a Service Provider) +- the backend (another Service Provider) +- the client (Service Client) +- 3 different instances of the middleware, one for each service From 105a510daf27f8f89771e929ae52bcda8bbdff7b Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 2 Mar 2024 11:17:33 +0100 Subject: [PATCH 20/42] Update README.md --- README.md | 185 +++++++++++++++++++++++++++++------------------------- 1 file changed, 98 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index 1b5c5b0..243c07f 100644 --- a/README.md +++ b/README.md @@ -3,28 +3,101 @@ ## Quickstart example -Do you want to just see an example of the infrastructure runnung? +Do you want to just see an example of the infrastructure running? 1. **Tools:** Docker (v25+) and Docker Compose (v2.24+). 2. Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`, or unzip [the file containing it](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip). -3. Once in the repository root, navigate in your terminal to the `examples/credit-card-payments` directory: `cd examples/credit-card-payments/` -4. Run the client: `docker-compose run client` - +3. Once in the repository root, navigate in your terminal to the `examples/credit-card-payments` directory: +``` +cd examples/credit-card-payments/ +``` +4. Run the client: +``` +docker-compose run client +``` Before running the client, Docker will first build the infraestructure (i.e., the Broker and the Middleware), the services and the client. Then, it will run everything within containers; the Broker, a Middleware for each service required by the example, and their corresponding services behind them. Finally, it will run a Middleware for the client, and the client application behind it. +## Setting up a development environment + +### Prerequisites +Modify and/or contributing to this project requires the following tools to be installed: + +1. **Tools:** [Python 3.12](https://python.org/) and the following Python packages: + - [python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. + - [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. + - [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. + +A simple way of installing all of these is to install Python 3.12 and then run: +``` + pip install -r requirements.txt +``` + +2. [Go 1.21](https://go.dev/) and the following tools: + - [buf](https://buf.build/docs/installation), used to generate code from our Protocol Buffer definitions to Go code. + - [mockery](https://vektra.github.io/mockery/), used to generate mocks for tests. + - [ent](https://github.com/ent/ent), used to model the database where we store contracts, providers and compatibility checks already computed. + + +### Obtain the code +Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`; alternatively unzip the file containing it. + +The structure of the repository is: +- `internal`: contains the code of the middleware and the broker, along with their tests. +- `cfsm`: contains a _fork_ of the [`nickng/cfsm`](https://github.com/nickng/cfsm) library that implements Communicating Finite State Machines. The main changes compared to the original are: the addition of a parser to read FSA files, some data structure changes to force the serialization of CFSMs to be deterministic, and the addition of using CFSM names instead of numerical indices to make the generated FSA files more human-readable. +- `cmd`: contains the executable code for the middleware and broker. +- `contract`: contains the interfaces of the global contract and the local contract, along with concrete implementations using CFSMs. +- `gen`: contains the files generated by buf after compiling the .proto files. The middleware and broker use the Go code, but we also store the code generated in other languages. +- `ent`: contains the code for managing the broker database (ORM). The entity and relationship definitions are located in the schema subdirectory. The rest of the code is generated using the Ent framework. +- `mocks`: test mocks of the contracts generated with mockery, to facilitate the testing of the broker. +- `proto`: contains the Protocol Buffer files with the message type and gRPC service definitions. These files are compiled using buf. The configuration file that determines the target languages for compilation is `buf.gen.yaml` (in the root of the repository). + + +### Code generation from Protocol Buffer definitions +We use [buf](https://buf.build/docs/installation) to generate definition for message types and gRPC services. Our Protocol Buffer definitions live in the `proto` directory. The generated code lives in the `gen` directory. If you modify the Protocol Buffer definitions or add more output languages (see `buf.gen.yaml`), just run: +``` + buf generate proto +``` +The generated code should be commited to the repository. After modifying the Protocol Buffers, make sure you run the linter like this: +``` + buf lint proto +``` + +### Code generation for database management +We use [ent](https://github.com/ent/ent) to model the database where we store contracts, providers and compatibility checks already computed. -## How to compile and run the Broker and Middleware +The database definitions live in `ent/schema`. The rest of the files and directories in the `ent` directory are auto-generated from the schema definitions. If you change the schemas, run the folllowing command to regenerate code and commit any changes to the repository: +``` + go generate ./ent +``` +#### Other useful Ent commands +- Show schema in CLI: +``` + go run -mod=mod entgo.io/ent/cmd/ent describe ./ent/schema +``` +- Show schema in [Atlas Cloud](https://gh.atlasgo.cloud/): +``` + go run -mod=mod ariga.io/entviz ./ent/schema +``` +- Generate Entity Relation diagram locally +``` + go run -mod=mod github.com/a8m/enter ./ent/schema +``` -1. **Tools**: - 1.1. [Go 1.21](https://go.dev/). - 1.2. [Python 3.12](https://python.org/) and these packages (this is only required to run the _broker_, not the _middleware_): - 1.2.1. [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. - 1.2.2. [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. -2. **Build**: `go build -o . ./...` +### Code generation for test mocks +In software development, test mocks are simulated objects used in testing. They replace real objects or modules, allowing developers to isolate and test specific code independently. This means tests run faster and are more reliable because they aren't influenced by external factors. Mocks also offer predictable behavior, enabling developers to define how they respond to interactions and pinpoint potential issues within the code under test. Essentially, test mocks facilitate focused, efficient, and reliable unit testing, contributing to stronger software development. -This will generate the binaries `broker` and `middleware`. Both programs have a `--help` flag: +We use [mockery](https://vektra.github.io/mockery/) to generate test _mocks_ (only for the `contract` package for now). If you modify the `contract` package, regenerate the mocks by running the following command and commiting the changes to the repository. The generated mocks live in the `mocks` directory: +``` + mockery --dir contract --all --with-expecter +``` +### Compiling the broker and the middleware: +Building the infrastructure (i.e., the Broker and the Middleware) account to executing the following command: +``` + go build -o . ./... +``` +It will compile the code found in `internal`, `cfsm`, `contract`, `gen` and `ent`. This will generate the binaries `broker` and `middleware` and placed in `cmd`. Both programs have a `--help` flag: ``` ./broker --help Usage of ./broker: @@ -40,8 +113,9 @@ Usage of ./broker: Port number on which the broker listens (default 10000) -tls Connection uses TLS if true, else plain TCP + -use_python_bisimulation + Use the Python Bisimulation library to check for bisimulation ``` - ``` ./middleware --help Usage of ./middleware: @@ -65,84 +139,21 @@ Usage of ./middleware: Connection uses TLS if true, else plain TCP ``` - -## How to set up a development environment - -### Prerequisites - -If you want to modify and/or contribute to this project, you will need the following tools installed: - - -1. [Python 3.12](https://python.org/) and these Python packages: - - [python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. - - [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. - - [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. - -A simple way of installing all of these is to install Python 3.12 and run `pip install -r requirements.txt` - -2. [Go 1.21](https://go.dev/) and these tools - - [buf](https://buf.build/docs/installation), used to generate code from our Protocol Buffer definitions. - - [mockery](https://vektra.github.io/mockery/), used to generate mocks for tests. - -### Code generation from Protocol Buffer definitions - -Our Protocol Buffer definitions live in the `proto` directory. The generated code lives in the `gen` directory. If you modify the Protocol Buffer definitions or add more output languages (see `buf.gen.yaml`), just run: - - buf generate proto - -The generated code should be commited to the repository. - -When modifying the Protocol Buffers, make sure you run the linter like this: - - buf lint proto - -### Code generation for database management - -We use [Ent](https://github.com/ent/ent) to model the database where we store contracts, providers and compatibility checks already computed. - -The database definitions live in `ent/schema`. The rest of the files and directories in the `ent` directory are auto-generated from the schema definitions. If you change the schemas, run the folllowing command to regenerate code and commit any changes to the repository: - - go generate ./ent - -#### Other useful Ent commands - -##### Show schema in CLI - - go run -mod=mod entgo.io/ent/cmd/ent describe ./ent/schema - -##### Show schema in [Atlas Cloud](https://gh.atlasgo.cloud/) - - go run -mod=mod ariga.io/entviz ./ent/schema - -##### Generate Entity Relation diagram locally - - go run -mod=mod github.com/a8m/enter ./ent/schema - -### Code generation for test mocks - - We use [mockery](https://vektra.github.io/mockery/) to generate test _mocks_ (only for the `contract` package for now). If you modify the `contact` package, regenerate the mocks by running the following command and commiting the changes to the repository. These generated mocks live in the `mocks` directory: - - mockery --dir contract --all --with-expecter - -### Run tests - +### Running the tests +Running the tests requires running the following command: +``` go test ./... - -And with [race detector](https://go.dev/doc/articles/race_detector): - +``` +Running the tests with [race detector](https://go.dev/doc/articles/race_detector) requires the use to the following command: +``` go test ./... -count=1 -race - -### To get a report of code coverage - +``` +In order to get a report of code coverage after running the tests, use the following commands: +``` go test ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./cfsm/...,./internal/...,./contract -timeout 30s go tool cover -html=coverage.txt +``` -### To compile broker and middleware binaries: - - go build -o . ./... +### Compiling application -## The example -``` -cd examples/credit-card-payments -docker-compose build \ No newline at end of file From 884f96071d39606489138a40505548cc04dc9c97 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 11:26:06 +0100 Subject: [PATCH 21/42] missing flag parse --- examples/credit-card-payments/payments-service/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/credit-card-payments/payments-service/main.go b/examples/credit-card-payments/payments-service/main.go index 91a9ef0..81f1990 100644 --- a/examples/credit-card-payments/payments-service/main.go +++ b/examples/credit-card-payments/payments-service/main.go @@ -30,6 +30,7 @@ q3 Srv ! ChargeFail q5 ` func main() { + flag.Parse() var logger = log.New(os.Stderr, fmt.Sprintf("[PPS] - "), log.LstdFlags|log.Lmsgprefix|log.Lshortfile) var opts []grpc.DialOption opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) From 4a591e65208736f04ffb4e90ce4f2bba18c8ddb8 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 12:12:49 +0100 Subject: [PATCH 22/42] Make middleware URL parametric for client app example --- .../montepagano/search/examples/creditcardpayments/Main.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java b/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java index 1c2a0f5..c3cf1bb 100644 --- a/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java +++ b/examples/credit-card-payments/client/src/main/java/ar/com/montepagano/search/examples/creditcardpayments/Main.java @@ -22,6 +22,7 @@ public class Main { public static void main(String[] args) { + String middlewareURL = args.length > 0 ? args[0] : "middleware-client:11000"; Scanner scanner = new Scanner(System.in); // List of book titles @@ -77,7 +78,7 @@ public static void main(String[] args) { // Get the stub to communicate with the middleware ManagedChannel channel = ManagedChannelBuilder.forTarget( - "middleware-client:11000").usePlaintext().build(); + middlewareURL).usePlaintext().build(); PrivateMiddlewareServiceGrpc.PrivateMiddlewareServiceBlockingStub stub = PrivateMiddlewareServiceGrpc.newBlockingStub(channel); From 317d4c7cca2d7fda5c9cba8f9fe61e649891c897 Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 2 Mar 2024 12:19:08 +0100 Subject: [PATCH 23/42] Update README.md --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 243c07f..0ace010 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,62 @@ In order to get a report of code coverage after running the tests, use the follo go tool cover -html=coverage.txt ``` -### Compiling application +### Running the infrastructure +To setup the infrastructure requires: +1. running the broker: +``` + ./cmd/broker -host [ host_name ] -port [ port_number ] +``` +2. running the middlewares in each of the machines that will participate: +``` + ./cmd/middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] +``` + +### Compiling applications +Compiling application, if it was required, to run within this infrastructure is not different that compliling any other program to run in a computer. The only significant difference is that its execution requires the use of the communication primitives provided by the Middleware, thus, the application will resort to the libraries generated by buf that can be found in `gen`. In the commercial setting these libraries should be available from the package manager of choice. + +### Running applications +With the Middleware running, the applications must be run, according to their language requirements. They will need to communicate with their corresponding Middleware; a good practice is to develop them in way that they can be configured to communicate to a middleware host and port. + +### Running the example +The example can be run in different computers by appropriately setting the host and ports. For the sake of this section we will show how to run it in the localhost. +1. **Broker:** +In a terminal run: +``` + [ repository location ]/cmd/broker -host localhost -port 12000 +``` + +2. **Backend:** +In a terminal run the middleware for the backend service: +``` + [ repository location ]/cmd/middleware -private_port 11001 -public_port 10001 --broker_addr localhost:12000 +``` +In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/backend` and run the backend service: +``` + pip install -r requirements.txt + python main.py --middleware-host localhost --middleware-port 11001 +``` + +3. **Payments service:** +In a terminal run the middleware for the payments service: +``` + [ repository location ]/cmd/middleware -private_port 11002 -public_port 10002 --broker_addr localhost:12000 +``` +In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/payments service` and run the payments service: +``` + go run main.go --middleware-url localhost:11002 +``` + +4. **Client application:** +In a terminal run the middleware for the client application: +``` + [ repository location ]/cmd/middleware -private_port 11003 -public_port 10003 --broker_addr localhost:10000 +``` +In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/client` and run the client application: +``` +mvn verify --fail-never +mvn package +java -jar target/clientapp-1.0-SNAPSHOT-jar-with-dependencies.jar localhost:11003 +``` From 244fba5c0a147497e149a85bf156175fca41fbef Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 08:25:49 -0300 Subject: [PATCH 24/42] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0ace010..735d4f3 100644 --- a/README.md +++ b/README.md @@ -178,13 +178,13 @@ The example can be run in different computers by appropriately setting the host 1. **Broker:** In a terminal run: ``` - [ repository location ]/cmd/broker -host localhost -port 12000 + [ repository location ]/broker -host localhost -port 12000 ``` 2. **Backend:** In a terminal run the middleware for the backend service: ``` - [ repository location ]/cmd/middleware -private_port 11001 -public_port 10001 --broker_addr localhost:12000 + [ repository location ]/middleware -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/backend` and run the backend service: ``` @@ -195,7 +195,7 @@ In another terminal navigate to directory `[ repository location ]/examples/cred 3. **Payments service:** In a terminal run the middleware for the payments service: ``` - [ repository location ]/cmd/middleware -private_port 11002 -public_port 10002 --broker_addr localhost:12000 + [ repository location ]/middleware -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/payments service` and run the payments service: ``` @@ -205,7 +205,7 @@ In another terminal navigate to directory `[ repository location ]/examples/cred 4. **Client application:** In a terminal run the middleware for the client application: ``` - [ repository location ]/cmd/middleware -private_port 11003 -public_port 10003 --broker_addr localhost:10000 + [ repository location ]/middleware -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/client` and run the client application: ``` From 3a25de1a3cc47d8cf817e71d00d36fbbffb4d61d Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 08:28:57 -0300 Subject: [PATCH 25/42] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 735d4f3..1aa86b3 100644 --- a/README.md +++ b/README.md @@ -178,13 +178,13 @@ The example can be run in different computers by appropriately setting the host 1. **Broker:** In a terminal run: ``` - [ repository location ]/broker -host localhost -port 12000 + [ repository location ]go run cmd/broker/broker.go -host localhost -port 12000 ``` 2. **Backend:** In a terminal run the middleware for the backend service: ``` - [ repository location ]/middleware -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 + [ repository location ]go run cmd/middleware/middleware.go -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/backend` and run the backend service: ``` @@ -195,7 +195,7 @@ In another terminal navigate to directory `[ repository location ]/examples/cred 3. **Payments service:** In a terminal run the middleware for the payments service: ``` - [ repository location ]/middleware -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 + [ repository location ]go run cmd/middleware/middleware.go -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/payments service` and run the payments service: ``` @@ -205,7 +205,7 @@ In another terminal navigate to directory `[ repository location ]/examples/cred 4. **Client application:** In a terminal run the middleware for the client application: ``` - [ repository location ]/middleware -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 + [ repository location ]go run cmd/middleware/middleware.go -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/client` and run the client application: ``` From fbf5936b3e9e8b16aa28719b907c604645ccb87e Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 2 Mar 2024 12:39:00 +0100 Subject: [PATCH 26/42] Update README.md --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1aa86b3..9673e36 100644 --- a/README.md +++ b/README.md @@ -175,16 +175,18 @@ With the Middleware running, the applications must be run, according to their la ### Running the example The example can be run in different computers by appropriately setting the host and ports. For the sake of this section we will show how to run it in the localhost. -1. **Broker:** +1. **Broker** + In a terminal run: ``` - [ repository location ]go run cmd/broker/broker.go -host localhost -port 12000 + [ repository location ]/go run cmd/broker/broker.go -host localhost -port 12000 ``` -2. **Backend:** +2. **Backend** + In a terminal run the middleware for the backend service: ``` - [ repository location ]go run cmd/middleware/middleware.go -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 + [ repository location ]/go run cmd/middleware/middleware.go -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/backend` and run the backend service: ``` @@ -192,24 +194,26 @@ In another terminal navigate to directory `[ repository location ]/examples/cred python main.py --middleware-host localhost --middleware-port 11001 ``` -3. **Payments service:** +3. **Payments service** + In a terminal run the middleware for the payments service: ``` - [ repository location ]go run cmd/middleware/middleware.go -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 + [ repository location ]/go run cmd/middleware/middleware.go -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/payments service` and run the payments service: ``` go run main.go --middleware-url localhost:11002 ``` -4. **Client application:** +4. **Client application** + In a terminal run the middleware for the client application: ``` - [ repository location ]go run cmd/middleware/middleware.go -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 + [ repository location ]/go run cmd/middleware/middleware.go -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/client` and run the client application: ``` -mvn verify --fail-never -mvn package -java -jar target/clientapp-1.0-SNAPSHOT-jar-with-dependencies.jar localhost:11003 + mvn verify --fail-never + mvn package + java -jar target/clientapp-1.0-SNAPSHOT-jar-with-dependencies.jar localhost:11003 ``` From 619f8d2a8ba56033000681daab2707e17f12bdab Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 2 Mar 2024 14:44:22 +0100 Subject: [PATCH 27/42] Update README.md --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9673e36..3b1cd3b 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Do you want to just see an example of the infrastructure running? -1. **Tools:** Docker (v25+) and Docker Compose (v2.24+). -2. Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`, or unzip [the file containing it](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip). +1. **Tools:** Docker (v25+), included in [Docker Desktop](https://docs.docker.com/desktop/), and [Docker Compose (v2.24+)](https://docs.docker.com/compose/). +2. Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`, or unzip the [file](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip) containing it. 3. Once in the repository root, navigate in your terminal to the `examples/credit-card-payments` directory: ``` cd examples/credit-card-payments/ @@ -17,6 +17,19 @@ docker-compose run client ``` Before running the client, Docker will first build the infraestructure (i.e., the Broker and the Middleware), the services and the client. Then, it will run everything within containers; the Broker, a Middleware for each service required by the example, and their corresponding services behind them. Finally, it will run a Middleware for the client, and the client application behind it. +To see all the logs, open another terminal, navigate to this same directory, and run: +``` + docker-compose logs -f +``` + +That command will show you the logs all the containers: +- the broker +- the backend (a Service Provider) +- the payments-service (another Service Provider) +- the client application (Service Client) +- 3 different instances of the middleware, one for each service and one for the application + + ## Setting up a development environment ### Prerequisites From 908011c1defa6a63bf284ceb467c98b59c1182ff Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 2 Mar 2024 15:29:35 +0100 Subject: [PATCH 28/42] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b1cd3b..4e5cc86 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,10 @@ That command will show you the logs all the containers: - 3 different instances of the middleware, one for each service and one for the application -## Setting up a development environment +## Setting up SEArch step-by-step ### Prerequisites -Modify and/or contributing to this project requires the following tools to be installed: +Modifying and/or playing with SEArch requires to install the following tools: 1. **Tools:** [Python 3.12](https://python.org/) and the following Python packages: - [python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. @@ -171,11 +171,11 @@ In order to get a report of code coverage after running the tests, use the follo To setup the infrastructure requires: 1. running the broker: ``` - ./cmd/broker -host [ host_name ] -port [ port_number ] + [ repository location ]/cmd/broker -host [ host_name ] -port [ port_number ] ``` 2. running the middlewares in each of the machines that will participate: ``` - ./cmd/middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] + [ repository location ]/cmd/middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] ``` ### Compiling applications From 1b75fc57019994d52910c8f7b812274a1fcc0664 Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 2 Mar 2024 16:10:50 +0100 Subject: [PATCH 29/42] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e5cc86..7b33e23 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ A simple way of installing all of these is to install Python 3.12 and then run: ### Obtain the code -Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`; alternatively unzip the file containing it. +Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`; alternatively unzip the [file](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip) containing it. The structure of the repository is: - `internal`: contains the code of the middleware and the broker, along with their tests. From 6155d7acd5681f39bef14f6bfa25ecfbe067cee3 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 22:40:46 +0100 Subject: [PATCH 30/42] docker install details --- README.md | 10 +++++++--- examples/credit-card-payments/README.md | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7b33e23..25ce44b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,11 @@ Do you want to just see an example of the infrastructure running? -1. **Tools:** Docker (v25+), included in [Docker Desktop](https://docs.docker.com/desktop/), and [Docker Compose (v2.24+)](https://docs.docker.com/compose/). +1. **Tools:** + - [Docker Engine](https://docs.docker.com/engine/) (v25+) + - [Docker buildx plugin](https://github.com/docker/buildx) + - [Docker Compose](https://docs.docker.com/compose/) v2.24+ + These tools are all bundled in [Docker Desktop](https://docs.docker.com/desktop/). 2. Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`, or unzip the [file](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip) containing it. 3. Once in the repository root, navigate in your terminal to the `examples/credit-card-payments` directory: ``` @@ -13,13 +17,13 @@ cd examples/credit-card-payments/ ``` 4. Run the client: ``` -docker-compose run client +docker compose run client ``` Before running the client, Docker will first build the infraestructure (i.e., the Broker and the Middleware), the services and the client. Then, it will run everything within containers; the Broker, a Middleware for each service required by the example, and their corresponding services behind them. Finally, it will run a Middleware for the client, and the client application behind it. To see all the logs, open another terminal, navigate to this same directory, and run: ``` - docker-compose logs -f + docker compose logs -f ``` That command will show you the logs all the containers: diff --git a/examples/credit-card-payments/README.md b/examples/credit-card-payments/README.md index 92bc981..86d3d8e 100644 --- a/examples/credit-card-payments/README.md +++ b/examples/credit-card-payments/README.md @@ -10,7 +10,7 @@ Please follow the instructions below to run the SEArch example: - Open a terminal, navigate to this directory and run: - docker-compose run client + docker compose run client You will be prompted by the Service Client for different questions. The output should look like this: @@ -46,7 +46,7 @@ Purchase successful! To see all the logs, open another terminal, navigate to this same directory, and run: - docker-compose logs -f + docker compose logs -f That command will show you the logs all the containers: From a3283357032d3f5b044a99f9ee32f522b796c5e0 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 22:42:30 +0100 Subject: [PATCH 31/42] add healthcheck to pps to make sure it's registered before starting the client --- examples/credit-card-payments/docker-compose.yaml | 6 ++++++ examples/credit-card-payments/payments-service/main.go | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/examples/credit-card-payments/docker-compose.yaml b/examples/credit-card-payments/docker-compose.yaml index 90959f5..d16ff50 100644 --- a/examples/credit-card-payments/docker-compose.yaml +++ b/examples/credit-card-payments/docker-compose.yaml @@ -30,6 +30,12 @@ services: - payments_network depends_on: - middleware-payments-service + healthcheck: + test: ["CMD", "/usr/bin/stat", "/tmp/registered"] + interval: 2s + timeout: 1s + retries: 10 + start_period: 2s broker: build: ../../ diff --git a/examples/credit-card-payments/payments-service/main.go b/examples/credit-card-payments/payments-service/main.go index 81f1990..7855455 100644 --- a/examples/credit-card-payments/payments-service/main.go +++ b/examples/credit-card-payments/payments-service/main.go @@ -60,6 +60,11 @@ func main() { } appID := ack.GetAppId() logger.Printf("Finished registration. Got AppId %s", appID) + // create empty file for Docker Compose healthcheck + _, err = os.Create("/tmp/registered") + if err != nil { + logger.Printf("Error creating /tmp/registered: %v", err) + } // wait on RegisterAppResponse stream to await for new channel type NewSessionNotification struct { From e2ad451243084f9622433a5a3d3ffccc3e582fba Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Sat, 2 Mar 2024 22:46:09 +0100 Subject: [PATCH 32/42] add healthcheck for backend --- examples/credit-card-payments/backend/main.py | 3 +++ examples/credit-card-payments/docker-compose.yaml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/examples/credit-card-payments/backend/main.py b/examples/credit-card-payments/backend/main.py index 8a1c722..e20528b 100755 --- a/examples/credit-card-payments/backend/main.py +++ b/examples/credit-card-payments/backend/main.py @@ -58,6 +58,9 @@ async def main(grpc_channel): # This should only happen once, in the first iteration. registered = True logger.info(f"App registered with id {r.app_id}") + # Create temp file for Docker Compose healthcheck. + with open("/tmp/registered", "w") as f: + f.write("OK") else: logger.error(f"Unexpected response: {r}. Exiting.") break diff --git a/examples/credit-card-payments/docker-compose.yaml b/examples/credit-card-payments/docker-compose.yaml index d16ff50..5f11e02 100644 --- a/examples/credit-card-payments/docker-compose.yaml +++ b/examples/credit-card-payments/docker-compose.yaml @@ -10,6 +10,12 @@ services: - backend_network depends_on: - middleware-backend + healthcheck: + test: ["CMD", "/usr/bin/stat", "/tmp/registered"] + interval: 2s + timeout: 1s + retries: 10 + start_period: 2s client: build: From 2e9ba251d86d1886cbfaa29f27b2d1a4b52e44b7 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Wed, 6 Mar 2024 00:16:32 +0100 Subject: [PATCH 33/42] small fixes --- README.md | 26 ++++++++++++++++---------- internal/broker/broker.go | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 25ce44b..88b3d27 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,11 @@ Do you want to just see an example of the infrastructure running? ``` cd examples/credit-card-payments/ ``` -4. Run the client: +4. Build: +``` +docker compose build +``` +5. Run: ``` docker compose run client ``` @@ -172,14 +176,16 @@ In order to get a report of code coverage after running the tests, use the follo ``` ### Running the infrastructure -To setup the infrastructure requires: -1. running the broker: + +After having compiled the broker and the middleware you'll have executables for both in the root directory. + +1. Running the broker: ``` - [ repository location ]/cmd/broker -host [ host_name ] -port [ port_number ] + [ repository location ]/broker -host [ host_name ] -port [ port_number ] ``` 2. running the middlewares in each of the machines that will participate: ``` - [ repository location ]/cmd/middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] + [ repository location ]/middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] ``` ### Compiling applications @@ -196,14 +202,14 @@ The example can be run in different computers by appropriately setting the host In a terminal run: ``` - [ repository location ]/go run cmd/broker/broker.go -host localhost -port 12000 + go run cmd/broker/broker.go -host localhost -port 12000 ``` 2. **Backend** In a terminal run the middleware for the backend service: ``` - [ repository location ]/go run cmd/middleware/middleware.go -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 + go run cmd/middleware/middleware.go -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/backend` and run the backend service: ``` @@ -215,9 +221,9 @@ In another terminal navigate to directory `[ repository location ]/examples/cred In a terminal run the middleware for the payments service: ``` - [ repository location ]/go run cmd/middleware/middleware.go -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 + go run cmd/middleware/middleware.go -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 ``` -In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/payments service` and run the payments service: +In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/payments-service` and run the payments service: ``` go run main.go --middleware-url localhost:11002 ``` @@ -226,7 +232,7 @@ In another terminal navigate to directory `[ repository location ]/examples/cred In a terminal run the middleware for the client application: ``` - [ repository location ]/go run cmd/middleware/middleware.go -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 + go run cmd/middleware/middleware.go -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/client` and run the client application: ``` diff --git a/internal/broker/broker.go b/internal/broker/broker.go index 627b51d..a2c12a4 100644 --- a/internal/broker/broker.go +++ b/internal/broker/broker.go @@ -462,7 +462,7 @@ func (s *brokerServer) BrokerChannel(ctx context.Context, request *pb.BrokerChan client pb.PublicMiddlewareServiceClient conn *grpc.ClientConn }{pname, nil, nil} - s.logger.Printf("Connecting to participant %s during brokerage. Provider AppId: %s", pname, p.AppId) + s.logger.Printf("Connecting to participant %s during brokerage. Provider AppId: %s, URL: %s", pname, p.AppId, p.Url) // Connect to the provider's middleware. conn, err := grpc.DialContext( From 036fc78aad1db5921f6e4da2efff33e03977569a Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Fri, 8 Mar 2024 08:28:12 -0300 Subject: [PATCH 34/42] Create LICENSE --- LICENSE | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..51e232d --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2024, Pablo Montepagano + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 929daa018e73fb261dd911273c02fa01d5bae07d Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Fri, 8 Mar 2024 08:41:17 -0300 Subject: [PATCH 35/42] update readme --- README.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 88b3d27..bb4d851 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,22 @@ # SEArch -## Quickstart example +## How to run the exoeriment that demonstrates SEArch runnung -Do you want to just see an example of the infrastructure running? +Prerequisites: -1. **Tools:** +1. Linux or MacOS, either x86_64 or ARM CPU. +2. Have installed Docker with buildx and Compose plugins. - [Docker Engine](https://docs.docker.com/engine/) (v25+) - [Docker buildx plugin](https://github.com/docker/buildx) - [Docker Compose](https://docs.docker.com/compose/) v2.24+ These tools are all bundled in [Docker Desktop](https://docs.docker.com/desktop/). -2. Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`, or unzip the [file](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip) containing it. -3. Once in the repository root, navigate in your terminal to the `examples/credit-card-payments` directory: + +3. Navigate in your terminal to the `examples/credit-card-payments` directory: ``` cd examples/credit-card-payments/ ``` -4. Build: +4. Build the Docker containers: ``` docker compose build ``` @@ -37,13 +38,15 @@ That command will show you the logs all the containers: - the client application (Service Client) - 3 different instances of the middleware, one for each service and one for the application +The expected total runtime to run the experiments is of 10 minutes at most, of which most of it is building the containers. Build time on a 2022 laptop takes 3 minutes. + -## Setting up SEArch step-by-step +## Setting up SEArch step-by-step ### Prerequisites -Modifying and/or playing with SEArch requires to install the following tools: +Modifying and/or playing with SEArch requires you to install the following tools: -1. **Tools:** [Python 3.12](https://python.org/) and the following Python packages: +1. [Python 3.12](https://python.org/) and the following Python packages: - [python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. - [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. - [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. @@ -60,6 +63,7 @@ A simple way of installing all of these is to install Python 3.12 and then run: ### Obtain the code + Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`; alternatively unzip the [file](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip) containing it. The structure of the repository is: From 02b015a7fde72bfddeb5de5a0fb95a4099089db9 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 21 Mar 2024 22:04:23 +0100 Subject: [PATCH 36/42] Pin Java grpc/protobuf generation package version --- buf.gen.yaml | 4 +- examples/credit-card-payments/client/pom.xml | 12 +- .../search/v1/AppMessageOuterClass.java | 460 ++---- .../ar/com/montepagano/search/v1/Broker.java | 530 ++---- .../search/v1/BrokerServiceGrpc.java | 2 +- .../com/montepagano/search/v1/Contracts.java | 218 +-- .../com/montepagano/search/v1/Middleware.java | 1445 ++++++----------- .../v1/PrivateMiddlewareServiceGrpc.java | 2 +- .../v1/PublicMiddlewareServiceGrpc.java | 2 +- 9 files changed, 864 insertions(+), 1811 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index 1a58090..c28a450 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -22,9 +22,9 @@ plugins: out: gen/python # Java - - plugin: buf.build/grpc/java:v1.58.0 + - plugin: buf.build/grpc/java:v1.62.2 out: gen/java - - plugin: buf.build/protocolbuffers/java + - plugin: buf.build/protocolbuffers/java:v26.0 out: gen/java # Typescript diff --git a/examples/credit-card-payments/client/pom.xml b/examples/credit-card-payments/client/pom.xml index 4e01d15..c90f24d 100644 --- a/examples/credit-card-payments/client/pom.xml +++ b/examples/credit-card-payments/client/pom.xml @@ -18,22 +18,22 @@ io.grpc grpc-core - 1.58.0 + 1.62.2 io.grpc grpc-protobuf - 1.58.0 + 1.62.2 io.grpc grpc-stub - 1.58.0 + 1.62.2 io.grpc grpc-netty - 1.58.0 + 1.62.2 org.apache.tomcat @@ -51,7 +51,7 @@ com.google.protobuf protobuf-java - 3.25.0 + 4.26.0 @@ -100,4 +100,4 @@ - \ No newline at end of file + diff --git a/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java b/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java index 72dc095..92e57c0 100644 --- a/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java +++ b/gen/java/ar/com/montepagano/search/v1/AppMessageOuterClass.java @@ -1,11 +1,20 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: search/v1/app_message.proto +// Protobuf Java Version: 4.26.0 -// Protobuf Java Version: 3.25.3 package ar.com.montepagano.search.v1; public final class AppMessageOuterClass { private AppMessageOuterClass() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 0, + /* suffix= */ "", + AppMessageOuterClass.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -104,12 +113,21 @@ public interface MessageExchangeRequestOrBuilder extends * Protobuf type {@code search.v1.MessageExchangeRequest} */ public static final class MessageExchangeRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:search.v1.MessageExchangeRequest) MessageExchangeRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 0, + /* suffix= */ "", + MessageExchangeRequest.class.getName()); + } // Use MessageExchangeRequest.newBuilder() to construct. - private MessageExchangeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MessageExchangeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MessageExchangeRequest() { @@ -118,20 +136,13 @@ private MessageExchangeRequest() { recipientId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MessageExchangeRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_MessageExchangeRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_MessageExchangeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -322,14 +333,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(senderId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, senderId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(senderId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, senderId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recipientId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, recipientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recipientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, recipientId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getContent()); @@ -343,14 +354,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(senderId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, senderId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(senderId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, senderId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recipientId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, recipientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recipientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, recipientId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -442,20 +453,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeR } public static ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -463,20 +474,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeR java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -496,7 +507,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -508,7 +519,7 @@ protected Builder newBuilderForType( * Protobuf type {@code search.v1.MessageExchangeRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:search.v1.MessageExchangeRequest) ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -517,7 +528,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_MessageExchangeRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -530,12 +541,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getContentFieldBuilder(); } @@ -604,38 +615,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.AppMessageOuterClass.Mes result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ar.com.montepagano.search.v1.AppMessageOuterClass.MessageExchangeRequest) { @@ -1013,7 +992,7 @@ public Builder setRecipientIdBytes( } private ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage content_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder> contentBuilder_; /** * .search.v1.AppMessage content = 4 [json_name = "content"]; @@ -1119,11 +1098,11 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder get /** * .search.v1.AppMessage content = 4 [json_name = "content"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder> getContentFieldBuilder() { if (contentBuilder_ == null) { - contentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + contentBuilder_ = new com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder>( getContent(), getParentForChildren(), @@ -1132,18 +1111,6 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder get } return contentBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:search.v1.MessageExchangeRequest) } @@ -1255,12 +1222,21 @@ public interface AppSendRequestOrBuilder extends * Protobuf type {@code search.v1.AppSendRequest} */ public static final class AppSendRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:search.v1.AppSendRequest) AppSendRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 0, + /* suffix= */ "", + AppSendRequest.class.getName()); + } // Use AppSendRequest.newBuilder() to construct. - private AppSendRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AppSendRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AppSendRequest() { @@ -1268,20 +1244,13 @@ private AppSendRequest() { recipient_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AppSendRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppSendRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppSendRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1415,11 +1384,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recipient_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recipient_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recipient_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, recipient_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getMessage()); @@ -1433,11 +1402,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recipient_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recipient_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recipient_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, recipient_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -1525,20 +1494,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest p } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -1546,20 +1515,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest p java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1579,7 +1548,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1591,7 +1560,7 @@ protected Builder newBuilderForType( * Protobuf type {@code search.v1.AppSendRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:search.v1.AppSendRequest) ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1600,7 +1569,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppSendRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1613,12 +1582,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getMessageFieldBuilder(); } @@ -1683,38 +1652,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.AppMessageOuterClass.App result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ar.com.montepagano.search.v1.AppMessageOuterClass.AppSendRequest) { @@ -1965,7 +1902,7 @@ public Builder setRecipientBytes( } private ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage message_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder> messageBuilder_; /** * .search.v1.AppMessage message = 3 [json_name = "message"]; @@ -2071,11 +2008,11 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder get /** * .search.v1.AppMessage message = 3 [json_name = "message"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder> getMessageFieldBuilder() { if (messageBuilder_ == null) { - messageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + messageBuilder_ = new com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder>( getMessage(), getParentForChildren(), @@ -2084,18 +2021,6 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder get } return messageBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:search.v1.AppSendRequest) } @@ -2207,12 +2132,21 @@ public interface AppRecvResponseOrBuilder extends * Protobuf type {@code search.v1.AppRecvResponse} */ public static final class AppRecvResponse extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:search.v1.AppRecvResponse) AppRecvResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 0, + /* suffix= */ "", + AppRecvResponse.class.getName()); + } // Use AppRecvResponse.newBuilder() to construct. - private AppRecvResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AppRecvResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AppRecvResponse() { @@ -2220,20 +2154,13 @@ private AppRecvResponse() { sender_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AppRecvResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppRecvResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppRecvResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2367,11 +2294,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sender_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sender_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getMessage()); @@ -2385,11 +2312,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sender_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sender_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sender_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -2477,20 +2404,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -2498,20 +2425,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2531,7 +2458,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2543,7 +2470,7 @@ protected Builder newBuilderForType( * Protobuf type {@code search.v1.AppRecvResponse} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:search.v1.AppRecvResponse) ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2552,7 +2479,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppRecvResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2565,12 +2492,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getMessageFieldBuilder(); } @@ -2635,38 +2562,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.AppMessageOuterClass.App result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ar.com.montepagano.search.v1.AppMessageOuterClass.AppRecvResponse) { @@ -2917,7 +2812,7 @@ public Builder setSenderBytes( } private ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage message_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder> messageBuilder_; /** * .search.v1.AppMessage message = 3 [json_name = "message"]; @@ -3023,11 +2918,11 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder get /** * .search.v1.AppMessage message = 3 [json_name = "message"]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder> getMessageFieldBuilder() { if (messageBuilder_ == null) { - messageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + messageBuilder_ = new com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage.Builder, ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder>( getMessage(), getParentForChildren(), @@ -3036,18 +2931,6 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder get } return messageBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:search.v1.AppRecvResponse) } @@ -3132,12 +3015,21 @@ public interface AppMessageOrBuilder extends * Protobuf type {@code search.v1.AppMessage} */ public static final class AppMessage extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:search.v1.AppMessage) AppMessageOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 0, + /* suffix= */ "", + AppMessage.class.getName()); + } // Use AppMessage.newBuilder() to construct. - private AppMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AppMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AppMessage() { @@ -3145,20 +3037,13 @@ private AppMessage() { body_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AppMessage(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppMessage_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3229,8 +3114,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); } if (!body_.isEmpty()) { output.writeBytes(2, body_); @@ -3244,8 +3129,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); } if (!body_.isEmpty()) { size += com.google.protobuf.CodedOutputStream @@ -3324,20 +3209,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage parse } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -3345,20 +3230,20 @@ public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage parse java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -3378,7 +3263,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3392,7 +3277,7 @@ protected Builder newBuilderForType( * Protobuf type {@code search.v1.AppMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:search.v1.AppMessage) ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -3401,7 +3286,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.AppMessageOuterClass.internal_static_search_v1_AppMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3414,7 +3299,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3465,38 +3350,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.AppMessageOuterClass.App } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage) { @@ -3673,18 +3526,6 @@ public Builder clearBody() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:search.v1.AppMessage) } @@ -3740,22 +3581,22 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage getDefaultIn private static final com.google.protobuf.Descriptors.Descriptor internal_static_search_v1_MessageExchangeRequest_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_search_v1_MessageExchangeRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_search_v1_AppSendRequest_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_search_v1_AppSendRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_search_v1_AppRecvResponse_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_search_v1_AppRecvResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_search_v1_AppMessage_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_search_v1_AppMessage_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -3789,27 +3630,28 @@ public ar.com.montepagano.search.v1.AppMessageOuterClass.AppMessage getDefaultIn internal_static_search_v1_MessageExchangeRequest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_search_v1_MessageExchangeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_search_v1_MessageExchangeRequest_descriptor, new java.lang.String[] { "ChannelId", "SenderId", "RecipientId", "Content", }); internal_static_search_v1_AppSendRequest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_search_v1_AppSendRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_search_v1_AppSendRequest_descriptor, new java.lang.String[] { "ChannelId", "Recipient", "Message", }); internal_static_search_v1_AppRecvResponse_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_search_v1_AppRecvResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_search_v1_AppRecvResponse_descriptor, new java.lang.String[] { "ChannelId", "Sender", "Message", }); internal_static_search_v1_AppMessage_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_search_v1_AppMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_search_v1_AppMessage_descriptor, new java.lang.String[] { "Type", "Body", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/gen/java/ar/com/montepagano/search/v1/Broker.java b/gen/java/ar/com/montepagano/search/v1/Broker.java index ba4fb28..b17265a 100644 --- a/gen/java/ar/com/montepagano/search/v1/Broker.java +++ b/gen/java/ar/com/montepagano/search/v1/Broker.java @@ -1,11 +1,20 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: search/v1/broker.proto +// Protobuf Java Version: 4.26.0 -// Protobuf Java Version: 3.25.3 package ar.com.montepagano.search.v1; public final class Broker { private Broker() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 0, + /* suffix= */ "", + Broker.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -109,24 +118,26 @@ ar.com.montepagano.search.v1.Broker.RemoteParticipant getPresetParticipantsOrThr * Protobuf type {@code search.v1.BrokerChannelRequest} */ public static final class BrokerChannelRequest extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:search.v1.BrokerChannelRequest) BrokerChannelRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 0, + /* suffix= */ "", + BrokerChannelRequest.class.getName()); + } // Use BrokerChannelRequest.newBuilder() to construct. - private BrokerChannelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BrokerChannelRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BrokerChannelRequest() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BrokerChannelRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_BrokerChannelRequest_descriptor; @@ -145,7 +156,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_BrokerChannelRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -307,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getContract()); } - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetPresetParticipants(), @@ -416,20 +427,20 @@ public static ar.com.montepagano.search.v1.Broker.BrokerChannelRequest parseFrom } public static ar.com.montepagano.search.v1.Broker.BrokerChannelRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.Broker.BrokerChannelRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.Broker.BrokerChannelRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } @@ -437,20 +448,20 @@ public static ar.com.montepagano.search.v1.Broker.BrokerChannelRequest parseDeli java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static ar.com.montepagano.search.v1.Broker.BrokerChannelRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static ar.com.montepagano.search.v1.Broker.BrokerChannelRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -470,7 +481,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -478,7 +489,7 @@ protected Builder newBuilderForType( * Protobuf type {@code search.v1.BrokerChannelRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:search.v1.BrokerChannelRequest) ar.com.montepagano.search.v1.Broker.BrokerChannelRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -509,7 +520,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_BrokerChannelRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -522,12 +533,12 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getContractFieldBuilder(); } @@ -588,38 +599,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Broker.BrokerChannelRequ result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ar.com.montepagano.search.v1.Broker.BrokerChannelRequest) { @@ -698,7 +677,7 @@ public Builder mergeFrom( private int bitField0_; private ar.com.montepagano.search.v1.Contracts.GlobalContract contract_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< ar.com.montepagano.search.v1.Contracts.GlobalContract, ar.com.montepagano.search.v1.Contracts.GlobalContract.Builder, ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder> contractBuilder_; /** *
@@ -840,11 +819,11 @@ public ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder getContrac
        *
        * .search.v1.GlobalContract contract = 1 [json_name = "contract"];
        */
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Contracts.GlobalContract, ar.com.montepagano.search.v1.Contracts.GlobalContract.Builder, ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder> 
           getContractFieldBuilder() {
         if (contractBuilder_ == null) {
-          contractBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+          contractBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               ar.com.montepagano.search.v1.Contracts.GlobalContract, ar.com.montepagano.search.v1.Contracts.GlobalContract.Builder, ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder>(
                   getContract(),
                   getParentForChildren(),
@@ -1048,18 +1027,6 @@ public ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder putPresetPa
         }
         return (ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder) entry;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.BrokerChannelRequest)
     }
@@ -1194,25 +1161,27 @@ ar.com.montepagano.search.v1.Broker.RemoteParticipant getParticipantsOrThrow(
    * Protobuf type {@code search.v1.BrokerChannelResponse}
    */
   public static final class BrokerChannelResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.BrokerChannelResponse)
       BrokerChannelResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        BrokerChannelResponse.class.getName());
+    }
     // Use BrokerChannelResponse.newBuilder() to construct.
-    private BrokerChannelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private BrokerChannelResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private BrokerChannelResponse() {
       channelId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new BrokerChannelResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_BrokerChannelResponse_descriptor;
@@ -1231,7 +1200,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl
       }
     }
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_BrokerChannelResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -1394,10 +1363,10 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, channelId_);
       }
-      com.google.protobuf.GeneratedMessageV3
+      com.google.protobuf.GeneratedMessage
         .serializeStringMapTo(
           output,
           internalGetParticipants(),
@@ -1412,8 +1381,8 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, channelId_);
       }
       for (java.util.Map.Entry entry
            : internalGetParticipants().getMap().entrySet()) {
@@ -1500,20 +1469,20 @@ public static ar.com.montepagano.search.v1.Broker.BrokerChannelResponse parseFro
     }
     public static ar.com.montepagano.search.v1.Broker.BrokerChannelResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.BrokerChannelResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Broker.BrokerChannelResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -1521,20 +1490,20 @@ public static ar.com.montepagano.search.v1.Broker.BrokerChannelResponse parseDel
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Broker.BrokerChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.BrokerChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -1554,7 +1523,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -1562,7 +1531,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.BrokerChannelResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.BrokerChannelResponse)
         ar.com.montepagano.search.v1.Broker.BrokerChannelResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -1593,7 +1562,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi
         }
       }
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_BrokerChannelResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -1606,7 +1575,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -1657,38 +1626,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Broker.BrokerChannelResp
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Broker.BrokerChannelResponse) {
@@ -2044,18 +1981,6 @@ public ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder putParticip
         }
         return (ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder) entry;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.BrokerChannelResponse)
     }
@@ -2143,32 +2068,34 @@ public interface RegisterProviderRequestOrBuilder extends
    * Protobuf type {@code search.v1.RegisterProviderRequest}
    */
   public static final class RegisterProviderRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.RegisterProviderRequest)
       RegisterProviderRequestOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        RegisterProviderRequest.class.getName());
+    }
     // Use RegisterProviderRequest.newBuilder() to construct.
-    private RegisterProviderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private RegisterProviderRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private RegisterProviderRequest() {
       url_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new RegisterProviderRequest();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RegisterProviderRequest_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RegisterProviderRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -2258,8 +2185,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (((bitField0_ & 0x00000001) != 0)) {
         output.writeMessage(1, getContract());
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, url_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -2274,8 +2201,8 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(1, getContract());
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -2355,20 +2282,20 @@ public static ar.com.montepagano.search.v1.Broker.RegisterProviderRequest parseF
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -2376,20 +2303,20 @@ public static ar.com.montepagano.search.v1.Broker.RegisterProviderRequest parseD
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -2409,7 +2336,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -2417,7 +2344,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.RegisterProviderRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.RegisterProviderRequest)
         ar.com.montepagano.search.v1.Broker.RegisterProviderRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -2426,7 +2353,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RegisterProviderRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -2439,12 +2366,12 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
       private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
+        if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
           getContractFieldBuilder();
         }
@@ -2505,38 +2432,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Broker.RegisterProviderR
         result.bitField0_ |= to_bitField0_;
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Broker.RegisterProviderRequest) {
@@ -2613,7 +2508,7 @@ public Builder mergeFrom(
       private int bitField0_;
 
       private ar.com.montepagano.search.v1.Contracts.LocalContract contract_;
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Contracts.LocalContract, ar.com.montepagano.search.v1.Contracts.LocalContract.Builder, ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder> contractBuilder_;
       /**
        * .search.v1.LocalContract contract = 1 [json_name = "contract"];
@@ -2719,11 +2614,11 @@ public ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder getContract
       /**
        * .search.v1.LocalContract contract = 1 [json_name = "contract"];
        */
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Contracts.LocalContract, ar.com.montepagano.search.v1.Contracts.LocalContract.Builder, ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder> 
           getContractFieldBuilder() {
         if (contractBuilder_ == null) {
-          contractBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+          contractBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               ar.com.montepagano.search.v1.Contracts.LocalContract, ar.com.montepagano.search.v1.Contracts.LocalContract.Builder, ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder>(
                   getContract(),
                   getParentForChildren(),
@@ -2804,18 +2699,6 @@ public Builder setUrlBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.RegisterProviderRequest)
     }
@@ -2892,32 +2775,34 @@ public interface RegisterProviderResponseOrBuilder extends
    * Protobuf type {@code search.v1.RegisterProviderResponse}
    */
   public static final class RegisterProviderResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.RegisterProviderResponse)
       RegisterProviderResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        RegisterProviderResponse.class.getName());
+    }
     // Use RegisterProviderResponse.newBuilder() to construct.
-    private RegisterProviderResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private RegisterProviderResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private RegisterProviderResponse() {
       appId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new RegisterProviderResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RegisterProviderResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RegisterProviderResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -2977,8 +2862,8 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, appId_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -2989,8 +2874,8 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, appId_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -3061,20 +2946,20 @@ public static ar.com.montepagano.search.v1.Broker.RegisterProviderResponse parse
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -3082,20 +2967,20 @@ public static ar.com.montepagano.search.v1.Broker.RegisterProviderResponse parse
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.RegisterProviderResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -3115,7 +3000,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -3127,7 +3012,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.RegisterProviderResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.RegisterProviderResponse)
         ar.com.montepagano.search.v1.Broker.RegisterProviderResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -3136,7 +3021,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RegisterProviderResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -3149,7 +3034,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -3196,38 +3081,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Broker.RegisterProviderR
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Broker.RegisterProviderResponse) {
@@ -3364,18 +3217,6 @@ public Builder setAppIdBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.RegisterProviderResponse)
     }
@@ -3476,12 +3317,21 @@ public interface RemoteParticipantOrBuilder extends
    * Protobuf type {@code search.v1.RemoteParticipant}
    */
   public static final class RemoteParticipant extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.RemoteParticipant)
       RemoteParticipantOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        RemoteParticipant.class.getName());
+    }
     // Use RemoteParticipant.newBuilder() to construct.
-    private RemoteParticipant(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private RemoteParticipant(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private RemoteParticipant() {
@@ -3489,20 +3339,13 @@ private RemoteParticipant() {
       appId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new RemoteParticipant();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RemoteParticipant_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RemoteParticipant_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -3617,11 +3460,11 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, url_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, appId_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -3632,11 +3475,11 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, url_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appId_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -3711,20 +3554,20 @@ public static ar.com.montepagano.search.v1.Broker.RemoteParticipant parseFrom(
     }
     public static ar.com.montepagano.search.v1.Broker.RemoteParticipant parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.RemoteParticipant parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Broker.RemoteParticipant parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -3732,20 +3575,20 @@ public static ar.com.montepagano.search.v1.Broker.RemoteParticipant parseDelimit
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Broker.RemoteParticipant parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Broker.RemoteParticipant parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -3765,7 +3608,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -3773,7 +3616,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.RemoteParticipant}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.RemoteParticipant)
         ar.com.montepagano.search.v1.Broker.RemoteParticipantOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -3782,7 +3625,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Broker.internal_static_search_v1_RemoteParticipant_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -3795,7 +3638,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -3846,38 +3689,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Broker.RemoteParticipant
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Broker.RemoteParticipant) {
@@ -4136,18 +3947,6 @@ public Builder setAppIdBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.RemoteParticipant)
     }
@@ -4203,37 +4002,37 @@ public ar.com.montepagano.search.v1.Broker.RemoteParticipant getDefaultInstanceF
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_BrokerChannelRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_BrokerChannelRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_BrokerChannelRequest_PresetParticipantsEntry_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_BrokerChannelRequest_PresetParticipantsEntry_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_BrokerChannelResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_BrokerChannelResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_BrokerChannelResponse_ParticipantsEntry_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_BrokerChannelResponse_ParticipantsEntry_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RegisterProviderRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RegisterProviderRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RegisterProviderResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RegisterProviderResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RemoteParticipant_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RemoteParticipant_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor
@@ -4281,45 +4080,46 @@ public ar.com.montepagano.search.v1.Broker.RemoteParticipant getDefaultInstanceF
     internal_static_search_v1_BrokerChannelRequest_descriptor =
       getDescriptor().getMessageTypes().get(0);
     internal_static_search_v1_BrokerChannelRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_BrokerChannelRequest_descriptor,
         new java.lang.String[] { "Contract", "PresetParticipants", });
     internal_static_search_v1_BrokerChannelRequest_PresetParticipantsEntry_descriptor =
       internal_static_search_v1_BrokerChannelRequest_descriptor.getNestedTypes().get(0);
     internal_static_search_v1_BrokerChannelRequest_PresetParticipantsEntry_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_BrokerChannelRequest_PresetParticipantsEntry_descriptor,
         new java.lang.String[] { "Key", "Value", });
     internal_static_search_v1_BrokerChannelResponse_descriptor =
       getDescriptor().getMessageTypes().get(1);
     internal_static_search_v1_BrokerChannelResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_BrokerChannelResponse_descriptor,
         new java.lang.String[] { "ChannelId", "Participants", });
     internal_static_search_v1_BrokerChannelResponse_ParticipantsEntry_descriptor =
       internal_static_search_v1_BrokerChannelResponse_descriptor.getNestedTypes().get(0);
     internal_static_search_v1_BrokerChannelResponse_ParticipantsEntry_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_BrokerChannelResponse_ParticipantsEntry_descriptor,
         new java.lang.String[] { "Key", "Value", });
     internal_static_search_v1_RegisterProviderRequest_descriptor =
       getDescriptor().getMessageTypes().get(2);
     internal_static_search_v1_RegisterProviderRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RegisterProviderRequest_descriptor,
         new java.lang.String[] { "Contract", "Url", });
     internal_static_search_v1_RegisterProviderResponse_descriptor =
       getDescriptor().getMessageTypes().get(3);
     internal_static_search_v1_RegisterProviderResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RegisterProviderResponse_descriptor,
         new java.lang.String[] { "AppId", });
     internal_static_search_v1_RemoteParticipant_descriptor =
       getDescriptor().getMessageTypes().get(4);
     internal_static_search_v1_RemoteParticipant_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RemoteParticipant_descriptor,
         new java.lang.String[] { "Url", "AppId", });
+    descriptor.resolveAllFeaturesImmutable();
     ar.com.montepagano.search.v1.Contracts.getDescriptor();
   }
 
diff --git a/gen/java/ar/com/montepagano/search/v1/BrokerServiceGrpc.java b/gen/java/ar/com/montepagano/search/v1/BrokerServiceGrpc.java
index a853832..9dceb69 100644
--- a/gen/java/ar/com/montepagano/search/v1/BrokerServiceGrpc.java
+++ b/gen/java/ar/com/montepagano/search/v1/BrokerServiceGrpc.java
@@ -5,7 +5,7 @@
 /**
  */
 @javax.annotation.Generated(
-    value = "by gRPC proto compiler (version 1.58.0)",
+    value = "by gRPC proto compiler (version 1.62.2)",
     comments = "Source: search/v1/broker.proto")
 @io.grpc.stub.annotations.GrpcGenerated
 public final class BrokerServiceGrpc {
diff --git a/gen/java/ar/com/montepagano/search/v1/Contracts.java b/gen/java/ar/com/montepagano/search/v1/Contracts.java
index 64b29f9..a317a07 100644
--- a/gen/java/ar/com/montepagano/search/v1/Contracts.java
+++ b/gen/java/ar/com/montepagano/search/v1/Contracts.java
@@ -1,11 +1,20 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: search/v1/contracts.proto
+// Protobuf Java Version: 4.26.0
 
-// Protobuf Java Version: 3.25.3
 package ar.com.montepagano.search.v1;
 
 public final class Contracts {
   private Contracts() {}
+  static {
+    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+      /* major= */ 4,
+      /* minor= */ 26,
+      /* patch= */ 0,
+      /* suffix= */ "",
+      Contracts.class.getName());
+  }
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistryLite registry) {
   }
@@ -43,6 +52,15 @@ public enum GlobalContractFormat
     UNRECOGNIZED(-1),
     ;
 
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        GlobalContractFormat.class.getName());
+    }
     /**
      * GLOBAL_CONTRACT_FORMAT_UNSPECIFIED = 0;
      */
@@ -176,6 +194,15 @@ public enum LocalContractFormat
     UNRECOGNIZED(-1),
     ;
 
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        LocalContractFormat.class.getName());
+    }
     /**
      * LOCAL_CONTRACT_FORMAT_UNSPECIFIED = 0;
      */
@@ -318,12 +345,21 @@ public interface GlobalContractOrBuilder extends
    * Protobuf type {@code search.v1.GlobalContract}
    */
   public static final class GlobalContract extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.GlobalContract)
       GlobalContractOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        GlobalContract.class.getName());
+    }
     // Use GlobalContract.newBuilder() to construct.
-    private GlobalContract(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private GlobalContract(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private GlobalContract() {
@@ -332,20 +368,13 @@ private GlobalContract() {
       initiatorName_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new GlobalContract();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Contracts.internal_static_search_v1_GlobalContract_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Contracts.internal_static_search_v1_GlobalContract_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -440,8 +469,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (format_ != ar.com.montepagano.search.v1.Contracts.GlobalContractFormat.GLOBAL_CONTRACT_FORMAT_UNSPECIFIED.getNumber()) {
         output.writeEnum(2, format_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initiatorName_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, initiatorName_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initiatorName_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 3, initiatorName_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -460,8 +489,8 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeEnumSize(2, format_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initiatorName_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, initiatorName_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initiatorName_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, initiatorName_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -539,20 +568,20 @@ public static ar.com.montepagano.search.v1.Contracts.GlobalContract parseFrom(
     }
     public static ar.com.montepagano.search.v1.Contracts.GlobalContract parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Contracts.GlobalContract parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Contracts.GlobalContract parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -560,20 +589,20 @@ public static ar.com.montepagano.search.v1.Contracts.GlobalContract parseDelimit
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Contracts.GlobalContract parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Contracts.GlobalContract parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -593,7 +622,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -601,7 +630,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.GlobalContract}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.GlobalContract)
         ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -610,7 +639,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Contracts.internal_static_search_v1_GlobalContract_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -623,7 +652,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -678,38 +707,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Contracts.GlobalContract
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Contracts.GlobalContract) {
@@ -947,18 +944,6 @@ public Builder setInitiatorNameBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.GlobalContract)
     }
@@ -1036,12 +1021,21 @@ public interface LocalContractOrBuilder extends
    * Protobuf type {@code search.v1.LocalContract}
    */
   public static final class LocalContract extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.LocalContract)
       LocalContractOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        LocalContract.class.getName());
+    }
     // Use LocalContract.newBuilder() to construct.
-    private LocalContract(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private LocalContract(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private LocalContract() {
@@ -1049,20 +1043,13 @@ private LocalContract() {
       format_ = 0;
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new LocalContract();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Contracts.internal_static_search_v1_LocalContract_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Contracts.internal_static_search_v1_LocalContract_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -1207,20 +1194,20 @@ public static ar.com.montepagano.search.v1.Contracts.LocalContract parseFrom(
     }
     public static ar.com.montepagano.search.v1.Contracts.LocalContract parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Contracts.LocalContract parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Contracts.LocalContract parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -1228,20 +1215,20 @@ public static ar.com.montepagano.search.v1.Contracts.LocalContract parseDelimite
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Contracts.LocalContract parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Contracts.LocalContract parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -1261,7 +1248,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -1269,7 +1256,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.LocalContract}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.LocalContract)
         ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -1278,7 +1265,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Contracts.internal_static_search_v1_LocalContract_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -1291,7 +1278,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -1342,38 +1329,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Contracts.LocalContract
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Contracts.LocalContract) {
@@ -1529,18 +1484,6 @@ public Builder clearFormat() {
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.LocalContract)
     }
@@ -1596,12 +1539,12 @@ public ar.com.montepagano.search.v1.Contracts.LocalContract getDefaultInstanceFo
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_GlobalContract_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_GlobalContract_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_LocalContract_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_LocalContract_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor
@@ -1636,15 +1579,16 @@ public ar.com.montepagano.search.v1.Contracts.LocalContract getDefaultInstanceFo
     internal_static_search_v1_GlobalContract_descriptor =
       getDescriptor().getMessageTypes().get(0);
     internal_static_search_v1_GlobalContract_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_GlobalContract_descriptor,
         new java.lang.String[] { "Contract", "Format", "InitiatorName", });
     internal_static_search_v1_LocalContract_descriptor =
       getDescriptor().getMessageTypes().get(1);
     internal_static_search_v1_LocalContract_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_LocalContract_descriptor,
         new java.lang.String[] { "Contract", "Format", });
+    descriptor.resolveAllFeaturesImmutable();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/gen/java/ar/com/montepagano/search/v1/Middleware.java b/gen/java/ar/com/montepagano/search/v1/Middleware.java
index 2a75657..59b8df9 100644
--- a/gen/java/ar/com/montepagano/search/v1/Middleware.java
+++ b/gen/java/ar/com/montepagano/search/v1/Middleware.java
@@ -1,11 +1,20 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: search/v1/middleware.proto
+// Protobuf Java Version: 4.26.0
 
-// Protobuf Java Version: 3.25.3
 package ar.com.montepagano.search.v1;
 
 public final class Middleware {
   private Middleware() {}
+  static {
+    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+      /* major= */ 4,
+      /* minor= */ 26,
+      /* patch= */ 0,
+      /* suffix= */ "",
+      Middleware.class.getName());
+  }
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistryLite registry) {
   }
@@ -34,32 +43,34 @@ public interface AppSendResponseOrBuilder extends
    * Protobuf type {@code search.v1.AppSendResponse}
    */
   public static final class AppSendResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.AppSendResponse)
       AppSendResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        AppSendResponse.class.getName());
+    }
     // Use AppSendResponse.newBuilder() to construct.
-    private AppSendResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private AppSendResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private AppSendResponse() {
       result_ = 0;
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new AppSendResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_AppSendResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_AppSendResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -86,6 +97,15 @@ public enum Result
       UNRECOGNIZED(-1),
       ;
 
+      static {
+        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+          /* major= */ 4,
+          /* minor= */ 26,
+          /* patch= */ 0,
+          /* suffix= */ "",
+          Result.class.getName());
+      }
       /**
        * RESULT_UNSPECIFIED = 0;
        */
@@ -299,20 +319,20 @@ public static ar.com.montepagano.search.v1.Middleware.AppSendResponse parseFrom(
     }
     public static ar.com.montepagano.search.v1.Middleware.AppSendResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.AppSendResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.AppSendResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -320,20 +340,20 @@ public static ar.com.montepagano.search.v1.Middleware.AppSendResponse parseDelim
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.AppSendResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.AppSendResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -353,7 +373,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -361,7 +381,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.AppSendResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.AppSendResponse)
         ar.com.montepagano.search.v1.Middleware.AppSendResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -370,7 +390,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_AppSendResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -383,7 +403,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -430,38 +450,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.AppSendRespon
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.AppSendResponse) {
@@ -577,18 +565,6 @@ public Builder clearResult() {
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.AppSendResponse)
     }
@@ -673,12 +649,21 @@ public interface AppRecvRequestOrBuilder extends
    * Protobuf type {@code search.v1.AppRecvRequest}
    */
   public static final class AppRecvRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.AppRecvRequest)
       AppRecvRequestOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        AppRecvRequest.class.getName());
+    }
     // Use AppRecvRequest.newBuilder() to construct.
-    private AppRecvRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private AppRecvRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private AppRecvRequest() {
@@ -686,20 +671,13 @@ private AppRecvRequest() {
       participant_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new AppRecvRequest();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_AppRecvRequest_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_AppRecvRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -798,11 +776,11 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, participant_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(participant_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, participant_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -813,11 +791,11 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, participant_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(participant_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, participant_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -892,20 +870,20 @@ public static ar.com.montepagano.search.v1.Middleware.AppRecvRequest parseFrom(
     }
     public static ar.com.montepagano.search.v1.Middleware.AppRecvRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.AppRecvRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.AppRecvRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -913,20 +891,20 @@ public static ar.com.montepagano.search.v1.Middleware.AppRecvRequest parseDelimi
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.AppRecvRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.AppRecvRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -946,7 +924,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -954,7 +932,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.AppRecvRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.AppRecvRequest)
         ar.com.montepagano.search.v1.Middleware.AppRecvRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -963,7 +941,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_AppRecvRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -976,7 +954,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -1027,38 +1005,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.AppRecvReques
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.AppRecvRequest) {
@@ -1277,18 +1223,6 @@ public Builder setParticipantBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.AppRecvRequest)
     }
@@ -1418,24 +1352,26 @@ ar.com.montepagano.search.v1.Broker.RemoteParticipant getPresetParticipantsOrThr
    * Protobuf type {@code search.v1.RegisterChannelRequest}
    */
   public static final class RegisterChannelRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.RegisterChannelRequest)
       RegisterChannelRequestOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        RegisterChannelRequest.class.getName());
+    }
     // Use RegisterChannelRequest.newBuilder() to construct.
-    private RegisterChannelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private RegisterChannelRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private RegisterChannelRequest() {
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new RegisterChannelRequest();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterChannelRequest_descriptor;
@@ -1454,7 +1390,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl
       }
     }
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterChannelRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -1600,7 +1536,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (((bitField0_ & 0x00000001) != 0)) {
         output.writeMessage(1, getRequirementsContract());
       }
-      com.google.protobuf.GeneratedMessageV3
+      com.google.protobuf.GeneratedMessage
         .serializeStringMapTo(
           output,
           internalGetPresetParticipants(),
@@ -1709,20 +1645,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest par
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -1730,20 +1666,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest par
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -1763,7 +1699,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -1771,7 +1707,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.RegisterChannelRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.RegisterChannelRequest)
         ar.com.montepagano.search.v1.Middleware.RegisterChannelRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -1802,7 +1738,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi
         }
       }
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterChannelRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -1815,12 +1751,12 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
       private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
+        if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
           getRequirementsContractFieldBuilder();
         }
@@ -1881,38 +1817,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.RegisterChann
         result.bitField0_ |= to_bitField0_;
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.RegisterChannelRequest) {
@@ -1991,7 +1895,7 @@ public Builder mergeFrom(
       private int bitField0_;
 
       private ar.com.montepagano.search.v1.Contracts.GlobalContract requirementsContract_;
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Contracts.GlobalContract, ar.com.montepagano.search.v1.Contracts.GlobalContract.Builder, ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder> requirementsContractBuilder_;
       /**
        * .search.v1.GlobalContract requirements_contract = 1 [json_name = "requirementsContract"];
@@ -2097,11 +2001,11 @@ public ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder getRequire
       /**
        * .search.v1.GlobalContract requirements_contract = 1 [json_name = "requirementsContract"];
        */
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Contracts.GlobalContract, ar.com.montepagano.search.v1.Contracts.GlobalContract.Builder, ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder> 
           getRequirementsContractFieldBuilder() {
         if (requirementsContractBuilder_ == null) {
-          requirementsContractBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+          requirementsContractBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               ar.com.montepagano.search.v1.Contracts.GlobalContract, ar.com.montepagano.search.v1.Contracts.GlobalContract.Builder, ar.com.montepagano.search.v1.Contracts.GlobalContractOrBuilder>(
                   getRequirementsContract(),
                   getParentForChildren(),
@@ -2297,18 +2201,6 @@ public ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder putPresetPa
         }
         return (ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder) entry;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.RegisterChannelRequest)
     }
@@ -2381,32 +2273,34 @@ public interface RegisterChannelResponseOrBuilder extends
    * Protobuf type {@code search.v1.RegisterChannelResponse}
    */
   public static final class RegisterChannelResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.RegisterChannelResponse)
       RegisterChannelResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        RegisterChannelResponse.class.getName());
+    }
     // Use RegisterChannelResponse.newBuilder() to construct.
-    private RegisterChannelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private RegisterChannelResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private RegisterChannelResponse() {
       channelId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new RegisterChannelResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterChannelResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterChannelResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -2466,8 +2360,8 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -2478,8 +2372,8 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -2550,20 +2444,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse pa
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -2571,20 +2465,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse pa
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -2604,7 +2498,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -2612,7 +2506,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.RegisterChannelResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.RegisterChannelResponse)
         ar.com.montepagano.search.v1.Middleware.RegisterChannelResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -2621,7 +2515,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterChannelResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -2634,7 +2528,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -2681,38 +2575,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.RegisterChann
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.RegisterChannelResponse) {
@@ -2849,18 +2711,6 @@ public Builder setChannelIdBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.RegisterChannelResponse)
     }
@@ -2936,31 +2786,33 @@ public interface RegisterAppRequestOrBuilder extends
    * Protobuf type {@code search.v1.RegisterAppRequest}
    */
   public static final class RegisterAppRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.RegisterAppRequest)
       RegisterAppRequestOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        RegisterAppRequest.class.getName());
+    }
     // Use RegisterAppRequest.newBuilder() to construct.
-    private RegisterAppRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private RegisterAppRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private RegisterAppRequest() {
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new RegisterAppRequest();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterAppRequest_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterAppRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -3098,20 +2950,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterAppRequest parseFr
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -3119,20 +2971,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterAppRequest parseDe
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -3152,7 +3004,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -3160,7 +3012,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.RegisterAppRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.RegisterAppRequest)
         ar.com.montepagano.search.v1.Middleware.RegisterAppRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -3169,7 +3021,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterAppRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -3182,12 +3034,12 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
       private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
+        if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
           getProviderContractFieldBuilder();
         }
@@ -3244,38 +3096,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.RegisterAppRe
         result.bitField0_ |= to_bitField0_;
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.RegisterAppRequest) {
@@ -3342,7 +3162,7 @@ public Builder mergeFrom(
       private int bitField0_;
 
       private ar.com.montepagano.search.v1.Contracts.LocalContract providerContract_;
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Contracts.LocalContract, ar.com.montepagano.search.v1.Contracts.LocalContract.Builder, ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder> providerContractBuilder_;
       /**
        * .search.v1.LocalContract provider_contract = 1 [json_name = "providerContract"];
@@ -3448,11 +3268,11 @@ public ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder getProvider
       /**
        * .search.v1.LocalContract provider_contract = 1 [json_name = "providerContract"];
        */
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Contracts.LocalContract, ar.com.montepagano.search.v1.Contracts.LocalContract.Builder, ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder> 
           getProviderContractFieldBuilder() {
         if (providerContractBuilder_ == null) {
-          providerContractBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+          providerContractBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               ar.com.montepagano.search.v1.Contracts.LocalContract, ar.com.montepagano.search.v1.Contracts.LocalContract.Builder, ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder>(
                   getProviderContract(),
                   getParentForChildren(),
@@ -3461,18 +3281,6 @@ public ar.com.montepagano.search.v1.Contracts.LocalContractOrBuilder getProvider
         }
         return providerContractBuilder_;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.RegisterAppRequest)
     }
@@ -3571,31 +3379,33 @@ public interface RegisterAppResponseOrBuilder extends
    * Protobuf type {@code search.v1.RegisterAppResponse}
    */
   public static final class RegisterAppResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.RegisterAppResponse)
       RegisterAppResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        RegisterAppResponse.class.getName());
+    }
     // Use RegisterAppResponse.newBuilder() to construct.
-    private RegisterAppResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private RegisterAppResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private RegisterAppResponse() {
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new RegisterAppResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterAppResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterAppResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -3742,7 +3552,7 @@ public final boolean isInitialized() {
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       if (ackOrNewCase_ == 1) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ackOrNew_);
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, ackOrNew_);
       }
       if (ackOrNewCase_ == 2) {
         output.writeMessage(2, (ar.com.montepagano.search.v1.Middleware.InitChannelNotification) ackOrNew_);
@@ -3757,7 +3567,7 @@ public int getSerializedSize() {
 
       size = 0;
       if (ackOrNewCase_ == 1) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ackOrNew_);
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ackOrNew_);
       }
       if (ackOrNewCase_ == 2) {
         size += com.google.protobuf.CodedOutputStream
@@ -3853,20 +3663,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterAppResponse parseF
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -3874,20 +3684,20 @@ public static ar.com.montepagano.search.v1.Middleware.RegisterAppResponse parseD
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.RegisterAppResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -3907,7 +3717,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -3919,7 +3729,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.RegisterAppResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.RegisterAppResponse)
         ar.com.montepagano.search.v1.Middleware.RegisterAppResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -3928,7 +3738,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_RegisterAppResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -3941,7 +3751,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -3999,38 +3809,6 @@ private void buildPartialOneofs(ar.com.montepagano.search.v1.Middleware.Register
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.RegisterAppResponse) {
@@ -4222,7 +4000,7 @@ public Builder setAppIdBytes(
         return this;
       }
 
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Middleware.InitChannelNotification, ar.com.montepagano.search.v1.Middleware.InitChannelNotification.Builder, ar.com.montepagano.search.v1.Middleware.InitChannelNotificationOrBuilder> notificationBuilder_;
       /**
        * .search.v1.InitChannelNotification notification = 2 [json_name = "notification"];
@@ -4345,14 +4123,14 @@ public ar.com.montepagano.search.v1.Middleware.InitChannelNotificationOrBuilder
       /**
        * .search.v1.InitChannelNotification notification = 2 [json_name = "notification"];
        */
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
           ar.com.montepagano.search.v1.Middleware.InitChannelNotification, ar.com.montepagano.search.v1.Middleware.InitChannelNotification.Builder, ar.com.montepagano.search.v1.Middleware.InitChannelNotificationOrBuilder> 
           getNotificationFieldBuilder() {
         if (notificationBuilder_ == null) {
           if (!(ackOrNewCase_ == 2)) {
             ackOrNew_ = ar.com.montepagano.search.v1.Middleware.InitChannelNotification.getDefaultInstance();
           }
-          notificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+          notificationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               ar.com.montepagano.search.v1.Middleware.InitChannelNotification, ar.com.montepagano.search.v1.Middleware.InitChannelNotification.Builder, ar.com.montepagano.search.v1.Middleware.InitChannelNotificationOrBuilder>(
                   (ar.com.montepagano.search.v1.Middleware.InitChannelNotification) ackOrNew_,
                   getParentForChildren(),
@@ -4363,18 +4141,6 @@ public ar.com.montepagano.search.v1.Middleware.InitChannelNotificationOrBuilder
         onChanged();
         return notificationBuilder_;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.RegisterAppResponse)
     }
@@ -4452,32 +4218,34 @@ public interface InitChannelNotificationOrBuilder extends
    * Protobuf type {@code search.v1.InitChannelNotification}
    */
   public static final class InitChannelNotification extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.InitChannelNotification)
       InitChannelNotificationOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        InitChannelNotification.class.getName());
+    }
     // Use InitChannelNotification.newBuilder() to construct.
-    private InitChannelNotification(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private InitChannelNotification(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private InitChannelNotification() {
       channelId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new InitChannelNotification();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelNotification_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelNotification_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -4537,8 +4305,8 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -4549,8 +4317,8 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -4621,20 +4389,20 @@ public static ar.com.montepagano.search.v1.Middleware.InitChannelNotification pa
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelNotification parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelNotification parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.InitChannelNotification parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -4642,20 +4410,20 @@ public static ar.com.montepagano.search.v1.Middleware.InitChannelNotification pa
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelNotification parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelNotification parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -4675,7 +4443,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -4688,7 +4456,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.InitChannelNotification}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.InitChannelNotification)
         ar.com.montepagano.search.v1.Middleware.InitChannelNotificationOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -4697,7 +4465,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelNotification_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -4710,7 +4478,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -4757,38 +4525,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.InitChannelNo
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.InitChannelNotification) {
@@ -4925,18 +4661,6 @@ public Builder setChannelIdBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.InitChannelNotification)
     }
@@ -5087,12 +4811,21 @@ ar.com.montepagano.search.v1.Broker.RemoteParticipant getParticipantsOrThrow(
    * Protobuf type {@code search.v1.InitChannelRequest}
    */
   public static final class InitChannelRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.InitChannelRequest)
       InitChannelRequestOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        InitChannelRequest.class.getName());
+    }
     // Use InitChannelRequest.newBuilder() to construct.
-    private InitChannelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private InitChannelRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private InitChannelRequest() {
@@ -5100,13 +4833,6 @@ private InitChannelRequest() {
       appId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new InitChannelRequest();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelRequest_descriptor;
@@ -5125,7 +4851,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl
       }
     }
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -5327,13 +5053,13 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, appId_);
       }
-      com.google.protobuf.GeneratedMessageV3
+      com.google.protobuf.GeneratedMessage
         .serializeStringMapTo(
           output,
           internalGetParticipants(),
@@ -5348,11 +5074,11 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appId_);
       }
       for (java.util.Map.Entry entry
            : internalGetParticipants().getMap().entrySet()) {
@@ -5443,20 +5169,20 @@ public static ar.com.montepagano.search.v1.Middleware.InitChannelRequest parseFr
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.InitChannelRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -5464,20 +5190,20 @@ public static ar.com.montepagano.search.v1.Middleware.InitChannelRequest parseDe
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -5497,7 +5223,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -5509,7 +5235,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.InitChannelRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.InitChannelRequest)
         ar.com.montepagano.search.v1.Middleware.InitChannelRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -5540,7 +5266,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi
         }
       }
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -5553,7 +5279,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -5608,38 +5334,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.InitChannelRe
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.InitChannelRequest) {
@@ -6077,18 +5771,6 @@ public ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder putParticip
         }
         return (ar.com.montepagano.search.v1.Broker.RemoteParticipant.Builder) entry;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.InitChannelRequest)
     }
@@ -6160,32 +5842,34 @@ public interface InitChannelResponseOrBuilder extends
    * Protobuf type {@code search.v1.InitChannelResponse}
    */
   public static final class InitChannelResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.InitChannelResponse)
       InitChannelResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        InitChannelResponse.class.getName());
+    }
     // Use InitChannelResponse.newBuilder() to construct.
-    private InitChannelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private InitChannelResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private InitChannelResponse() {
       result_ = 0;
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new InitChannelResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -6212,6 +5896,15 @@ public enum Result
       UNRECOGNIZED(-1),
       ;
 
+      static {
+        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+          /* major= */ 4,
+          /* minor= */ 26,
+          /* patch= */ 0,
+          /* suffix= */ "",
+          Result.class.getName());
+      }
       /**
        * RESULT_UNSPECIFIED = 0;
        */
@@ -6425,20 +6118,20 @@ public static ar.com.montepagano.search.v1.Middleware.InitChannelResponse parseF
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.InitChannelResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -6446,20 +6139,20 @@ public static ar.com.montepagano.search.v1.Middleware.InitChannelResponse parseD
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.InitChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -6479,7 +6172,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -6487,7 +6180,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.InitChannelResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.InitChannelResponse)
         ar.com.montepagano.search.v1.Middleware.InitChannelResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -6496,7 +6189,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_InitChannelResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -6509,7 +6202,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -6556,38 +6249,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.InitChannelRe
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.InitChannelResponse) {
@@ -6703,18 +6364,6 @@ public Builder clearResult() {
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.InitChannelResponse)
     }
@@ -6799,12 +6448,21 @@ public interface StartChannelRequestOrBuilder extends
    * Protobuf type {@code search.v1.StartChannelRequest}
    */
   public static final class StartChannelRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.StartChannelRequest)
       StartChannelRequestOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        StartChannelRequest.class.getName());
+    }
     // Use StartChannelRequest.newBuilder() to construct.
-    private StartChannelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private StartChannelRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private StartChannelRequest() {
@@ -6812,20 +6470,13 @@ private StartChannelRequest() {
       appId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new StartChannelRequest();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_StartChannelRequest_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_StartChannelRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -6924,11 +6575,11 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, appId_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -6939,11 +6590,11 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appId_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -7018,20 +6669,20 @@ public static ar.com.montepagano.search.v1.Middleware.StartChannelRequest parseF
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.StartChannelRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -7039,20 +6690,20 @@ public static ar.com.montepagano.search.v1.Middleware.StartChannelRequest parseD
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -7072,7 +6723,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -7080,7 +6731,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.StartChannelRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.StartChannelRequest)
         ar.com.montepagano.search.v1.Middleware.StartChannelRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -7089,7 +6740,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_StartChannelRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -7102,7 +6753,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -7153,38 +6804,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.StartChannelR
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.StartChannelRequest) {
@@ -7403,18 +7022,6 @@ public Builder setAppIdBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.StartChannelRequest)
     }
@@ -7486,32 +7093,34 @@ public interface StartChannelResponseOrBuilder extends
    * Protobuf type {@code search.v1.StartChannelResponse}
    */
   public static final class StartChannelResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.StartChannelResponse)
       StartChannelResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        StartChannelResponse.class.getName());
+    }
     // Use StartChannelResponse.newBuilder() to construct.
-    private StartChannelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private StartChannelResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private StartChannelResponse() {
       result_ = 0;
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new StartChannelResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_StartChannelResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_StartChannelResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -7538,6 +7147,15 @@ public enum Result
       UNRECOGNIZED(-1),
       ;
 
+      static {
+        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+          /* major= */ 4,
+          /* minor= */ 26,
+          /* patch= */ 0,
+          /* suffix= */ "",
+          Result.class.getName());
+      }
       /**
        * RESULT_UNSPECIFIED = 0;
        */
@@ -7751,20 +7369,20 @@ public static ar.com.montepagano.search.v1.Middleware.StartChannelResponse parse
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.StartChannelResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -7772,20 +7390,20 @@ public static ar.com.montepagano.search.v1.Middleware.StartChannelResponse parse
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.StartChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -7805,7 +7423,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -7813,7 +7431,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.StartChannelResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.StartChannelResponse)
         ar.com.montepagano.search.v1.Middleware.StartChannelResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -7822,7 +7440,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_StartChannelResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -7835,7 +7453,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -7882,38 +7500,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.StartChannelR
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.StartChannelResponse) {
@@ -8029,18 +7615,6 @@ public Builder clearResult() {
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.StartChannelResponse)
     }
@@ -8113,32 +7687,34 @@ public interface CloseChannelRequestOrBuilder extends
    * Protobuf type {@code search.v1.CloseChannelRequest}
    */
   public static final class CloseChannelRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.CloseChannelRequest)
       CloseChannelRequestOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        CloseChannelRequest.class.getName());
+    }
     // Use CloseChannelRequest.newBuilder() to construct.
-    private CloseChannelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private CloseChannelRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private CloseChannelRequest() {
       channelId_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new CloseChannelRequest();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_CloseChannelRequest_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_CloseChannelRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -8198,8 +7774,8 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -8210,8 +7786,8 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -8282,20 +7858,20 @@ public static ar.com.montepagano.search.v1.Middleware.CloseChannelRequest parseF
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -8303,20 +7879,20 @@ public static ar.com.montepagano.search.v1.Middleware.CloseChannelRequest parseD
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -8336,7 +7912,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -8344,7 +7920,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.CloseChannelRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.CloseChannelRequest)
         ar.com.montepagano.search.v1.Middleware.CloseChannelRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -8353,7 +7929,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_CloseChannelRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -8366,7 +7942,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -8413,38 +7989,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.CloseChannelR
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.CloseChannelRequest) {
@@ -8581,18 +8125,6 @@ public Builder setChannelIdBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.CloseChannelRequest)
     }
@@ -8701,12 +8233,21 @@ public interface CloseChannelResponseOrBuilder extends
    * Protobuf type {@code search.v1.CloseChannelResponse}
    */
   public static final class CloseChannelResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.CloseChannelResponse)
       CloseChannelResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        CloseChannelResponse.class.getName());
+    }
     // Use CloseChannelResponse.newBuilder() to construct.
-    private CloseChannelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private CloseChannelResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private CloseChannelResponse() {
@@ -8716,20 +8257,13 @@ private CloseChannelResponse() {
           com.google.protobuf.LazyStringArrayList.emptyList();
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new CloseChannelResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_CloseChannelResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_CloseChannelResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -8760,6 +8294,15 @@ public enum Result
       UNRECOGNIZED(-1),
       ;
 
+      static {
+        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+          /* major= */ 4,
+          /* minor= */ 26,
+          /* patch= */ 0,
+          /* suffix= */ "",
+          Result.class.getName());
+      }
       /**
        * RESULT_UNSPECIFIED = 0;
        */
@@ -8973,11 +8516,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (result_ != ar.com.montepagano.search.v1.Middleware.CloseChannelResponse.Result.RESULT_UNSPECIFIED.getNumber()) {
         output.writeEnum(1, result_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, errorMessage_);
       }
       for (int i = 0; i < participantsWithPendingInbound_.size(); i++) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, participantsWithPendingInbound_.getRaw(i));
+        com.google.protobuf.GeneratedMessage.writeString(output, 3, participantsWithPendingInbound_.getRaw(i));
       }
       getUnknownFields().writeTo(output);
     }
@@ -8992,8 +8535,8 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeEnumSize(1, result_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorMessage_);
       }
       {
         int dataSize = 0;
@@ -9081,20 +8624,20 @@ public static ar.com.montepagano.search.v1.Middleware.CloseChannelResponse parse
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -9102,20 +8645,20 @@ public static ar.com.montepagano.search.v1.Middleware.CloseChannelResponse parse
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.CloseChannelResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -9135,7 +8678,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -9143,7 +8686,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.CloseChannelResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.CloseChannelResponse)
         ar.com.montepagano.search.v1.Middleware.CloseChannelResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -9152,7 +8695,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_CloseChannelResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -9165,7 +8708,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -9222,38 +8765,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.CloseChannelR
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.CloseChannelResponse) {
@@ -9578,18 +9089,6 @@ public Builder addParticipantsWithPendingInboundBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.CloseChannelResponse)
     }
@@ -9673,12 +9172,21 @@ public interface MessageExchangeResponseOrBuilder extends
    * Protobuf type {@code search.v1.MessageExchangeResponse}
    */
   public static final class MessageExchangeResponse extends
-      com.google.protobuf.GeneratedMessageV3 implements
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:search.v1.MessageExchangeResponse)
       MessageExchangeResponseOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 26,
+        /* patch= */ 0,
+        /* suffix= */ "",
+        MessageExchangeResponse.class.getName());
+    }
     // Use MessageExchangeResponse.newBuilder() to construct.
-    private MessageExchangeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private MessageExchangeResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private MessageExchangeResponse() {
@@ -9686,20 +9194,13 @@ private MessageExchangeResponse() {
       errorMessage_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new MessageExchangeResponse();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_MessageExchangeResponse_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_MessageExchangeResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -9726,6 +9227,15 @@ public enum Result
       UNRECOGNIZED(-1),
       ;
 
+      static {
+        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+          /* major= */ 4,
+          /* minor= */ 26,
+          /* patch= */ 0,
+          /* suffix= */ "",
+          Result.class.getName());
+      }
       /**
        * RESULT_UNSPECIFIED = 0;
        */
@@ -9897,8 +9407,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (result_ != ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse.Result.RESULT_UNSPECIFIED.getNumber()) {
         output.writeEnum(1, result_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, errorMessage_);
       }
       getUnknownFields().writeTo(output);
     }
@@ -9913,8 +9423,8 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeEnumSize(1, result_);
       }
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorMessage_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -9988,20 +9498,20 @@ public static ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse pa
     }
     public static ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
 
@@ -10009,20 +9519,20 @@ public static ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse pa
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -10042,7 +9552,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -10050,7 +9560,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code search.v1.MessageExchangeResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:search.v1.MessageExchangeResponse)
         ar.com.montepagano.search.v1.Middleware.MessageExchangeResponseOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -10059,7 +9569,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return ar.com.montepagano.search.v1.Middleware.internal_static_search_v1_MessageExchangeResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -10072,7 +9582,7 @@ private Builder() {
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
 
       }
@@ -10123,38 +9633,6 @@ private void buildPartial0(ar.com.montepagano.search.v1.Middleware.MessageExchan
         }
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse) {
@@ -10352,18 +9830,6 @@ public Builder setErrorMessageBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:search.v1.MessageExchangeResponse)
     }
@@ -10419,82 +9885,82 @@ public ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse getDefaul
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_AppSendResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_AppSendResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_AppRecvRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_AppRecvRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RegisterChannelRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RegisterChannelRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RegisterChannelRequest_PresetParticipantsEntry_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RegisterChannelRequest_PresetParticipantsEntry_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RegisterChannelResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RegisterChannelResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RegisterAppRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RegisterAppRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_RegisterAppResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_RegisterAppResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_InitChannelNotification_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_InitChannelNotification_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_InitChannelRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_InitChannelRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_InitChannelRequest_ParticipantsEntry_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_InitChannelRequest_ParticipantsEntry_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_InitChannelResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_InitChannelResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_StartChannelRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_StartChannelRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_StartChannelResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_StartChannelResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_CloseChannelRequest_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_CloseChannelRequest_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_CloseChannelResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_CloseChannelResponse_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_search_v1_MessageExchangeResponse_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_search_v1_MessageExchangeResponse_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor
@@ -10592,99 +10058,100 @@ public ar.com.montepagano.search.v1.Middleware.MessageExchangeResponse getDefaul
     internal_static_search_v1_AppSendResponse_descriptor =
       getDescriptor().getMessageTypes().get(0);
     internal_static_search_v1_AppSendResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_AppSendResponse_descriptor,
         new java.lang.String[] { "Result", });
     internal_static_search_v1_AppRecvRequest_descriptor =
       getDescriptor().getMessageTypes().get(1);
     internal_static_search_v1_AppRecvRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_AppRecvRequest_descriptor,
         new java.lang.String[] { "ChannelId", "Participant", });
     internal_static_search_v1_RegisterChannelRequest_descriptor =
       getDescriptor().getMessageTypes().get(2);
     internal_static_search_v1_RegisterChannelRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RegisterChannelRequest_descriptor,
         new java.lang.String[] { "RequirementsContract", "PresetParticipants", });
     internal_static_search_v1_RegisterChannelRequest_PresetParticipantsEntry_descriptor =
       internal_static_search_v1_RegisterChannelRequest_descriptor.getNestedTypes().get(0);
     internal_static_search_v1_RegisterChannelRequest_PresetParticipantsEntry_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RegisterChannelRequest_PresetParticipantsEntry_descriptor,
         new java.lang.String[] { "Key", "Value", });
     internal_static_search_v1_RegisterChannelResponse_descriptor =
       getDescriptor().getMessageTypes().get(3);
     internal_static_search_v1_RegisterChannelResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RegisterChannelResponse_descriptor,
         new java.lang.String[] { "ChannelId", });
     internal_static_search_v1_RegisterAppRequest_descriptor =
       getDescriptor().getMessageTypes().get(4);
     internal_static_search_v1_RegisterAppRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RegisterAppRequest_descriptor,
         new java.lang.String[] { "ProviderContract", });
     internal_static_search_v1_RegisterAppResponse_descriptor =
       getDescriptor().getMessageTypes().get(5);
     internal_static_search_v1_RegisterAppResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_RegisterAppResponse_descriptor,
         new java.lang.String[] { "AppId", "Notification", "AckOrNew", });
     internal_static_search_v1_InitChannelNotification_descriptor =
       getDescriptor().getMessageTypes().get(6);
     internal_static_search_v1_InitChannelNotification_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_InitChannelNotification_descriptor,
         new java.lang.String[] { "ChannelId", });
     internal_static_search_v1_InitChannelRequest_descriptor =
       getDescriptor().getMessageTypes().get(7);
     internal_static_search_v1_InitChannelRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_InitChannelRequest_descriptor,
         new java.lang.String[] { "ChannelId", "AppId", "Participants", });
     internal_static_search_v1_InitChannelRequest_ParticipantsEntry_descriptor =
       internal_static_search_v1_InitChannelRequest_descriptor.getNestedTypes().get(0);
     internal_static_search_v1_InitChannelRequest_ParticipantsEntry_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_InitChannelRequest_ParticipantsEntry_descriptor,
         new java.lang.String[] { "Key", "Value", });
     internal_static_search_v1_InitChannelResponse_descriptor =
       getDescriptor().getMessageTypes().get(8);
     internal_static_search_v1_InitChannelResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_InitChannelResponse_descriptor,
         new java.lang.String[] { "Result", });
     internal_static_search_v1_StartChannelRequest_descriptor =
       getDescriptor().getMessageTypes().get(9);
     internal_static_search_v1_StartChannelRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_StartChannelRequest_descriptor,
         new java.lang.String[] { "ChannelId", "AppId", });
     internal_static_search_v1_StartChannelResponse_descriptor =
       getDescriptor().getMessageTypes().get(10);
     internal_static_search_v1_StartChannelResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_StartChannelResponse_descriptor,
         new java.lang.String[] { "Result", });
     internal_static_search_v1_CloseChannelRequest_descriptor =
       getDescriptor().getMessageTypes().get(11);
     internal_static_search_v1_CloseChannelRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_CloseChannelRequest_descriptor,
         new java.lang.String[] { "ChannelId", });
     internal_static_search_v1_CloseChannelResponse_descriptor =
       getDescriptor().getMessageTypes().get(12);
     internal_static_search_v1_CloseChannelResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_CloseChannelResponse_descriptor,
         new java.lang.String[] { "Result", "ErrorMessage", "ParticipantsWithPendingInbound", });
     internal_static_search_v1_MessageExchangeResponse_descriptor =
       getDescriptor().getMessageTypes().get(13);
     internal_static_search_v1_MessageExchangeResponse_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_search_v1_MessageExchangeResponse_descriptor,
         new java.lang.String[] { "Result", "ErrorMessage", });
+    descriptor.resolveAllFeaturesImmutable();
     ar.com.montepagano.search.v1.AppMessageOuterClass.getDescriptor();
     ar.com.montepagano.search.v1.Contracts.getDescriptor();
     ar.com.montepagano.search.v1.Broker.getDescriptor();
diff --git a/gen/java/ar/com/montepagano/search/v1/PrivateMiddlewareServiceGrpc.java b/gen/java/ar/com/montepagano/search/v1/PrivateMiddlewareServiceGrpc.java
index 15a0768..a3e43a9 100644
--- a/gen/java/ar/com/montepagano/search/v1/PrivateMiddlewareServiceGrpc.java
+++ b/gen/java/ar/com/montepagano/search/v1/PrivateMiddlewareServiceGrpc.java
@@ -9,7 +9,7 @@
  * 
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.58.0)", + value = "by gRPC proto compiler (version 1.62.2)", comments = "Source: search/v1/middleware.proto") @io.grpc.stub.annotations.GrpcGenerated public final class PrivateMiddlewareServiceGrpc { diff --git a/gen/java/ar/com/montepagano/search/v1/PublicMiddlewareServiceGrpc.java b/gen/java/ar/com/montepagano/search/v1/PublicMiddlewareServiceGrpc.java index 81cac3f..4688a43 100644 --- a/gen/java/ar/com/montepagano/search/v1/PublicMiddlewareServiceGrpc.java +++ b/gen/java/ar/com/montepagano/search/v1/PublicMiddlewareServiceGrpc.java @@ -8,7 +8,7 @@ * */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.58.0)", + value = "by gRPC proto compiler (version 1.62.2)", comments = "Source: search/v1/middleware.proto") @io.grpc.stub.annotations.GrpcGenerated public final class PublicMiddlewareServiceGrpc { From f2c517576819031c2c88f622b905452d207df980 Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 21 Mar 2024 22:04:53 +0100 Subject: [PATCH 37/42] Various clarifications in readme --- README.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index bb4d851..09783d4 100644 --- a/README.md +++ b/README.md @@ -46,20 +46,23 @@ The expected total runtime to run the experiments is of 10 minutes at most, of w ### Prerequisites Modifying and/or playing with SEArch requires you to install the following tools: -1. [Python 3.12](https://python.org/) and the following Python packages: +1. [Python 3.11+](https://python.org/) and the following Python packages: - [python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. - [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. - [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. -A simple way of installing all of these is to install Python 3.12 and then run: +On Ubuntu 23.10 you can install the packages: `python3 python-is-python3 python3.11-venv`. Other distributions/versions may have differences in versions and package names. + +With Python 3.11+ installed, you can then run the following commands to install the three dependencies in a temp virtualenv: ``` + python -m venv /tmp/search-paper-python-deps + source /tmp/search-paper-python-deps/bin/activate pip install -r requirements.txt ``` -2. [Go 1.21](https://go.dev/) and the following tools: +2. [Go 1.21+](https://go.dev/) and the following tools: - [buf](https://buf.build/docs/installation), used to generate code from our Protocol Buffer definitions to Go code. - [mockery](https://vektra.github.io/mockery/), used to generate mocks for tests. - - [ent](https://github.com/ent/ent), used to model the database where we store contracts, providers and compatibility checks already computed. ### Obtain the code @@ -185,17 +188,19 @@ After having compiled the broker and the middleware you'll have executables for 1. Running the broker: ``` - [ repository location ]/broker -host [ host_name ] -port [ port_number ] + ./broker -host [ host_name ] -port [ port_number ] ``` 2. running the middlewares in each of the machines that will participate: ``` - [ repository location ]/middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] + ./middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] ``` ### Compiling applications + Compiling application, if it was required, to run within this infrastructure is not different that compliling any other program to run in a computer. The only significant difference is that its execution requires the use of the communication primitives provided by the Middleware, thus, the application will resort to the libraries generated by buf that can be found in `gen`. In the commercial setting these libraries should be available from the package manager of choice. ### Running applications + With the Middleware running, the applications must be run, according to their language requirements. They will need to communicate with their corresponding Middleware; a good practice is to develop them in way that they can be configured to communicate to a middleware host and port. @@ -204,8 +209,9 @@ The example can be run in different computers by appropriately setting the host 1. **Broker** -In a terminal run: +Make sure you run this from a terminal that has the Python virtual environment on which you installed `cfsm-bisimulation`. In a terminal run: ``` + source /tmp/search-paper-python-deps/bin/activate go run cmd/broker/broker.go -host localhost -port 12000 ``` @@ -215,8 +221,10 @@ In a terminal run the middleware for the backend service: ``` go run cmd/middleware/middleware.go -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 ``` -In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/backend` and run the backend service: +In another terminal navigate to directory `examples/credit-card-payments/backend` and run the backend service: ``` + python -m venv /tmp/search-paper-example-backend + source /tmp/search-paper-example-backend/bin/activate pip install -r requirements.txt python main.py --middleware-host localhost --middleware-port 11001 ``` @@ -227,7 +235,7 @@ In a terminal run the middleware for the payments service: ``` go run cmd/middleware/middleware.go -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 ``` -In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/payments-service` and run the payments service: +In another terminal navigate to directory `examples/credit-card-payments/payments-service` and run the payments service: ``` go run main.go --middleware-url localhost:11002 ``` @@ -238,7 +246,10 @@ In a terminal run the middleware for the client application: ``` go run cmd/middleware/middleware.go -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 ``` -In another terminal navigate to directory `[ repository location ]/examples/credit-card-payments/client` and run the client application: + +For this example we need OpenJDK 21 and Maven 3.9. On Ubuntu 23.10 you can install them by installing the packages `maven openjdk-21-jdk-headless`. + +In another terminal navigate to directory `examples/credit-card-payments/client` and run the client application: ``` mvn verify --fail-never mvn package From 23aa46fe71cd7b65184e1a896e6bf67778563b3e Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 21 Mar 2024 22:05:25 +0100 Subject: [PATCH 38/42] new generation of stubs --- gen/go/search/v1/app_message.pb.go | 2 +- gen/go/search/v1/broker.pb.go | 2 +- gen/go/search/v1/contracts.pb.go | 2 +- gen/go/search/v1/middleware.pb.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gen/go/search/v1/app_message.pb.go b/gen/go/search/v1/app_message.pb.go index c88b6e2..51d10ff 100644 --- a/gen/go/search/v1/app_message.pb.go +++ b/gen/go/search/v1/app_message.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.33.0 // protoc (unknown) // source: search/v1/app_message.proto diff --git a/gen/go/search/v1/broker.pb.go b/gen/go/search/v1/broker.pb.go index 444eb54..837fe70 100644 --- a/gen/go/search/v1/broker.pb.go +++ b/gen/go/search/v1/broker.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.33.0 // protoc (unknown) // source: search/v1/broker.proto diff --git a/gen/go/search/v1/contracts.pb.go b/gen/go/search/v1/contracts.pb.go index 8b2402b..a17b1c7 100644 --- a/gen/go/search/v1/contracts.pb.go +++ b/gen/go/search/v1/contracts.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.33.0 // protoc (unknown) // source: search/v1/contracts.proto diff --git a/gen/go/search/v1/middleware.pb.go b/gen/go/search/v1/middleware.pb.go index e5a6ec8..306473f 100644 --- a/gen/go/search/v1/middleware.pb.go +++ b/gen/go/search/v1/middleware.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.33.0 // protoc (unknown) // source: search/v1/middleware.proto From bea03442729294553f90274aeb7fccaf03fdb59b Mon Sep 17 00:00:00 2001 From: Pablo Montepagano Date: Thu, 21 Mar 2024 22:05:58 +0100 Subject: [PATCH 39/42] remove deprecated version key from docker-compose.yaml --- examples/credit-card-payments/docker-compose.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/credit-card-payments/docker-compose.yaml b/examples/credit-card-payments/docker-compose.yaml index 5f11e02..1525e0c 100644 --- a/examples/credit-card-payments/docker-compose.yaml +++ b/examples/credit-card-payments/docker-compose.yaml @@ -1,6 +1,3 @@ - -version: '3' - services: backend: build: From 65130c074869ac8d9fd41959407e1198c4a847be Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 23 Mar 2024 11:58:31 -0300 Subject: [PATCH 40/42] Update README.md --- README.md | 133 ++++++++++++++++++++++++++---------------------------- 1 file changed, 64 insertions(+), 69 deletions(-) diff --git a/README.md b/README.md index 09783d4..cb3142d 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,32 @@ # SEArch +## Quickstart example shipped with `SEArch` -## How to run the exoeriment that demonstrates SEArch runnung +To run the infrastructure of `SEArch` on the example of the paper follow the following steps: -Prerequisites: +1. **Linux or MacOS**, either x86_64 or ARM CPU. +2. **Tools:** **Docker** with buildx and Compose plugins (These tools are all bundled in [Docker Desktop](https://docs.docker.com/desktop/)): -1. Linux or MacOS, either x86_64 or ARM CPU. -2. Have installed Docker with buildx and Compose plugins. - - [Docker Engine](https://docs.docker.com/engine/) (v25+) - - [Docker buildx plugin](https://github.com/docker/buildx) - - [Docker Compose](https://docs.docker.com/compose/) v2.24+ - These tools are all bundled in [Docker Desktop](https://docs.docker.com/desktop/). - -3. Navigate in your terminal to the `examples/credit-card-payments` directory: -``` -cd examples/credit-card-payments/ -``` -4. Build the Docker containers: + - [Docker Engine](https://docs.docker.com/engine/) (v25+) + - [Docker buildx plugin](https://github.com/docker/buildx) + - [Docker Compose](https://docs.docker.com/compose/) v2.24+ +4. Navigate the root directory `search-bisimulation-impl-paper` , and then to the example folder `examples/credit-card-payments`; for instance, in a Linux terminal you can type: +```bash + cd [path_to_search] + cd examples/credit-card-payments/ ``` -docker compose build +5. **Build the Docker containers:** +```bash + docker compose build ``` -5. Run: -``` -docker compose run client +6. **Run:** +```bash + docker compose run client ``` Before running the client, Docker will first build the infraestructure (i.e., the Broker and the Middleware), the services and the client. Then, it will run everything within containers; the Broker, a Middleware for each service required by the example, and their corresponding services behind them. Finally, it will run a Middleware for the client, and the client application behind it. To see all the logs, open another terminal, navigate to this same directory, and run: -``` +```bash docker compose logs -f ``` @@ -38,35 +37,36 @@ That command will show you the logs all the containers: - the client application (Service Client) - 3 different instances of the middleware, one for each service and one for the application -The expected total runtime to run the experiments is of 10 minutes at most, of which most of it is building the containers. Build time on a 2022 laptop takes 3 minutes. +The expected total runtime to run the example is of 10 minutes at most, of which most of it is building the containers. Build time on a 2022 laptop takes 3 minutes. ## Setting up SEArch step-by-step ### Prerequisites -Modifying and/or playing with SEArch requires you to install the following tools: +Modifying and/or playing with `SEArch` requires you to install the following tools: -1. [Python 3.11+](https://python.org/) and the following Python packages: - - [python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. - - [cfsm-bisimulation](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. - - [z3-solver](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. +1. Python 3.11+ [https://python.org/](https://python.org/) and the following Python packages: + - `python-betterproto` [https://github.com/danielgtaylor/python-betterproto](https://github.com/danielgtaylor/python-betterproto), used to compile our Protocol Buffer definitions to Python code. + - `cfsm-bisimulation` [https://github.com/diegosenarruzza/bisimulation/](https://github.com/diegosenarruzza/bisimulation/), used to calculate compatibility between contracts. + - `z3-solver` [https://github.com/Z3Prover/z3](https://github.com/Z3Prover/z3), which is a dependency of `cfsm-bisimulation`. On Ubuntu 23.10 you can install the packages: `python3 python-is-python3 python3.11-venv`. Other distributions/versions may have differences in versions and package names. With Python 3.11+ installed, you can then run the following commands to install the three dependencies in a temp virtualenv: -``` +```bash python -m venv /tmp/search-paper-python-deps source /tmp/search-paper-python-deps/bin/activate pip install -r requirements.txt ``` -2. [Go 1.21+](https://go.dev/) and the following tools: - - [buf](https://buf.build/docs/installation), used to generate code from our Protocol Buffer definitions to Go code. - - [mockery](https://vektra.github.io/mockery/), used to generate mocks for tests. +2. Go 1.21+ [https://go.dev/](https://go.dev/) and the following tools: + - `buf` [https://buf.build/docs/installation](https://buf.build/docs/installation), used to generate code from our Protocol Buffer definitions to Go code *(cf. Section 3 of the paper)*. + - `mockery`: [https://vektra.github.io/mockery/](https://vektra.github.io/mockery/latest/installation/), used to generate mocks for tests. + - `ent` [https://github.com/ent/ent](https://github.com/ent/ent), used to model the database where we store contracts, providers and compatibility checks already computed. -### Obtain the code +### Obtain `SEArch` Clone the [repository](https://github.com/pmontepagano/search.git) and checkout the branch `origin/bisimulation-impl-paper`; alternatively unzip the [file](https://github.com/pmontepagano/search/archive/refs/heads/bisimulation-impl-paper.zip) containing it. The structure of the repository is: @@ -81,52 +81,52 @@ The structure of the repository is: ### Code generation from Protocol Buffer definitions -We use [buf](https://buf.build/docs/installation) to generate definition for message types and gRPC services. Our Protocol Buffer definitions live in the `proto` directory. The generated code lives in the `gen` directory. If you modify the Protocol Buffer definitions or add more output languages (see `buf.gen.yaml`), just run: -``` +We use `buf` to generate definition for message types and gRPC services. Our Protocol Buffer definitions live in the `proto` directory. The generated code lives in the `gen` directory. If you modify the Protocol Buffer definitions or add more output languages (see `buf.gen.yaml`), just run: +```bash buf generate proto ``` The generated code should be commited to the repository. After modifying the Protocol Buffers, make sure you run the linter like this: -``` +```bash buf lint proto ``` ### Code generation for database management -We use [ent](https://github.com/ent/ent) to model the database where we store contracts, providers and compatibility checks already computed. +We use `ent` to model the database where we store contracts, providers and compatibility checks already computed. The database definitions live in `ent/schema`. The rest of the files and directories in the `ent` directory are auto-generated from the schema definitions. If you change the schemas, run the folllowing command to regenerate code and commit any changes to the repository: -``` +```bash go generate ./ent ``` #### Other useful Ent commands - Show schema in CLI: -``` +```bash go run -mod=mod entgo.io/ent/cmd/ent describe ./ent/schema ``` -- Show schema in [Atlas Cloud](https://gh.atlasgo.cloud/): -``` +- Show schema in `Atlas Cloud` [https://gh.atlasgo.cloud/](https://gh.atlasgo.cloud/): +```bash go run -mod=mod ariga.io/entviz ./ent/schema ``` - Generate Entity Relation diagram locally -``` +```bash go run -mod=mod github.com/a8m/enter ./ent/schema ``` ### Code generation for test mocks In software development, test mocks are simulated objects used in testing. They replace real objects or modules, allowing developers to isolate and test specific code independently. This means tests run faster and are more reliable because they aren't influenced by external factors. Mocks also offer predictable behavior, enabling developers to define how they respond to interactions and pinpoint potential issues within the code under test. Essentially, test mocks facilitate focused, efficient, and reliable unit testing, contributing to stronger software development. -We use [mockery](https://vektra.github.io/mockery/) to generate test _mocks_ (only for the `contract` package for now). If you modify the `contract` package, regenerate the mocks by running the following command and commiting the changes to the repository. The generated mocks live in the `mocks` directory: -``` +We use `mockery` to generate test _mocks_ (only for the `contract` package for now). If you modify the `contract` package, regenerate the mocks by running the following command and commiting the changes to the repository. The generated mocks live in the `mocks` directory: +```bash mockery --dir contract --all --with-expecter ``` ### Compiling the broker and the middleware: Building the infrastructure (i.e., the Broker and the Middleware) account to executing the following command: -``` +```bash go build -o . ./... ``` It will compile the code found in `internal`, `cfsm`, `contract`, `gen` and `ent`. This will generate the binaries `broker` and `middleware` and placed in `cmd`. Both programs have a `--help` flag: -``` +```bash ./broker --help Usage of ./broker: -cert_file string @@ -144,7 +144,7 @@ Usage of ./broker: -use_python_bisimulation Use the Python Bisimulation library to check for bisimulation ``` -``` +```bash ./middleware --help Usage of ./middleware: -broker_addr string @@ -169,48 +169,43 @@ Usage of ./middleware: ### Running the tests Running the tests requires running the following command: -``` +```bash go test ./... ``` -Running the tests with [race detector](https://go.dev/doc/articles/race_detector) requires the use to the following command: -``` +Running the tests with `race detector` [https://go.dev/doc/articles/race_detector](https://go.dev/doc/articles/race_detector) requires the use to the following command: +```bash go test ./... -count=1 -race ``` In order to get a report of code coverage after running the tests, use the following commands: -``` +```bash go test ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./cfsm/...,./internal/...,./contract -timeout 30s go tool cover -html=coverage.txt ``` ### Running the infrastructure - -After having compiled the broker and the middleware you'll have executables for both in the root directory. - -1. Running the broker: +To setup the infrastructure requires to navigate to the root directory of `SEArch` and +1. run the broker: +```bash + ./cmd/broker -host [ host_name ] -port [ port_number ] ``` - ./broker -host [ host_name ] -port [ port_number ] -``` -2. running the middlewares in each of the machines that will participate: -``` - ./middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] +2. run the middlewares in each of the machines that will participate: +```bash + ./cmd/middleware -private_port [ port_number ] -public_port [ port_number ] -broker_addr [ host:port ] ``` ### Compiling applications - -Compiling application, if it was required, to run within this infrastructure is not different that compliling any other program to run in a computer. The only significant difference is that its execution requires the use of the communication primitives provided by the Middleware, thus, the application will resort to the libraries generated by buf that can be found in `gen`. In the commercial setting these libraries should be available from the package manager of choice. +Compiling application, if it was required, to run within `SEArch` is similar to standard compilation. The only significant difference is that its execution requires the use of the communication primitives provided by the middleware, thus, the application will resort to the libraries generated by `buf` that can be found in `gen`. In the commercial setting these libraries should be available from the package manager of choice. ### Running applications - With the Middleware running, the applications must be run, according to their language requirements. They will need to communicate with their corresponding Middleware; a good practice is to develop them in way that they can be configured to communicate to a middleware host and port. - ### Running the example -The example can be run in different computers by appropriately setting the host and ports. For the sake of this section we will show how to run it in the localhost. +The example can be run in different computers by appropriately setting the host and ports. For the sake of this section we will show how to run it in the localhost from the root directory of `SEArch`. 1. **Broker** Make sure you run this from a terminal that has the Python virtual environment on which you installed `cfsm-bisimulation`. In a terminal run: -``` +```bash source /tmp/search-paper-python-deps/bin/activate go run cmd/broker/broker.go -host localhost -port 12000 ``` @@ -218,11 +213,11 @@ Make sure you run this from a terminal that has the Python virtual environment o 2. **Backend** In a terminal run the middleware for the backend service: -``` +```bash go run cmd/middleware/middleware.go -private_port 11001 -public_port 10001 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `examples/credit-card-payments/backend` and run the backend service: -``` +```bash python -m venv /tmp/search-paper-example-backend source /tmp/search-paper-example-backend/bin/activate pip install -r requirements.txt @@ -232,25 +227,25 @@ In another terminal navigate to directory `examples/credit-card-payments/backend 3. **Payments service** In a terminal run the middleware for the payments service: -``` +```bash go run cmd/middleware/middleware.go -private_port 11002 -public_port 10002 -public_host localhost --broker_addr localhost:12000 ``` In another terminal navigate to directory `examples/credit-card-payments/payments-service` and run the payments service: -``` +```bash go run main.go --middleware-url localhost:11002 ``` 4. **Client application** In a terminal run the middleware for the client application: -``` +```bash go run cmd/middleware/middleware.go -private_port 11003 -public_port 10003 -public_host localhost --broker_addr localhost:12000 ``` For this example we need OpenJDK 21 and Maven 3.9. On Ubuntu 23.10 you can install them by installing the packages `maven openjdk-21-jdk-headless`. In another terminal navigate to directory `examples/credit-card-payments/client` and run the client application: -``` +```bash mvn verify --fail-never mvn package java -jar target/clientapp-1.0-SNAPSHOT-jar-with-dependencies.jar localhost:11003 From 908b14311cf95f21aab5170dd0a5355ff2322e39 Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 23 Mar 2024 12:00:21 -0300 Subject: [PATCH 41/42] Create LOGDESCRIPTION.md --- LOGDESCRIPTION.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 LOGDESCRIPTION.md diff --git a/LOGDESCRIPTION.md b/LOGDESCRIPTION.md new file mode 100644 index 0000000..bcf99ad --- /dev/null +++ b/LOGDESCRIPTION.md @@ -0,0 +1,58 @@ +# SEArch logs description + +Logs, as *SEArch* itself, are under development and, in some sense, they must undergo a process of major redesign. In their current state, logs only meet the basic requirement of being a debugging tool for the infrastructure. Such a redesign requires elaborating of a conceptual hierarchy of logable events such that they can expose relevant aspects of the state of each component (i.e., components of the infrastructure such as the middlewares and the broker, services and applications running within the infrastructure). + +One key limitation of the current logging infrastructure is that it is done by streaming the messages through the standard output of each of the processes involved in executing the application within *SEArch*; this posses difficulties for understanding executions as they relay on quite intricate communication schemes. + +Regardless future plans, as for today, logs mainly allow basic monitoring of communication messages between components. This is split in four categories: + +1. **middleware - broker:** encompases messages sent or received between a middleware and the broker, for example: + +*A Middleware logs it's view of a brokerage request to the Broker:* +``` + middleware-client:10000 - Requesting brokerage of contract +``` + +2. **service/client - middleware:** encompases messages exchanged between agents participating in an execution and their corresponding middlewares. As we mentioned before, not having a unified logging infrastructure exposses limitations, mainly related to the heterogeneity derived from the idiosyncracies of the different programming languages involved and their associated logging libraries. Examples of these events are: + +*A Middleware logs it's view of a message sent by a process running behind it:* +``` + Received CardDetailsWithTotalAmount: {232 22 22 110} +``` + +3. **middleware - middleware:** encompases the logging events associated to messages exchanged between middlewares, for example: + +*A Middleware logs when it dispatches a message to a another middleware hosting a remote participant:* +``` + Sent message to remote Service Provider for channel cf4ea1f5-44d3-4b27-b489-64c424911611, participant PPS +``` + +4. **critical internal actions of the infrastructure's component:** these messages are used for monitoring the behaviour of the components by following their execution by tracking chosen internal actions, for example: + +*A Middleware logs when it receives a first outbound message from a participant:* +``` + Received first outbound message to send on channel cf4ea1f5-44d3-4b27-b489-64c424911611 for participant Srv. Opening connection to remote Service Provider. +``` +*A Middleware starts the routine that periodically sends outgoing messages on an outbox buffer:* +``` + Started sender routine for channel cf4ea1f5-44d3-4b27-b489-64c424911611, participant Srv +``` + +Naturally, as *SEArch* is still under development, many debug logging entries can be found in the code. These entries are used to get a close look at critical parts of the code implementing the different components, both of the infrastructure, and the example provided with the implementation. + +## Logs when running within Docker containers + +As we mentioned before, *SEArch* has a basic logging infrastructure based on using the standard output stream of the processes. + +When running within a Docker container it is possible to obtain and visualize the logs by using built in capability of the `docker compose` pluggin. + +For a basic usage of this infrastructure a user can try the following commands: + +1. Visualizing the a time based composition of all the containers: +```bash + docker compose logs -f +``` +2. Visualizing the log of a specific container: +```bash + docker compose logs [container_identifier] +``` From 10c835f783126084fbf94a4b7cdfe09dfff25f66 Mon Sep 17 00:00:00 2001 From: Carlos Gustavo Lopez Pombo Date: Sat, 23 Mar 2024 15:35:42 -0300 Subject: [PATCH 42/42] Update LOGDESCRIPTION.md --- LOGDESCRIPTION.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/LOGDESCRIPTION.md b/LOGDESCRIPTION.md index bcf99ad..a2c7a1b 100644 --- a/LOGDESCRIPTION.md +++ b/LOGDESCRIPTION.md @@ -1,10 +1,6 @@ # SEArch logs description -Logs, as *SEArch* itself, are under development and, in some sense, they must undergo a process of major redesign. In their current state, logs only meet the basic requirement of being a debugging tool for the infrastructure. Such a redesign requires elaborating of a conceptual hierarchy of logable events such that they can expose relevant aspects of the state of each component (i.e., components of the infrastructure such as the middlewares and the broker, services and applications running within the infrastructure). - -One key limitation of the current logging infrastructure is that it is done by streaming the messages through the standard output of each of the processes involved in executing the application within *SEArch*; this posses difficulties for understanding executions as they relay on quite intricate communication schemes. - -Regardless future plans, as for today, logs mainly allow basic monitoring of communication messages between components. This is split in four categories: +In their current state, logs only meet the basic requirement for debugging purposes. Logs mainly allow basic monitoring of communication messages between components and are split in four categories: 1. **middleware - broker:** encompases messages sent or received between a middleware and the broker, for example: @@ -13,7 +9,7 @@ Regardless future plans, as for today, logs mainly allow basic monitoring of com middleware-client:10000 - Requesting brokerage of contract ``` -2. **service/client - middleware:** encompases messages exchanged between agents participating in an execution and their corresponding middlewares. As we mentioned before, not having a unified logging infrastructure exposses limitations, mainly related to the heterogeneity derived from the idiosyncracies of the different programming languages involved and their associated logging libraries. Examples of these events are: +2. **service/client - middleware:** encompases messages exchanged between agents participating in an execution and their corresponding middlewares. Examples of these events are: *A Middleware logs it's view of a message sent by a process running behind it:* ``` @@ -38,7 +34,7 @@ Regardless future plans, as for today, logs mainly allow basic monitoring of com Started sender routine for channel cf4ea1f5-44d3-4b27-b489-64c424911611, participant Srv ``` -Naturally, as *SEArch* is still under development, many debug logging entries can be found in the code. These entries are used to get a close look at critical parts of the code implementing the different components, both of the infrastructure, and the example provided with the implementation. +Several debugging entries of logs can be found in the code. These entries are used to get a close look at critical parts of the code implementing the different components, both of the infrastructure, and the example provided with the implementation. ## Logs when running within Docker containers