You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete the code-sync migration by porting the durable code-fetch Queue to the new p2p/proto stack and wiring it to its producer, so outstanding code requests survive restarts and the syncer's to-fetch marker handling has a real writer.
Problem
PR #5402 moved the code Syncer (consumer) into vms/evm/sync/code on the new p2p/proto client, but deferred graft/evm/sync/code/queue.go:
As a result, nothing currently writes to-fetch markers. The Syncer's DeleteCodeToFetch calls (slow path and fulfill) are inert no-ops until the Queue lands, and there is no crash-recovery of outstanding code requests (init / recoverUnfetchedCodeHashes).
graft/evm/sync/code is still live (imported by graft/evm/sync/evmstate and graft/evm/sync/engine), so it cannot be deleted until the migration completes.
Proposed Solution
Port queue.go into vms/evm/sync/code, adapting to the new tree. customrawdb already lives there. Drop or port a minimal replacement for graft/evm/sync/types.Finalizer.
Goal
Complete the code-sync migration by porting the durable code-fetch Queue to the new p2p/proto stack and wiring it to its producer, so outstanding code requests survive restarts and the syncer's to-fetch marker handling has a real writer.
Problem
PR #5402 moved the code Syncer (consumer) into vms/evm/sync/code on the new p2p/proto client, but deferred graft/evm/sync/code/queue.go:
AddCode, which persistscustomrawdbto-fetch markers and forwards hashes to the syncer's channel. Its only producer is leaf-sync, which lands on the leaf branch (Add leaf-range request handler #5405), so it had no caller in feat(vms/evm/sync/code): add code-by-hash request handler #5402.Proposed Solution
queue.gointovms/evm/sync/code, adapting to the new tree.customrawdbalready lives there. Drop or port a minimal replacement forgraft/evm/sync/types.Finalizer.Queue.AddCode, and passQueue.CodeHashes()intocode.NewSyncer, replacing the direct channel the feat(vms/evm/sync/code): add code-by-hash request handler #5402 integration test feeds.Name()/ID()and atypes.Syncerinterface once a sync registry consumes them (dropped in feat(vms/evm/sync/code): add code-by-hash request handler #5402 to avoid an orphan types package).