Skip to content

runtime-sdk: Add provider-related endorsement constraints - #2241

Merged
kostko merged 2 commits into
mainfrom
kostko/feature/rofl-app-provider-constraints
Jul 11, 2025
Merged

runtime-sdk: Add provider-related endorsement constraints#2241
kostko merged 2 commits into
mainfrom
kostko/feature/rofl-app-provider-constraints

Conversation

@kostko

@kostko kostko commented Jun 18, 2025

Copy link
Copy Markdown
Member

Fixes #2237

@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch from 980de54 to 354ff3b Compare June 18, 2025 13:03
@kostko
kostko force-pushed the kostko/feature/rofl-scheduler-api-logs branch 3 times, most recently from 4ab4045 to 32f0c68 Compare June 20, 2025 07:10
Base automatically changed from kostko/feature/rofl-scheduler-api-logs to main June 20, 2025 07:35
@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch from 354ff3b to 47e3153 Compare June 20, 2025 11:53
@netlify

netlify Bot commented Jun 20, 2025

Copy link
Copy Markdown

Deploy Preview for oasisprotocol-oasis-sdk canceled.

Name Link
🔨 Latest commit 60025cd
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-oasis-sdk/deploys/6870fb24b30a2200087c732c

@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch 2 times, most recently from 51dfdad to d63d5a5 Compare June 23, 2025 09:55
@codecov

codecov Bot commented Jun 23, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 3.55030% with 163 lines in your changes missing coverage. Please review.

Project coverage is 53.38%. Comparing base (6b4a64e) to head (d63d5a5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
runtime-sdk/src/modules/rofl/policy.rs 2.12% 92 Missing ⚠️
runtime-sdk/modules/rofl-market/src/policy.rs 0.00% 42 Missing ⚠️
runtime-sdk/src/modules/rofl/app/registration.rs 0.00% 17 Missing ⚠️
runtime-sdk/src/modules/rofl/mod.rs 33.33% 8 Missing ⚠️
rofl-scheduler/src/manager.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2241      +/-   ##
==========================================
- Coverage   55.06%   53.38%   -1.69%     
==========================================
  Files         160      162       +2     
  Lines       12109    12230     +121     
==========================================
- Hits         6668     6529     -139     
- Misses       5441     5701     +260     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch 2 times, most recently from 5a640aa to 30ff9c8 Compare June 27, 2025 13:29
@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch 2 times, most recently from 211e6c7 to ce44e94 Compare July 10, 2025 13:01
@kostko
kostko marked this pull request as ready for review July 10, 2025 13:09
@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch from ce44e94 to bf791d9 Compare July 10, 2025 14:02
Comment thread runtime-sdk/modules/rofl-market/src/policy.rs
Comment thread runtime-sdk/src/modules/rofl/mod.rs Outdated
Comment thread runtime-sdk/modules/rofl-market/src/policy.rs
/// Provider attestation metadata stored in `METADATA_KEY_POLICY_PROVIDER_ATTESTATION` label.
#[derive(Clone, Debug, Default, cbor::Encode, cbor::Decode)]
pub struct ProviderAttestation {
/// A CBOR-serialized `LabelAttestation`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other structs you used name attestation and comment CBOR-serialized label attestation..

Comment thread runtime-sdk/src/modules/rofl/app/registration.rs Outdated
};

// Include provider-specific metadata if available.
if let Err(err) = self.collect_provider_metadata(&mut metadata).await {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Might be more readable if we renamed this function to fetch_provider_metadata and then insert it here, as currently the reader has no idea what is going on with metadata.

Comment thread runtime-sdk/src/modules/rofl/policy.rs
Comment thread runtime-sdk/src/modules/rofl/policy.rs

Self::verify_atoms(
ctx,
EndorsementPolicyOperator::Or,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is not important which operator we insert here, I would try to remove it from function signature?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not important in this particular invocation (because the default for outer-most atoms is OR), but that function is also called from other places where this can be AND (e.g. when evaluating the And operator).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but veriify_atoms is a public function of the trait, so it should not have this parameter (inner ones can have it).

Comment thread runtime-sdk/src/modules/rofl/policy.rs Outdated
@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch from bf791d9 to a262b93 Compare July 11, 2025 10:10
@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch 2 times, most recently from 6c30106 to 74589b3 Compare July 11, 2025 11:33
@kostko
kostko force-pushed the kostko/feature/rofl-app-provider-constraints branch from 74589b3 to 60025cd Compare July 11, 2025 11:53
@kostko
kostko merged commit 39703f7 into main Jul 11, 2025
26 checks passed
@kostko
kostko deleted the kostko/feature/rofl-app-provider-constraints branch July 11, 2025 12:26
github-actions Bot added a commit that referenced this pull request Jul 11, 2025
…ostko/feature/rofl-app-provider-constraints

runtime-sdk: Add provider-related endorsement constraints 39703f7
github-actions Bot added a commit that referenced this pull request Jul 11, 2025
…/kostko/feature/rofl-app-provider-constraints

runtime-sdk: Add provider-related endorsement constraints 39703f7
github-actions Bot added a commit to OasisUnofficial/oasis-sdk that referenced this pull request Jul 11, 2025
…oasisprotocol/kostko/feature/rofl-app-provider-constraints

runtime-sdk: Add provider-related endorsement constraints 39703f7
github-actions Bot added a commit to OasisUnofficial/oasis-sdk that referenced this pull request Jul 11, 2025
…sisprotocol/kostko/feature/rofl-app-provider-constraints

runtime-sdk: Add provider-related endorsement constraints 39703f7
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.

rofl: Add more provider-based endorsement constraints

2 participants