Skip to content

Conversation

@RembrandtK
Copy link
Contributor

Currently a WIP placeholder.

Response to TRST-L-3 "Inaccurate view functions for the zero-address target"

The current behaviour of getTargetAllocation() and getTargetIssuancePerBlock()
is deliberate and regarded as correct. These functions return assigned
allocations rather than effective minting amounts. This design choice is
supported by the following reasoning:

1. **Semantically correct**: The functions answer "what allocation is assigned
   to this target?" rather than "what does this target receive?".

2. **Consistent interface**: Callers can query the default target allocation
   uniformly, regardless of whether it's address(0) or not.

3. **Accounting utility**: When address(0) is used, the returned values
   represent the unallocated/unminted portion of issuance.

4. **Separation of concerns**: getTotalAllocation() provides the effective
   system-wide allocation that excludes unmintable portions.

The documentation has been enhanced to make this behaviour explicit for the
address(0) edge case, to avoid potential confusion.
@RembrandtK RembrandtK self-assigned this Dec 16, 2025
@openzeppelin-code
Copy link

openzeppelin-code bot commented Dec 16, 2025

Issuance allocator audit responses (WIP)

Generated at commit: 8edca9af3423fee6fc71eeb1fc11782a5b799338

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
5
0
14
38
60
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.14%. Comparing base (48be37a) to head (8edca9a).

Additional details and impacted files
@@                  Coverage Diff                  @@
##           issuance-allocator-3    #1270   +/-   ##
=====================================================
  Coverage                 86.14%   86.14%           
=====================================================
  Files                        45       45           
  Lines                      2345     2345           
  Branches                    698      698           
=====================================================
  Hits                       2020     2020           
  Misses                      325      325           
Flag Coverage Δ
unittests 86.14% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Addresses TRST-R-1: Follow naming conventions for non-public functions

Updated two private functions for consistency with the rest of the
codebase:
- notifyAllTargets() → _notifyAllTargets()
- accumulatePendingIssuance() → _accumulatePendingIssuance()

All private and internal functions now consistently use underscore
prefixes, improving code clarity and reducing potential for errors.
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