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
cancel_agreement — has working server-side handling (signature verification, operator lookup, enqueues process_indexing_agreement_indexer_cancellation), but has no production callers. The only trigger is the agent-side blocklist path (DipsManager._tryCancelAgreement), and even that is marginal. The public method tryCancelAgreement(allocationId) is exported but never called from agent reconciliation loops.
Both endpoints are artefacts of the pre-on-chain architecture. With the migration to on-chain agreements and the offer-based authorization path, cancellation is handled on-chain: the indexer (or dipper) calls the contract directly, the event is emitted, the subgraph indexes it, and dipper's chain_listener detects the state change. The off-chain gRPC cancellation is redundant — it introduces a second pathway that must stay consistent with the on-chain source of truth without adding meaningful capability.
The collect_payment endpoint was part of the off-chain voucher system that was abandoned before deployment. It has been a dead stub for months.
Scope
This spans three codebases. The dead code in each:
dipper (this repo)
Server-side handlers:
bin/dipper-service/src/indexer_rpc_server/handlers.rs — the cancel_agreement and collect_payment implementations on the GatewayDipsService trait
bin/dipper-service/src/indexer_rpc_server/service.rs — the tonic server setup that registers the GatewayDipsServiceServer
bin/dipper-service/src/signing/eip712.rs — recover_dips_cancellation_msg_signer (used only by cancel_agreement handler). If this is the last consumer of the EIP-712 signer module, the entire module can go.
bin/dipper-service/src/worker/handlers/ — the process_indexing_agreement_indexer_cancellation worker handler enqueued by cancel_agreement
bin/dipper-service/src/main.rs — the indexer RPC server spawn and context wiring
Proto definitions:
dipper-rpc/src/indexer/ — the GatewayDipsService proto with CancelAgreement and CollectPayment RPCs, plus the Solidity-side SignedCancellationRequest type
Config:
bin/dipper-service/src/config.rs — indexer_rpc config section (listen_addr, allowlist). If no other endpoint needs the indexer RPC server, remove the entire server and its config.
indexer-rs (graphprotocol/indexer-rs)
Stub handler:
crates/dips/src/server.rs — cancel_agreement is an unimplemented stub that returns Status::unimplemented. It only exists to satisfy the proto trait.
Proto definitions:
crates/dips/src/proto/ — the generated CancelAgreementRequest, CancelAgreementResponse, and CollectPaymentRequest/CollectPaymentResponse types. These come from the shared .proto file — if dipper drops them from the proto, indexer-rs codegen will stop producing them automatically.
indexer agent (graphprotocol/indexer)
gRPC client:
packages/indexer-common/src/indexing-fees/gateway-dips-service-client.ts — createGatewayDipsServiceClient which constructs the gRPC client, plus cancelAgreementDomain and cancelAgreementTypes EIP-712 constants used for signing cancellation requests
packages/indexer-common/src/indexing-fees/dips.ts — tryCancelAgreement(allocationId), _tryCancelAgreement(agreement), and the gatewayDipsServiceClient field on DipsManager. The CancelAgreement call at line 116 is the only gRPC call the agent makes to dipper.
Blocklist path:
packages/indexer-common/src/indexing-fees/dips.ts:851 — _tryCancelAgreement is called when the agent detects a NEVER indexing rule for a deployment with an active agreement. This needs to be replaced with an on-chain cancellation call (the agent already has contract interaction infrastructure for acceptIndexingAgreement).
Note: Maikol has been actively working on DIPs agent-side features. Confirm with him before removing cancel_agreement client code — he may have plans for it or may prefer to handle the agent-side cleanup himself.
What to check before removing
Grep all three codebases for CancelAgreement, cancel_agreement, CollectPayment, collect_payment, GatewayDipsService to find any references beyond what's listed above.
Verify that dipper's chain_listener correctly handles indexer-initiated on-chain cancellations (the IndexingAgreementCanceled event path). If it does, the off-chain notification path is fully redundant.
Check whether the .proto file lives in dipper or in a shared proto repo. If shared, coordinate the proto change across all consumers.
The agent's blocklist cancellation path (line 851) needs a replacement — either call the contract directly or remove the auto-cancel-on-blocklist behaviour entirely.
Motivation
Dipper's indexer-facing gRPC server (
indexer_rpc) exposes two endpoints that are no longer part of the active protocol flow:collect_payment— already an explicitunimplementedstub since PR chore: remove V1 payment collection dead code #574. Payment collection is handled entirely on-chain viaRecurringCollector.cancel_agreement— has working server-side handling (signature verification, operator lookup, enqueuesprocess_indexing_agreement_indexer_cancellation), but has no production callers. The only trigger is the agent-side blocklist path (DipsManager._tryCancelAgreement), and even that is marginal. The public methodtryCancelAgreement(allocationId)is exported but never called from agent reconciliation loops.Both endpoints are artefacts of the pre-on-chain architecture. With the migration to on-chain agreements and the offer-based authorization path, cancellation is handled on-chain: the indexer (or dipper) calls the contract directly, the event is emitted, the subgraph indexes it, and dipper's
chain_listenerdetects the state change. The off-chain gRPC cancellation is redundant — it introduces a second pathway that must stay consistent with the on-chain source of truth without adding meaningful capability.The
collect_paymentendpoint was part of the off-chain voucher system that was abandoned before deployment. It has been a dead stub for months.Scope
This spans three codebases. The dead code in each:
dipper (this repo)
Server-side handlers:
bin/dipper-service/src/indexer_rpc_server/handlers.rs— thecancel_agreementandcollect_paymentimplementations on theGatewayDipsServicetraitbin/dipper-service/src/indexer_rpc_server/service.rs— the tonic server setup that registers theGatewayDipsServiceServerbin/dipper-service/src/signing/eip712.rs—recover_dips_cancellation_msg_signer(used only by cancel_agreement handler). If this is the last consumer of the EIP-712 signer module, the entire module can go.bin/dipper-service/src/worker/handlers/— theprocess_indexing_agreement_indexer_cancellationworker handler enqueued by cancel_agreementbin/dipper-service/src/main.rs— the indexer RPC server spawn and context wiringProto definitions:
dipper-rpc/src/indexer/— theGatewayDipsServiceproto withCancelAgreementandCollectPaymentRPCs, plus the Solidity-sideSignedCancellationRequesttypeConfig:
bin/dipper-service/src/config.rs—indexer_rpcconfig section (listen_addr,allowlist). If no other endpoint needs the indexer RPC server, remove the entire server and its config.indexer-rs (
graphprotocol/indexer-rs)Stub handler:
crates/dips/src/server.rs—cancel_agreementis an unimplemented stub that returnsStatus::unimplemented. It only exists to satisfy the proto trait.Proto definitions:
crates/dips/src/proto/— the generatedCancelAgreementRequest,CancelAgreementResponse, andCollectPaymentRequest/CollectPaymentResponsetypes. These come from the shared.protofile — if dipper drops them from the proto, indexer-rs codegen will stop producing them automatically.indexer agent (
graphprotocol/indexer)gRPC client:
packages/indexer-common/src/indexing-fees/gateway-dips-service-client.ts—createGatewayDipsServiceClientwhich constructs the gRPC client, pluscancelAgreementDomainandcancelAgreementTypesEIP-712 constants used for signing cancellation requestspackages/indexer-common/src/indexing-fees/dips.ts—tryCancelAgreement(allocationId),_tryCancelAgreement(agreement), and thegatewayDipsServiceClientfield onDipsManager. TheCancelAgreementcall at line 116 is the only gRPC call the agent makes to dipper.Blocklist path:
packages/indexer-common/src/indexing-fees/dips.ts:851—_tryCancelAgreementis called when the agent detects a NEVER indexing rule for a deployment with an active agreement. This needs to be replaced with an on-chain cancellation call (the agent already has contract interaction infrastructure foracceptIndexingAgreement).Note: Maikol has been actively working on DIPs agent-side features. Confirm with him before removing
cancel_agreementclient code — he may have plans for it or may prefer to handle the agent-side cleanup himself.What to check before removing
CancelAgreement,cancel_agreement,CollectPayment,collect_payment,GatewayDipsServiceto find any references beyond what's listed above.chain_listenercorrectly handles indexer-initiated on-chain cancellations (theIndexingAgreementCanceledevent path). If it does, the off-chain notification path is fully redundant..protofile lives in dipper or in a shared proto repo. If shared, coordinate the proto change across all consumers.