Consensys / corset

4 stars 10 forks source link

`corset inspect` display `:display :bytes` in little endian order #112

Closed letypequividelespoubelles closed 1 month ago

letypequividelespoubelles commented 1 month ago

I think it's just a display issue, but quite annoying while debugging. In the following screenshot, INPUT_1_{98} = LIMB_{98}, corset check accepts the trace. image Columns are defined as follows:

(INPUT :i128 :display :bytes :array [2])
(LIMB :i128)
(ACC :i128 :display :bytes :array [2])

INPUT_1 and ACC_1 display bytes in wrong order

DavePearce commented 1 month ago

Ok, that looks pretty straightforward to fix.

DavePearce commented 1 month ago

Ok, minimal test case:

(module bytes)
(defcolumns (BS :i32 :display :bytes))

Along with trace data:

{"bytes": { "BS": [1,2,256,257,65536] } }

And command to recreate:

corset inspect --trace bytes.trace bytes.lisp
DavePearce commented 1 month ago

Ok, the fix for this is merged into master.