Skip to content

Conversation

@letypequividelespoubelles
Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles commented Nov 13, 2025

Note

Decouples EUC from Wcp, simplifies Gas invocation, refines EXP constants, refactors StpCall, adds an EXP duplicate test, and bumps the release version.

  • Core modules:
    • EUC: Remove Wcp dependency; instantiate via new Euc() in ZkCounter/Hub; drop wcp.callLT and simplify callEUC; trim dividend/divisor in EucOperation.
    • Gas: Simplify API to call(Hub, CommonFragmentValues); internally create GasParameters; update trigger in CommonFragmentValues.
  • EXP:
    • Use WORD_SIZE for cutoffs in ExpOperation (replacing hardcoded 32).
  • Hub/IMC:
    • StpCall: refactor to use opCodeData.mnemonic() and pass frame/opCode to helpers; minor cleanups.
  • Counters/Init:
    • ZkCounter: construct Euc without Wcp.
  • Tests:
    • Add ExpTest.testExpLogDuplicate.
  • Build:
    • Bump releaseVersion in gradle.properties.

Written by Cursor Bugbot for commit 564f95d. This will update automatically on new commits. Configure here.

@letypequividelespoubelles letypequividelespoubelles linked an issue Nov 13, 2025 that may be closed by this pull request
@letypequividelespoubelles letypequividelespoubelles marked this pull request as ready for review November 14, 2025 05:56
Signed-off-by: F Bojarski <[email protected]>
this.dividend = dividend;
this.divisor = divisorTrim;
this.dividend = dividend.trimLeadingZeros();
this.divisor = divisorTrim.trimLeadingZeros();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Optimize Divisor Field Trimming

The divisor field is trimmed twice: divisorTrim already contains the result of divisor.trimLeadingZeros() from line 38, so calling trimLeadingZeros() again on it is redundant. The assignment should be this.divisor = divisorTrim; to match the original behavior and avoid unnecessary computation.

Fix in Cursor Fix in Web

Signed-off-by: F Bojarski <[email protected]>
@letypequividelespoubelles letypequividelespoubelles changed the title clean: no duplicate for exp and cleaning clean: some cleaning in GAS, EUC, EXP Nov 14, 2025
this.dividend = dividend;
this.divisor = divisorTrim;
this.dividend = dividend.trimLeadingZeros();
this.divisor = divisorTrim.trimLeadingZeros();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Unnecessary Trimming Impacts Performance

The divisor field is trimmed twice: once when creating divisorTrim at line 38, then again when assigning to this.divisor. This redundant operation wastes CPU cycles. The assignment should be this.divisor = divisorTrim; to match the pattern used for quotient at line 43.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: check no duplicates in stp / gas / exp

2 participants