linea-monorepo
linea-monorepo copied to clipboard
Decompressor Library
This PR implements creates a decompressor library capable of managing different blob versions and dictionaries. Its output consists of an RLP encoded list of blocks. Due to some information loss during compression, two pieces of information are represented "hackily":
- The block hash is in the
ParentHashfield, not the hash field itself, asgo-ethereumcomputes that field itself, not allowing users to set it manually. - The transaction
fromaddress is in thesignature.Rfield.
NOTE Only the Go side has been tested. Need contribution from a Kotlin developer to make this merge-ready.
Checklist
- [ ] I wrote new tests for my new core changes.
- [ ] I have successfully ran tests, style checker and build against my new changes locally.
- [ ] I have informed the team of any breaking changes if there are any.
Delta Summary - Kotlin Code Coverage
| Generated on: | 09/14/2024 - 15:26 | ||
| Description | Previous | Current | Delta |
| Coverage date: | 09/14/2024 - 15:26 | 09/14/2024 - 15:26 | |
| Tag: | 118_10863448018 | 118_10863448018 | |
| Line coverage: | 27.6% | 27.6% | 0.0% |
| Covered lines: | 26071 | 26071 | 0 |
| Coverable lines: | 94280 | 94280 | 0 |
| Total lines: | 133202 | 133202 | 0 |
| Branch coverage: | 10.5% | 10.5% | 0.0% |
| Covered branches: | 5638 | 5638 | 0 |
| Total branches: | 53419 | 53419 | 0 |
| Method coverage: | Feature is only available for sponsors |
Hi @Tabaie I made a release of the decompressor lib from this branch and created a basic test but it fails with error.
Maybe I am initializing the decompressor wrongly. Please take a take a look at the test. You can run them with
./gradlew jvm-libs:blob-decompressor:test
Error looking up function 'Error': dlsym(0x8b047c60, Error): symbol not found
java.lang.UnsatisfiedLinkError: Error looking up function 'Error': dlsym(0x8b047c60, Error): symbol not found
at com.sun.jna.Function.<init>(Function.java:255)
~@jpnovais the Kotlin side is probably all wrong. I was hoping to hammer that part out together with yourself or @gauravahuja.~
^ seems like you've already done all that. I'll take a look today or tomorrow. 👍
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.28%. Comparing base (
9fc7fa6) to head (a81ee48). Report is 4 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #31 +/- ##
============================================
- Coverage 70.69% 70.28% -0.42%
+ Complexity 1059 1038 -21
============================================
Files 291 282 -9
Lines 11972 11244 -728
Branches 1106 1077 -29
============================================
- Hits 8464 7903 -561
+ Misses 3031 2875 -156
+ Partials 477 466 -11
| Flag | Coverage Δ | *Carryforward flag | |
|---|---|---|---|
| hardhat | 98.69% <ø> (ø) |
||
| kotlin | 67.75% <ø> (-0.62%) |
:arrow_down: | Carriedforward from 5927923 |
*This pull request uses carry forward flags. Click here to find out more.
Closed in favor of https://github.com/Consensys/linea-monorepo/pull/229 due to merge conflicts