-
Notifications
You must be signed in to change notification settings - Fork 88
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
Simplifying tests for DA compression #816
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dentosal
approved these changes
Sep 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like introducing syntax magic trait, but it's probably better than the alternative here.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 10, 2024
* WIP * Migrate compact-derive from fuel-core * Add doc comments and cleanup * Add changelog * Cargo.toml fmt * Wrap Compaction return types to anyhow::Result * Update readme * Fix wording Co-authored-by: Brandon Vrooman <[email protected]> * Combine some bounds Co-authored-by: Brandon Vrooman <[email protected]> * Fix issues after merge * Fix compression for latest types * Keep used gas price * Cargo sort * Introduce ContractId table to da compression registry * Reference table types directly in #[da_compress(registry = _)] * WIP: migrate domain logic to fuel-core * Re-add dummy registry for testing * Add some missing docs * Move block section data for fuel-core * Minor change for fuel-core integration * cargo sort * Fix incorrect feature cfg on default_test_tx * Implement compacting for blobs as well * Fix no_std deps * WIP: working towards adapting Green's trait-based approach * Complete migration to Green's trait-heavy approach * Polish: docs, naming, argument order * Clean up proc macro a bit * Line count reduction :\ * More polish * Move readme from fuel-compression to fuel-core-compression * Enable more lints for fuel-derive, remove unnecessary regex dependency * Remove debug writing to /tmp, as we're hopefully done here * Get rid of anyhow * Add roundtrip tests * Use type-based registry keyspaces * Omit Message amount from DA compressed data * Remove extra "Compressible" bound from "RegistrySubstitutableBy" * Implement da compression for TxId -> TxPointer * Use the type instead of field annotations for determining compressed fields * Make da compression async * Also make compression context async * unused_crate_dependencies fix * More unused_crate_dependencies * cargo sort * Cosmetic changes: - Renamed derive macro `Compressed` -> `CompressibleBy` - Renamed `da_compress` -> `compressible_by` - Removed default constrains from `Compressible::Compressed` - Fixed compilation after removing constrains - Removed `da_compress(bound)` - Added new `TxId` type * Cleanup small nits after review * Revert commits af39dcf and bf75dbc * Split derive macro "Compressed" into "Compress" and "Decompress" * Re-apply Green's da_compress(bound) removal and bound simplification * Re-introduce Green's TxId type, do some cleanup related to these types * Re-apply bf75dbc * Compress the whole UtxoId instead of just TxId * Compress UtxoId: test fixes * Introduce PredicateCode to allow compressing it * Make fields for Compressed* public * Remove Decompress derive from Message and Coin Also, rename {C,De}omprssibleBy methods to {de}compress_with * Rename da_compress attribute to just compress * Add tests for TxId * Rename remaining instances of compaction into compression * Add explicit CompressedUtxoId type * Rename De/CompressionContext methods Fix tests * Clippy * Ignore incorrect unused crate warning * Fix no-default-features * Remove De/CompressionContext traits, they seem unnecessary * Simplifying tests for DA compression (#816) * Address PR review comments * Fix , => ; * Fix a memory leak in unsafe array de/compress code * Fix typo Co-authored-by: Rafał Chabowski <[email protected]> * Fix typo Co-authored-by: Rafał Chabowski <[email protected]> * Add a test cases to cover skipped fields and nested structs * Remove unneeded change of field ref for struct that impls Deref * Remove useless .scollect()s * Clarify variable namings around serialization in a test case * Add a test case showing that skipped fields are not part of the compressed output --------- Co-authored-by: Brandon Vrooman <[email protected]> Co-authored-by: green <[email protected]> Co-authored-by: Rafał Chabowski <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Small improvements for test maintenance