Skip to content

Commit

Permalink
feat: move v3 contents to subdir
Browse files Browse the repository at this point in the history
This was an attempt to fix test-fuzz but it didn't work. The fuzz test
in x/blob/types complains that an error code has already been
registered. Notably this error doesn't occur during make build, make
install, or runtime (i.e. ./scripts/single-node.sh).
  • Loading branch information
rootulp committed Aug 16, 2024
1 parent ceb32ed commit ee71dce
Show file tree
Hide file tree
Showing 208 changed files with 89 additions and 82 deletions.
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ help: Makefile

## build: Build the celestia-appd binary into the ./build directory.
build: mod
@cd ./cmd/celestia-appd
@echo "--> Building celestia-appd binary to ./build directory"
@mkdir -p build/
@go build $(BUILD_FLAGS) -o build/ ./cmd/celestia-appd
@cd v3 && go build $(BUILD_FLAGS) -o ../build/ ./cmd/celestia-appd
.PHONY: build

## install: Build and install the celestia-appd binary into the $GOPATH/bin directory.
install: go.sum
install: mod
@echo "--> Installing celestia-appd"
@go install $(BUILD_FLAGS) ./cmd/celestia-appd
@cd v3 && go install $(BUILD_FLAGS) ./cmd/celestia-appd
.PHONY: install

## mod: Update all go.mod files.
mod:
@echo "--> Updating go.mod"
@go mod tidy
@echo "--> Updating go.mod in ./v3"
@(cd ./v3 && go mod tidy)
@echo "--> Updating go.mod in ./test/interchain"
@(cd ./test/interchain && go mod tidy)
@echo "--> Updating go.mod in ./x/blob"
Expand Down Expand Up @@ -110,7 +110,14 @@ publish-ghcr-docker:
## lint: Run all linters; golangci-lint, markdownlint, hadolint, yamllint.
lint:
@echo "--> Running golangci-lint"
@golangci-lint run
@cd v3 && golangci-lint run ./...
@cd x/blob && golangci-lint run ./...
@cd x/blobstream && golangci-lint run ./...
@cd x/minfee && golangci-lint run ./...
@cd x/mint && golangci-lint run ./...
@cd x/paramfilter && golangci-lint run ./...
@cd x/signal && golangci-lint run ./...
@cd x/tokenfilter && golangci-lint run ./...
@echo "--> Running markdownlint"
@markdownlint --config .markdownlint.yaml '**/*.md'
@echo "--> Running hadolint"
Expand Down
2 changes: 1 addition & 1 deletion proto/celestia/core/v1/da/data_availability_header.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package celestia.core.v1.da;

option go_package = "github.com/celestiaorg/celestia-app/proto/celestia/core/v1/da";
option go_package = "github.com/celestiaorg/celestia-app/v3/pkg/da/proto";

// DataAvailabilityHeader contains the row and column roots of the erasure
// coded version of the data in Block.Data.
Expand Down
4 changes: 2 additions & 2 deletions proto/celestia/core/v1/proof/proof.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package celestia.core.v1.proof;

option go_package = "github.com/celestiaorg/celestia-app/pkg/proof";
option go_package = "github.com/celestiaorg/celestia-app/v3/pkg/proof";

// ShareProof is an NMT proof that a set of shares exist in a set of rows and a
// Merkle proof that those rows exist in a Merkle tree with a given data root.
Expand Down Expand Up @@ -51,4 +51,4 @@ message Proof {
int64 index = 2;
bytes leaf_hash = 3;
repeated bytes aunts = 4;
}
}
4 changes: 2 additions & 2 deletions proto/celestia/core/v1/tx/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package celestia.core.v1.tx;

import "google/api/annotations.proto";

option go_package = "github.com/celestiaorg/celestia-app/app/grpc/tx";
option go_package = "github.com/celestiaorg/celestia-app/v3/app/grpc/tx";

// Service defines a gRPC service for interacting with transactions.
service Tx {
Expand Down Expand Up @@ -35,4 +35,4 @@ message TxStatusResponse {
uint32 execution_code = 3;
// status is the status of the transaction.
string status = 4;
}
}
14 changes: 7 additions & 7 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

set -eo pipefail

protoc_gen_gocosmos() {
if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then
echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder."
return 1
fi
}
# protoc_gen_gocosmos() {
# if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then
# echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder."
# return 1
# fi
# }

protoc_gen_gocosmos
# protoc_gen_gocosmos

cd proto
proto_dirs=$(find . -path ./cosmos -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e
echo "Running fuzz tests..."
# manually specify the tests to fuzz since go toolchain doesn't support
# fuzzing multiple packages with multiple fuzz tests
go test -fuzz=FuzzPFBGasEstimation -fuzztime 3m ./x/blob/types
cd x/blob/types && go test -fuzz=FuzzPFBGasEstimation -fuzztime 3m
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 20 additions & 20 deletions app/grpc/tx/tx.pb.go → v3/app/grpc/tx/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions go.mod → v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ require (
)

replace (
github.com/celestiaorg/celestia-app/x/blob => ./x/blob // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/blobstream => ./x/blobstream // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/minfee => ./x/minfee // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/mint => ./x/mint // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/paramfilter => ./x/paramfilter // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/signal => ./x/signal // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/tokenfilter => ./x/tokenfilter // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/blob => ../x/blob // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/blobstream => ../x/blobstream // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/minfee => ../x/minfee // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/mint => ../x/mint // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/paramfilter => ../x/paramfilter // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/signal => ../x/signal // TODO: remove this after we create a release.
github.com/celestiaorg/celestia-app/x/tokenfilter => ../x/tokenfilter // TODO: remove this after we create a release.
github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.24.1-sdk-v0.46.16
// Pin to ledger-cosmos-go v0.12.4 to avoid a breaking change introduced in v0.13.0
// The following replace statement can be removed when we upgrade to cosmos-sdk >= v0.50.0
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"golang.org/x/exp/constraints"

"github.com/celestiaorg/celestia-app/v3/pkg/appconsts"
daproto "github.com/celestiaorg/celestia-app/v3/pkg/da/proto"
"github.com/celestiaorg/celestia-app/v3/pkg/wrapper"
daproto "github.com/celestiaorg/celestia-app/v3/proto/celestia/core/v1/da"
)

var (
Expand Down
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
54 changes: 27 additions & 27 deletions pkg/proof/proof.pb.go → v3/pkg/proof/proof.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ee71dce

Please sign in to comment.