runtime-sdk: Add provider-related endorsement constraints - #2241
Conversation
980de54 to
354ff3b
Compare
4ab4045 to
32f0c68
Compare
354ff3b to
47e3153
Compare
✅ Deploy Preview for oasisprotocol-oasis-sdk canceled.
|
51dfdad to
d63d5a5
Compare
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
5a640aa to
30ff9c8
Compare
211e6c7 to
ce44e94
Compare
ce44e94 to
bf791d9
Compare
| /// 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`. |
There was a problem hiding this comment.
In other structs you used name attestation and comment CBOR-serialized label attestation..
| }; | ||
|
|
||
| // Include provider-specific metadata if available. | ||
| if let Err(err) = self.collect_provider_metadata(&mut metadata).await { |
There was a problem hiding this comment.
[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.
|
|
||
| Self::verify_atoms( | ||
| ctx, | ||
| EndorsementPolicyOperator::Or, |
There was a problem hiding this comment.
If it is not important which operator we insert here, I would try to remove it from function signature?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Yes, but veriify_atoms is a public function of the trait, so it should not have this parameter (inner ones can have it).
bf791d9 to
a262b93
Compare
6c30106 to
74589b3
Compare
74589b3 to
60025cd
Compare
…ostko/feature/rofl-app-provider-constraints runtime-sdk: Add provider-related endorsement constraints 39703f7
…/kostko/feature/rofl-app-provider-constraints runtime-sdk: Add provider-related endorsement constraints 39703f7
…oasisprotocol/kostko/feature/rofl-app-provider-constraints runtime-sdk: Add provider-related endorsement constraints 39703f7
…sisprotocol/kostko/feature/rofl-app-provider-constraints runtime-sdk: Add provider-related endorsement constraints 39703f7
Fixes #2237