Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: R5a. and reuse released addr #6

Merged
merged 2 commits into from
Jun 27, 2024
Merged

fix: R5a. and reuse released addr #6

merged 2 commits into from
Jun 27, 2024

Conversation

blake-regalia
Copy link

Removes the use of random addresses when mutating the buffer. Instead, reuses existing addresses in order to reduce the signal to noise ratio that random addresses would otherwise produce in storage access patterns. Also applies this logic when releasing the owner/sender.

Guiding pseudocode for the if/else logic in choosing presumptive_settle_index and write_index:

if recipient_in_buffer:
	settle the dummy entry
	update the existing recipient's buffered balance
else:
	if undersaturated:
		settle dummy entry
		place new entry at next pos
	else:
		settle random entry
		replace settled entry with new entry

@darwinzer0 darwinzer0 merged commit 5fddb99 into dwbs Jun 27, 2024
2 of 6 checks passed
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