Skip to content

chore: rearrange structs a bit to shave bytes#1645

Open
0xf0xx0 wants to merge 4 commits into
bitaxeorg:masterfrom
0xf0xx0:packin-my-struct-till-i-
Open

chore: rearrange structs a bit to shave bytes#1645
0xf0xx0 wants to merge 4 commits into
bitaxeorg:masterfrom
0xf0xx0:packin-my-struct-till-i-

Conversation

@0xf0xx0

@0xf0xx0 0xf0xx0 commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

im not sure how to calculate how much this actually saves, mayb like 20 bytes lol

used https://staruwos.github.io/structviz/

Comment thread main/global_state.h
uint64_t shares_rejected;
uint64_t work_received;
RejectedReasonStat rejected_reason_stats[10];
uint32_t shares_accepted;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

dropped these to uint32s, should be fine

assuming a share a second itd take 180 years to hit 2^32

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown

Test Results

 2 files  ±0   2 suites  ±0   0s ⏱️ ±0s
83 tests ±0  83 ✅ ±0  0 💤 ±0  0 ❌ ±0 
85 runs  ±0  85 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 8d95a2e. ± Comparison against base commit bba9e6a.

♻️ This comment has been updated with latest results.

@WantClue WantClue self-requested a review April 4, 2026 10:54
@WantClue

Copy link
Copy Markdown
Collaborator

@0xf0xx0 please resolve conflicts :-)

0xf0xx0 added 2 commits April 28, 2026 11:55
reduced padding to 4 bytes all at the end
@0xf0xx0

0xf0xx0 commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator Author

fixed

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