-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(da_compression): invalid decompression of utxo id and CoinConfig …
…fix (#2593) ## Linked Issues/PRs <!-- List of related issues/PRs --> some investigation related to why transaction ids were mismatching before compression and after decompression ## Description <!-- List of detailed changes --> - Fixed CoinConfig generate function to create appropriate tx_id and output_index - Fixed utxo id lookup - da compression integ test asserts tx ids are the same AI generated: ### Code Organization: * [`crates/chain-config/src/config/coin.rs`](diffhunk://#diff-942b8fa635eb049417e89ef88024e08422c209c2952e0f5612e45531ee03a8b1R124-R171): Moved `CoinConfigGenerator` to a new `coin_config_helpers` module and updated its implementation to use a `CoinCount` type. * Updated references to `CoinConfigGenerator` across multiple files to use the new `coin_config_helpers` module. [[1]](diffhunk://#diff-942b8fa635eb049417e89ef88024e08422c209c2952e0f5612e45531ee03a8b1L170-R182) [[2]](diffhunk://#diff-942b8fa635eb049417e89ef88024e08422c209c2952e0f5612e45531ee03a8b1L183-R195) [[3]](diffhunk://#diff-beed0a09969286877b6b2569d2e3775a9526d5328bfebe9ef04da44e16dc8492L49-R49) [[4]](diffhunk://#diff-aceecd6cf4d806ddbb7fe3edc5d757cc292c1c8b81f9df2601cdc2103cca16f2R5-L6) [[5]](diffhunk://#diff-e83ddeaff43cbea45b7b2a6c5b688054cf32fbcd7c5010fc5059d0812b1f413eR3-L4) [[6]](diffhunk://#diff-12758c6f607876b04a2fd230ac5b6c16c275c65e82390f867404ddb62345119aR27-L28) [[7]](diffhunk://#diff-12758c6f607876b04a2fd230ac5b6c16c275c65e82390f867404ddb62345119aL527-R527) ### Decompression Logic: * [`crates/compression/src/decompress.rs`](diffhunk://#diff-d0b271dacdbc77c5808aab48fee0fa85f338d593e1adc25e8bd0205c370dd824L71-R93): Modified the decompression logic to handle mint transactions correctly and ensure the TxPointer is set appropriately. [[1]](diffhunk://#diff-d0b271dacdbc77c5808aab48fee0fa85f338d593e1adc25e8bd0205c370dd824L71-R93) [[2]](diffhunk://#diff-d0b271dacdbc77c5808aab48fee0fa85f338d593e1adc25e8bd0205c370dd824R231-R232) ### Testing and Configuration: * [`tests/tests/da_compression.rs`](diffhunk://#diff-b7fc0c13495dc1a6096e1822748a1d512e84510d50d2ac1d56b1f9a839646342R66-R92): Enhanced the test for fetching DA compressed blocks from GraphQL by adding additional checks and ensuring the transactions' IDs match. [[1]](diffhunk://#diff-b7fc0c13495dc1a6096e1822748a1d512e84510d50d2ac1d56b1f9a839646342R66-R92) [[2]](diffhunk://#diff-b7fc0c13495dc1a6096e1822748a1d512e84510d50d2ac1d56b1f9a839646342R129-R157) ### Miscellaneous: * Various files: Updated imports and removed unnecessary `where` clauses to clean up the codebase. [[1]](diffhunk://#diff-942b8fa635eb049417e89ef88024e08422c209c2952e0f5612e45531ee03a8b1L23) [[2]](diffhunk://#diff-d0b271dacdbc77c5808aab48fee0fa85f338d593e1adc25e8bd0205c370dd824R21) [[3]](diffhunk://#diff-d0b271dacdbc77c5808aab48fee0fa85f338d593e1adc25e8bd0205c370dd824R39) [[4]](diffhunk://#diff-715d143d62233118cd663c107e340e6d32aeb6446c02c167893656316ce13cbeL276-R276) [[5]](diffhunk://#diff-715d143d62233118cd663c107e340e6d32aeb6446c02c167893656316ce13cbeL304) [[6]](diffhunk://#diff-715d143d62233118cd663c107e340e6d32aeb6446c02c167893656316ce13cbeL317-R321) ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [ ] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else?
- Loading branch information
Showing
10 changed files
with
129 additions
and
66 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.