Skip to content

Commit ee1b578

Browse files
tac0turtleclaude[bot]tac0turtle
authored
feat: update dependabot to scan all go.mod files (#2543)
This PR addresses issue #2542 by updating Dependabot configuration to comprehensively scan all go.mod files across the repository. ## Changes - Updated `.github/dependabot.yml` to scan 11 directories with go.mod files - Groups all Go dependencies into single PR to reduce noise - Covers apps, execution, sequencers, da, core, and test modules Closes #2542 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Marko <[email protected]> Co-authored-by: tac0turtle <[email protected]>
1 parent e844cb2 commit ee1b578

File tree

7 files changed

+503
-25
lines changed

7 files changed

+503
-25
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,24 @@ updates:
3030
- "patch"
3131
- "minor"
3232
- package-ecosystem: gomod
33-
target-branch: main
34-
directory: "/"
33+
# Scan the root and any submodules (apps, execution, sequencers, etc.)
34+
directories:
35+
- "/"
36+
- "/apps/**"
37+
- "/core"
38+
- "/da"
39+
- "/execution/**"
40+
- "/sequencers/**"
41+
- "/test/**"
3542
schedule:
3643
interval: weekly
3744
open-pull-requests-limit: 10
3845
labels:
3946
- T:dependencies
40-
# Group all patch updates into a single PR
41-
groups:
42-
patch-updates:
43-
applies-to: version-updates
44-
update-types:
45-
- "patch"
46-
- package-ecosystem: gomod
47-
directory: "/"
48-
schedule:
49-
interval: daily
50-
allow:
51-
- dependency-name: "github.com/ev-node/*"
52-
labels:
53-
- T:dependencies
54-
# Group all patch updates into a single PR
47+
# group to reduce PR noise (optional)
5548
groups:
56-
patch-updates:
57-
applies-to: version-updates
58-
update-types:
59-
- "patch"
49+
all-go:
50+
patterns: ["*"]
6051
- package-ecosystem: docker
6152
directory: "/"
6253
schedule:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Dependabot Go Autofix
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
tidy-and-verify:
14+
if: github.actor == 'dependabot[bot]'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.head_ref }}
20+
21+
- uses: actions/setup-go@v5
22+
with:
23+
go-version: "1.22"
24+
25+
- name: Install make (if missing)
26+
run: sudo apt-get update && sudo apt-get install -y make
27+
28+
- name: Run dependency update
29+
run: make deps
30+
31+
- name: Commit and push changes
32+
run: |
33+
if [ -n "$(git status --porcelain)" ]; then
34+
git config user.name "github-actions[bot]"
35+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
36+
git add -A
37+
git commit -m "chore: run make deps after Dependabot update"
38+
git push
39+
else
40+
echo "No changes to commit."
41+
fi

.github/workflows/docs_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build VitePress Site
1+
name: Docs Build
22
permissions:
33
contents: read
44

@@ -12,7 +12,7 @@ on:
1212
- "docs/**"
1313

1414
jobs:
15-
build:
15+
docs_build:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout

.github/workflows/docs_deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sample workflow for building and deploying a VitePress site to GitHub Pages
22
#
3-
name: Deploy VitePress site to Pages
3+
name: Docs Deploy
44

55
on:
66
# Runs on pushes targeting the `main` branch. Change this to `master` if you're

.github/workflows/docs_preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy PR previews
1+
name: Docs Deploy Preview
22

33
on:
44
# This workflow requires pull_request and won't work with pull_request_target

block/CLAUDE.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# CLAUDE.md - Block Package
2+
3+
This file provides guidance to Claude Code when working with the block package of ev-node.
4+
5+
## Package Overview
6+
7+
The block package is the core of ev-node's block management system. It handles block creation, validation, synchronization, and submission to the Data Availability (DA) layer. This package implements the block lifecycle from transaction aggregation through to finalization.
8+
9+
## Core Components
10+
11+
### Manager (`manager.go`)
12+
- **Purpose**: Central orchestrator for all block operations
13+
- **Key Responsibilities**:
14+
- Transaction aggregation into blocks
15+
- Block production and validation
16+
- State synchronization
17+
- DA layer interaction
18+
- P2P block/header gossiping
19+
20+
### Aggregation (`aggregation.go`, `lazy_aggregation_test.go`)
21+
- **Purpose**: Collects transactions from mempool and creates blocks
22+
- **Modes**:
23+
- **Normal Mode**: Produces blocks at regular intervals (BlockTime)
24+
- **Lazy Mode**: Only produces blocks when transactions are present or after LazyBlockTime
25+
- **Key Functions**:
26+
- `AggregationLoop`: Main loop for block production
27+
- `lazyAggregationLoop`: Optimized for low-traffic scenarios
28+
- `normalAggregationLoop`: Regular block production
29+
30+
### Synchronization (`sync.go`, `sync_test.go`)
31+
- **Purpose**: Keeps the node synchronized with the network
32+
- **Key Functions**:
33+
- `SyncLoop`: Main synchronization loop
34+
- Processes headers from P2P network
35+
- Retrieves block data from DA layer
36+
- Handles header and data caching
37+
38+
### Data Availability (`da_includer.go`, `submitter.go`, `retriever.go`)
39+
- **DA Includer**: Manages DA blob inclusion proofs and validation
40+
- **Submitter**: Handles block submission to the DA layer with retry logic
41+
- **Retriever**: Fetches blocks from the DA layer
42+
- **Key Features**:
43+
- Multiple DA layer support
44+
- Configurable retry attempts
45+
- Batch submission optimization
46+
47+
### Storage (`store.go`, `store_test.go`)
48+
- **Purpose**: Persistent storage for blocks and state
49+
- **Key Features**:
50+
- Block height tracking
51+
- Block and commit storage
52+
- State root management
53+
- Migration support for namespace changes
54+
55+
### Pending Blocks (`pending_base.go`, `pending_headers.go`, `pending_data.go`)
56+
- **Purpose**: Manages blocks awaiting DA inclusion or validation
57+
- **Components**:
58+
- **PendingBase**: Base structure for pending blocks
59+
- **PendingHeaders**: Header queue management
60+
- **PendingData**: Block data queue management
61+
- **Key Features**:
62+
- Ordered processing by height
63+
- Validation before acceptance
64+
- Memory-efficient caching
65+
66+
### Metrics (`metrics.go`, `metrics_helpers.go`)
67+
- **Purpose**: Performance monitoring and observability
68+
- **Key Metrics**:
69+
- Block production times
70+
- Sync status and progress
71+
- DA layer submission metrics
72+
- Transaction throughput
73+
74+
## Key Workflows
75+
76+
### Block Production Flow
77+
1. Transactions collected from mempool
78+
2. Block created with proper header and data
79+
3. Block executed through executor
80+
4. Block submitted to DA layer
81+
5. Block gossiped to P2P network
82+
83+
### Synchronization Flow
84+
1. Headers received from P2P network
85+
2. Headers validated and cached
86+
3. Block data retrieved from DA layer
87+
4. Blocks applied to state
88+
5. Sync progress updated
89+
90+
### DA Submission Flow
91+
1. Block prepared for submission
92+
2. Blob created with block data
93+
3. Submission attempted with retries
94+
4. Inclusion proof obtained
95+
5. Block marked as finalized
96+
97+
## Configuration
98+
99+
### Time Parameters
100+
- `BlockTime`: Target time between blocks (default: 1s)
101+
- `DABlockTime`: DA layer block time (default: 6s)
102+
- `LazyBlockTime`: Max time between blocks in lazy mode (default: 60s)
103+
104+
### Limits
105+
- `maxSubmitAttempts`: Max DA submission retries (30)
106+
- `defaultMempoolTTL`: Blocks until tx dropped (25)
107+
108+
## Testing Strategy
109+
110+
### Unit Tests
111+
- Test individual components in isolation
112+
- Mock external dependencies (DA, executor, sequencer)
113+
- Focus on edge cases and error conditions
114+
115+
### Integration Tests
116+
- Test component interactions
117+
- Verify block flow from creation to storage
118+
- Test synchronization scenarios
119+
120+
### Performance Tests (`da_speed_test.go`)
121+
- Measure DA submission performance
122+
- Test batch processing efficiency
123+
- Validate metrics accuracy
124+
125+
## Common Development Tasks
126+
127+
### Adding a New DA Feature
128+
1. Update DA interfaces in `core/da`
129+
2. Modify `da_includer.go` for inclusion logic
130+
3. Update `submitter.go` for submission flow
131+
4. Add retrieval logic in `retriever.go`
132+
5. Update tests and metrics
133+
134+
### Modifying Block Production
135+
1. Update aggregation logic in `aggregation.go`
136+
2. Adjust timing in Manager configuration
137+
3. Update metrics collection
138+
4. Test both normal and lazy modes
139+
140+
### Implementing New Sync Strategy
141+
1. Modify `SyncLoop` in `sync.go`
142+
2. Update pending block handling
143+
3. Adjust cache strategies
144+
4. Test various network conditions
145+
146+
## Error Handling Patterns
147+
148+
- Use structured errors with context
149+
- Retry transient failures (network, DA)
150+
- Log errors with appropriate levels
151+
- Maintain sync state consistency
152+
- Handle node restart gracefully
153+
154+
## Performance Considerations
155+
156+
- Batch DA operations when possible
157+
- Use caching to reduce redundant work
158+
- Optimize header validation path
159+
- Monitor goroutine lifecycle
160+
- Profile memory usage in caches
161+
162+
## Security Considerations
163+
164+
- Validate all headers before processing
165+
- Verify DA inclusion proofs
166+
- Check block signatures
167+
- Prevent DOS through rate limiting
168+
- Validate state transitions
169+
170+
## Debugging Tips
171+
172+
- Enable debug logging for detailed flow
173+
- Monitor metrics for performance issues
174+
- Check pending queues for blockages
175+
- Verify DA layer connectivity
176+
- Inspect cache hit rates
177+
178+
## Code Patterns to Follow
179+
180+
- Use context for cancellation
181+
- Implement graceful shutdown
182+
- Log with structured fields
183+
- Return errors with context
184+
- Use metrics for observability
185+
- Test error conditions thoroughly

0 commit comments

Comments
 (0)