Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion makefiles/ignite.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ⚠️ The crypto backend is a BUILD-TIME configuration ⚠️
# CGO=0 uses pure-Go secp256k1 (portable). CGO=1 uses Decred (C-backed).

IGNITE_CMD ?= ignite chain build
IGNITE_CMD ?= ignite chain build --home $(HOME)/.pocket
IGNITE_BASE_CGO_ENABLED := CGO_ENABLED=1 CGO_CFLAGS="-Wno-implicit-function-declaration" $(IGNITE_CMD) --build.tags="ethereum_secp256k1"
IGNITE_BASE_CGO_DISABLED := CGO_ENABLED=0 $(IGNITE_CMD)

Expand Down
25 changes: 0 additions & 25 deletions makefiles/localnet.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,13 @@ k8s_kind_up: check_kind
echo '[INFO] Kind cluster already exists. Skipping creation and switching to kind-pocket-localnet...'; \
kubectl config use-context kind-pocket-localnet; \
fi
# Optional context for 'move_poktroll_to_pocket' to answer this question:
# https://github.com/pokt-network/poktroll/pull/1151#discussion_r2013801486
#
# When running 'ignite chain --help', it states:
# > By default the validator node will be initialized in your $HOME directory in a hidden directory that matches the name of your project.
# This DOES NOT reference: chain-id, app-id, or other "logical" things we expect it to be.
# This DOES reference: the project name (i.e. the basename of the directory).
# Until the 'poktroll' repository is renamed to 'pocket', the following will be required.
# TODO_TECHDEBT: Once this repository is renamed from 'poktroll' to 'pocket, remove the helper below.

.PHONY: move_poktroll_to_pocket
# Internal Helper to move the .poktroll directory to .pocket
move_poktroll_to_pocket:
@echo "###############################################"
@echo "TODO_MAINNET_MIGRATION(@olshansky): Manually moving HOME/.poktroll to HOME/.pocket. This is a temporary fix until ignite CLI uses the project (not chain) name. Ref: https://docs.ignite.com/nightly/references/cli"
@echo "Creating new .pocket directory if it doesn't exist..."
@mkdir -p $(HOME)/.pocket
@echo "Moving contents from .poktroll to .pocket..."
@rsync -av --quiet --remove-source-files $(HOME)/.poktroll/ $(HOME)/.pocket/
@echo "Removing old .poktroll directory..."
@rm -rf $(HOME)/.poktroll
@echo "Move completed successfully: .poktroll to .pocket!"
@echo "###############################################"

.PHONY: localnet_regenesis
localnet_regenesis: ignite_check_version check_yq ## Regenerate the localnet genesis file
# NOTE: intentionally not using --home <dir> flag to avoid overwriting the test keyring
@echo "Initializing chain..."
@set -e
@ignite chain init --skip-proto
# DEV_NOTE: We want the following command to run every time localnet is spun up (i.e. localnet re-genesis)
$(MAKE) move_poktroll_to_pocket
AUTH_CONTENT=$$(cat ./tools/scripts/authz/localnet_genesis_authorizations.json | jq -r tostring); \
$(SED) -i -E 's!^(\s*)"authorization": (\[\]|null)!\1"authorization": '$$AUTH_CONTENT'!' ${HOME}/.pocket/config/genesis.json;
@cp -r ${HOME}/.pocket/keyring-test $(POCKETD_HOME)
Expand Down
4 changes: 2 additions & 2 deletions tiltfiles/env.Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ IGNITE_BUILD_TAGS_LOCAL = "--build.tags=ethereum_secp256k1"
IGNITE_BUILD_TAGS_CROSS = ""

# Unified build commands for different contexts
IGNITE_CMD_LOCAL = "ignite chain build %s --skip-proto --debug -v" % IGNITE_BUILD_TAGS_LOCAL
IGNITE_CMD_CROSS = "ignite chain build %s --skip-proto --debug -v" % IGNITE_BUILD_TAGS_CROSS
IGNITE_CMD_LOCAL = "ignite chain build %s --home $(HOME)/.pocket --skip-proto --debug -v" % IGNITE_BUILD_TAGS_LOCAL
IGNITE_CMD_CROSS = "ignite chain build %s --home $(HOME)/.pocket %s --skip-proto --debug -v" % IGNITE_BUILD_TAGS_CROSS

# Primary command for development (local + cross-compilation with CGO)
IGNITE_CMD = IGNITE_CMD_LOCAL
Expand Down
Loading