Skip to content

Conversation

@DavePearce
Copy link
Collaborator

@DavePearce DavePearce commented Nov 11, 2025

NOTE: resolution required on which version of blobbasefee-value should be kept.


Note

Bumps go-corset to v1.1.27, consolidates blobbasefee constraints, renames/clarifies multiple BLS/RLP constraints, tweaks logdata range-check signature, renames an MXP lookup, fixes a width in STP, and refactors bit_sar/bit_shr implementations.

  • CI:
    • Bump go-corset to v1.1.27 in .github/workflows/check.yml.
  • Blockdata (blobbasefee):
    • Remove blobbasefee-value from cancun/.../common.lisp; keep explicit value constraint in .../linea.lisp.
    • Keep blobbasefee-bound and minor formatting cleanup.
  • BLS Data (Cancun & Prague):
    • Rename/namespace several constraints for clarity: stamp-constancy-address-sum, vanishing-values-ct, vanishing-values-index, index-constancy-index-max, counter-constancy-first-and-second, index-constancy-phase.
  • Logdata:
    • Update normalized-SIZE_LIMB signature to (:i5 :force).
  • MXP:
    • Rename lookup hub-into-instdecoder -> mxp-into-instdecoder.
  • RLP:
    • rlptxn: rename transaction constancy to transaction-constancies-requires-evm.
    • rlputils: rename property to ct-max-is-ct-constant; fix bytes32 constraints naming (byte32--...) and minor formatting.
  • STP:
    • Fix temp width in min256_64: tmp1 u257 -> u256.
  • Utils (bit ops):
    • Refactor bit_sar256* and bit_shr256*: remove redundant temps, inline constructions, and adjust workaround decompositions.

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

This puts through two fixes needed for go-corset v1.2.0.  This is a
preparatory step to simplify integration later on.
In several places, there were duplicate constraint handles.  These have
now been modified to better reflect their differences.
@DavePearce DavePearce linked an issue Nov 11, 2025 that may be closed by this pull request
(defconst (BLOB_BASE_FEE_ENABLE :binary :extern) 1)

(defconstraint blobbasefee-value
(defconstraint blobbasefee-value2
Copy link
Collaborator Author

@DavePearce DavePearce Nov 11, 2025

Choose a reason for hiding this comment

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

Need to decide which of the two constraints we actually want (i.e. this one or the very similar one in common.lisp)

The bit_shr and bit_sar utility functions were not able to compile on
the KOALABEAR_16 fields due a known existing issue with the zkasm
register splitting algorithm.  Previously, a workaround was used which
worked only for the BLS12_377 field.  However, a workaround has now been
developed which works for both BLS12_377 and KOALABEAR_16.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun (normalized-SIZE_LIMB)
(defun ((normalized-SIZE_LIMB :i5 :force))
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

;; compute minimum of two values of different widths
fn min256_64(gas u256, L_gas_diff u64) -> (res u64) {
var tmp1 u257
var tmp1 u256
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't remember why it was a u257 ?

sign, msw, lsw = word
nword = (sign*0x1ffffffffffffffffffffffffffffffff*2^127)+msw
res = bit_sar256_u7(nword,m)
res = bit_sar256_u7((sign*0x1ffffffffffffffffffffffffffffffff*2^127)+msw, m)
Copy link
Collaborator

Choose a reason for hiding this comment

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

it just does the same, but without an explicit column with intermediate result right ? Can we do this thanks to a corset new feature ?

;;
sign, hi, lo, b = word
;;
res = (sign*0b11*2^254) + (hi * 2^7) + lo
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this change here ?

(defconst (BLOB_BASE_FEE_ENABLE :binary :extern) 1)

(defconstraint blobbasefee-value
(defconstraint blobbasefee-value2
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would name blobasefee-prod and blobbasefee-referencetests instead

There was a duplicate of this constraint which was not conditional on
the `BLOB_BASE_FEE_ENABLE` constant.  As such, it should have been
removed before.
Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles left a comment

Choose a reason for hiding this comment

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

LGTM

@DavePearce DavePearce merged commit bfe9b12 into master Nov 12, 2025
8 checks passed
@DavePearce DavePearce deleted the 824-feat-update-to-go-corset-version-v1127 branch November 12, 2025 06:27
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.

feat: update to go-corset version v1.1.27

3 participants