Commit 67605de
refactor: eliminate comptime DB generics; add phantom access fix
Replace Journal(DB)/Context(DB)/EvmFor(DB) comptime generics with a
concrete Database vtable (ptr + fn pointers). Journal, Context, and Evm
are now single concrete types — no more per-DB monomorphization.
The @hasDecl pattern for optional DB methods is eliminated entirely. The
one remaining optional capability (hasNonZeroStorageForAddress for CREATE
collision detection) lives in the Database vtable as a nullable fn ptr.
Also fixes phantom BAL entries at the opcode level: CALL now uses a
worst-case getCallGasCost pre-check (assumes account non-existent) before
loading the target, EXTCODECOPY moves all gas charges before codeInfo(),
SELFDESTRUCT adds a worst-case pre-check before h.selfdestruct(), and
CREATE moves the Amsterdam balance check before js.loadAccount(new_addr).
untrackAddress/forceTrackAddress and bal_untracked are fully removed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b35bd08 commit 67605de
File tree
19 files changed
+917
-977
lines changed- examples
- src
- context
- database
- handler
- interpreter
- opcodes
- spec_test
19 files changed
+917
-977
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments