Skip to content

fix: add missing Ignition dependency for HorizonStaking#1305

Open
MoonBoi9001 wants to merge 1 commit intomde/dips-ignition-deploymentfrom
fix/horizon-staking-ignition-dependency
Open

fix: add missing Ignition dependency for HorizonStaking#1305
MoonBoi9001 wants to merge 1 commit intomde/dips-ignition-deploymentfrom
fix/horizon-staking-ignition-dependency

Conversation

@MoonBoi9001
Copy link
Member

Motivation

During local-network testing with fresh contract deployments, HorizonStaking deployment intermittently fails with GraphDirectoryInvalidZeroAddress("GraphToken"). The failure is nondeterministic -- it depends on the order Ignition schedules module execution.

Summary

HorizonStaking's constructor extends GraphDirectory, which queries the Controller for GraphToken, EpochManager, RewardsManager, and other periphery contracts. These addresses are registered in the Controller by GraphPeripheryModule. Without an explicit after dependency, Ignition may schedule HorizonStaking before the periphery registrations complete, causing the constructor to read address(0) and revert.

Every other core module (GraphPayments, PaymentsEscrow, GraphTallyCollector, RecurringCollector) already declares { after: [GraphPeripheryModule, HorizonProxiesModule] }. HorizonStaking was the only one missing it.

The fix adds the same dependency declaration to HorizonStaking.ts. This only affects fresh deployments (new chains, testnets, local environments) -- on mainnet, the Controller already has all addresses registered so the ordering is irrelevant.

🤖 Generated with Claude Code

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>
@MoonBoi9001 MoonBoi9001 marked this pull request as ready for review March 11, 2026 20:47
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.58%. Comparing base (7b34ae0) to head (d3fc44f).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           mde/dips-ignition-deployment    #1305   +/-   ##
=============================================================
  Coverage                         81.58%   81.58%           
=============================================================
  Files                                47       47           
  Lines                              2644     2644           
  Branches                            787      787           
=============================================================
  Hits                               2157     2157           
  Misses                              487      487           
Flag Coverage Δ
unittests 81.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant