Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7e006d6
chore: remove unused rayon pool from WorkloadExecutor (#19065)
0xKarl98 Oct 16, 2025
8788782
fix(net): remove redundant remove of evicted hash in fetcher (#19083)
MozirDmitriy Oct 16, 2025
ff2236e
fix: support rlp hex in read_header_from_file (#19089)
mattsse Oct 16, 2025
5887a15
revert: "fix: Revert "chore: disable fee charge in env"" (#19073)
mattsse Oct 16, 2025
cc490b6
fix: accurately track account and code weighs (#19091)
mattsse Oct 16, 2025
25e8d6b
chore: clarify the wrong Length description (#19094)
AJStonewee Oct 16, 2025
53ef7a3
docs: fix duplicate method comments in ChainInfoTracker (#18929)
avorylli Oct 16, 2025
48d8298
feat: add Pool::remove_transaction(hash) (#19098)
stevencartavia Oct 16, 2025
a8e387b
chore: init state touchups (#19066)
mattsse Oct 16, 2025
73af300
fix(cli): Remove duplicit static file header and transaction append (…
RomanHodulak Oct 17, 2025
3af2c93
feat(cli): add method `CliRunner::block_on` (#19088)
lean-apple Oct 17, 2025
a2c5094
chore: exhaustive match for builtin tracer (#19105)
mattsse Oct 17, 2025
ff68bfe
chore: lower ecies instrument calls to trace (#19004)
Rjected Oct 17, 2025
4c7b1ed
fix: add revm-state to dev-dependencies of chain-state crate (#19044)
futreall Oct 17, 2025
e46a9bc
fix(sim): clamp bundle timeout to max instead of falling back to defa…
maradini77 Oct 17, 2025
cfb2691
fix(cli): remove redundant EthChainSpec bound in run_with_components …
sashass1315 Oct 17, 2025
ca26219
feat: convert blobs at RPC (#19084)
klkvr Oct 17, 2025
1634535
fix: add bundle and transaction context to call_many errors (#18127)
crazykissshout Oct 17, 2025
928d91d
chore: add comment section for claude (#19108)
mattsse Oct 17, 2025
1b830e9
feat: derive dev accounts from mnemonic in dev mode (#18299)
dharmvr1 Oct 17, 2025
d1f6637
refactor: naming fix for multiproof dispatch (#19102)
yongkangc Oct 17, 2025
6a918f4
fix: Deduplicate hashed storage preparation in MemoryOverlayStateProv…
leopardracer Oct 17, 2025
a5618f5
feat: convert pooled blobs transition (#19095)
klkvr Oct 17, 2025
4a32bc0
feat(engine): improve payload validator tracing spans (#18960)
shekhirin Oct 17, 2025
63f5607
feat: add capacity metrics for tries (#19117)
Rjected Oct 18, 2025
8d91b9e
feat(cli): Reuse a single StaticFileProducer across file import chunk…
GarmashAlex Oct 18, 2025
46228d0
feat(stateless): make UncompressedPublicKey serializable (#19115)
jsign Oct 18, 2025
a8ef47d
docs: fix wrong label for `--color=auto` (#19110)
mdqst Oct 18, 2025
a718752
chore: fix clippy (#19118)
mattsse Oct 18, 2025
be392e6
Merge branch 'main' into jsign-update-1
jsign Oct 18, 2025
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
79 changes: 79 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,85 @@ Common refactoring pattern:
- Add trait bounds for flexibility
- Enable reuse across different chain types (Ethereum, Optimism)

#### When to Comment

Write comments that remain valuable after the PR is merged. Future readers won't have PR context - they only see the current code.

##### ✅ DO: Add Value

**Explain WHY and non-obvious behavior:**
```rust
// Process must handle allocations atomically to prevent race conditions
// between dealloc on drop and concurrent limit checks
unsafe impl GlobalAlloc for LimitedAllocator { ... }

// Binary search requires sorted input. Panics on unsorted slices.
fn find_index(items: &[Item], target: &Item) -> Option

// Timeout set to 5s to match EVM block processing limits
const TRACER_TIMEOUT: Duration = Duration::from_secs(5);
```

**Document constraints and assumptions:**
```rust
/// Returns heap size estimate.
///
/// Note: May undercount shared references (Rc/Arc). For precise
/// accounting, combine with an allocator-based approach.
fn deep_size_of(&self) -> usize
```

**Explain complex logic:**
```rust
// We reset limits at task start because tokio reuses threads in
// spawn_blocking pool. Without reset, second task inherits first
// task's allocation count and immediately hits limit.
THREAD_ALLOCATED.with(|allocated| allocated.set(0));
```

##### ❌ DON'T: Describe Changes
```rust
// ❌ BAD - Describes the change, not the code
// Changed from Vec to HashMap for O(1) lookups

// ✅ GOOD - Explains the decision
// HashMap provides O(1) symbol lookups during trace replay
```
```rust
// ❌ BAD - PR-specific context
// Fix for issue #234 where memory wasn't freed

// ✅ GOOD - Documents the actual behavior
// Explicitly drop allocations before limit check to ensure
// accurate accounting
```
```rust
// ❌ BAD - States the obvious
// Increment counter
counter += 1;

// ✅ GOOD - Explains non-obvious purpose
// Track allocations across all threads for global limit enforcement
GLOBAL_COUNTER.fetch_add(1, Ordering::SeqCst);
```

✅ **Comment when:**
- Non-obvious behavior or edge cases
- Performance trade-offs
- Safety requirements (unsafe blocks must always be documented)
- Limitations or gotchas
- Why simpler alternatives don't work

❌ **Don't comment when:**
- Code is self-explanatory
- Just restating the code in English
- Describing what changed in this PR

##### The Test: "Will this make sense in 6 months?"

Before adding a comment, ask: Would someone reading just the current code (no PR, no history) find this helpful?


### Example Contribution Workflow

Let's say you want to fix a bug where external IP resolution fails on startup:
Expand Down
Loading
Loading