Skip to content

Commit

Permalink
Merge pull request #771 from maticnetwork/vcastellm/pos-133-deploy-he…
Browse files Browse the repository at this point in the history
…imdall-v030-binary

Do not build or run bridge
  • Loading branch information
Victor Castell authored Feb 7, 2022
2 parents c9e1695 + 89cbfee commit d974904
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 117 deletions.
70 changes: 0 additions & 70 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,70 +132,6 @@ builds:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -linkmode external -extldflags "-static"

# bridge

- &xbuildbridge
id: bridge-darwin-amd64
main: ./bridge/bridge.go
binary: bridge
goos:
- darwin
goarch:
- amd64
tags:
- netgo
env:
- CC=o64-clang
- CXX=o64-clang++
ldflags:
- -s -w
- -X github.com/maticnetwork/heimdall/version.Name=heimdall
- -X github.com/maticnetwork/heimdall/version.ServerName=heimdalld
- -X github.com/maticnetwork/heimdall/version.ClientName=heimdallcli
- -X github.com/maticnetwork/heimdall/version.Version={{.Version}}
- -X github.com/maticnetwork/heimdall/version.Commit={{.Commit}}
- -X github.com/cosmos/cosmos-sdk/version.Name=heimdall
- -X github.com/cosmos/cosmos-sdk/version.ServerName=heimdalld
- -X github.com/cosmos/cosmos-sdk/version.ClientName=heimdallcli
- -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}

- <<: *xbuildbridge
id: bridge-darwin-arm64
goos:
- darwin
goarch:
- arm64
env:
- CC=oa64-clang
- CXX=oa64-clang++

- <<: *xbuildbridge
id: bridge-linux-amd64
goos:
- linux
goarch:
- amd64
env:
- CC=gcc
- CXX=g++
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -linkmode external -extldflags "-static"

- <<: *xbuildbridge
id: bridge-linux-arm64
goos:
- linux
goarch:
- arm64
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -linkmode external -extldflags "-static"

nfpms:
- vendor: 0xPolygon
homepage: https://polygon.technology
Expand All @@ -212,12 +148,6 @@ nfpms:
- src: builder/files/heimdalld.service
dst: /lib/systemd/system/heimdalld.service
type: config
- src: builder/files/heimdalld-rest-server.service
dst: /lib/systemd/system/heimdalld-rest-server.service
type: config
- src: builder/files/heimdalld-bridge.service
dst: /lib/systemd/system/heimdalld-bridge.service
type: config
- src: builder/files/genesis-mainnet-v1.json
dst: /etc/heimdall/genesis-mainnet-v1.json
type: config
Expand Down
46 changes: 0 additions & 46 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ build: clean
mkdir -p build
go build -o build/heimdalld ./cmd/heimdalld
go build -o build/heimdallcli ./cmd/heimdallcli
go build -o build/bridge bridge/bridge.go
@echo "====================================================\n==================Build Successful==================\n===================================================="

# make install
install:
go install $(BUILD_FLAGS) ./cmd/heimdalld
go install $(BUILD_FLAGS) ./cmd/heimdallcli
go install $(BUILD_FLAGS) bridge/bridge.go

contracts:
abigen --abi=contracts/rootchain/rootchain.abi --pkg=rootchain --out=contracts/rootchain/rootchain.go
Expand All @@ -48,50 +46,6 @@ contracts:
abigen --abi=contracts/validatorset/validatorset.abi --pkg=validatorset --out=contracts/validatorset/validatorset.go
abigen --abi=contracts/erc20/erc20.abi --pkg=erc20 --out=contracts/erc20/erc20.go


init-heimdall:
./build/heimdalld init

show-account-heimdall:
./build/heimdalld show-account

show-node-id:
./build/heimdalld tendermint show-node-id

run-heimdall:
./build/heimdalld start

start-heimdall:
mkdir -p ./logs &
./build/heimdalld start > ./logs/heimdalld.log &

reset-heimdall:
./build/heimdalld unsafe-reset-all
./build/bridge purge-queue
rm -rf ~/.heimdalld/bridge

run-server:
./build/heimdalld rest-server

start-server:
mkdir -p ./logs &
./build/heimdalld rest-server > ./logs/heimdalld-rest-server.log &

start:
mkdir -p ./logs
bash docker/start.sh

run-bridge:
./build/bridge start --all

start-bridge:
mkdir -p logs &
./build/bridge start --all > ./logs/bridge.log &

start-all:
mkdir -p ./logs
bash docker/start-heimdall.sh

#
# Code quality
#
Expand Down
5 changes: 4 additions & 1 deletion builder/files/heimdalld.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
Restart=on-failure
RestartSec=5s
WorkingDirectory=/usr/local/bin
ExecStart=/usr/local/bin/heimdalld start --home /var/lib/heimdall --bridge --rest-server
ExecStart=/usr/local/bin/heimdalld start --home /var/lib/heimdall \
--chain=mainnet \
--bridge \
--rest-server
Type=simple
User=root
[Install]
Expand Down

0 comments on commit d974904

Please sign in to comment.