Skip to content

Conversation

@ZenGround0
Copy link
Contributor

Closes #268

I went with the append option. I think this is fine as non empty notes only show up as error conditions in our only existing validator and as auditors have pointed out settling many segments will cost linearly increasing gas so this is only adding a constant term to an existing efficiency problem not creating a whole new problem. And it is a simple matter for users to settle smaller spans of time if we actually start hitting gas problems.

Previously, when settling a rail with multiple rate changes in the queue,
only the final segment's note was retained. Now notes from all segments
are accumulated with "; " separators, following the pattern used in
checkAndFinalizeTerminatedRail.

Only non-empty notes are added to the accumulator.

Updated test to verify the accumulated notes behavior.

Fixes #268

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@FilOzzy FilOzzy added this to FOC Jan 28, 2026
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Jan 28, 2026
// Accumulate validation notes from each segment
if (bytes(validationNote).length > 0) {
if (bytes(note).length > 0) {
note = string.concat(note, "; ", validationNote);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a pretty expensive operation in ethereum because memory gas is quadratic and solidity will leak each of these strings, but it's probably fine in the FEVM.

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FOC Jan 29, 2026
@BigLep BigLep added this to the M4.5: GA Fast Follows milestone Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✔️ Approved by reviewer
Status: No status

Development

Successfully merging this pull request may close these issues.

Audit Fix 3: Accumlate notes

3 participants