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

Bytes hooks #151

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Bytes hooks #151

merged 2 commits into from
Oct 9, 2024

Conversation

virgil-serbanuta
Copy link
Member

@virgil-serbanuta virgil-serbanuta commented Oct 8, 2024

Relevant for #135

@virgil-serbanuta virgil-serbanuta marked this pull request as ready for review October 8, 2024 17:37
cat $(UKM_CONTRACTS_TESTING_INPUT_DIR)/bytes_hooks.rs >> [email protected]
echo ">)>" >> [email protected]

# echo "<(<" > [email protected]
Copy link
Member Author

@virgil-serbanuta virgil-serbanuta Oct 8, 2024

Choose a reason for hiding this comment

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

I plan to uncomment this as soon as we can parse ukm.rs.

<ukm-bytes-buffers>
M => M[NextId <- b""]
</ukm-bytes-buffers>
<ukm-bytes-next-id>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@virgil-serbanuta , Are we treating the bytes using a pseudo indexed-memory approach? Is that the purpose of <ukm-bytes-next-id> and <ukm-bytes-buffers>?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so. This is a mapping from indexes to Bytes objects, with indexes generated sequentially from the <ukm-bytes-next-id> cell. It is sort of similar with a heap in which memory is never freed, and which holds only values of type Bytes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for the explanation, Virgil.

@virgil-serbanuta virgil-serbanuta merged commit 06018e6 into main Oct 9, 2024
2 of 3 checks passed
@virgil-serbanuta virgil-serbanuta deleted the byte-hooks branch October 9, 2024 17:40
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