Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRI Translator Proxy compatibility matrix #1186

Open
plebhash opened this issue Oct 4, 2024 · 10 comments
Open

SRI Translator Proxy compatibility matrix #1186

plebhash opened this issue Oct 4, 2024 · 10 comments
Assignees
Labels
documentation Improvements or additions to documentation firmware compatibilty sv1 tracker Help us track a group of related issues translator proxy SV1>SV2 translator proxy issues

Comments

@plebhash
Copy link
Collaborator

plebhash commented Oct 4, 2024

SRI Provides a Translator Proxy (tProxy). It translates SV1 traffic into SV2. It is a key component for SV2 adoption in the Mining Industry.

Different SV1 firmware flavors can result in different edge cases. It is strategically important for SRI tProxy to cover the most popular SV1 firmwares in the industry.


@GitGab19 and I will spend 3 weeks in Thailand for a Residency in BOB Space (Dec 1-20)

we will have access to a wide range of SV1 Mining Devices there

we should take that opportunity to battle test SRI tProxy

as an outcome of this effort, I propose that we add a matrix of device support to roles/translator/README.md

something like this:

Mining Device Control Board Firmware tProxy support ok? if not, issue tracking compatibility bug validated by
S19j Braiins BCB 100 BOS v24.08.1 @ foo
S19j Mara UCB 2100 Mara OS xxx @ bar
S21 Pro Bitmain Stock Antminer stock 202408281552 @ foo
WhatsMiner M30+ #1173 @ bar

if the number of compatibility bugs is too big for us to be able to fix everything during the time we spend there, we will need to make compromises, which will mostly consist of:

  • which models deserve priority
  • how can we encourage the community to submit PRs that will help fix the ones we did not have the bandwidth to fix during the residency
@plebhash plebhash added translator proxy SV1>SV2 translator proxy issues documentation Improvements or additions to documentation firmware compatibilty sv1 labels Oct 4, 2024
@pavlenex
Copy link
Collaborator

pavlenex commented Oct 4, 2024

We did have a matrix with our early release (way pre 1.0.0), but a lot has changed, and I am unable to locate that doc in our drive.

I am not sure if battle testing is a proper term here, but having a compatibility matrix would help. I think the end-goal here is to test on as many miners as you have and also set up a system where any community member can contribute to. An easy way to keep a track of compatibility could be a GitHub issue which has an owner that maintains, and testers could simply leave a comment once they test with a particular device/firmware. One example of how we conducted tests with uppercase Bech32 on BTCPay. btcpayserver/btcpayserver#2110

Having a tracker issue would not only help with an easy way to provide feedback, but also help with cross-posting in manufacturers repos and advocate for compatibility.

@plebhash plebhash changed the title ⚙️ Battle testing tProxy on BOB Residency 🇹🇭 ⚙️ tProxy compatibility matrix on BOB Residency 🇹🇭 Oct 4, 2024
@plebhash
Copy link
Collaborator Author

plebhash commented Oct 4, 2024

An easy way to keep a track of compatibility could be a GitHub issue which has an owner that maintains, and testers could simply leave a comment once they test with a particular device/firmware.

that's a better path indeed

we should just keep editing this issue description as we make progress on this effort

this dynamic approach is probably easier than having to approve and merge multiple PRs that are modifying roles/translator/README.md

@plebhash plebhash added the tracker Help us track a group of related issues label Oct 4, 2024
@plebhash plebhash changed the title ⚙️ tProxy compatibility matrix on BOB Residency 🇹🇭 tProxy compatibility matrix Oct 4, 2024
@plebhash plebhash changed the title tProxy compatibility matrix SRI Translator Proxy compatibility matrix Oct 4, 2024
@plebhash
Copy link
Collaborator Author

plebhash commented Dec 9, 2024

in June 2024 I rented a bosminer rig from rigly.io

it did not work with tProxy right away, which was reported on #964 and fixed on #965 as a patch to the parsing logic converting sv1_api::client_to_server::Subscribe from a sv1_api::json_rpc::StandardRequest:

impl<'a> TryFrom<StandardRequest> for Subscribe<'a> {
type Error = ParsingMethodError;
fn try_from(msg: StandardRequest) -> Result<Self, Self::Error> {
match msg.params.as_array() {
Some(params) => {
let (agent_signature, extranonce1) = match &params[..] {
// bosminer subscribe message
[JString(a), Null, JString(_), Null] => (a.into(), None),
// bosminer subscribe message
[JString(a), Null] => (a.into(), None),
[JString(a), JString(b)] => {
(a.into(), Some(Extranonce::try_from(hex::decode(b)?)?))
}
[JString(a)] => (a.into(), None),
[] => ("".to_string(), None),
_ => return Err(ParsingMethodError::wrong_args_from_value(msg.params)),
};
let id = msg.id;
let res = Subscribe {
id,
agent_signature,
extranonce1,
};
Ok(res)
}
None => Err(ParsingMethodError::not_array_from_value(msg.params)),
}
}
}


as we work on the compatibility matrix, we should pay special attention to how each machine is sending the mining.subscribe message, and make sure there's no edge cases left behind

@Sjors
Copy link
Collaborator

Sjors commented Dec 9, 2024

While you're at it, can you test the machines with (OP_TRUE) signet? Could be a separate issue of course.

@plebhash
Copy link
Collaborator Author

plebhash commented Dec 9, 2024

While you're at it, can you test the machines with (OP_TRUE) signet? Could be a separate issue of course.

yea we deployed a dedicated signet for this, more details here: #1274 (comment)

@plebhash
Copy link
Collaborator Author

plebhash commented Dec 18, 2024

I was able to see #1173 on System Logs of WhatsMiners while mining on testnet4 (which is currently being attacked on the timestamp vulnerability)

@plebhash
Copy link
Collaborator Author

I was able to see #1173 on System Logs of WhatsMiners while mining on testnet4 (which is currently being attacked on the timestamp vulnerability)

this is however non-blocking, meaning that despite these error logs on the device firmware, it can still mine with tProxy on mainnet

@plebhash
Copy link
Collaborator Author

the only firmware that really caused trouble was BraiinsOS (BOS)

the tProxy logs had some error messages that deserve more investigation

2024-12-20T12:40:43.073783Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:40:43.073982Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:40:43.074045Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33258
2024-12-20T12:40:43.074176Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:40:44.048910Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33256
2024-12-20T12:40:52.060271Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33258
2024-12-20T12:40:54.072679Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33260
2024-12-20T12:40:56.074164Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:40:56.074301Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:40:56.074346Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33260
2024-12-20T12:40:56.074463Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:05.077880Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33260
2024-12-20T12:41:15.098913Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33266
2024-12-20T12:41:15.766242Z  INFO roles_logic_sv2::handlers::mining: Received SetTarget for channel id: 1
2024-12-20T12:41:15.766352Z  INFO translator_sv2::lib::upstream_sv2::upstream: SetTarget: SetTarget { channel_id: 1, maximum_target: Ref([255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]) }
2024-12-20T12:41:17.174371Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:41:17.174557Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:17.174624Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33266
2024-12-20T12:41:17.174715Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:26.104540Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33266
2024-12-20T12:41:49.140489Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33272
2024-12-20T12:41:51.174254Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:41:51.174461Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:51.174580Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:51.174604Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33272
2024-12-20T12:41:51.774693Z ERROR translator_sv2::lib::status: Error: Io(Custom { kind: ConnectionAborted, error: "Connection closed by client" })
2024-12-20T12:41:51.774764Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:51.774789Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33238
2024-12-20T12:41:51.774805Z ERROR translator_sv2::lib::status: Error: ChannelErrorReceiver(RecvError)
2024-12-20T12:41:51.774816Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33238

this is however low priority, since (assuming noise incompatibility with SRI gets solved) BOS is perfectly capable of doing Sv2, and therefore connecting it to a tProxy is not a hard requirement

@Fi3
Copy link
Collaborator

Fi3 commented Dec 30, 2024

the only firmware that really caused trouble was BraiinsOS (BOS)

the tProxy logs had some error messages that deserve more investigation

2024-12-20T12:40:43.073783Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:40:43.073982Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:40:43.074045Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33258
2024-12-20T12:40:43.074176Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:40:44.048910Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33256
2024-12-20T12:40:52.060271Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33258
2024-12-20T12:40:54.072679Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33260
2024-12-20T12:40:56.074164Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:40:56.074301Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:40:56.074346Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33260
2024-12-20T12:40:56.074463Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:05.077880Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33260
2024-12-20T12:41:15.098913Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33266
2024-12-20T12:41:15.766242Z  INFO roles_logic_sv2::handlers::mining: Received SetTarget for channel id: 1
2024-12-20T12:41:15.766352Z  INFO translator_sv2::lib::upstream_sv2::upstream: SetTarget: SetTarget { channel_id: 1, maximum_target: Ref([255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]) }
2024-12-20T12:41:17.174371Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:41:17.174557Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:17.174624Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33266
2024-12-20T12:41:17.174715Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:26.104540Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33266
2024-12-20T12:41:49.140489Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33272
2024-12-20T12:41:51.174254Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:41:51.174461Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:51.174580Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:51.174604Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33272
2024-12-20T12:41:51.774693Z ERROR translator_sv2::lib::status: Error: Io(Custom { kind: ConnectionAborted, error: "Connection closed by client" })
2024-12-20T12:41:51.774764Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:51.774789Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33238
2024-12-20T12:41:51.774805Z ERROR translator_sv2::lib::status: Error: ChannelErrorReceiver(RecvError)
2024-12-20T12:41:51.774816Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33238

this is however low priority, since (assuming noise incompatibility with SRI gets solved) BOS is perfectly capable of doing Sv2, and therefore connecting it to a tProxy is not a hard requirement

this is not an issue with the translator but with the miner. That send non stratum messages trying to contact the pool I guess.

@GitGab19
Copy link
Collaborator

the only firmware that really caused trouble was BraiinsOS (BOS)
the tProxy logs had some error messages that deserve more investigation

2024-12-20T12:40:43.073783Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:40:43.073982Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:40:43.074045Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33258
2024-12-20T12:40:43.074176Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:40:44.048910Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33256
2024-12-20T12:40:52.060271Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33258
2024-12-20T12:40:54.072679Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33260
2024-12-20T12:40:56.074164Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:40:56.074301Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:40:56.074346Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33260
2024-12-20T12:40:56.074463Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:05.077880Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33260
2024-12-20T12:41:15.098913Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33266
2024-12-20T12:41:15.766242Z  INFO roles_logic_sv2::handlers::mining: Received SetTarget for channel id: 1
2024-12-20T12:41:15.766352Z  INFO translator_sv2::lib::upstream_sv2::upstream: SetTarget: SetTarget { channel_id: 1, maximum_target: Ref([255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]) }
2024-12-20T12:41:17.174371Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:41:17.174557Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:17.174624Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33266
2024-12-20T12:41:17.174715Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:26.104540Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33266
2024-12-20T12:41:49.140489Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.155:33272
2024-12-20T12:41:51.174254Z ERROR translator_sv2::lib::status: Error: BadSerdeJson(Error("expected value", line: 1, column: 2))
2024-12-20T12:41:51.174461Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:51.174580Z  INFO translator_sv2::lib: HEALTHY message: Bad serde json: `Error("expected value", line: 1, column: 2)`
2024-12-20T12:41:51.174604Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33272
2024-12-20T12:41:51.774693Z ERROR translator_sv2::lib::status: Error: Io(Custom { kind: ConnectionAborted, error: "Connection closed by client" })
2024-12-20T12:41:51.774764Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream reader
2024-12-20T12:41:51.774789Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.155:33238
2024-12-20T12:41:51.774805Z ERROR translator_sv2::lib::status: Error: ChannelErrorReceiver(RecvError)
2024-12-20T12:41:51.774816Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream writer: 192.168.1.155:33238

this is however low priority, since (assuming noise incompatibility with SRI gets solved) BOS is perfectly capable of doing Sv2, and therefore connecting it to a tProxy is not a hard requirement

this is not an issue with the translator but with the miner. That send non stratum messages trying to contact the pool I guess.

@jakubtrnka do you have some insights on this issue here? I remember the first time we noticed that was about 1 year ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation firmware compatibilty sv1 tracker Help us track a group of related issues translator proxy SV1>SV2 translator proxy issues
Projects
Development

No branches or pull requests

5 participants