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

Simplifying tests for DA compression #816

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented Sep 6, 2024

Small improvements for test maintenance

@xgreenx xgreenx requested review from Dentosal and a team September 6, 2024 19:02
@xgreenx xgreenx self-assigned this Sep 6, 2024
@xgreenx xgreenx added the no changelog Skips the CI changelog check label Sep 6, 2024
Copy link
Member

@Dentosal Dentosal left a 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.

@Dentosal Dentosal merged commit cc61e1e into dento/da-compression Sep 9, 2024
44 of 50 checks passed
@Dentosal Dentosal deleted the feature/simplifing-tests-for-da branch September 9, 2024 09:13
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
Labels
no changelog Skips the CI changelog check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants