From d61944f8236b0ac72277621130e1dd32fc30dd2b Mon Sep 17 00:00:00 2001 From: ducnt87 Date: Tue, 9 May 2023 11:44:09 +0700 Subject: [PATCH 1/3] update protogenc --- Makefile | 4 ++-- scripts/protocgen.sh | 2 +- x/feeabs/types/epoch.pb.go | 22 +++++++++++----------- x/feeabs/types/feepool.pb.go | 2 +- x/feeabs/types/genesis.pb.go | 2 +- x/feeabs/types/osmosisibc.pb.go | 10 +++++----- x/feeabs/types/params.pb.go | 2 +- x/feeabs/types/proposal.pb.go | 2 +- x/feeabs/types/query.pb.go | 4 ++-- x/feeabs/types/tx.pb.go | 4 ++-- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 9c785f9..de880ca 100644 --- a/Makefile +++ b/Makefile @@ -118,8 +118,8 @@ ictest-all: ictest-basic ictest-ibc ictest-packet-forward ### Proto ### ############################################################################### -protoVer=v0.9 -protoImageName=ghcr.io/notional-labs/fa-proto-gen:$(protoVer) +protoVer=0.11.6 +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) containerProtoGen=fa-proto-gen-$(protoVer) containerProtoFmt=fa-proto-fmt-$(protoVer) diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index f941c3d..394df4f 100644 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -24,7 +24,7 @@ cd .. # move proto files to the right places # # Note: Proto files are suffixed with the current binary version. -cp -r ./github.com/notional-labs/fee-abstraction/v2/x/feeabs/types/* ./x/feeabs/types/ +cp -r github.com/notional-labs/fee-abstraction/v2/x/feeabs/types/* ./x/feeabs/types/ rm -rf github.com go mod tidy -compat=1.18 diff --git a/x/feeabs/types/epoch.pb.go b/x/feeabs/types/epoch.pb.go index 7165654..77960f6 100644 --- a/x/feeabs/types/epoch.pb.go +++ b/x/feeabs/types/epoch.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" @@ -228,7 +228,7 @@ func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CurrentEpochStartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CurrentEpochStartTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CurrentEpochStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime):]) if err1 != nil { return 0, err1 } @@ -241,7 +241,7 @@ func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) if err2 != nil { return 0, err2 } @@ -249,7 +249,7 @@ func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEpoch(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x1a - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err3 != nil { return 0, err3 } @@ -288,14 +288,14 @@ func (m *EpochInfo) Size() (n int) { if l > 0 { n += 1 + l + sovEpoch(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovEpoch(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) n += 1 + l + sovEpoch(uint64(l)) if m.CurrentEpoch != 0 { n += 1 + sovEpoch(uint64(m.CurrentEpoch)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CurrentEpochStartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime) n += 1 + l + sovEpoch(uint64(l)) if m.EpochCountingStarted { n += 2 @@ -402,7 +402,7 @@ func (m *EpochInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -435,7 +435,7 @@ func (m *EpochInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -487,7 +487,7 @@ func (m *EpochInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CurrentEpochStartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CurrentEpochStartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/feeabs/types/feepool.pb.go b/x/feeabs/types/feepool.pb.go index bef654d..57e4139 100644 --- a/x/feeabs/types/feepool.pb.go +++ b/x/feeabs/types/feepool.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" math "math" ) diff --git a/x/feeabs/types/genesis.pb.go b/x/feeabs/types/genesis.pb.go index 1b928b6..833c285 100644 --- a/x/feeabs/types/genesis.pb.go +++ b/x/feeabs/types/genesis.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" io "io" math "math" diff --git a/x/feeabs/types/osmosisibc.pb.go b/x/feeabs/types/osmosisibc.pb.go index 185663f..30f2bbf 100644 --- a/x/feeabs/types/osmosisibc.pb.go +++ b/x/feeabs/types/osmosisibc.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types1 "github.com/tendermint/tendermint/abci/types" _ "google.golang.org/genproto/googleapis/api/annotations" io "io" @@ -499,7 +499,7 @@ func (m *QueryArithmeticTwapToNowRequest) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err1 != nil { return 0, err1 } @@ -805,7 +805,7 @@ func (m *QueryArithmeticTwapToNowRequest) Size() (n int) { if l > 0 { n += 1 + l + sovOsmosisibc(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovOsmosisibc(uint64(l)) return n } @@ -1060,7 +1060,7 @@ func (m *QueryArithmeticTwapToNowRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/feeabs/types/params.pb.go b/x/feeabs/types/params.pb.go index b4e66ab..af09155 100644 --- a/x/feeabs/types/params.pb.go +++ b/x/feeabs/types/params.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" _ "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" io "io" diff --git a/x/feeabs/types/proposal.pb.go b/x/feeabs/types/proposal.pb.go index f5c8034..7ded41d 100644 --- a/x/feeabs/types/proposal.pb.go +++ b/x/feeabs/types/proposal.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" _ "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" io "io" diff --git a/x/feeabs/types/query.pb.go b/x/feeabs/types/query.pb.go index f986eb1..c4b97af 100644 --- a/x/feeabs/types/query.pb.go +++ b/x/feeabs/types/query.pb.go @@ -9,8 +9,8 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/feeabs/types/tx.pb.go b/x/feeabs/types/tx.pb.go index 764f13f..57fec18 100644 --- a/x/feeabs/types/tx.pb.go +++ b/x/feeabs/types/tx.pb.go @@ -10,8 +10,8 @@ import ( types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" From 864a4fbdde2b23566fcd4ebf2df1120b834022ed Mon Sep 17 00:00:00 2001 From: ducnt87 Date: Tue, 9 May 2023 11:53:07 +0700 Subject: [PATCH 2/3] try sleep --- scripts/protocgen.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 394df4f..bebf224 100644 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -21,6 +21,7 @@ done cd .. +sleep 10 # move proto files to the right places # # Note: Proto files are suffixed with the current binary version. From 9931109165a818513ab9f0e133117916e5b67fba Mon Sep 17 00:00:00 2001 From: ducnt87 Date: Tue, 9 May 2023 12:08:10 +0700 Subject: [PATCH 3/3] revert and remove check-generate proto --- .github/workflows/check-generated.yml | 25 ------------------------- scripts/protocgen.sh | 1 - 2 files changed, 26 deletions(-) delete mode 100644 .github/workflows/check-generated.yml diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml deleted file mode 100644 index 272ca70..0000000 --- a/.github/workflows/check-generated.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Check generated code -on: - workflow_dispatch: - pull_request: - branches: - - '*' - -permissions: - contents: read - -jobs: - check-proto: - runs-on: ubuntu-latest - steps: - - - uses: actions/setup-go@v3 - with: - go-version: '1.19' - - - uses: actions/checkout@v3 - with: - fetch-depth: 1 # we need a .git directory to run git diff - - - name: "Check protobuf generated code" - run: scripts/check-generated.sh \ No newline at end of file diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index bebf224..394df4f 100644 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -21,7 +21,6 @@ done cd .. -sleep 10 # move proto files to the right places # # Note: Proto files are suffixed with the current binary version.