-
Notifications
You must be signed in to change notification settings - Fork 22
Add Full Horizon (V2) TAP Receipt Verifier Support #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
neithanmo
wants to merge
30
commits into
main
Choose a base branch
from
feat/horizon
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix the TODO comment about mapping allocation types - now properly detects Horizon contracts and maps allocations accordingly instead of always using Legacy type
…able context Enhance RAV request error messages to indicate which receipt table (V1/Legacy vs V2/Horizon) was queried, helping with Horizon migration debugging
…acking Add comprehensive debug and info logging throughout the allocation and escrow account systems to improve troubleshooting of receipt processing, RAV generation, and Horizon migration issues.
- Reduce timestamp buffer from 1000s to 30s for faster RAV generation - Add trigger_value_divisor configuration for fine-tuned receipt batching - Set max_receipt_value_grt to 0.001 for controlled testing - Update tap-aggregator endpoint port configuration
7a60956
to
4c6e510
Compare
Add dual domain separator support for V1 (TAP) and V2 (GraphTally) protocols. This enables simultaneous processing of both legacy and Horizon receipt types with version-appropriate EIP712 domains
Update service components to support both V1 and V2 domain separators simultaneously. Includes IndexerTapContext, ServiceRouter, and middleware updates for version-aware receipt processing.
Critical fix for V2 receipt processing failures. Store receipts using version-appropriate domain separators to ensure correct signer recovery and escrow account lookup. Resolves "signer not found in V2 escrow accounts" errors.
Implement version-aware receipt authorization that routes V1 and V2 receipts to appropriate TAP managers. Includes new dual_tap_receipt_authorize function for simultaneous protocol support.
Update sender middleware to use version-appropriate domain separators for signer recovery. V1 receipts use legacy domain, V2 receipts use Horizon domain for correct escrow account lookups.
Add V2 domain separator support to sender account management, allocation handling, and receipt processing. Maintains single allocation type invariant while enabling version-appropriate domain usage.
Update receipt validation checks and test infrastructure to support dual domain separators. Ensures proper EIP712 domain usage for both V1 and V2 receipt types in testing scenarios.
Update integration tests, TAP agent tests, and service router tests to support V1/V2 dual domain architecture. Ensures comprehensive testing coverage for both protocol versions.
- Add optional receipts_verifier_address_v2 to BlockchainConfig - Update configuration examples with V2 verifier documentation - Prepare infrastructure for dual domain separator support
- Update indexer-service and tap-agent to use correct V2 verifier addresses - Add strict validation: V2 address required when horizon.enabled=true - Implement graceful fallback when Horizon is disabled
- Remove static config.toml files from indexer-service and tap-agent - Update Dockerfiles to rely on start.sh for dynamic config generation - Clean up docker-compose.dev.yml by removing commented static config mounts - Ensure consistent contract file mounting across all Docker configurations
0793bf6
to
f3b0f7d
Compare
Pull Request Test Coverage Report for Build 17218027720Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
3e2b57d
to
be4b685
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements comprehensive support for Horizon (V2) TAP receipts by adding dual domain separator configuration and proper V2 verifier address handling across all services. This completes the foundation for full Horizon migration support in the indexer-rs ecosystem.
Changes Made
Configuration Updates
receipts_verifier_address_v2
field toBlockchainConfig
for separate V2 contract addressesService Updates
indexer-service
to use correct V2 verifier address for domain separator creationtap-agent
to use correct V2 verifier address for global domain separatorshorizon.enabled = true
,receipts_verifier_address_v2
must be explicitly configured (fails fast with clear error)horizon.enabled = false
, V2 operations fall back to V1 verifier address if V2 isn't specifiedInfrastructure Updates
Key Behavioral Changes
Horizon Configuration Invariants
When
horizon.enabled = true
: Both services require explicit V2 verifier configuration and will fail fast with:When
horizon.enabled = false
: Both services gracefully fall back to V1 addresses for V2 domainsDomain Separator Logic
receipts_verifier_address
receipts_verifier_address_v2
(required)receipts_verifier_address_v2
or fallback toreceipts_verifier_address
Configuration Example
Impact
This change resolves the "No sender found for signer" errors that occurred when V2 receipts were validated against incorrect verifier contracts. The dual domain approach ensures:
Testing