Skip to content

Local network setup for indexing payments#69

Draft
RembrandtK wants to merge 6 commits intomainfrom
ip_local_network
Draft

Local network setup for indexing payments#69
RembrandtK wants to merge 6 commits intomainfrom
ip_local_network

Conversation

@RembrandtK
Copy link
Copy Markdown
Member

I am not sure this will play nicely yet, busy fixing some issues.

Adds the deployment path for the GIP-0088 contract bundle (REO +
IssuanceAllocator + RecurringAgreementManager):

- New graph-contracts-issuance container for the Phase 4/5 deployment,
  wired after graph-contracts-horizon and running the issuance package
  deploy sequence (REO, IA, RAM, activation).
- Rename existing graph-contracts container to graph-contracts-horizon
  to distinguish it from the new issuance container. Dev-override files
  split correspondingly into graph-contracts-only.yaml and
  graph-contracts-issuance.yaml.
- Rename the Kafka topic from indexer_daily_metrics to
  eligibility_oracle_state to match the REO aggregator output name.
- Contract naming: the issuance deploy produces RewardsEligibilityOracleA
  (and B/Mock variants); consumers updated to read the A variant from
  issuance.json.
- Horizon compatibility: use getStake instead of hasStake in
  indexer-agent run.sh.
- Add KAFKA_TOPIC_ENVIRONMENT optional env var that all producers and
  consumers append to their topic names (e.g. gateway_queries_local).
  Leave empty for default topic names. All consumers must agree on the
  value; centralised in shared/lib.sh via kafka_topic() helper.
- Run redpanda as root so rpk topic bootstrap operations can write to
  the data directory without permission errors.
- Enable dipper's Redpanda signal consumer: kafka.brokers, topic, and
  consumer_group in generated config.json.
- Fix dipper config to resolve recurring_collector address from the
  horizon address book (moved to a different JSON file layout).
- Enable indexer-service DIPs gRPC server (listen on DIPS_PORT, expose
  to local-network consumers).
- Map chain ID 1337 to hardhat in dipper's additional_networks so the
  local hardhat chain is recognised.
- Remove docs/indexing-payments/RecurringCollectorDeployment.md —
  superseded by graph-contracts-issuance container deployment flow.
GHCR packages for dipper-service and subgraph-dips-indexer-selection are
not published, so point both versions at :local tags built from sibling
repos. Also enable the indexing-payments profile by default on this branch.
Switches four runtime services from clone-and-build wrappers
(FROM debian:bookworm-slim + ARG *_COMMIT + cargo build) to thin
image-consumption wrappers (FROM ghcr.io/...:${VERSION}). Each wrapper
now just adds the tools run.sh needs (jq, curl, rpk) and overrides
ENTRYPOINT with the local-network run.sh.

Conversions:

- eligibility-oracle-node → ghcr.io/edgeandnode/eligibility-oracle-node:main.
  Updates run.sh for the upstream config schema change
  ([[blockchain.contracts]]/[[blockchain.chains]] arrays, drop
  staleness_threshold_secs) and the contract rename
  (RewardsEligibilityOracle → RewardsEligibilityOracleA) across scripts
  and docs.
- gateway → ghcr.io/edgeandnode/graph-gateway:sha-50c7081 (pinned to
  upstream main HEAD; CI publishes sha-<short> tags only).
- tap-escrow-manager → ghcr.io/edgeandnode/tap-escrow-manager:sha-df659cf.
  Symlinks /opt/tap-escrow-manager to /usr/local/bin so run.sh can
  invoke the binary by name.
- graph-node bumped v0.37.0 → v0.42.1.
- indexer-tap-agent bumped v1.12.2 → v2.0.0.

Env var renames: *_COMMIT → *_VERSION for each converted dep.
Profile rename: rewards-eligibility → eligibility-oracle (service name
eligibility-oracle-node retained to keep the contract-vs-node
distinction visible). Env var ELIGIBILITY_ORACLE_VERSION renamed to
ELIGIBILITY_ORACLE_NODE_VERSION for the same reason.

Extend CONTRACTS_COMMIT from short sha to full 40-char sha.

Dev-override restructure: drop bundled graph-contracts.yaml (which
mixed contracts + subgraph concerns), rename
graph-contracts-only.yaml → graph-contracts-horizon.yaml, add new
network-subgraph.yaml for the subgraph-deploy override alone, rename
GRAPH_CONTRACTS_SOURCE_ROOT → NETWORK_SUBGRAPH_SOURCE_ROOT to match
what it actually points at. Add note to compose/dev/README.md that
image-tag consumption is preferred over these overrides, which are not
all recently tested.

COMPOSE_PROFILES default includes all four profiles; comment updated
to flag that indexing-payments requires GHCR auth.

Note: graphprotocol/rewards-eligibility-oracle is a *different*
Python-based project; the local-network dep is the Rust one at
edgeandnode/eligibility-oracle-node.
Sequential cast send calls with --confirmations=0 returned before the tx was
visible in chain state, so the next tx was built with a stale nonce and got
'nonce too low' from the chain. Default cast send behaviour waits for the tx
receipt, which serializes the approve/mint pairs correctly.

Cascading effect: when start-indexing died partway through the
approve+mint curation loop, allocations were never created, which starved
dipper's topology fetch (empty gateway API responses interpreted as 'failed
to fetch subgraphs info' and retried indefinitely).
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