diff --git a/flake.nix b/flake.nix index 9e3cd5883..13f4a58ae 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,9 @@ # rust toolchain (toolchain pkgs) + # for `hostname -I` + hostname-debian + # build dependencies llvmPackages.bintools openssl openssl.dev libiconv pkg-config libclang.lib libz clang pkg-config protobuf rustPlatform.bindgenHook diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 632d3c6a8..9beef3ad6 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -57,6 +57,7 @@ where transaction_ingress_result, background_task_result, services_result, + movement_rest_result, ) = try_join!( tokio::spawn(async move { exec_settle_task.run().await }), tokio::spawn(async move { transaction_ingress_task.run().await }), @@ -68,6 +69,7 @@ where .and(transaction_ingress_result) .and(background_task_result) .and(services_result) + .and(movement_rest_result) } } diff --git a/protocol-units/movement-rest/src/lib.rs b/protocol-units/movement-rest/src/lib.rs index 658481188..13a46550a 100644 --- a/protocol-units/movement-rest/src/lib.rs +++ b/protocol-units/movement-rest/src/lib.rs @@ -38,7 +38,7 @@ impl MovementRest { pub fn try_from_env() -> Result { let url = env::var(Self::MOVEMENT_REST_ENV_VAR) - .unwrap_or_else(|_| "http://0.0.0.0:30832".to_string()); + .unwrap_or_else(|_| "0.0.0.0:30832".to_string()); Ok(Self { url, context: None }) } @@ -46,7 +46,7 @@ impl MovementRest { self.context = Some(context); } - pub fn run_service(&self) -> impl Future> + Send { + pub fn run_service(&self) -> impl Future> + Send { info!("Starting movement rest service at {}", self.url); let movement_rest = self.create_routes(); Server::new(TcpListener::bind(self.url.clone())) @@ -60,11 +60,11 @@ impl MovementRest { .at("/movement/v1/state-root-hash/:blockheight", get(state_root_hash)) .at("movement/v1/richard", get(richard)) .at( - "/movement/v1/resource-proof/:table_handle/:key/:blockheight", + "/movement/v1/table-item-with-proof/:table_handle/:key/:blockheight", get(table_item_with_proof), ) .at("/movement/v1/state-proof/:blockheight", get(state_proof)) - .data(self.context.clone()) + .data(self.context.as_ref().unwrap().clone()) .with(Tracing) } }