-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use local-ic tool to start devnet (#429)
* use env variable instead of yaml file * use local-ic to startup local devnet * lint * update readme * edit makefile * edit makefile --------- Co-authored-by: themandalore <[email protected]>
- Loading branch information
1 parent
cefdcfe
commit 74f18b9
Showing
39 changed files
with
149 additions
and
1,821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,6 @@ secrets.yaml | |
prod-sim | ||
|
||
dist/ | ||
|
||
interchaintest/ | ||
heighliner/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,41 +117,35 @@ lint-folder-fix: | |
############################################################################### | ||
### Protobuf ### | ||
############################################################################### | ||
CURRENT_UID := $(shell id -u) | ||
CURRENT_GID := $(shell id -g) | ||
|
||
protoVer=0.14.0 | ||
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) | ||
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) | ||
protoImage="$(DOCKER)" run -e BUF_CACHE_DIR=/tmp/buf --rm -v "$(CURDIR)":/workspace:rw --user ${CURRENT_UID}:${CURRENT_GID} --workdir /workspace $(protoImageName) | ||
|
||
#? proto-all: Run make proto-format proto-lint proto-gen | ||
proto-all: proto-format proto-lint proto-gen | ||
proto-all: proto-format proto-lint proto-gen format | ||
|
||
#? proto-gen: Generate Protobuf files | ||
proto-gen: | ||
@go install cosmossdk.io/orm/cmd/[email protected] | ||
@echo "Generating Protobuf files" | ||
@$(protoImage) sh ./scripts/protocgen.sh | ||
@go mod tidy | ||
|
||
#? proto-swagger-gen: Generate Protobuf Swagger | ||
proto-swagger-gen: | ||
@echo "Generating Protobuf Swagger" | ||
@$(protoImage) sh ./scripts/protoc-swagger-gen.sh | ||
|
||
#? proto-format: Format proto file | ||
proto-format: | ||
@echo "Formatting Protobuf files" | ||
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; | ||
|
||
#? proto-lint: Lint proto file | ||
proto-swagger-gen: | ||
@./scripts/protoc-swagger-gen.sh | ||
|
||
proto-lint: | ||
@$(protoImage) buf lint --error-format=json | ||
|
||
#? proto-check-breaking: Check proto file is breaking | ||
proto-check-breaking: | ||
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main | ||
|
||
#? proto-update-deps: Update protobuf dependencies | ||
proto-update-deps: | ||
@echo "Updating Protobuf dependencies" | ||
$(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update | ||
|
||
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps | ||
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking | ||
|
||
############################################################################### | ||
### tests ### | ||
|
@@ -231,9 +225,13 @@ mock-gen: | |
$(MAKE) mock-gen-registry | ||
$(MAKE) mock-gen-reporter | ||
|
||
.PHONY: mock-gen mock-gen-bridge mock-gen-dispute mock-gen-mint mock-gen-oracle mock-gen-registry mock-gen-reporter mock-gen-daemon | ||
|
||
get-heighliner: | ||
git clone https://github.com/strangelove-ventures/heighliner.git | ||
git clone --depth 1 https://github.com/strangelove-ventures/heighliner.git | ||
cd heighliner && go install | ||
@sleep 0.1 | ||
@echo ✅ heighliner installed to $(shell which heighliner) | ||
|
||
local-image: | ||
ifeq (,$(shell which heighliner)) | ||
|
@@ -242,4 +240,20 @@ else | |
heighliner build -c layer --local --dockerfile cosmos --build-target "make install" --binaries "/go/bin/layerd" | ||
endif | ||
|
||
.PHONY: mock-gen mock-gen-bridge mock-gen-dispute mock-gen-mint mock-gen-oracle mock-gen-registry mock-gen-reporter mock-gen-daemon | ||
get-localic: | ||
@echo "Installing local-interchain" | ||
git clone --depth 1 https://github.com/strangelove-ventures/interchaintest.git | ||
cd interchaintest/local-interchain && make install | ||
@sleep 0.1 | ||
@echo ✅ local-interchain installed $(shell which local-ic) | ||
|
||
|
||
local-devnet: | ||
ifeq (,$(shell which local-ic)) | ||
echo 'local-ic' binary not found. Consider running `make get-localic` | ||
else | ||
echo "Starting local interchain" | ||
cd local_devnet && ICTEST_HOME=. local-ic start layer.json | ||
|
||
endif | ||
.PHONY: get-heighliner local-image get-localic local-devnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"chains": [ | ||
{ | ||
"name": "layer", | ||
"chain_id": "layer-1", | ||
"denom": "loya", | ||
"binary": "layerd", | ||
"bech32_prefix": "tellor", | ||
"docker_image": { | ||
"repository": "layer", | ||
"version": "local", | ||
"uid-gid": "1025:1025" | ||
}, | ||
"gas_prices": "0%DENOM%", | ||
"coin_type": 118, | ||
"trusting_period": "112h", | ||
"gas_adjustment": 2.0, | ||
"number_vals": 4, | ||
"number_node": 0, | ||
"debugging": true, | ||
"block_time": "5000ms", | ||
"host_port_override": { | ||
"26657": "26657", | ||
"1317": "1317", | ||
"9090": "9090" | ||
}, | ||
"additional_start_args": [ | ||
"--keyring-backend", | ||
"test", | ||
"--key-name", | ||
"validator" | ||
], | ||
"env": [ | ||
"ETH_RPC_URL=https://sepolia.infura.io/v3/key", | ||
"TOKEN_BRIDGE_CONTRACT=0x" | ||
], | ||
"config_file_overrides": [ | ||
{ | ||
"file": "config/config.toml", | ||
"paths": { | ||
"moniker": "localic", | ||
"rpc.cors_allowed_origins": [ | ||
"*" | ||
] | ||
} | ||
} | ||
], | ||
"genesis": { | ||
"modify": [ | ||
{ | ||
"key": "app_state.gov.params.voting_period", | ||
"value": "15s" | ||
}, | ||
{ | ||
"key": "app_state.gov.params.max_deposit_period", | ||
"value": "15s" | ||
}, | ||
{ | ||
"key": "app_state.gov.params.min_deposit.0.denom", | ||
"value": "loya" | ||
}, | ||
{ | ||
"key": "app_state.gov.params.min_deposit.0.amount", | ||
"value": "1" | ||
}, | ||
{ | ||
"key": "consensus.params.abci.vote_extensions_enable_height", | ||
"value": "1" | ||
} | ||
], | ||
"startup_commands": [ | ||
"ls %HOME%", | ||
"%BIN% keys add example-key-after --keyring-backend test --home %HOME%" | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"start_time": 1730826722, | ||
"chains": [ | ||
{ | ||
"chain_id": "layer-1", | ||
"chain_name": "layer-1", | ||
"rpc_address": "http://0.0.0.0:26657", | ||
"rest_address": "http://0.0.0.0:1317", | ||
"grpc_address": "0.0.0.0:9090", | ||
"p2p_address": "0.0.0.0:62372", | ||
"ibc_paths": [] | ||
} | ||
], | ||
"ibc_channels": [] | ||
} |
Oops, something went wrong.