Skip to content

draft: testing dips#1319

Draft
MoonBoi9001 wants to merge 6 commits intoindexing-payments-management-audit-fix-2-lightfrom
mb9/dips-local-testing-fixes
Draft

draft: testing dips#1319
MoonBoi9001 wants to merge 6 commits intoindexing-payments-management-audit-fix-2-lightfrom
mb9/dips-local-testing-fixes

Conversation

@MoonBoi9001
Copy link
Copy Markdown
Member

No description provided.

MoonBoi9001 added a commit to edgeandnode/local-network that referenced this pull request Apr 16, 2026
Point CONTRACTS_COMMIT at the audit-branch testing superset so the
graph-contracts image picks up the uint16 conditions field, the
RecurringCollector offer-path, acceptIndexingAgreement with empty
signature, and the HorizonStaking ignition dependency fix. The branch
is shared via draft PR graphprotocol/contracts#1319.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MoonBoi9001 and others added 6 commits April 28, 2026 16:40
HorizonStaking's constructor extends GraphDirectory, which queries the
Controller for GraphToken, EpochManager, RewardsManager, etc. These are
registered by GraphPeripheryModule. Without an explicit `after` dependency,
Ignition may schedule HorizonStaking before the periphery registrations,
causing the constructor to read address(0) and revert with
GraphDirectoryInvalidZeroAddress.

Every other core module (GraphPayments, PaymentsEscrow, GraphTallyCollector,
RecurringCollector) declares this dependency. HorizonStaking was the only
outlier.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add IRecurringCollector to GraphHorizonContracts interface
- Re-export IRecurringCollector from interfaces main entrypoint
- Add encodeCollectIndexingFeesData() helper for indexing fee collection
- Add decoders: decodeSignedRCA, decodeAcceptIndexingAgreementMetadata,
  decodeIndexingAgreementTermsV1
- Add round-trip tests for all decoders and encoder
The audit-branch SubgraphService.sol now depends on four external
libraries (StakeClaims, AllocationHandler, IndexingAgreement,
IndexingAgreementDecoder) and a fifth constructor argument for the
RecurringCollector, but the Ignition deploy module was not updated to
match. Deploys fail at validation time with IGN716 (missing libraries)
and IGN703 (4 args expected 5), blocking any fresh hardhat deployment.

Deploy the four libraries up-front via m.library() and pass them
through deployImplementation's libraries option so the bytecode
placeholders resolve. Thread the RecurringCollector address from the
horizon deployment into the $global patch in deploy.ts, and add a
recurringCollectorAddress placeholder to both the default and
localNetwork protocol configs so Ignition can getParameter() it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ignition's validator walks each deployed library's bytecode, so it is
not enough to link the four libraries into SubgraphService and stop
there. IndexingAgreement calls into IndexingAgreementDecoder, which
calls into IndexingAgreementDecoderRaw, so both transitive links have
to be declared up-front or the deploy aborts on IGN716 while validating
the library futures themselves.

Deploy IndexingAgreementDecoderRaw first, link it into the Decoder,
and link the Decoder into IndexingAgreement. SubgraphService keeps its
existing four links unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The audit-branch RecurringCollectionAgreement struct added a uint16
conditions field at position 9 (between maxSecondsPerCollection and
nonce). The toolshed decoder tuple was missing it, so decodeSignedRCA
read 10 fields against 11 ABI-encoded fields: nonce read what was
actually conditions, metadata read the wrong offset, decode threw.

The indexer-agent relies on this decoder to read pending RCA proposals
the indexer-service persists. Without the fix, every proposal logs
"Failed to decode pending RCA proposal" and is skipped, so the agent
never calls acceptIndexingAgreement on-chain and DIPs agreements
expire in dipper's DB.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MoonBoi9001 MoonBoi9001 force-pushed the mb9/dips-local-testing-fixes branch from dacb4b8 to 3e739a3 Compare April 28, 2026 08:42
@MoonBoi9001 MoonBoi9001 changed the base branch from indexing-payments-management-audit-fix-reduced to indexing-payments-management-audit-fix-2-light April 28, 2026 09:06
@graphprotocol graphprotocol deleted a comment from openzeppelin-code Bot Apr 30, 2026
@graphprotocol graphprotocol deleted a comment from codecov Bot Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants