Skip to content

feat(antminer): add missing trait implementations for stock AM#274

Open
b-rowan wants to merge 4 commits into
256foundation:masterfrom
b-rowan:add-stock-am-traits
Open

feat(antminer): add missing trait implementations for stock AM#274
b-rowan wants to merge 4 commits into
256foundation:masterfrom
b-rowan:add-stock-am-traits

Conversation

@b-rowan

@b-rowan b-rowan commented Jun 15, 2026

Copy link
Copy Markdown
Member

Adds all traits that stock antminer firmware can support, basically everything sans scaling.

Includes some generic fixes for python representations of data types I noticed while testing.

};

self.web
.set_miner_conf(json!({ mode_key: mode.to_string() }))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be merged with the existing configuration?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so for 2023? I don't have a miner with newer FW so I can't really test, but the pause/resume implementation seems to not care -

https://github.com/b-rowan/asic-rs/blob/add-stock-am-traits/asic-rs-firmwares/antminer/src/backends/v2023_07/mod.rs#L939-L966

let success = self.web.change_password(password).await?;
if success {
let username = self.web.username().to_string();
self.set_auth(MinerAuth::new(username, password));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the call could time out after the miner accepted the password change and the would leave us with stale creds. Maybe we should re auth after the change_password call to verify what creds are set.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. That endpoint is kinda slow (same as everything on stock IG)...

@ankitgoswami ankitgoswami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ left a few comments but mostly looks good. Can't wait to try it on fleet!

@b-rowan

b-rowan commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

Ill look at the re-auth idea, its probably not a bad idea to try to deal with those funky edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants