Repository navigation
feat(oracle): implement oracle network contract and off-chain node service (#362) - #367
Draft
s6pa1rta3n-lab wants to merge 1 commit into
Draft
s6pa1rta3n-lab wants to merge 1 commit into
s6pa1rta3n-lab wants to merge 1 commit into
Conversation
|
@s6pa1rta3n-lab is attempting to deploy a commit to the Isaac Gellu's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
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
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
Closes #362
Implements the complete Oracle Network system consisting of an on-chain Soroban smart contract and an off-chain persistent node daemon service:
On-Chain Oracle Network Contract (
contracts/oracle-network):100_000_000stroops) for registration (register_node,deregister_node,get_node). Inactive or under-staked nodes are barred from submitting data.register_feed,get_feed_config) with configurable freshness window, maximum deviation basis points (max_deviation_bps), and minimum quorum threshold.submit_data(node, feed_id, value, timestamp)verifies node authorization, active stake status, and timestamp freshness.OUTLIER_PENALTY).slash_node(caller, node, amount)enforces caller authorization by admin or designated governance contract (set_governance).submit_reading,get_reading, andaggregatemethods.Off-Chain Node Daemon Runtime (
packages/oracle-node):OracleNodeServicedaemon loop running indefinitely with configurable polling interval (POLL_INTERVAL_MS)."bin": { "oracle-node": "dist/bin.js" }and"start": "node dist/bin.js"scripts.BackendCreditScoreAdapter: Fetches off-chain credit scores from backend API with fallback.BackendFraudAlertAdapter: Fetches risk and fraud status signals.StaticFeedAdapter: Deterministic / simulated adapter with dynamic value setting and drift simulation.submissions_succeeded,submissions_failed,submissions_rejected.GET /health/GET /api/v1/status: Health check, uptime, active feeds, and contract info.GET /metrics/GET /api/v1/metrics: Performance metrics in JSON and Prometheus exposition format.@chenaikit/oracle-nodeclient.createGracefulShutdownhandlesSIGINT/SIGTERMsignals, closes network listeners, and cancels pending work cleanly.Operational Documentation (
docs/oracle-node.md):Testing done
cargo test -p oracle-networkScreenshots
N/A - backend oracle smart contract and off-chain daemon runtime only.
Checklist
Payout Routing
0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC