Skip to content

Commit

Permalink
Merge pull request #65 from xian-network/update-makefile
Browse files Browse the repository at this point in the history
Update makefile for cometbft
  • Loading branch information
Endogen authored Apr 4, 2024
2 parents 2a94c08 + 3510228 commit 9842a40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 52 deletions.
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://github.com/raw/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

0 comments on commit 9842a40

Please sign in to comment.