Skip to content

Commit

Permalink
refactor(chain): rename binary to world-evm (#393)
Browse files Browse the repository at this point in the history
Co-authored-by: Heronimus Adie <adie@heronimus.id>
  • Loading branch information
technicallyty and heronimus authored Nov 3, 2023
1 parent e874637 commit a0c83b0
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 66 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker images
uses: ScribeMD/docker-cache@0.3.4
with:
key: docker-${{ runner.os }}-${{ hashFiles('chain/Dockerfile') }}
# - name: Cache Docker images
# uses: ScribeMD/docker-cache@0.3.4
# with:
# key: docker-${{ runner.os }}-${{ hashFiles('chain/Dockerfile') }}
- name: Forge Build chain/contracts
run: make forge-build
- name: Build Rollup
Expand Down
2 changes: 1 addition & 1 deletion chain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ forge-build: |
@forge build --extra-output-files bin --extra-output-files abi --root chain/precompile/contracts

rollup-build:
cd chain && docker compose build
@docker build chain
4 changes: 2 additions & 2 deletions chain/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Compile the argus binary
FROM golang:1.21-bullseye AS argusd-builder
FROM golang:1.21.0-bullseye AS argusd-builder
WORKDIR /src/app/
COPY go.mod go.sum* ./
COPY . .
Expand All @@ -9,7 +9,7 @@ RUN CGO_ENABLED=1 make install

# build on ubuntu
FROM ubuntu:18.04
COPY --from=argusd-builder /go/bin/world /usr/local/bin/
COPY --from=argusd-builder /go/bin/world-evm /usr/local/bin/
EXPOSE 26656 26657 1317 9090 8546 8545 9601

USER 0
Expand Down
2 changes: 1 addition & 1 deletion chain/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif

CMTVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')
BUILDDIR ?= $(CURDIR)/build
ARGUS_CMD := $(CURDIR)/cmd/world
ARGUS_CMD := $(CURDIR)/cmd/world-evm

export GO111MODULE = on

Expand Down
2 changes: 1 addition & 1 deletion chain/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func init() {
panic(err)
}

DefaultNodeHome = filepath.Join(userHomeDir, ".world")
DefaultNodeHome = filepath.Join(userHomeDir, ".world-evm")
}

// NewApp returns a reference to an initialized App.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ func NewRootCmd() *cobra.Command {
WithKeyringOptions(keyring.EthSecp256k1Option())

rootCmd := &cobra.Command{
Use: "world",
Short: "world engine application",
Use: "world-evm",
Short: "world engine EVM base shard",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs
cmd.SetOut(cmd.OutOrStdout())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"

simapp "pkg.world.dev/world-engine/chain/app"
"pkg.world.dev/world-engine/chain/cmd/world/cmd"
"pkg.world.dev/world-engine/chain/cmd/world-evm/cmd"

"github.com/cosmos/cosmos-sdk/client/flags"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
Expand Down
2 changes: 1 addition & 1 deletion chain/cmd/world/main.go → chain/cmd/world-evm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

simapp "pkg.world.dev/world-engine/chain/app"
"pkg.world.dev/world-engine/chain/cmd/world/cmd"
"pkg.world.dev/world-engine/chain/cmd/world-evm/cmd"
"pkg.world.dev/world-engine/chain/config"
"pkg.world.dev/world-engine/chain/types"
)
Expand Down
40 changes: 0 additions & 40 deletions chain/docker-compose.yml

This file was deleted.

26 changes: 13 additions & 13 deletions chain/scripts/start-rollup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ echo "DA_NAMESPACE_ID: $DA_NAMESPACE_ID"
echo "DA_CONFIG: $DA_CONFIG"

# World Engine Chain Config & Init
world comet unsafe-reset-all
rm -rf /root/.world/
world-evm comet unsafe-reset-all
rm -rf /root/.world-evm/

world init $VALIDATOR_NAME --chain-id $CHAIN_ID
world-evm init $VALIDATOR_NAME --chain-id $CHAIN_ID

printf "enact adjust liberty squirrel bulk ticket invest tissue antique window thank slam unknown fury script among bread social switch glide wool clog flag enroll\n\n" | world keys add $KEY_NAME --keyring-backend="test" --algo="eth_secp256k1" -i
world genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test
world genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test
world genesis collect-gentxs
printf "enact adjust liberty squirrel bulk ticket invest tissue antique window thank slam unknown fury script among bread social switch glide wool clog flag enroll\n\n" | world-evm keys add $KEY_NAME --keyring-backend="test" --algo="eth_secp256k1" -i
world-evm genesis add-genesis-account $KEY_NAME $TOKEN_AMOUNT --keyring-backend test
world-evm genesis gentx $KEY_NAME $STAKING_AMOUNT --chain-id $CHAIN_ID --keyring-backend test
world-evm genesis collect-gentxs

sed -i'.bak' 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' /root/.world/config/config.toml
sed -i'.bak' 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' /root/.world-evm/config/config.toml

sed -i '/api\]/,/\[/ s/enable = false/enable = true/' /root/.world/config/app.toml
sed -i '/api\]/,/\[/ s/enable = false/enable = true/' /root/.world-evm/config/app.toml

# Cosmos SDK gRPC listener
sed -i'.bak' 's#"localhost:9090"#"0.0.0.0:9090"#g' /root/.world/config/app.toml
sed -i'.bak' 's#"localhost:9090"#"0.0.0.0:9090"#g' /root/.world-evm/config/app.toml
# Cosmos SDK API server listener
sed -i'.bak' 's#localhost:1317#0.0.0.0:1317#g' /root/.world/config/app.toml
sed -i'.bak' 's#localhost:1317#0.0.0.0:1317#g' /root/.world-evm/config/app.toml

sed -i 's/"stake"/"ether"/g' /root/.world/config/genesis.json
sed -i 's/"stake"/"ether"/g' /root/.world-evm/config/genesis.json

world start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config=$DA_CONFIG --rollkit.namespace_id $DA_NAMESPACE_ID --rollkit.da_start_height $DA_BLOCK_HEIGHT --rollkit.block_time $BLOCK_TIME --minimum-gas-prices 0eth
world-evm start --rollkit.aggregator true --rollkit.da_layer celestia --rollkit.da_config=$DA_CONFIG --rollkit.namespace_id $DA_NAMESPACE_ID --rollkit.da_start_height $DA_BLOCK_HEIGHT --rollkit.block_time $BLOCK_TIME --minimum-gas-prices 0eth

0 comments on commit a0c83b0

Please sign in to comment.