Skip to content

Commit

Permalink
fix: remove unused deps in .proto files (#355)
Browse files Browse the repository at this point in the history
## Summary

This PR removes unused dependencies in `.proto` files, addressing the
protobuf generation issue outlined in
[babylon-contract/issues/101](babylonlabs-io/babylon-contract#101).


## Test Plan

```
make proto-lint
```
  • Loading branch information
lesterli authored Dec 18, 2024
1 parent 72654c8 commit e901f1c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ jobs:
run-integration-tests: false
run-lint: true

proto_lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run proto lint
run: |
make proto-lint
docker_pipeline:
uses: babylonlabs-io/.github/.github/workflows/[email protected]
secrets: inherit
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(pro

proto-all: proto-gen proto-swagger-gen ## Generate all protobuf related files

proto-gen: ## Generate protobuf files
proto-gen: proto-lint ## Generate protobuf files
@echo "Generating Protobuf files"
@$(protoImage) sh ./proto/scripts/protocgen.sh

Expand All @@ -425,7 +425,7 @@ proto-format: ## Format protobuf files
proto-lint: ## Lint protobuf files
@$(protoImage) buf lint --error-format=json

.PHONY: proto-gen proto-swagger-gen proto-format prot-lint
.PHONY: proto-gen proto-swagger-gen proto-format proto-lint

###############################################################################
### Docker ###
Expand Down
3 changes: 1 addition & 2 deletions proto/babylon/btcstaking/v1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ syntax = "proto3";
package babylon.btcstaking.v1;

import "gogoproto/gogo.proto";
import "cosmos/staking/v1beta1/staking.proto";
import "babylon/btcstaking/v1/btcstaking.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";

option go_package = "github.com/babylonlabs-io/babylon/x/btcstaking/types";

// EventNewFinalityProvider is the event emitted when new finality provider is created
message EventNewFinalityProvider {
FinalityProvider fp = 1;
}
Expand Down
1 change: 0 additions & 1 deletion proto/babylon/btcstkconsumer/v1/btcstkconsumer.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
syntax = "proto3";
package babylon.btcstkconsumer.v1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/babylonlabs-io/babylon/x/btcstkconsumer/types";
Expand Down
1 change: 0 additions & 1 deletion proto/babylon/checkpointing/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package babylon.checkpointing.v1;
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "babylon/checkpointing/v1/bls_key.proto";
import "babylon/checkpointing/v1/checkpoint.proto";
import "cosmos/base/query/v1beta1/pagination.proto";

Expand Down
1 change: 0 additions & 1 deletion proto/babylon/finality/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import "tendermint/crypto/proof.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
import "babylon/finality/v1/params.proto";
import "babylon/finality/v1/finality.proto";

// Msg defines the Msg service.
service Msg {
Expand Down
1 change: 0 additions & 1 deletion proto/babylon/incentive/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package babylon.incentive;
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "babylon/incentive/params.proto";
import "babylon/incentive/incentive.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/babylonlabs-io/babylon/x/incentive/types";
Expand Down
1 change: 0 additions & 1 deletion proto/babylon/mint/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package babylon.mint.v1;

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "babylon/mint/v1/mint.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/babylonlabs-io/babylon/x/mint/types";
Expand Down

0 comments on commit e901f1c

Please sign in to comment.