stratum-mining / stratum

stratum
https://stratumprotocol.org
Other
223 stars 127 forks source link

naive MG test on `CloseChannel`, potential naive behavior on tProxy #1081

Open plebhash opened 3 months ago

plebhash commented 3 months ago

It's not clear what pool-sri-test-close-channel tries to achieve.

There's nothing in the specs stating that a proxy must close the entire connection when it receives a CloseChannel from Upstream.

This feels like a naive test. What if the proxy has other active channels?

Also relevant: https://github.com/stratum-mining/stratum/blob/61b5cf056446964b226652b9cdf79a8fcac55405/roles/translator/src/lib/upstream_sv2/upstream.rs#L397-L400

plebhash commented 3 months ago

from @Fi3 over Discord:

not sure depend what we want to test and what tproxy is expected to do the thing that make most sense impo is to close downstream connection reopen the channel with upstream and wait for the miner to reconnect tproxy from what I know can not open more then one channel so tproxy having more channle opened is impossible when if tproxy will support more then one channel opened with upstream we can reason about it