feat: add claimsync package and integrate with bridgesync#1539
feat: add claimsync package and integrate with bridgesync#1539joanestebanr wants to merge 7 commits intodevelopfrom
Conversation
- Add new claimsync package with its own storage (SQLite), processor, embedded mode, and ClaimsReader interface - Remove duplicated claim event handlers from bridgesync/downloader.go; bridgesync now delegates to claimsync via ClaimsSyncProcessor interface - Add ProcessBlockWithTx(insertBlock bool) to allow shared tx reuse between bridgesync and claimsync (atomic writes) - Add ReorgWithTx to ClaimsSyncProcessor so bridgesync can call claimsync reorg within its own transaction - Add ClaimsReader interface grouping read-only claim queries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @joanestebanr's task in 3m 4s —— View job Code Review Complete🚀 What's NewThis PR extracts claim event synchronization from bridgesync into a new standalone
Key additions:
🐛 Bug FixesNone - this is a refactoring PR. 📋 Config UpdatesNone - existing bridgesync config is reused.
|
- Move Claim/Unclaim types from bridgesync to claimsync/types package - Add ClaimSyncRPC server exposing l2claimsync_* JSON-RPC methods - Add paged storage implementation for claimsync - Add claimsync config and claim_data types - Update aggsender interfaces to use claimsync.Claim instead of bridgesync.Claim - Add GetNextBlockNumber and GeneratePreBuildParams to AggsenderBuilderFlow/FlowBaser interfaces - Extend GetLastProcessedBlock signature to return (uint64, bool, error) - Add op-pp local config and e2e bridge tests - Regenerate all affected mocks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… bootstrap - Move TrueFalseAutoMode to config/types as a struct with Mode string and Resolved *bool (not read from config); add type alias + var re-exports in bridgesync - claimsync RPC: GetRPCServices() sets service name (l1claimsync/l2claimsync) based on syncerID stored in ClaimSync struct - claimsync config: add AutoStart TrueFalseAutoMode field; resolved against BRIDGE/L1BRIDGESYNC or BRIDGE/L2BRIDGESYNC components at startup - sync/EVMDriver: add SyncNextBlock(ctx, blockNum) to bootstrap the first block; returns ErrAlreadyBootstrapped if a block already exists (ignorable) - claimsync: Start() passes InitialBlockNum to Sync() when AutoStart=true; syncNextBlockInfinite() retries bootstrap until success or ctx cancellation - sync: add README.md documenting how to implement a new syncer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔄 Changes Summary
📋 Config Updates
✅ Testing
🐞 Issues
🔗 Related PRs
📝 Notes