Skip to content

Misc 20260904 fixes - #8

Merged
luke-jr merged 10 commits into
CONVOYMining:masterfrom
luke-jr:misc_20260904_fixes
Sep 26, 2026
Merged

luke-jr merged 10 commits into
CONVOYMining:masterfrom
luke-jr:misc_20260904_fixes

Conversation

@luke-jr

@luke-jr luke-jr commented Sep 5, 2026

Copy link
Copy Markdown

No description provided.

@luke-jr luke-jr added the bug Something isn't working label Sep 5, 2026

@jasonsopko jasonsopko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested ACK cd91837

Ubuntu 24.04, gcc 13.3, clang 18.1, on master b9ea7dc. gcc and clang with -Wall -Werror, ENABLE_API=OFF, DATUM_API_FOR_UMBREL and ASan all build clean and pass --test. The UBSan run stops at the pre-existing misaligned store in datum_protocol_tests.c:133; with #5 cherry-picked on top it passes.

Notes from reading the three commits:

  • The leak fix is latent today: the only caller (datum_protocol.c:1355) passes must_free=false. Correct either way.
  • outval > s->coinbase_value - tally is safe because tally only grows by values that already passed the check, so it never exceeds coinbase_value. The new test covers the overflow case.
  • The vardiff move fixes a real first-notify problem. The client slot is zeroed on connect, so stratum_update_vardiff() inside the first send_mining_notify() saw share_snap_tsms == 0, read that as more than 60 s without shares, and halved current_diff before the forced_high_min_diff/vardiff_min clamps. Starting the snapshot before the notify makes that pass a no-op.

@luke-jr
luke-jr merged commit a66083d into CONVOYMining:master Sep 26, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants