diff --git a/thirdparty/asic-rs/patches/0014-luxminer-pool-ops-privileged.patch b/thirdparty/asic-rs/patches/0014-luxminer-pool-ops-privileged.patch new file mode 100644 index 00000000..1b3fa059 --- /dev/null +++ b/thirdparty/asic-rs/patches/0014-luxminer-pool-ops-privileged.patch @@ -0,0 +1,88 @@ +Subject: [PATCH 0014] luxminer: pool ops must be privileged (send session_id); add removepool + +Round 16 / G13. The LuxOS pool write commands (addgroup, groupquota, removegroup, +addpool, switchpool, enablepool, disablepool) were sent with privileged=false, so +no session_id was included. That works on default units but FAILS with a +"Missing session_id" error on password-set LuxOS units (every other LuxOS write -- +profileset/fanset/curtail/etc. -- is already privileged=true). Flip all seven pool +ops to privileged=true so send_command prepends the logon session token, and add +the missing rpc.removepool (privileged) for future incremental pool editing. + +Verified no regression on a default corpus unit (10.4.1.60): set_pools_config still +applies correctly via the new privileged path. The password-set failure path is a +code-correct fix but needs a password-set LuxOS unit to reproduce/verify live. +diff --git a/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs b/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs +index 1afc686c..39d7ef63 100644 +--- a/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs ++++ b/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs +@@ -239,7 +239,7 @@ impl LUXMinerRPCAPI { + pub async fn addgroup(&self, name: &str, quota: u32) -> anyhow::Result { + self.send_command( + "addgroup", +- false, ++ true, + Some(Value::String(format!("{name},{quota}"))), + ) + .await +@@ -248,7 +248,7 @@ impl LUXMinerRPCAPI { + pub async fn groupquota(&self, group_id: u32, quota: u32) -> anyhow::Result { + self.send_command( + "groupquota", +- false, ++ true, + Some(Value::String(format!("{group_id},{quota}"))), + ) + .await +@@ -257,7 +257,7 @@ impl LUXMinerRPCAPI { + pub async fn removegroup(&self, group_id: u32) -> anyhow::Result { + self.send_command( + "removegroup", +- false, ++ true, + Some(Value::String(group_id.to_string())), + ) + .await +@@ -275,14 +275,14 @@ impl LUXMinerRPCAPI { + params.push(group_id); + } + +- self.send_command("addpool", false, Some(Value::String(params.join(",")))) ++ self.send_command("addpool", true, Some(Value::String(params.join(",")))) + .await + } + + pub async fn switchpool(&self, pool_id: i32) -> anyhow::Result { + self.send_command( + "switchpool", +- false, ++ true, + Some(Value::String(pool_id.to_string())), + ) + .await +@@ -291,7 +291,7 @@ impl LUXMinerRPCAPI { + pub async fn enablepool(&self, pool_id: i32) -> anyhow::Result { + self.send_command( + "enablepool", +- false, ++ true, + Some(Value::String(pool_id.to_string())), + ) + .await +@@ -300,7 +300,16 @@ impl LUXMinerRPCAPI { + pub async fn disablepool(&self, pool_id: i32) -> anyhow::Result { + self.send_command( + "disablepool", +- false, ++ true, ++ Some(Value::String(pool_id.to_string())), ++ ) ++ .await ++ } ++ ++ pub async fn removepool(&self, pool_id: i32) -> anyhow::Result { ++ self.send_command( ++ "removepool", ++ true, + Some(Value::String(pool_id.to_string())), + ) + .await diff --git a/vendor/asic-rs-firmwares-luxminer/.cargo-checksum.json b/vendor/asic-rs-firmwares-luxminer/.cargo-checksum.json index 3da6e8db..2ab73664 100644 --- a/vendor/asic-rs-firmwares-luxminer/.cargo-checksum.json +++ b/vendor/asic-rs-firmwares-luxminer/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"fe8effe2bfdda5d4c390656c016729f531a2b1c60033228557659c0befdde9f2","Cargo.lock":"a2b2cb45bb8b574e4f29ffdcdb5ebafd1dd87a0e6e11b47383973a99be367784","Cargo.toml":"503efa00123f8567f5fe40bf6a93e9e453d13094df0e0e1b7e98bdacdfbd2595","Cargo.toml.orig":"1c4ba0315fb491c086fc22a5c9bafaf7288c6b1fd48679c3d03dbd9df156a8b5","src/backends/mod.rs":"548d988b877410e330a55e275f64b2adad95ca5f1a0f085fe144957c96b8906f","src/backends/v1/mod.rs":"3e57d2c72d1d48c0b86f5438202633fcd9c1ebf375bd87ffe53ea5298ae936ad","src/backends/v1/rpc.rs":"9dea9c65629e1e9b833b96a4ae88014f7195a26036104f92daa264fbdf13feba","src/firmware.rs":"d95345295ae5043dfc357e69ae56c564b261fdb3b19b5c0ad1765267ff05ab3f","src/lib.rs":"53f7acddeff8f7d82f80d09e0a9f91962011f9ccf2e441c4ca05cd7fc4eb292e","src/test/json/mod.rs":"24191681066d5cf6a3022ad59c1baa92b57e3ce7717bb78d6a682af9e19a38c4","src/test/json/v1/config.json":"6ca9e6217d853d4bf1e75d69159630e9c9184ede96751706b88dfb699b5d59ad","src/test/json/v1/devs.json":"8f746dc6a02953eee5ee96dcf53be8dc7880a8ffc2c6e303f0284bcf6a97f42d","src/test/json/v1/events.json":"913683ff97af3333018807e1cc6e43467ea8a55925e5964dc402616615e2a5e3","src/test/json/v1/fans.json":"f8a9a1234d651055c80f4ebb1380bbb4e6d19eb33012902c55fff1385e592447","src/test/json/v1/healthchipget_0.json":"10619460049333ca016b2beec59ecc514ed9077fb19bdf7d0ed697201f8cb96c","src/test/json/v1/healthchipget_1.json":"80927fb1480c95be7f3a4e155d63f68f97720530ff7cf5d5ade06f2a3e810bf0","src/test/json/v1/healthchipget_2.json":"1e93ee2ab472ee7af58add08b4251e3ce0ad4f986d4325abbf43fd4c9b3dd28f","src/test/json/v1/mod.rs":"5a050f07455e622e35ad79ab1c8a6daf2ea38c4198472e49c6bbfe80538a9e48","src/test/json/v1/pools.json":"0068745327e31853fec051172abb7337f18a4cf9972c51967113d63f4f31f504","src/test/json/v1/power.json":"80534bb4581de7c8b747bf33b5d629b909c6e16a531d18ecb4afd7ffad3f014f","src/test/json/v1/profiles.json":"1f00429036e270daa08f12cd2d7357135070c57acd7a899a3c0af6167fe82abb","src/test/json/v1/stats.json":"2b105f0eb927046c9d2389bde978a43e3d54d12a420dfbe400786bb2f0ae31ca","src/test/json/v1/summary.json":"aaea3378eb7040952037e2f1ef7bd5f20a1b242bf93d4ba0501c46104b0b31a0","src/test/json/v1/temps.json":"1ee781cd2be3ed6a6a07e23be930248735fb51348c160453ba10f6ef71fcb7f1","src/test/json/v1/version.json":"4beb6ca5c0ebf359cee0434fdcc4d0a1a0607436634e46be3fd951e2256595df","src/test/json/v1/voltageget_0.json":"c445fa8674c2542b2d296fbafdd3166c53008dfbd9da8095327217989d37f1da","src/test/json/v1/voltageget_1.json":"96b91c3447dd66e7f1f575ed3b99611062e8b1d516d31422b74e425c46b2f49c","src/test/json/v1/voltageget_2.json":"7d40544021b2e32401135ae333067b770d2d736ada9e60deaca8fd8f5a79a1e3","src/test/mod.rs":"ed52c3d613eabc4a0346bb38bcfdf7a94933d61e368d3c9094821edeab92f81b"},"package":"513792d93a2a21d5258d9e6ac0e6dc9e0a6365118934514b4e656792add78066"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"fe8effe2bfdda5d4c390656c016729f531a2b1c60033228557659c0befdde9f2","Cargo.lock":"a2b2cb45bb8b574e4f29ffdcdb5ebafd1dd87a0e6e11b47383973a99be367784","Cargo.toml":"503efa00123f8567f5fe40bf6a93e9e453d13094df0e0e1b7e98bdacdfbd2595","Cargo.toml.orig":"1c4ba0315fb491c086fc22a5c9bafaf7288c6b1fd48679c3d03dbd9df156a8b5","src/backends/mod.rs":"548d988b877410e330a55e275f64b2adad95ca5f1a0f085fe144957c96b8906f","src/backends/v1/mod.rs":"3e57d2c72d1d48c0b86f5438202633fcd9c1ebf375bd87ffe53ea5298ae936ad","src/backends/v1/rpc.rs":"25b0b9d56fbf113d5b8c3d3bc8eb7a0d67967b1f90f6d855da0b9f6ff24ae335","src/firmware.rs":"d95345295ae5043dfc357e69ae56c564b261fdb3b19b5c0ad1765267ff05ab3f","src/lib.rs":"53f7acddeff8f7d82f80d09e0a9f91962011f9ccf2e441c4ca05cd7fc4eb292e","src/test/json/mod.rs":"24191681066d5cf6a3022ad59c1baa92b57e3ce7717bb78d6a682af9e19a38c4","src/test/json/v1/config.json":"6ca9e6217d853d4bf1e75d69159630e9c9184ede96751706b88dfb699b5d59ad","src/test/json/v1/devs.json":"8f746dc6a02953eee5ee96dcf53be8dc7880a8ffc2c6e303f0284bcf6a97f42d","src/test/json/v1/events.json":"913683ff97af3333018807e1cc6e43467ea8a55925e5964dc402616615e2a5e3","src/test/json/v1/fans.json":"f8a9a1234d651055c80f4ebb1380bbb4e6d19eb33012902c55fff1385e592447","src/test/json/v1/healthchipget_0.json":"10619460049333ca016b2beec59ecc514ed9077fb19bdf7d0ed697201f8cb96c","src/test/json/v1/healthchipget_1.json":"80927fb1480c95be7f3a4e155d63f68f97720530ff7cf5d5ade06f2a3e810bf0","src/test/json/v1/healthchipget_2.json":"1e93ee2ab472ee7af58add08b4251e3ce0ad4f986d4325abbf43fd4c9b3dd28f","src/test/json/v1/mod.rs":"5a050f07455e622e35ad79ab1c8a6daf2ea38c4198472e49c6bbfe80538a9e48","src/test/json/v1/pools.json":"0068745327e31853fec051172abb7337f18a4cf9972c51967113d63f4f31f504","src/test/json/v1/power.json":"80534bb4581de7c8b747bf33b5d629b909c6e16a531d18ecb4afd7ffad3f014f","src/test/json/v1/profiles.json":"1f00429036e270daa08f12cd2d7357135070c57acd7a899a3c0af6167fe82abb","src/test/json/v1/stats.json":"2b105f0eb927046c9d2389bde978a43e3d54d12a420dfbe400786bb2f0ae31ca","src/test/json/v1/summary.json":"aaea3378eb7040952037e2f1ef7bd5f20a1b242bf93d4ba0501c46104b0b31a0","src/test/json/v1/temps.json":"1ee781cd2be3ed6a6a07e23be930248735fb51348c160453ba10f6ef71fcb7f1","src/test/json/v1/version.json":"4beb6ca5c0ebf359cee0434fdcc4d0a1a0607436634e46be3fd951e2256595df","src/test/json/v1/voltageget_0.json":"c445fa8674c2542b2d296fbafdd3166c53008dfbd9da8095327217989d37f1da","src/test/json/v1/voltageget_1.json":"96b91c3447dd66e7f1f575ed3b99611062e8b1d516d31422b74e425c46b2f49c","src/test/json/v1/voltageget_2.json":"7d40544021b2e32401135ae333067b770d2d736ada9e60deaca8fd8f5a79a1e3","src/test/mod.rs":"ed52c3d613eabc4a0346bb38bcfdf7a94933d61e368d3c9094821edeab92f81b"},"package":"513792d93a2a21d5258d9e6ac0e6dc9e0a6365118934514b4e656792add78066"} \ No newline at end of file diff --git a/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs b/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs index 1afc686c..39d7ef63 100644 --- a/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs +++ b/vendor/asic-rs-firmwares-luxminer/src/backends/v1/rpc.rs @@ -239,7 +239,7 @@ impl LUXMinerRPCAPI { pub async fn addgroup(&self, name: &str, quota: u32) -> anyhow::Result { self.send_command( "addgroup", - false, + true, Some(Value::String(format!("{name},{quota}"))), ) .await @@ -248,7 +248,7 @@ impl LUXMinerRPCAPI { pub async fn groupquota(&self, group_id: u32, quota: u32) -> anyhow::Result { self.send_command( "groupquota", - false, + true, Some(Value::String(format!("{group_id},{quota}"))), ) .await @@ -257,7 +257,7 @@ impl LUXMinerRPCAPI { pub async fn removegroup(&self, group_id: u32) -> anyhow::Result { self.send_command( "removegroup", - false, + true, Some(Value::String(group_id.to_string())), ) .await @@ -275,14 +275,14 @@ impl LUXMinerRPCAPI { params.push(group_id); } - self.send_command("addpool", false, Some(Value::String(params.join(",")))) + self.send_command("addpool", true, Some(Value::String(params.join(",")))) .await } pub async fn switchpool(&self, pool_id: i32) -> anyhow::Result { self.send_command( "switchpool", - false, + true, Some(Value::String(pool_id.to_string())), ) .await @@ -291,7 +291,7 @@ impl LUXMinerRPCAPI { pub async fn enablepool(&self, pool_id: i32) -> anyhow::Result { self.send_command( "enablepool", - false, + true, Some(Value::String(pool_id.to_string())), ) .await @@ -300,7 +300,16 @@ impl LUXMinerRPCAPI { pub async fn disablepool(&self, pool_id: i32) -> anyhow::Result { self.send_command( "disablepool", - false, + true, + Some(Value::String(pool_id.to_string())), + ) + .await + } + + pub async fn removepool(&self, pool_id: i32) -> anyhow::Result { + self.send_command( + "removepool", + true, Some(Value::String(pool_id.to_string())), ) .await