-
Notifications
You must be signed in to change notification settings - Fork 66
Add OP Stack integration for L2 chain tracking #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Nitpicks 🔍
|
2c83881 to
c9888cf
Compare
PR Code Suggestions ✨
|
|
CodeAnt AI finished reviewing your PR. |
c9888cf to
3137138
Compare
Implement full OP Stack support to track batches, state roots, deposits, and withdrawals between custom L2 OP Stack chains and L1. Features: - Database models: OpChainConfig, OpBatch, OpOutput, OpDeposit, OpWithdrawal - Event detection for deposits, outputs, withdrawals, and batches - Support for both legacy (L2OutputOracle) and modern (DisputeGameFactory) chains - Background jobs for output finalization and deposit-to-L2 linking - API endpoints for all OP Stack entities - Frontend pages: deposits, withdrawals, batches, outputs with detail views - Transaction lifecycle component showing L2 tx progression - Settings page for OP Stack configuration - Shared isTopL1Parent field for both Orbit and OP Stack parent workspaces 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3137138 to
c101ed0
Compare
- Fix unmanagedError(error, req, res) → next in explorers.js - Use SHA-256 instead of keccak256 for blob versioned hashes (EIP-4844) - Fix gameType BigNumber conversion in opOutputs.js - Fix timestamp setter to return Date instead of string - Update deriveL2TransactionHash to include l1BlockNumber - Add onDelete/onUpdate behavior to migration foreign keys - Add DROP TYPE to down migrations for enums - Add l1TransactionHash lowercase normalization setters - Fix JSDoc return type in opDeposits.js - Add sortBy[0].order guard in OpWithdrawals.vue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@CodeAnt-AI: review iteration on your comments |
|
Question: review iteration on your comments Answer: High-level summary (what looks good)
Concrete issues and suggested fixes (prioritized)
Files you should re-check carefully before next iteration
Tests and CI
If you want I can:
Tell me which of those you’d like me to implement or if you want a short PR checklist for reviewers/QA to validate this feature end-to-end. |
- Fix computeBlobVersionedHash slicing (handle 0x prefix correctly) - Add node-fetch import for beacon API calls - Add try/catch error handling to all parseLog functions - Add lowercase normalization setters for all address fields in OpChainConfig - Fix safeUpdate to only validate parentChainId when provided 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix race condition in batch index assignment using transaction with lock - Add input validation and sanitization for pagination parameters - Add named constants for EIP-4844 versioned hash calculations - Add 404 handling when OP entities are not found - Add optional chaining for template property access in Vue components 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add getAvailableOpParents API endpoint for L1 workspace selection - Add parent workspace dropdown to ExplorerOpSettings component - Include opConfig in workspace queries for proper data flow - Add parentChainExplorer and parentWorkspaceId to explorer responses - Update CLAUDE.md with OP Stack testing documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Filter L1 transactions to only OP-relevant contracts when workspace has opChildConfigs (similar to existing Orbit filtering) - Include opChildConfigs in initial workspace query to avoid extra DB call - Reuse loaded opChildConfigs for batch detection instead of re-querying Contracts filtered: batchInboxAddress, optimismPortalAddress, l2OutputOracleAddress, disputeGameFactoryAddress, systemConfigAddress 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
- Add full batch data parsing with zlib/brotli decompression - Parse span batch and singular batch formats per OP Stack derivation spec - Extract L2 block count and calculate block range from timestamps - Add finalizePendingOpBatches job to confirm batches on safe block - Add l2BlockTime field to OpChainConfig model - Fix finalizePendingOrbitBatches to include orbitChildConfigs association - Fix hex-to-integer conversion for l1BlockNumber in batch creation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
- Extract sanitizePagination to shared utility in lib/utils.js - Remove duplicate sanitizePagination from OP API files - Move timestamp conversion outside loop in blockSync.js - Add named constants for magic numbers in opBatches.js - Add logging to batch parsing error handlers - Move requires to top of opBatches.js to avoid potential circular deps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dataContainer field to op_batches (in_blob4844 vs in_calldata) - Add clickable links to parent chain explorer for blob hash, L1 tx, and L1 block - Implement deposit and output event detection in receiptSync - Add storeOpDeposit and storeOpOutput jobs for event processing - Add backfill jobs for historical deposits and outputs - Add opEvents.js library for OP Stack event parsing - Update TransactionsList to support opBatchIndex filtering - Add beaconUrl field to OpChainConfig for blob fetching 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
- Clean up event signatures: remove dead code, use single computed source - Lower default backfill batch size from 10000 to 10 for RPC compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tabbed interface with Overview and Transactions tabs - Create OpBatchOverview component with v-list layout - Create OpBatchTransactions wrapper component - Add skeleton loader for loading state - Support URL hash navigation between tabs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add getOpBatchBlocks function to firebase.js - Add /opBatches/:batchIndex/blocks API endpoint - Add getOpBatchBlocks method to server.js plugin - Add opBatchIndex prop to BlockList.vue component - Create OpBatchBlocks.vue wrapper component - Add Blocks tab to OpBatchDetail.vue with URL hash support - Change default blob explorer URL from Etherscan to Blockscout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused managedError imports from opDeposits.js and opOutputs.js - Add pagination to backfillOpBatchBlockRanges job (chunk size 1000) - Add test for GET /:batchIndex/blocks endpoint - Add unit tests for OpBatchBlocks and OpBatchOverview components 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Make l2BlockNumber nullable for dispute game outputs (fault proofs don't include L2 block number in DisputeGameCreated event) - Fix priority parameter in receiptSync enqueue calls (use integer 1 instead of string 'high') - Add migration to alter op_outputs.l2BlockNumber column 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create OpOutputOverview component with v-list layout - Update OpOutputDetail to use tabbed interface with BaseChipGroup - Add parentChainExplorer to getOpOutput API response - Add game type labels for dispute games (Cannon, Permissioned Cannon, etc) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
User description
Summary
isTopOrbitParenttoisTopL1Parentto share parent workspace linking between Orbit and OP StackTest plan
🤖 Generated with Claude Code
CodeAnt-AI Description
Add OP Stack integration for tracking L2 batches, deposits, outputs, and withdrawals
What Changed
Impact
✅ Can view OP batches and their estimated L2 coverage✅ Clearer withdrawal proof and finalization status✅ Fewer manual steps to link L1 deposits to L2 transactions💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.