Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update makefile for cometbft #65

Merged
merged 3 commits into from
Apr 4, 2024
Merged
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
54 changes: 4 additions & 50 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
# Origin
version_branch = v0.34.24
tendermint = https://raw.githubusercontent.com/tendermint/tendermint/$(version_branch)

# Outputs
tmabci = protos/tendermint/abci/types.proto
tmtypes = protos/tendermint/types/types.proto
tmpubkey = protos/tendermint/crypto/keys.proto
tmproof = protos/tendermint/crypto/proof.proto
tmparams = protos/tendermint/types/params.proto
tmversions = protos/tendermint/version/types.proto
tmvalidator = protos/tendermint/types/validator.proto

# Only run this to rebuild/update protobufs from the tendermint source
update-proto:
curl $(tendermint)/proto/tendermint/abci/types.proto > $(tmabci)
curl $(tendermint)/proto/tendermint/crypto/keys.proto > $(tmpubkey)
curl $(tendermint)/proto/tendermint/crypto/proof.proto > $(tmproof)
curl $(tendermint)/proto/tendermint/types/params.proto > $(tmparams)
curl $(tendermint)/proto/tendermint/types/types.proto > $(tmtypes)
curl $(tendermint)/proto/tendermint/types/validator.proto > $(tmvalidator)
curl $(tendermint)/proto/tendermint/version/types.proto > $(tmversions)
curl $(tendermint)/version/version.go | grep -F -eTMVersionDefault -eABCISemVer > tm_version.txt
@python build_proto.py

test_tm:
@rm -Rf .test_pyabci
@tendermint --home .test_pyabci init
@tendermint --home .test_pyabci node

test:
pytest .
Expand All @@ -37,44 +8,27 @@ dev:
clean:
@rm -Rf dist/

# PyPi package deploy:
# 1. build-dist
# 2. test-pypi
# 3. update-pypi
build-dist:
python -m build

publish-test:
twine upload dist/* --repository testpypi

publish:
twine upload dist/* --repository pypi

rc:
cp ~/.tendermint/xian ~/.tendermint/xian_last -r
rm -rf ~/.tendermint/xian

wipe:
rm -rf ~/.tendermint/xian
./tendermint unsafe-reset-all

up:
cd ./src/xian && CONFIG_PATH=config/config-testnet.toml pm2 start xian_abci.py
pm2 start "./tendermint node --rpc.laddr tcp://0.0.0.0:26657" --name tendermint
pm2 start "./cometbft node --rpc.laddr tcp://0.0.0.0:26657" --name cometbft
pm2 logs --lines 1000

down:
pm2 delete tendermint xian_abci
pm2 delete cometbft xian_abci

restart:
make down
make up

init:
./tendermint init
./cometbft init

node-id:
./tendermint show-node-id
./cometbft show-node-id

dwu:
make down
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Set up the environment on Ubuntu 22.04 with the following steps:
```
git clone https://github.com/xian-network/xian-core.git
cd xian-core
git clone https://github.com/XianChain/contracting.git
git clone https://github.com/xian-network/contracting.git
```

4. Set up Python virtual environment and dependencies:
Expand All @@ -39,7 +39,7 @@ Set up the environment on Ubuntu 22.04 with the following steps:
rm cometbft_0.38.6_linux_amd64.tar.gz
./cometbft init
---- LOCAL ----
python src/xian/tools/configure.py --moniker "Node" --copy-genesis True --genesis-file-name genesis.json --validator_privkey "cd6cc45ffe7cebf09c6c6025575d50bb42c6c70c07e1dbc5150aaadc98705c2b"
python src/xian/tools/configure.py --moniker "Node" --copy-genesis True --genesis-file-name genesis.json --validatorprivkey "cd6cc45ffe7cebf09c6c6025575d50bb42c6c70c07e1dbc5150aaadc98705c2b"
---- JOIN TESTNET ----
python src/xian/tools/configure.py --moniker "Node" --copy-genesis True --genesis-file-name genesis-testnet.json --seed-node "91.108.112.184" --validator-privkey "7d53884dcc7aa3095aa594c905752698f8323f91848556725f642a7e86589d5a"
./cometbft node --rpc.laddr tcp://0.0.0.0:26657
Expand Down