Skip to content

chore: add Makefile and MakefileEc2.mk, update README#78

Open
panos-xyz wants to merge 3 commits intomainfrom
chore/add-makefile
Open

chore: add Makefile and MakefileEc2.mk, update README#78
panos-xyz wants to merge 3 commits intomainfrom
chore/add-makefile

Conversation

@panos-xyz
Copy link
Copy Markdown
Contributor

@panos-xyz panos-xyz commented Apr 3, 2026

Summary

  • Add Makefile with build, test (unit + e2e), lint, docker, and clean targets
  • Add MakefileEc2.mk for internal S3 deployment (mainnet, hoodi, qanet)
  • Update README: chainspecs now scheduled through Jade, clarify state root behavior, add --rpc.eth-proof-window to CLI flags
  • Add .claude/ and .omc/ to .gitignore

Test plan

  • make help displays all targets correctly
  • make build compiles morph-reth binary
  • make fmt and make clippy pass
  • make test runs unit tests

Summary by CodeRabbit

  • New Features

    • Added --rpc.eth-proof-window CLI flag for configuring historical block availability in eth_getProof.
    • New build/test/packaging targets to simplify building, testing, formatting, and publishing releases.
  • Documentation

    • Updated hardfork notes: Jade activation timeline and state-root validation behavior clarified.
  • Chores

    • Workspace package version bumped (0.1.0 → 0.2.0) and gitignore updated to exclude additional local tool directories.

- Add Makefile with build, test, lint, docker and clean targets
- Add MakefileEc2.mk for internal S3 deployment (mainnet, hoodi, qanet)
- Update README: chainspecs now scheduled through Jade (not Emerald)
- Update README: clarify ZK-trie state root validation behavior
- Update README: add --rpc.eth-proof-window to CLI flags table
- Add .claude/ and .omc/ to .gitignore
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

Version bumped to 0.2.0 in workspace configuration. Gitignore patterns expanded for .claude/ and .omc/ directories. Two new Makefiles added: one for comprehensive build/test/lint/Docker workflows, another for EC2 deployment automation with S3 uploads. README updated with Jade hardfork state-root validation details and new --rpc.eth-proof-window CLI flag documentation.

Changes

Cohort / File(s) Summary
Configuration & Version Management
/.gitignore, Cargo.toml
Added .claude/ and .omc/ to .gitignore; bumped [workspace.package].version from 0.1.00.2.0.
Build & Deployment Automation
Makefile, MakefileEc2.mk
Added top-level Makefile with build, install, test, lint, Docker build/push, tarball release, and clean targets; added MakefileEc2.mk providing cargo build + tarball creation and S3 upload targets for EC2 deployment.
Documentation
README.md
Updated hardfork documentation to indicate Jade activation and state-root validation behavior (pre-Jade ZK-trie; Jade onward MPT); documented new CLI flag --rpc.eth-proof-window (default 0).

Sequence Diagram(s)

(omitted — changes are build/docs/configuration additions without new multi-component runtime control flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • chengwenxi
  • anylots

Poem

🐰 A tiny bump, a Makefile new,
Ignore a folder or maybe two,
Jade now wakes, proofs get a tune,
Tarballs pack up beneath the moon,
I hop and cheer — release comes soon! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding two Makefiles and updating the README, which are the primary modifications across all files in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-makefile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
Makefile (1)

21-23: Add a required all phony target to satisfy checkmake (minphony) rule.

The Makefile is missing the required all target, which triggers a minphony violation. This target should be the default aggregate entrypoint.

Proposed fix
 .PHONY: help
 help: ## Display this help.
 	`@awk` 'BEGIN {FS = ":.*##"; printf "Usage:\n  make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf "  \033[36m%-30s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
+
+.PHONY: all
+all: build ## Default aggregate target.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 21 - 23, Add a default aggregate phony target named
"all" to satisfy the checkmake minphony rule: declare it as phony (extend the
existing .PHONY list to include all) and implement an "all" target that depends
on the top-level entrypoint (e.g., make all: help or other primary targets) so
running `make` runs the aggregate; update any existing .PHONY declarations and
ensure "help" remains untouched.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile`:
- Line 5: GIT_TAG assignment in the Makefile fails when the repo has no tags;
change the GIT_TAG ?= $(shell git describe --tags --abbrev=0) assignment to a
shell command that falls back to a safe default when describe fails (for example
return a fallback string like "v0.0.0" or the short commit hash) so the
build-release-tarballs, docker-build-push and docker-build-push-latest targets
that depend on GIT_TAG do not break; update the GIT_TAG definition accordingly
to try git describe and emit the fallback on error.

In `@MakefileEc2.mk`:
- Around line 10-11: MakefileEc2.mk currently hardcodes the release target and
path; update the EC2 build macro to use the configurable variables used in the
main Makefile: invoke cargo build with --target-dir $(CARGO_TARGET_DIR) and
--profile $(PROFILE) (instead of --release) while keeping --bin $(BINARY), and
change the copy source to $(CARGO_TARGET_DIR)/$(PROFILE)/$(BINARY) when copying
to $(DIST_DIR); modify the two lines that call cargo build and cp accordingly so
the macro respects CARGO_TARGET_DIR, PROFILE, BINARY, and DIST_DIR.

---

Nitpick comments:
In `@Makefile`:
- Around line 21-23: Add a default aggregate phony target named "all" to satisfy
the checkmake minphony rule: declare it as phony (extend the existing .PHONY
list to include all) and implement an "all" target that depends on the top-level
entrypoint (e.g., make all: help or other primary targets) so running `make`
runs the aggregate; update any existing .PHONY declarations and ensure "help"
remains untouched.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f366b392-271a-40f7-8e6b-449357fc331b

📥 Commits

Reviewing files that changed from the base of the PR and between 42d7ede and c4ec2ed.

📒 Files selected for processing (5)
  • .gitignore
  • Cargo.toml
  • Makefile
  • MakefileEc2.mk
  • README.md

- Add GIT_TAG fallback to short SHA when no tags exist
- Use configurable CARGO_TARGET_DIR and PROFILE in MakefileEc2.mk
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
Makefile (1)

128-131: Consider adding a phony all target to satisfy checkmake minphony.

This is optional, but it will remove the current linter warning and provides a conventional entrypoint.

Proposed fix
+.PHONY: all
+all: build ## Default build target.
+
 .PHONY: clean
 clean: ## Clean build artifacts and the dist directory.
 	cargo clean
 	rm -rf $(BIN_DIR)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 128 - 131, Add a phony "all" target to the Makefile to
satisfy checkmake's minphony rule: declare .PHONY: all (alongside the existing
.PHONY: clean) and add a minimal all target (e.g., all: build or all: default)
as the conventional entrypoint so the linter warning disappears; update any
existing .PHONY line to include "all" and ensure the new target references the
appropriate build target (such as the same target that produces $(BIN_DIR) or
the existing build workflow).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile`:
- Around line 57-59: The Makefile 'test' target description says "unit only,
fast" but currently runs `cargo test --all`; update the target so the command
matches the description by replacing `cargo test --all` with a unit-only
invocation such as `cargo test --lib --bins` (or alternatively change the
description to reflect that it runs all tests if you prefer to keep `cargo test
--all`); edit the `test` target to use `cargo test --lib --bins` (or update the
comment) so `test` and its command are consistent.

---

Nitpick comments:
In `@Makefile`:
- Around line 128-131: Add a phony "all" target to the Makefile to satisfy
checkmake's minphony rule: declare .PHONY: all (alongside the existing .PHONY:
clean) and add a minimal all target (e.g., all: build or all: default) as the
conventional entrypoint so the linter warning disappears; update any existing
.PHONY line to include "all" and ensure the new target references the
appropriate build target (such as the same target that produces $(BIN_DIR) or
the existing build workflow).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f65e48de-f20d-4184-9ac7-8c670af544e4

📥 Commits

Reviewing files that changed from the base of the PR and between c4ec2ed and 44fece3.

📒 Files selected for processing (2)
  • Makefile
  • MakefileEc2.mk
✅ Files skipped from review due to trivial changes (1)
  • MakefileEc2.mk

@panos-xyz panos-xyz requested a review from chengwenxi April 3, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant