@@ -6,14 +6,17 @@ use tokio::sync::mpsc;
66
77use oasis_runtime_sdk:: {
88 core:: {
9- common:: { crypto :: signature :: Signature , logger:: get_logger} ,
9+ common:: logger:: get_logger,
1010 consensus:: {
1111 beacon:: EpochTime , state:: beacon:: ImmutableState as BeaconState , verifier:: Verifier ,
1212 } ,
1313 host:: attestation:: { AttestLabelsRequest , LabelAttestation } ,
1414 } ,
1515 modules:: rofl:: types:: { AppInstanceQuery , Register , Registration } ,
1616} ;
17+ use oasis_runtime_sdk_rofl_market:: policy:: {
18+ ProviderAttestation , LABEL_PROVIDER , METADATA_KEY_POLICY_PROVIDER_ATTESTATION ,
19+ } ;
1720
1821use super :: { client:: SubmitTxOpts , processor, App , Environment } ;
1922
@@ -232,17 +235,3 @@ where
232235 Ok ( ( ) )
233236 }
234237}
235-
236- /// Name of the ROFL app instance metadata key used to store the provider attestation.
237- const METADATA_KEY_POLICY_PROVIDER_ATTESTATION : & str = "net.oasis.policy.provider" ;
238- /// Name of the provider label set by the scheduler.
239- const LABEL_PROVIDER : & str = "net.oasis.provider" ;
240-
241- /// Provider attestation metadata stored in `METADATA_KEY_POLICY_PROVIDER_ATTESTATION` label.
242- #[ derive( Clone , Debug , Default , cbor:: Encode , cbor:: Decode ) ]
243- struct ProviderAttestation {
244- /// A CBOR-serialized `LabelAttestation`.
245- pub label_attestation : Vec < u8 > ,
246- /// Signature from endorsing node.
247- pub signature : Signature ,
248- }
0 commit comments