kleros-v2 icon indicating copy to clipboard operation
kleros-v2 copied to clipboard

feat: SSQ

Open jaybuidl opened this issue 3 years ago • 6 comments

Serialization scheme supporting simple binary fields of variable length.


PR-Codex overview

Focus of this PR:

This PR introduces the SSQ library for serialization and deserialization of data. It also updates the KlerosCore contract to use the SSQ library for reducing L1 calldata costs on Optimistic Rollups.

Detailed summary:

  • Added SSQ library for serialization and deserialization of data.
  • Updated KlerosCore contract to use the SSQ library for reducing L1 calldata costs on Optimistic Rollups.
  • Added new functions setStake and createDispute that use serialized arguments with SSQ library.

The following files were skipped due to too many changes: contracts/src/libraries/SSQ.sol, contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

jaybuidl avatar Mar 16 '22 23:03 jaybuidl

SSQ compression could be made obsolete by Arbitrum Nitro, to check. https://offchain.medium.com/its-nitro-time-86944693bf29

jaybuidl avatar Apr 07 '22 21:04 jaybuidl

Code Climate has analyzed commit 81bfe94c and detected 0 issues on this pull request.

View more on Code Climate.

qlty-cloud-legacy[bot] avatar Apr 15 '22 15:04 qlty-cloud-legacy[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Jun 01 '22 10:06 sonarqubecloud[bot]

nitro will have native call data compressions, so SSQ seems like it won't be needed. It's still unclear how compressed calldata with be priced, see here.

Just clarifying this feature is low priority.

shotaronowhere avatar Jun 11 '22 12:06 shotaronowhere

Yes, let's see what the potential gains look like once Nitro is out of DevNet.

jaybuidl avatar Jun 13 '22 16:06 jaybuidl

Deploy Preview for kleros-v2 failed.

Name Link
Latest commit a93922efdbf7464a177fe4c148bf3554bbb08b5f
Latest deploy log https://app.netlify.com/sites/kleros-v2/deploys/65ba97392e2e1d0008e5999a

netlify[bot] avatar Jan 30 '24 17:01 netlify[bot]