Fix tProxy issues found by Loupe - #741
Conversation
d08e12b to
639735c
Compare
bit-aloo
left a comment
There was a problem hiding this comment.
I need to think around the reconnect design.
639735c to
2c00d65
Compare
2c00d65 to
fe92ddd
Compare
fe92ddd to
c6a57a5
Compare
c6a57a5 to
733d19d
Compare
c5e7015 to
ba90896
Compare
ba90896 to
b5e41c1
Compare
|
commits have titles but no message bodies as described on this link listed on (highly recommended to have this on |
Yeah it's intentional, but thanks for pointing it out.
Completely agree, I'll add bodies soon. |
d5ea928 to
471ce4b
Compare
02e572c to
3dafaf3
Compare
|
I just modified the keepalive jobs commit: 3dafaf3a. Keepalive jobs now go only to miners whose own interval has elapsed, reusing the shared job when no new mutation is due. Late joiners also receive the latest shared job without resetting its history or rewinding nTime. |
bit-aloo
left a comment
There was a problem hiding this comment.
Few questions and suggestions..
3dafaf3 to
e386164
Compare
Document that a new vardiff target takes effect with the next mining.notify rather than immediately. This preserves the difficulty advertised with each job so late shares are not checked against a newer target.
The authorize-triggered notification flush must run only once. Keep Pending, Completing, and Complete with the notification cache under one lock so newer work cannot overtake the flush or remain stranded when normal forwarding is enabled. Flush cached mining notifications in difficulty-before-notify order; these are not repeated handshake responses. Preserve the existing difficulty and clean-jobs policy.
A failed send to one disconnected miner previously aborted the broadcast and starved healthy downstreams of their new difficulty. Finish the fan-out before returning the disconnect action for the failed peer.
An SV1 miner can pipeline setup traffic while its SV2 channel is opening. Cap that per-downstream queue at eight messages and disconnect on the ninth so an unauthenticated peer cannot grow it without bound.
Keep the existing Bitcoin Core IPC integration test aligned with rustfmt output. This is a formatting-only change with no runtime behavior impact.
Make the default trust boundary explicit: payout verification is disabled unless configured, so tProxy otherwise accepts the upstream payout policy. Operators can then make an informed choice when enabling the check.
Channel and group identifiers share routing state, so accepting a reused or reserved identifier can reinterpret later messages for the wrong owner. Reject collisions transactionally, including the aggregated sentinel ID.
Aggregated miners share job history, but keepalive delivery follows each miner's own idle interval. Bound shared nTime mutation by wall-clock time and reuse the latest keepalive for miners that become due between mutations. Replay the current shared job for late joiners without clearing history, rewinding nTime, or restarting the aggregate timer. Normal upstream jobs remain on their normal delivery path.
e386164 to
912a11a
Compare
bit-aloo
left a comment
There was a problem hiding this comment.
ACK. Clanker suggested some non blocker, but I don't think they were interesting to block work here.
This PR:
Closes project-loupe/audit-sv2-apps#26
Closes #743
Closes project-loupe/audit-sv2-apps#126
Closes project-loupe/audit-sv2-apps#127
Closes #744
Closes project-loupe/audit-sv2-apps#130
Closes #745
Closes project-loupe/audit-sv2-apps#187
Closes project-loupe/audit-sv2-apps#185
Closes #811
Closes project-loupe/audit-sv2-apps#188
Closes #812
Closes project-loupe/audit-sv2-apps#195
Closes #813