feat: parse oracle-url from YAML order config (Phase 6)#2462
feat: parse oracle-url from YAML order config (Phase 6)#2462hardyjosh merged 5 commits intofeat/signed-context-oracle-uifrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks 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 |
b349274 to
e375cee
Compare
7658403 to
48ead0a
Compare
e375cee to
10a7183
Compare
48ead0a to
0102b3d
Compare
57bb022 to
5963780
Compare
8f45a90 to
4d23ec9
Compare
5963780 to
7fb4b52
Compare
Adds optional oracle-url field to OrderCfg, parsed from the YAML front matter orders section. When present, this URL identifies a signed context oracle server for the order. Changes: - Add oracle_url: Option<String> to OrderCfg struct - Parse oracle-url via optional_string in YAML parsing - Add oracle-url to ALLOWED_ORDER_KEYS - Update Default and PartialEq impls - Add test for oracle-url parsing (present + absent) Spec: rainlanguage/specs#45 Chained on: #2459 (Phase 4)
When an order has oracle_url set in its config, new_from_deployment now creates a SignedContextOracleV1 meta item and includes it in the order's additional_meta. This means orders deployed with oracle-url in their YAML will have the oracle endpoint encoded in their onchain RainMetaDocumentV1, making it discoverable by takers and indexers (Phase 2 reads it back). Changes: - Import SignedContextOracleV1 in add_order.rs - In new_from_deployment: parse oracle_url, create meta item, append to additional_meta
4d23ec9 to
b48a03d
Compare
456b907 to
3e4ac64
Compare
|
@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
Caution
Merge order: Merge #2459 first, then this PR.
Motivation
Orders that use signed context oracles need a way to specify the oracle endpoint URL in the dotrain YAML config. This is the missing link between the YAML front matter and the on-chain metadata that takers use to discover oracles.
Solution
OrderCfg: neworacle_url: Option<String>fieldoracle-urlparsed viaoptional_string(same pattern asdeployer/orderbook)ALLOWED_ORDER_KEYS: addedoracle-urloracle-urlis deployed viaaddOrder, aSignedContextOracleV1item is included in the order'sRainMetaDocumentV1Checks
By submitting this for review, I'm confirming I've done the following: