Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: abstract codec versions into common interfaces (#25)
* feat: support conditional encode * move append conditionalEncode flag after validity check * update da-codec * align naming * add ConvertBlobToBlobBytes utility functions * kept blob bytes * rename enableEncode to enableCompress * refactor: move some common functions to encoding (#24) * refactor: move some common functions to encoding * fix golint * move symbol replace script to zstd folder * refactor: move some util functions to public package * fix CI * add interfaces of codec * add SetCompression * move interface to encoding * refactor * add dablock.go * add dachunk.go * add dabatch.go * move computeBatchDataHash to codecv * fix * add DABatchBase * add GetCodecVersion * add BlobVersionedHashes * rename encoding.go to interfaces.go * add NewDABatchWithExpectedBlobVersionedHashes * tweak * fix a bug * add more logs * add DecodeDAChunks * add BlockRange interface * fix * add version check * add Version * remove DABatchBase * add DABlock * fixes * fix * add CodecFromVersion and CodecFromConfig * remove GetCodecVersion * fix typos * make Block fields internal * make chunk fields internal * make batch fields internal and add some tweaks * add JSONFromBytes * fix a typo * use register mode * fix CI * remove register mode * add common functions * add EstimateBlockL1CommitCalldataSize * add dabatch interfaces * update interface implementations * add data hash * fix codecv3 & codecv4 estimate gas * fix * fix bugs * tweak * add CheckChunkCompressedDataCompatibility & CheckBatchCompressedDataCompatibility * fix * add BlobDataProofForPointEvaluation * add nil check in NewDAChunk * make some util functions internal * remove GetMaxChunksPerBatch * fix CI * change receiver mark from o to d * remove SetCompression * fix * add GetChunkEnableCompression & GetBatchEnableCompression * fix * update l2geth dependency * make types internal * embed codecv0 <- codecv1 <- codecv2 <- codecv3 <- codecv4 * remove dablock.go dachunk.go dabatch.go * trigger ci * tweak * tweaks * add back TxsToTxsData * fix * fix * fix * fix * fix * fix * tweak * add back test block encode and test chunk encode unit tests * replace some constants with meaningful vars * rename daBatchV2 to daBatchV3 * add chunk hash unit tests * add batch encode * add batch hash unit tests * add batch data hash & json marshal unit tests * add calldata size unit tests * add commit gas estimation * add BatchSizeAndBlobSizeEstimation unit tests * add L1MessagePopped unit tests * add BlobEncodingAndHashing unit tests * add blob data proof unit tests * add TestDecodeBitmap * add BlobCompressDecompress unit tests * tweaks and bug fixes * fix goimport * add StandardTestCases * edge cases * fixes * address ai's comments * address ai's comments * address ai's comments * address comments * address ai's comment * remove some constants * address comments * add more logs * address comments * address comments * address comments * address comments * add simple and nil functions unit tests * add uncompressed case unit tests of DecodeTxsFromBlob * add interface unit tests * add codecv2 & codecv3 CompressedDataCompatibilityCheck unit tests * remove mock flag * add JSONFromBytes unit tests * add codecv4 CompressedDataCompatibilityCheck unit tests * add NewDABatchFromBytes unit tests * fix golint * tweaks
- Loading branch information