Skip to content

enhance: replace memory uuids with increasing positive integers #2764

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

njhale
Copy link
Member

@njhale njhale commented Apr 30, 2025

Refactor the memory API to produce monotonically increasing positive integers for memory IDs instead of using UUIDs.

// NextMemoryID is a string representation of a monotonically increasing positive integer used
// to generate unique IDs for new memories.
// This field MUST be used as the ID of the next memory added to the MemorySet.
// After a memory is added, this field MUST be incremented by 1 when a new memory is add.
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
// After a memory is added, this field MUST be incremented by 1 when a new memory is add.
// After a memory is added, this field MUST be incremented by 1 when a new memory is added.

return big.NewInt(0)
}

// Increment the largets valid ID to get the next memory ID
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
// Increment the largets valid ID to get the next memory ID
// Increment the largest valid ID to get the next memory ID

Refactor the memory API to produce monotonically increasing positive
integers for memory IDs instead of using UUIDs.

Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>
@njhale njhale force-pushed the enhance-memory-no-uuids-2 branch from 7bc546d to 3c26cac Compare April 30, 2025 16:16
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.

3 participants