Refactoring/rename binary ogd#42
Refactoring/rename binary ogd#42khalifaT wants to merge 8 commits intochore/open-source-preparationfrom
Conversation
- Rename main binary from evmd to ogd throughout codebase - Update CLI command references in all shell scripts - Change home directory from .evmd to .ogd - Update Docker container names and image references - Rename script directory: tests/jsonrpc/scripts/evmd -> ogd - Rename script files: start-evmd.sh, stop-evmd.sh, container-start-evmd.sh - Update import path: evmd/cmd/evmd/cmd -> evmd/cmd/ogd/cmd
Changes: - Update all test compatibility scripts (hardhat, viem, common) - Update test_deployment.sh with ogd CLI commands - Update docker-compose.yml: rename service, container, env vars - Update tests/jsonrpc/README.md with ogd references - Change temp directories and log paths in scripts
Changes:
- evmd/app.go: Change appName constant from 'evmd' to 'ogd'
- evmd/README.md: Update binary name in configuration table
Documentation updates:
- precompiles/slashing: Update .evmd -> .ogd paths in docs and code
- precompiles/staking: Update CLI example (evmd -> ogd comet)
- tests/systemtests: Update README with ogd binary references
- tests/solidity: Update test helper messages and path references
- client/debug: Update example command chain-id
nces
Build/deployment updates:
- .github/workflows/aws-deploy.yml: Update Dockerfile path to ogd-env
- evmd/tests/network/util.go: Update node directory path
- tests/systemtests/chainupgrade: Update comment reference
There was a problem hiding this comment.
Pull request overview
Renames the project’s primary executable from evmd to ogd across build tooling, CLI entrypoints, scripts, docker/test infrastructure, and user-facing docs while keeping the Go module/package structure under evmd/ for compatibility.
Changes:
- Renamed/rewired the Go CLI entrypoint to build and execute as
ogd(including default home directory updates to.ogd). - Updated system/solidity/jsonrpc test harnesses and scripts to invoke
ogdinstead ofevmd. - Added
ogd-envdocker image scaffolding and updated CI to build from it.
Reviewed changes
Copilot reviewed 32 out of 38 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/systemtests/chainupgrade/v4_v5.go | Updates chain-upgrade system test references for renamed binary. |
| tests/systemtests/README.md | Updates systemtest instructions/examples to use ogd. |
| tests/solidity/test-helper.js | Updates logging/messages for renamed binary during solidity tests. |
| tests/solidity/suites/precompiles/test/5_slashing/queries.js | Updates comment path to .ogd home directory. |
| tests/jsonrpc/scripts/stop-networks.sh | Updates orchestration script to stop ogd instead of evmd. |
| tests/jsonrpc/scripts/start-networks.sh | Updates orchestration script to start ogd instead of evmd. |
| tests/jsonrpc/scripts/run-compat-test.sh | Updates JSON-RPC compat runner to use cosmos/ogd and .ogd data dir. |
| tests/jsonrpc/scripts/ogd/stop-ogd.sh | Adds/updates ogd stop script for JSON-RPC testing. |
| tests/jsonrpc/scripts/ogd/start-ogd.sh | Adds/updates ogd start/init script for JSON-RPC testing. |
| tests/jsonrpc/scripts/ogd/container-start-ogd.sh | Adds/updates container entry script to initialize/start ogd. |
| tests/jsonrpc/docker-compose.yml | Renames compose service/image to ogd and updates volumes/env. |
| tests/jsonrpc/README.md | Updates JSON-RPC compatibility docs to refer to ogd paths/scripts. |
| test_deployment.sh | Updates devnet deployment script commands/messages to ogd. |
| scripts/tests_compatibility_viem.sh | Updates viem compatibility script messaging for ogd. |
| scripts/tests_compatibility_hardhat.sh | Updates hardhat compatibility script messaging for ogd. |
| scripts/tests_compatibility_common.sh | Updates shared compatibility helpers to use ogd log naming/messages. |
| scripts/run-solidity-tests.sh | Updates solidity test runner temp dir/messages for ogd. |
| precompiles/staking/types.go | Updates CLI comment example to ogd. |
| precompiles/slashing/query.go | Updates .ogd home path in documentation comment. |
| precompiles/slashing/README.md | Updates .ogd home path reference in docs. |
| multi_node_startup.sh | Updates multi-node script commands/messages to ogd. |
| local_node.sh | Updates local node script commands/messages to ogd. |
| evmd/tests/network/util.go | Updates network test directory layout reference to ogd. |
| evmd/config/config.go | Changes default node home from .evmd to .ogd. |
| evmd/cmd/ogd/main.go | Switches main entrypoint import/execute name to ogd. |
| evmd/cmd/ogd/cmd/testnet_utils_test.go | Adds tests for config override parsing/apply behavior. |
| evmd/cmd/ogd/cmd/testnet_utils.go | Adds reflection-based config override application for testnet configs. |
| evmd/cmd/ogd/cmd/testnet_test.go | Adds tests for validator power parsing behavior. |
| evmd/cmd/ogd/cmd/testnet.go | Updates CLI examples/flags/help text from evmd to ogd. |
| evmd/cmd/ogd/cmd/root.go | Updates root command Use to ogd. |
| evmd/cmd/ogd/cmd/creator.go | Adds app creator/export wiring for the ogd command package. |
| evmd/app.go | Updates application name constant to ogd. |
| evmd/README.md | Updates user-facing readme binary name to ogd. |
| contrib/images/ogd-env/wrapper.sh | Adds wrapper script for ogd-env image. |
| contrib/images/ogd-env/Dockerfile | Adds docker build for ogd-env image. |
| client/debug/debug.go | Updates example CLI usage to --chain-id ogd-1. |
| Makefile | Renames build output binary to ogd and updates systemtest copy steps. |
| .github/workflows/aws-deploy.yml | Updates AWS deploy workflow to build using ogd-env Dockerfile. |
Comments suppressed due to low confidence (1)
evmd/tests/network/util.go:169
- This changes the per-validator node directory from
.../<moniker>/evmdto.../<moniker>/ogd, but the same test network package still creates and uses.../<nodeDirName>/evmdelsewhere (e.g. evmd/tests/network/network.go sets nodeDir to.../evmd). This inconsistency will likely cause genesis/config files to be written to one directory and read from another. Either update the rest of the network test harness to useogdconsistently or keep this directory name asevmdto match the existing layout.
nodeDir := filepath.Join(outputDir, vals[i].Moniker, "ogd")
gentxsDir := filepath.Join(outputDir, "gentxs")
cmtCfg.Moniker = vals[i].Moniker
cmtCfg.SetRoot(nodeDir)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Makefile
Outdated
| git checkout v0.5.0 | ||
| make build | ||
| cp $(BUILDDIR)/evmd ./tests/systemtests/binaries/v0.5 | ||
| cp $(BUILDDIR)/$(EXAMPLE_BINARY) ./tests/systemtests/binaries/v0.5 |
There was a problem hiding this comment.
build-v05 checks out tag v0.5.0 and runs make build there, which will produce the legacy binary name (very likely build/evmd). However this recipe then copies $(BUILDDIR)/$(EXAMPLE_BINARY) (now ogd), so the copy will fail and downstream system upgrade tests won’t have the legacy binary. Consider hardcoding the legacy filename for this target (or invoking make build EXAMPLE_BINARY=evmd while on v0.5.0) and then copying the resulting build/evmd into ./tests/systemtests/binaries/v0.5/.
| cp $(BUILDDIR)/$(EXAMPLE_BINARY) ./tests/systemtests/binaries/v0.5 | |
| cp $(BUILDDIR)/evmd ./tests/systemtests/binaries/v0.5 |
| upgradeHeight int64 = 12 | ||
| upgradeName = "v0.5.0-to-v0.6.0" // must match UpgradeName in evmd/upgrades.go | ||
| upgradeName = "v0.5.0-to-v0.6.0" // must match UpgradeName in ogd/upgrades.go | ||
| ) |
There was a problem hiding this comment.
The comment references ogd/upgrades.go, but the UpgradeName constant is currently defined in evmd/upgrades.go. This comment should match the actual file location to avoid confusion during future upgrades/refactors.
| legacyBinary := systest.WorkDir + "/binaries/v0.5/ogd" | ||
| sut.SetExecBinary(legacyBinary) | ||
| sut.SetTestnetInitializer(systest.InitializerWithBinary(legacyBinary, sut)) |
There was a problem hiding this comment.
The system upgrade test now expects the legacy (v0.5) binary to be at .../binaries/v0.5/ogd, but the build-v05 Makefile target checks out v0.5.0 and will most likely produce the legacy binary as evmd (not ogd). This mismatch will cause the chain upgrade scenario to fail when it tries to start the legacy chain. Either keep the legacy binary path as .../evmd for v0.5, or ensure the build-v05 step renames/copies the legacy binary to ogd in that folder.
| # evmd is a separate module under ./evmd | ||
| EVMD_DIR := evmd | ||
| EVMD_MAIN_PKG := ./cmd/evmd | ||
| EVMD_MAIN_PKG := ./cmd/ogd | ||
|
|
There was a problem hiding this comment.
PR description mentions updating localnet/docker targets for the renamed binary/image, but the top-level Makefile still has localnet targets that reference contrib/images evmd-env and cosmos/evmd (see Makefile lines ~364-370). This looks like an incomplete rename and will prevent make localnet-build-env / make localnet-start from producing/using the cosmos/ogd image as intended.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 34 out of 39 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
contrib/images/ogd-env/Dockerfile:35
- The image build still copies
/work/build/evmdinto the runtime image, butmake buildnow outputsbuild/ogd(see root Makefile). This will make the Docker build fail (or produce an image without anogdbinary on PATH), breakinglocalnet-build-envand the JSON-RPC scripts that runogd .... Update the artifact paths (and the linkage check) to use the new binary name.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| mkdir -p ./tests/systemtests/binaries/v0.5 | ||
| git checkout v0.5.0 | ||
| make build | ||
| cp $(BUILDDIR)/evmd ./tests/systemtests/binaries/v0.5 | ||
| cp $(BUILDDIR)/$(EXAMPLE_BINARY) ./tests/systemtests/binaries/v0.5 | ||
| git checkout - |
|
|
||
| legacyBinary := systest.WorkDir + "/binaries/v0.5/evmd" | ||
| legacyBinary := systest.WorkDir + "/binaries/v0.5/ogd" | ||
| sut.SetExecBinary(legacyBinary) |
| COPY contrib/images/ogd-env/wrapper.sh /usr/bin/wrapper.sh | ||
| COPY test_deployment.sh /usr/bin/test_deployment.sh | ||
| COPY multi_node_startup.sh /usr/bin/multi_node_startup.sh | ||
| COPY --from=evmd-builder /work/build/evmd /evmd/ |
There was a problem hiding this comment.
this could be an issue due to workdir diff
b4335d9 to
910ac9b
Compare
Rename binary from
evmdtoogd📋 Summary
Complete rename of the main binary from
evmdtoogd. All user-facing references updated while preserving Go module structure and internal type names for compatibility.📝 Changes
Core Binary & Build System
evmd/cmd/evmd/→evmd/cmd/ogd/EXAMPLE_BINARY := ogdevmd/app.go:const appName = "ogd"main.go:evmd/cmd/ogd/cmd~/.evmd→~/.ogdShell Scripts (10+ files)
local_node.sh- Allevmdcommands →ogdmulti_node_startup.sh- Allevmdcommands →ogdtest_deployment.sh- Allevmdcommands →ogdscripts/run-solidity-tests.sh- Temp directory and commentsscripts/tests_compatibility_*.sh- Echo messages and log pathstests/jsonrpc/scripts/ogd/Docker & Container Configuration
cosmos/evmd→cosmos/ogdcontrib/images/evmd-env/→contrib/images/ogd-env/ogdevmd-*→ogd-*EVMDHOME→OGDHOME,EVMD_URL→OGD_URLdocker-compose.ymltests/jsonrpc/scripts/evmd/→tests/jsonrpc/scripts/ogd/start-evmd.sh→start-ogd.shstop-evmd.sh→stop-ogd.shcontainer-start-evmd.sh→container-start-ogd.shCI/CD & Deployment
.github/workflows/aws-deploy.yml- Dockerfile path updated toogd-envogd-env,localnet-build-envDocumentation
evmd/README.md- Binary name in configuration tabletests/jsonrpc/README.md- All references to binary and pathstests/systemtests/README.md- Binary paths and examplesprecompiles/slashing/README.md&query.go- Path references (.evmd→.ogd)precompiles/staking/types.go- CLI example (evmd comet→ogd comet)client/debug/debug.go- Example command updatedtests/solidity/test-helper.js- Messages and loggingtests/solidity/suites/precompiles/test/5_slashing/queries.js- Path commentevmd/tests/network/util.go- Directory path in test setupConfiguration Files
evmd/config/config.go- Home directory path update✅ Preserved (Intentionally Unchanged)
To maintain compatibility with upstream and avoid breaking changes:
github.com/cosmos/evm/evmdpackage evmdtype EVMD structevmd/directory nameevmDenom,EvmDenomvariablestest-evmdMakefile targetcoverage_evmd.txtEVMD_DIRMakefile variablePACKAGES_EVMDvariable🧪 Testing
Verified the following work correctly:
Local Build & Execution
Docker
Local Development
Tests