Skip to content

Feat/fee mechanism#293

Open
dannyy2000 wants to merge 136 commits intoJagadeeshftw:masterfrom
dannyy2000:feat/fee-mechanism
Open

Feat/fee mechanism#293
dannyy2000 wants to merge 136 commits intoJagadeeshftw:masterfrom
dannyy2000:feat/fee-mechanism

Conversation

@dannyy2000
Copy link

  • Fix update_fee_config bug in program-escrow: use correct storage key
    (DataKey::Program(program_id) instead of unused PROGRAM_DATA)
  • Add missing PartiallyReleased case in bounty-escrow get_stats function
  • Remove unused PROGRAM_DATA constant

Test plan

  • All bounty-escrow tests pass (50 passed)
  • All program-escrow tests pass (24 passed)
  • Both contracts compile without warnings
  • Fee calculation accuracy verified
  • Zero-fee scenarios work correctly

Closes #156

Henry3029 and others added 30 commits January 23, 2026 10:07
- Add comprehensive event schema documentation (EVENT_SCHEMA.md)
  * Define event structures for all contracts
  * Document event versioning strategy
  * Provide indexing strategies and retention policies
  * Include monitoring hooks and filtering examples

- Implement event indexing infrastructure (internal/events/indexing.go)
  * EventIndexer for efficient event querying
  * Support for time-series, entity-based, and composite queries
  * Event aggregation capabilities
  * Event statistics and unindexed event tracking

- Implement event monitoring system (internal/events/monitoring.go)
  * EventMonitor for real-time event listening
  * AnomalyDetector for detecting unusual patterns
  * Alert generation and handling
  * EventFilter and EventAggregator utilities

- Implement advanced event filtering (internal/events/filtering.go)
  * FilterBuilder with fluent API
  * AdvancedEventFilter with operators (eq, ne, gt, gte, lt, lte, contains, in)
  * EventFilterStatistics for analytics
  * EventFilterExporter for JSON/CSV export

- Create database migration (migrations/000025_contract_events_indexing.up.sql)
  * contract_events table with comprehensive indexing
  * event_alerts table for monitoring alerts
  * event_metrics table for performance tracking
  * event_replay_log table for event replay capability
  * Materialized views for daily statistics
  * Database functions for cleanup and queries

- Add event indexing strategy guide (EVENT_INDEXING_STRATEGY.md)
  * Architecture overview and data flow
  * Database schema documentation
  * Indexing strategies (time-series, entity, composite, JSONB, materialized views)
  * Query patterns and monitoring hooks
  * Performance optimization techniques
  * Event retention policy

- Add event versioning documentation (contracts/EVENT_VERSIONING.md)
  * Semantic versioning scheme (MAJOR.MINOR.PATCH)
  * Version evolution rules and migration strategies
  * Deprecation timeline and best practices
  * Indexer compatibility patterns
  * Version roadmap

- Add implementation guide (EVENT_INDEXING_README.md)
  * Component overview and architecture
  * Usage examples for all major features
  * API integration patterns
  * Monitoring dashboard metrics
  * Performance tuning guide
  * Troubleshooting section

Key Features:
- Efficient off-chain event indexing with multiple strategies
- Real-time event monitoring and anomaly detection
- Comprehensive event schema with backward compatibility
- Event versioning for smooth schema evolution
- Advanced filtering and aggregation capabilities
- Performance metrics and SLA tracking
- Event retention policies for compliance
- Monitoring alerts and dashboards

Closes #[event-indexing-issue]
… Soroban contracts

- Add error classification system (transient, permanent, partial)
- Implement exponential backoff with jitter for retry logic
- Add circuit breaker pattern to prevent cascading failures
- Support partial success in batch operations with detailed tracking
- Implement error state persistence and monitoring
- Add comprehensive event emission for all error scenarios
- Create 20 passing unit tests covering all error recovery scenarios
- Integrate error recovery into program-escrow contract

This implementation significantly improves platform reliability by:
- Automatically retrying transient failures (network timeouts, rate limits)
- Preventing permanent error retries (insufficient funds, invalid addresses)
- Allowing batch operations to partially succeed instead of all-or-nothing
- Tracking failed batch items for targeted retry
- Implementing circuit breakers to prevent system overload
- Providing detailed error events for monitoring and debugging

All tests passing (36/36)
- Create comprehensive SDK for Grainlify contracts
- TypeScript bindings from contract ABIs
- Client classes for Core and Escrow contracts
- Examples for all workflows: lock funds, release funds, batch payouts, query escrow
- Error handling utilities
- Complete documentation and usage guide
- Remove node_modules directory from contracts/sdk
- Add node_modules/ to root .gitignore to prevent future commits
Jagadeeshftw and others added 4 commits January 30, 2026 00:34
…ple-languages-project-cards

feat: display multiple languages used in projects on project cards
…figuration

feat: admin configuration functions
- Fix update_fee_config bug in program-escrow: use correct storage key
- Add missing PartiallyReleased case in bounty-escrow get_stats
- Remove unused PROGRAM_DATA constant
- Update test to use new release_funds signature

Closes Jagadeeshftw#156
- Fix update_fee_config bug in program-escrow: use correct storage key
- Add missing PartiallyReleased case in bounty-escrow get_stats
- Remove unused PROGRAM_DATA constant
- Resolve merge conflicts with master

Closes Jagadeeshftw#156
@vercel
Copy link

vercel bot commented Jan 29, 2026

@dannyy2000 is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Jagadeeshftw Jagadeeshftw self-requested a review January 30, 2026 05:35
@Jagadeeshftw
Copy link
Owner

@dannyy2000, please resolve the conflicts.

@dannyy2000
Copy link
Author

@dannyy2000, please resolve the conflicts.

done, please review

@Jagadeeshftw
Copy link
Owner

@dannyy2000

@dannyy2000
Copy link
Author

@dannyy2000

yeah?

@Jagadeeshftw
Copy link
Owner

@dannyy2000 please fix the pipeline & resolve hte conflicts

@dannyy2000
Copy link
Author

@dannyy2000 please fix the pipeline & resolve hte conflicts

you are reviewing this the wrong way, thats why we have lots of conflicts, we shouldnt be having this large amounts of conflicts

@Jagadeeshftw
Copy link
Owner

@dannyy2000, could you please create a new PR with the new branch? I can see that code changes have been made in both the backend and frontend folders.

@dannyy2000
Copy link
Author

@dannyy2000, could you please create a new PR with the new branch? I can see that code changes have been made in both the backend and frontend folders.

whats the name of the new branch you created.

@Jagadeeshftw
Copy link
Owner

@dannyy2000, I asked you to create a new branch from the master and then submit a pull request.

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.

Implement Fee Mechanism for Platform Operations