Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove request-state argument form run config. no longer necessary to…
… explicitly request this
  • Loading branch information
brenzi committed Dec 4, 2023
commit 22357f29ed6b886d14f7d9821cbf7b73a89a7d2f
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ services:
interval: 10s
timeout: 10s
retries: 25
command: "--clean-reset --data-dir /tmp/worker2 --ws-external -M integritee-worker-2 -T wss://integritee-worker-2 -u ws://integritee-node -U ws://integritee-worker-2 -P 2012 -w 2102 -p 9912 -h 4646 run --dev --request-state ${ADDITIONAL_RUNTIME_FLAGS}"
command: "--clean-reset --data-dir /tmp/worker2 --ws-external -M integritee-worker-2 -T wss://integritee-worker-2 -u ws://integritee-node -U ws://integritee-worker-2 -P 2012 -w 2102 -p 9912 -h 4646 run --dev ${ADDITIONAL_RUNTIME_FLAGS}"
restart: "no"
networks:
integritee-test-network:
Expand Down
6 changes: 1 addition & 5 deletions service/src/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ subcommands:
long: dev
short: d
help: Set this flag if running in development mode to bootstrap enclave account on parentchain via //Alice.
- request-state:
long: request-state
short: r
help: Run the worker and request key and state provisioning from another worker.
- teeracle-interval:
required: false
long: teeracle-interval
Expand All @@ -140,7 +136,7 @@ subcommands:
help: Set the teeracle reregistration interval. Example of accepted syntax <5 seconds 15 minutes 2 hours 1 days> or short <5s15m2h1d>
takes_value: true
- request-state:
about: join a shard by requesting key provisioning from another worker
about: (DEPRECATED) join a shard by requesting key provisioning from another worker
args:
- shard:
long: shard
Expand Down
11 changes: 0 additions & 11 deletions service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,6 @@ pub struct RunConfig {
skip_ra: bool,
/// Set this flag if running in development mode to bootstrap enclave account on parentchain via //Alice.
dev: bool,
/// Request key and state provisioning from a peer worker.
request_state: bool,
/// Shard identifier base58 encoded. Defines the shard that this worker operates on. Default is mrenclave.
shard: Option<String>,
/// Optional teeracle update interval
Expand All @@ -286,10 +284,6 @@ impl RunConfig {
self.dev
}

pub fn request_state(&self) -> bool {
self.request_state
}

pub fn shard(&self) -> Option<&str> {
self.shard.as_deref()
}
Expand Down Expand Up @@ -319,7 +313,6 @@ impl From<&ArgMatches<'_>> for RunConfig {
fn from(m: &ArgMatches<'_>) -> Self {
let skip_ra = m.is_present("skip-ra");
let dev = m.is_present("dev");
let request_state = m.is_present("request-state");
let shard = m.value_of("shard").map(|s| s.to_string());
let teeracle_update_interval = m.value_of("teeracle-interval").map(|i| {
parse(i).unwrap_or_else(|e| panic!("teeracle-interval parsing error {:?}", e))
Expand All @@ -337,7 +330,6 @@ impl From<&ArgMatches<'_>> for RunConfig {
Self {
skip_ra,
dev,
request_state,
shard,
teeracle_update_interval,
reregister_teeracle_interval,
Expand Down Expand Up @@ -464,7 +456,6 @@ mod test {
let empty_args = ArgMatches::default();
let run_config = RunConfig::from(&empty_args);

assert_eq!(run_config.request_state, false);
assert_eq!(run_config.dev, false);
assert_eq!(run_config.skip_ra, false);
assert!(run_config.shard.is_none());
Expand All @@ -477,7 +468,6 @@ mod test {

let mut args = ArgMatches::default();
args.args = HashMap::from([
("request-state", Default::default()),
("dev", Default::default()),
("skip-ra", Default::default()),
("shard", Default::default()),
Expand All @@ -489,7 +479,6 @@ mod test {

let run_config = RunConfig::from(&args);

assert_eq!(run_config.request_state, true);
assert_eq!(run_config.dev, true);
assert_eq!(run_config.skip_ra, true);
assert_eq!(run_config.shard.unwrap(), shard_identifier.to_string());
Expand Down