Skip to content

Commit 815bc1c

Browse files
committed
rofl-app-core: Remove duplicate roflmarket policy types
1 parent 0ee3414 commit 815bc1c

3 files changed

Lines changed: 6 additions & 15 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rofl-app-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2021"
66
[dependencies]
77
cbor = { version = "0.5.1", package = "oasis-cbor" }
88
oasis-runtime-sdk = { path = "../runtime-sdk" }
9+
oasis-runtime-sdk-rofl-market = { path = "../runtime-sdk/modules/rofl-market" }
910

1011
# Third party.
1112
anyhow = "1.0.86"

rofl-app-core/src/registration.rs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ use tokio::sync::mpsc;
66

77
use 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

1821
use 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

Comments
 (0)