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

Direct & compact tx serialization #39

Merged
merged 3 commits into from
May 2, 2024

Conversation

jeffro256
Copy link

@jeffro256 jeffro256 commented Mar 19, 2024

Txs are [de]serialized directly from their classes and sizes of containers are not serialized
if they can be implied.

@jeffro256 jeffro256 marked this pull request as draft March 19, 2024 04:21
@jeffro256 jeffro256 force-pushed the direct_serial_splib branch 2 times, most recently from 519fdff to 10924f9 Compare March 25, 2024 02:44
@jeffro256 jeffro256 marked this pull request as ready for review March 25, 2024 02:49
src/common/va_args.h Show resolved Hide resolved
src/seraphis_impl/seraphis_serialization.h Outdated Show resolved Hide resolved
src/serialization/serialization.h Show resolved Hide resolved
tests/unit_tests/seraphis_serialization.cpp Outdated Show resolved Hide resolved
tests/unit_tests/seraphis_serialization.cpp Outdated Show resolved Hide resolved
@jeffro256 jeffro256 force-pushed the direct_serial_splib branch 2 times, most recently from 82fe608 to 1db5587 Compare April 11, 2024 15:30
txs are [de]serialized directly from their classes and sizes of containers are not serialized
if they can be implied.
jeffro256 added a commit to jeffro256/monero that referenced this pull request Apr 11, 2024
This PR is upstreaming changes in the Seraphis lib here: UkoeHB#39. This header adds a macro `VA_ARGS_COMMAPREFIX`
which, when passed `__VA_ARGS__`, expands to `, __VA_ARGS__` unless the length of `__VA_ARGS__` is 0, in which case it expands to nothing. This
macro is useful for passing/declaring optional function arguments.
jeffro256 added a commit to jeffro256/monero that referenced this pull request Apr 11, 2024
This PR is upstreaming changes in the Seraphis lib here: UkoeHB#39. The changes to the serialization header allow clean passing
of extra arguments to field serialization in the DSL. This is used mainly to pass implied sizes of containers during deserialization to make the format more
compact. For example, if my object has two containers A & B which must be the same size, I can serialize only the size of container A. Then, during
deserialization, when I deserialize A, I can then use A's size to deserialize B.

Depends on monero-project#9286.
@UkoeHB UkoeHB merged commit c742260 into UkoeHB:seraphis_lib May 2, 2024
18 checks passed
@jeffro256 jeffro256 mentioned this pull request May 24, 2024
UkoeHB pushed a commit that referenced this pull request Aug 2, 2024
* direct & compact tx serialization

txs are [de]serialized directly from their classes and sizes of containers are not serialized
if they can be implied.
jeffro256 added a commit to jeffro256/monero that referenced this pull request Aug 13, 2024
This PR is upstreaming changes in the Seraphis lib here: UkoeHB#39. This header adds a macro `VA_ARGS_COMMAPREFIX`
which, when passed `__VA_ARGS__`, expands to `, __VA_ARGS__` unless the length of `__VA_ARGS__` is 0, in which case it expands to nothing. This
macro is useful for passing/declaring optional function arguments.
jeffro256 added a commit to jeffro256/monero that referenced this pull request Aug 13, 2024
This PR is upstreaming changes in the Seraphis lib here: UkoeHB#39. The changes to the serialization header allow clean passing
of extra arguments to field serialization in the DSL. This is used mainly to pass implied sizes of containers during deserialization to make the format more
compact. For example, if my object has two containers A & B which must be the same size, I can serialize only the size of container A. Then, during
deserialization, when I deserialize A, I can then use A's size to deserialize B.

Depends on monero-project#9286.
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