Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
go-version-file: ./go.mod
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Benchmarks' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Build binaries
run: make build-evm build-da
run: just build-evm build-da
- name: Run EVM benchmarks
run: |
cd test/e2e && go test -tags evm -bench=. -benchmem -run='^$' \
Expand Down Expand Up @@ -53,8 +55,10 @@
go-version-file: ./go.mod
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Benchmarks' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Build binaries
run: make build-evm build-da
run: just build-evm build-da
- name: Run Spamoor smoke test
run: |
cd test/e2e && BENCH_JSON_OUTPUT=spamoor_bench.json go test -tags evm \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dependabot-auto-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
with:
go-version-file: ./go.mod

- name: Install make (if missing)
run: sudo apt-get update && sudo apt-get install -y make
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Dependabot Go Autofix' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash

- name: Run dependency update
run: make deps
run: just deps

- name: Commit and push changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "chore: run make deps after Dependabot update"
git commit -m "chore: run just deps after Dependabot update"
git push
else
echo "No changes to commit."
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
uses: actions/setup-go@v6.2.0
with:
go-version-file: ./test/docker-e2e/go.mod
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Docker E2E Tests' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Run Docker E2E Tests
run: make test-docker-e2e
run: just test-docker-e2e
env:
EV_NODE_IMAGE_REPO: ghcr.io/${{ github.repository_owner }}/ev-node-testapp
EV_NODE_IMAGE_TAG: ${{ inputs.image-tag }}
Expand All @@ -44,8 +46,10 @@
uses: actions/setup-go@v6.2.0
with:
go-version-file: ./test/docker-e2e/go.mod
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Docker E2E Tests' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Run Docker Upgrade E2E Tests
run: make test-docker-upgrade-e2e
run: just test-docker-upgrade-e2e
env:
EVM_IMAGE_REPO: ghcr.io/${{ github.repository_owner }}/ev-node-evm
EVM_NODE_IMAGE_TAG: ${{ inputs.image-tag }}
Expand All @@ -61,8 +65,10 @@
uses: actions/setup-go@v6.2.0
with:
go-version-file: ./test/docker-e2e/go.mod
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Docker E2E Tests' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Run Docker Compat E2E Tests
run: make test-docker-compat
run: just test-docker-compat
env:
SEQUENCER_EVM_IMAGE_REPO: ghcr.io/${{ github.repository_owner }}/ev-node-evm
SEQUENCER_EVM_IMAGE_TAG: main # TODO: set this to the last released tag
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
uses: actions/setup-go@v6.2.0
with:
go-version-file: ./go.mod
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests / Code Coverage' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Build all ev-node binaries
run: make build-all
run: just build-all

go_mod_tidy_check:
name: Go Mod Tidy Check
Expand All @@ -28,7 +30,8 @@
- uses: actions/setup-go@v6.2.0
with:
go-version-file: ./go.mod
- run: make deps
- uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests / Code Coverage' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- run: just deps
- name: check for diff
run: git diff --exit-code

Expand All @@ -44,8 +47,10 @@
uses: actions/setup-go@v6.2.0
with:
go-version-file: ./go.mod
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests / Code Coverage' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Run unit test
run: make test-cover
run: just test-cover
- name: Upload unit test coverage report
uses: actions/upload-artifact@v6
with:
Expand All @@ -61,8 +66,10 @@
uses: actions/setup-go@v6.2.0
with:
go-version-file: ./go.mod
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests / Code Coverage' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: Run integration test
run: make test-integration-cover
run: just test-integration-cover
- name: Upload integration test coverage report
uses: actions/upload-artifact@v6
with:
Expand Down Expand Up @@ -93,8 +100,10 @@
tags: evstack:local-dev
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests / Code Coverage' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: E2E Tests
run: make test-e2e
run: just test-e2e

evm-tests:
name: Run EVM Execution Tests
Expand All @@ -106,8 +115,10 @@
uses: actions/setup-go@v6.2.0
with:
go-version-file: ./go.mod
- name: Install just
uses: extractions/setup-just@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests / Code Coverage' step
Uses Step
uses 'extractions/setup-just' with ref 'v3', not a pinned commit hash
- name: EVM Tests
run: make test-evm
run: just test-evm

combine_and_upload_coverage:
name: Combine and Upload Coverage
Expand Down
71 changes: 71 additions & 0 deletions .just/build.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Build Testapp CLI
[group('build')]
build:
@echo "--> Building Testapp CLI"
@mkdir -p {{ build_dir }}
@cd apps/testapp && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/testapp .
@echo "--> Testapp CLI Built!"
@echo " Check the version with: build/testapp version"
@echo " Check the binary with: {{ build_dir }}/testapp"
Comment on lines +8 to +9
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistent path reference in echo message.

Line 8 uses a hardcoded path build/testapp while Line 9 correctly uses {{ build_dir }}/testapp. This could cause confusion if build_dir is changed.

🔧 Proposed fix
     `@echo` "--> Testapp CLI Built!"
-    `@echo` "    Check the version with: build/testapp version"
+    `@echo` "    Check the version with: {{ build_dir }}/testapp version"
     `@echo` "    Check the binary with: {{ build_dir }}/testapp"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@echo " Check the version with: build/testapp version"
@echo " Check the binary with: {{ build_dir }}/testapp"
`@echo` " Check the version with: {{ build_dir }}/testapp version"
`@echo` " Check the binary with: {{ build_dir }}/testapp"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.just/build.just around lines 8 - 9, The echo messages are inconsistent: one
hardcodes "build/testapp" while the other uses the template variable "{{
build_dir }}/testapp"; update the first echo to use the same build_dir variable
so both lines reference "{{ build_dir }}/testapp" (edit the echo string in the
`@echo` that currently prints "Check the binary with: build/testapp" to use "{{
build_dir }}/testapp" instead).


# Install Testapp CLI to Go bin directory
[group('build')]
install:
@echo "--> Installing Testapp CLI"
@cd apps/testapp && go install -ldflags "{{ ldflags }}" .
@echo "--> Testapp CLI Installed!"
@echo " Check the version with: testapp version"
@echo " Check the binary with: which testapp"

# Build all ev-node binaries
[group('build')]
build-all:
@echo "--> Building all ev-node binaries"
@mkdir -p {{ build_dir }}
@echo "--> Building testapp"
@cd apps/testapp && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/testapp .
@echo "--> Building evm"
@cd apps/evm && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/evm .
@echo "--> Building local-da"
@cd tools/local-da && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/local-da .
@echo "--> All ev-node binaries built!"

# Build Testapp Bench
[group('build')]
build-testapp-bench:
@echo "--> Building Testapp Bench"
@mkdir -p {{ build_dir }}
@cd apps/testapp && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/testapp-bench ./kv/bench
@echo " Check the binary with: {{ build_dir }}/testapp-bench"

# Build EVM binary
[group('build')]
build-evm:
@echo "--> Building EVM"
@mkdir -p {{ build_dir }}
@cd apps/evm && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/evm .
@echo " Check the binary with: {{ build_dir }}/evm"

# Build local-da binary
[group('build')]
build-da:
@echo "--> Building local-da"
@mkdir -p {{ build_dir }}
@cd tools/local-da && go build -ldflags "{{ ldflags }}" -o {{ build_dir }}/local-da .
@echo " Check the binary with: {{ build_dir }}/local-da"

# Build Docker image for local testing
[group('build')]
docker-build:
@echo "--> Building Docker image for local testing"
@docker build -t evstack:local-dev -f apps/testapp/Dockerfile .
@echo "--> Docker image built: evstack:local-dev"
@echo "--> Checking if image exists locally..."
@docker images evstack:local-dev

# Clean build artifacts
[group('build')]
clean:
@echo "--> Cleaning build directory"
@rm -rf {{ build_dir }}
@echo "--> Build directory cleaned!"
18 changes: 18 additions & 0 deletions .just/codegen.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generate mocks
[group('codegen')]
mock-gen:
@echo "-> Generating mocks"
go run github.com/vektra/mockery/v3@latest

# Install dependencies and tidy all modules
[group('codegen')]
deps:
@echo "--> Installing dependencies"
@go mod download
@go mod tidy
@go run scripts/tidy.go
Comment on lines +9 to +13
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's look at the full codegen.just file to see both recipes
cat -n .just/codegen.just

Repository: evstack/ev-node

Length of output: 578


🏁 Script executed:

# Check for build constraints in scripts/tidy.go
head -30 scripts/tidy.go

Repository: evstack/ev-node

Length of output: 704


Add -tags=tidy flag to deps recipe on line 13.

The scripts/tidy.go file has a //go:build tidy build constraint (line 1), which requires the -tags=tidy flag to compile. Line 13 runs the script without this flag, causing it to fail. Align with the tidy-all recipe on line 18, which correctly includes -tags=tidy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.just/codegen.just around lines 9 - 13, The deps recipe currently runs "go
run scripts/tidy.go" without the build tag, which fails because scripts/tidy.go
has a //go:build tidy constraint; update the deps recipe to invoke the script
with the build tag (use "go run -tags=tidy scripts/tidy.go") so it compiles like
the tidy-all recipe and includes the required -tags=tidy flag.


# Tidy all go.mod files
[group('codegen')]
tidy-all:
@go run -tags=tidy scripts/tidy.go
29 changes: 29 additions & 0 deletions .just/lint.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Run all linters
[group('lint')]
lint: vet
@echo "--> Running golangci-lint"
@golangci-lint run
@echo "--> Running markdownlint"
@markdownlint --config .markdownlint.yaml '**/*.md'
@echo "--> Running hadolint"
@hadolint test/docker/mockserv.Dockerfile
@echo "--> Running yamllint"
@yamllint --no-warnings . -c .yamllint.yml
@echo "--> Running goreleaser check"
@goreleaser check
@echo "--> Running actionlint"
@actionlint

# Auto-fix linting issues
[group('lint')]
lint-fix:
@echo "--> Formatting go"
@golangci-lint run --fix
@echo "--> Formatting markdownlint"
@markdownlint --config .markdownlint.yaml --ignore './changelog.md' '**/*.md' -f

# Run go vet
[group('lint')]
vet:
@echo "--> Running go vet"
@go vet ./...
30 changes: 30 additions & 0 deletions .just/proto.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generate protobuf files
[group('proto')]
proto-gen:
@echo "--> Generating Protobuf files"
buf generate --path="./proto/evnode" --template="buf.gen.yaml" --config="buf.yaml"
buf generate --path="./proto/execution/evm" --template="buf.gen.evm.yaml" --config="buf.yaml"

# Lint protobuf files (requires Docker)
[group('proto')]
proto-lint:
@echo "--> Linting Protobuf files"
@docker run --rm -v {{ justfile_directory() }}:/workspace --workdir /workspace bufbuild/buf:latest lint --error-format=json

# Generate Rust protobuf files
[group('proto')]
rust-proto-gen:
@echo "--> Generating Rust protobuf files"
@cd client/crates/types && EV_TYPES_FORCE_PROTO_GEN=1 cargo build

# Check if Rust protobuf files are up to date
[group('proto')]
rust-proto-check:
@echo "--> Checking Rust protobuf files"
@rm -rf client/crates/types/src/proto/*.rs
@cd client/crates/types && cargo build
Comment on lines +24 to +25
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing EV_TYPES_FORCE_PROTO_GEN=1 in rust-proto-check will cause false failures.

The rust-proto-check recipe deletes the generated proto files and then runs cargo build without EV_TYPES_FORCE_PROTO_GEN=1. Since rust-proto-gen uses this env var to trigger regeneration, omitting it here means the proto files won't be regenerated during the check, causing git diff to always detect changes.

🐛 Proposed fix
     `@rm` -rf client/crates/types/src/proto/*.rs
-    `@cd` client/crates/types && cargo build
+    `@cd` client/crates/types && EV_TYPES_FORCE_PROTO_GEN=1 cargo build
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@rm -rf client/crates/types/src/proto/*.rs
@cd client/crates/types && cargo build
`@rm` -rf client/crates/types/src/proto/*.rs
`@cd` client/crates/types && EV_TYPES_FORCE_PROTO_GEN=1 cargo build
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.just/proto.just around lines 24 - 25, The rust-proto-check recipe deletes
generated proto files but then runs cargo build without setting
EV_TYPES_FORCE_PROTO_GEN=1 so rust-proto-gen won’t regenerate files and git diff
will always fail; update the rust-proto-check recipe (the block that runs the
commands removing client/crates/types/src/proto/*.rs and then "cd
client/crates/types && cargo build") to run cargo build with the env var set
(e.g. prefix the build with EV_TYPES_FORCE_PROTO_GEN=1 or export it before
invoking cargo) so rust-proto-gen is triggered during the check.

@if ! git diff --exit-code client/crates/types/src/proto/; then \
echo "Error: Generated Rust proto files are not up to date."; \
echo "Run 'just rust-proto-gen' and commit the changes."; \
exit 1; \
fi
10 changes: 10 additions & 0 deletions .just/run.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Run 'n' nodes (default: 1). Usage: just run-n 3
[group('run')]
run-n nodes="1": build build-da
@go run -tags=run scripts/run.go --nodes={{ nodes }}

# Run EVM nodes (one sequencer and one full node)
[group('run')]
run-evm-nodes nodes="1": build-da build-evm
@echo "Starting EVM nodes..."
@go run -tags=run_evm scripts/run-evm-nodes.go --nodes={{ nodes }}
Loading
Loading